// GET: Perfiles/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } var obj = PerfilesDAL.ConsultarPerfil(id.Value); if (obj == null) { return(HttpNotFound()); } else { return(View(obj)); } }
// GET: Perfiles/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } var rol = PerfilesDAL.ConsultarPerfil(id.Value); SelectList ListadoMenu = new SelectList(MenuDAL.ListadoMeruHijos(), "Value", "Text"); ViewBag.listadoMenu = ListadoMenu; var opcionesMenu = PerfilesDAL.ListadoPerfilMenu(id.Value); ViewBag.idsPerfilesOpcionesMenu = opcionesMenu; if (rol == null) { return(HttpNotFound()); } return(View(rol)); }