Example #1
0
        public void Eliminar()
        {
            RepositorioBaseBLL <Estudiantes> repositorioBaseBLL = new RepositorioBaseBLL <Estudiantes>();
            Estudiantes estudiantes = new Estudiantes();

            Assert.IsTrue(repositorioBaseBLL.Eliminar(1));
        }
        private void Eliminarbutton_Click(object sender, EventArgs e)
        {
            int id;

            id = (int)IdnumericUpDown.Value;
            RepositorioBaseBLL <Asignaturas> repositorio = new RepositorioBaseBLL <Asignaturas>();

            try
            {
                if (repositorio.Eliminar(id))
                {
                    MessageBox.Show("Eliminado con existo");
                    Limpiar();
                }
            }catch
            {
                MessageBox.Show("No se pudo eliminar");
            }
        }
Example #3
0
        private void Eliminarbutton_Click(object sender, EventArgs e)
        {
            int id;

            id = (int)IdEstudiantenumericUpDown.Value;
            Limpiar();
            try
            {
                RepositorioBaseBLL <Estudiantes> repositorio = new RepositorioBaseBLL <Estudiantes>();

                Estudiantes estudiantes = new Estudiantes();

                if (repositorio.Eliminar(1))
                {
                    MessageBox.Show("Eliminado correctamente");
                }
            }catch
            {
                MessageBox.Show("El estudiante no existe");
            }
        }