示例#1
0
        public ActionResult RegistroAgente(UsuarioViewModel user)
        {
            var userlog = auth.GetLogedUser();

            if (userlog.TipoUsuario == "ADMINISTRADOR")
            {
                val.validarUsuario(user, ModelState);
                if (ModelState.IsValid)
                {
                    UserServ.AddUsuarioAgente(user);
                    return(RedirectToAction("Index", "Home"));
                }
                return(View(user));
            }
            return(RedirectToAction("Index", "Home"));
        }