// GET: UsuarioController/Create public ActionResult Create() { try { ViewBag.TiposPersona = repositorioTipoPersona.getAll(); ViewBag.Roles = Persona.ObtenerRoles(); return(View()); } catch (Exception ex) { TempData["Error"] = "Ocurrio un error." + ex.ToString(); return(RedirectToAction(nameof(Index))); } }
// GET: TipoPersonaController public ActionResult Index() { ViewData["Error"] = TempData["Error"]; ViewData["Warning"] = TempData["Warning"]; ViewData["Success"] = TempData["Success"]; var lista = repositorio.getAll(); ViewData[nameof(TipoPersona)] = lista; ViewData["Title"] = nameof(TipoPersona); return(View(lista)); }
// GET: PropietarioController/Create public ActionResult Create() { ViewBag.items = repositorioTipoPersona.getAll(); return(View()); }