public ActionResult Eliminar(Materia materia) { if (MateriaBusiness.EliminarMateria(materia)) { return(RedirectToAction("Materias", "Administrador")); } return(View(materia)); }
public ActionResult Editar(Materia materia) { if (ModelState.IsValid) { if (MateriaBusiness.ActualizarMateria(materia)) { return(RedirectToAction("Materias", "Administrador")); } } ViewData["profesorLista"] = new SelectList(ProfesorBusiness.ObtieneListaProfesor(), "Id", "Apellido"); return(View("~/Views/Materia/Editar.cshtml", materia)); }
public ActionResult Materias() { return(View(MateriaBusiness.ObtenerListaMaterias().OrderBy(m => m.Nombre))); }
public ActionResult Detalles(int id) { return(View("~/Views/Alumno/Detalles.cshtml", MateriaBusiness.ObtenerMateria(id))); }
/// Devuelve como modelo lista de materias ordenadas, para mostrar en el View public ActionResult Materias() { ViewData["error"] = TempData["error"]; return(View((MateriaBusiness.ObtenerListaMaterias()).OrderBy(m => m.Nombre))); }
public ActionResult Eliminar(int id) { return(View("~/Views/Materia/Eliminar.cshtml", MateriaBusiness.ObtenerMateria(id))); }
public ActionResult Editar(int id) { ViewData["profesorLista"] = new SelectList(ProfesorBusiness.ObtieneListaProfesor(), "Id", "Apellido"); return(View("~/Views/Materia/Editar.cshtml", MateriaBusiness.ObtenerMateria(id))); }