public async Task <ActionResult> Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } var obj = RolDAL.ConsultarRol(id.Value); if (obj == null) { return(HttpNotFound()); } else { return(View(obj)); } }
public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } var rol = RolDAL.ConsultarRol(id.Value); ViewBag.idsPerfilesRol = RolDAL.ListadoRolPerfil(id.Value); SelectList perfiles = new SelectList(PerfilesDAL.ListadoPerfil(), "Value", "Text"); ViewBag.idsPerfiles = perfiles; if (rol == null) { return(HttpNotFound()); } return(View(rol)); }