public ActionResult DeleteConfirmed(int id) { Matricula matricula = MatriculaBLL.Get(id); MatriculaBLL.Delete(id); return(RedirectToAction("Index")); }
// GET: Matriculas/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Matricula matricula = MatriculaBLL.Get(id); if (matricula == null) { return(HttpNotFound()); } return(View(matricula)); }
// GET: matriculas/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } matricula matricula = MatriculaBLL.Get(id); if (matricula == null) { return(HttpNotFound()); } ViewBag.idarea = new SelectList(AreaBLL.List(), "idarea", "nombre", matricula.idalumno); return(View(matricula)); }
// GET: Matriculas/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Matricula matricula = MatriculaBLL.Get(id); if (matricula == null) { return(HttpNotFound()); } ViewBag.idalumno = new SelectList(AlumnoBLL.ListToNames(), "idalumno", "nombres", matricula.idalumno); ViewBag.idmateria = new SelectList(MateriaBLL.ListToNames(), "idmateria", "nombre", matricula.idmateria); return(View(matricula)); }
// GET: Matriculas/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Matricula matricula = MatriculaBLL.Get(id); if (matricula == null) { return(HttpNotFound()); } MatriculaBLL.TransforEnum(matricula); ViewBag.tipo = new SelectList(MatriculaBLL.ListEnum("tipo"), matricula.tipo); ViewBag.estado = new SelectList(MatriculaBLL.ListEnum("estado"), matricula.estado); ViewBag.idalumno = new SelectList(AlumnoBLL.List(), "idalumno", "nombres", matricula.idalumno); ViewBag.idmateria = new SelectList(MateriaBLL.List(), "idmateria", "nombre", matricula.idmateria); return(View(matricula)); }