// 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)));
     }
 }
Example #2
0
        // 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));
        }
Example #3
0
 // GET: PropietarioController/Create
 public ActionResult Create()
 {
     ViewBag.items = repositorioTipoPersona.getAll();
     return(View());
 }