// GET: CompromisoPago/Create public ActionResult Create() { LOGICA.LFase ob = new LOGICA.LFase(); var obj = new ENTIDADES.Usuario(); ViewBag.IdFase = new SelectList(ob.getImtesAll(), "ID", "Descripcion"); var perfils = LPerfil.allPerfils(); ViewBag.IdPerfil = new SelectList(perfils, "ID", "Nombre"); return(PartialView("_Create", obj)); }
public ActionResult Edit(int id) { LOGICA.LFase ob = new LOGICA.LFase(); var list = LUsuario.toListaUsuario(); var obj = list.Where(x => x.ID == id).FirstOrDefault(); int select = obj.IdFase == null ? 1 : obj.IdFase; ViewBag.IdFase = new SelectList(ob.getImtesAll(), "ID", "Descripcion", select); if (obj != null) { return(PartialView("_Edit", obj)); } return(View()); }