public ActionResult Create() { SelectList Listado = new SelectList(PerfilesDAL.ListadoPerfil(), "Value", "Text"); ViewBag.idsPerfiles = Listado; return(View()); }
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)); }