Example #1
0
        private void b_Click(object sender, EventArgs e)
        {
            AlumnoBL mPBL;

            switch (TipoOperacion)
            {
            case Constantes.TiposOperacion.Alta:
                AlumnoAEditar = new Alumno();
                ValorizarEntidad(AlumnoAEditar);
                mPBL = new AlumnoBL();
                mPBL.Guardar(AlumnoAEditar);
                this.Close();
                break;

            case Constantes.TiposOperacion.Modificacion:
                ValorizarEntidad(AlumnoAEditar);
                mPBL = new AlumnoBL();
                mPBL.Guardar(AlumnoAEditar);
                this.Close();
                break;

            case Constantes.TiposOperacion.Baja:
                mPBL = new AlumnoBL();
                mPBL.Eliminar(AlumnoAEditar);
                this.Close();
                break;
            }
        }
Example #2
0
        public ActionResult Eliminar(int id)
        {
            var r = alumnoBL.Eliminar(id);

            if (!r)
            {
                ViewBag.Mensaje = "Ocurrio un error inesperado";
                return(View("~/Views/Shared/_Mensaje.cshtml"));
            }
            return(RedirectToAction("../"));
        }
        public IHttpActionResult Eliminar(int id)
        {
            var result = objAlumnoBL.Eliminar(id);

            return(Ok(result));
        }
Example #4
0
 public void Eliminar()
 {
     var response = objAlumnoBL.Eliminar(1);
     Assert.AreEqual(response, true);
 }