public ActionResult Search() { var list = cpermisos.Mostrar(); if (list == null) { return(RedirectToAction("Create")); } ; return(View(list)); }
public ActionResult Create() { //cargado en el View var roles = cRoles.Mostrar(); ViewBag.ddlRoles = new SelectList(roles, "IDRol", "nombre"); var permisos = cPermisos.Mostrar(); ViewBag.ddlPermisos = new SelectList(permisos, "IDPermiso", "nombre"); return(View()); }