public IViewComponentResult Invoke(TbSeUsuario model) { ViewData["avatares"] = Avatars(); var viewModel = _userMap.DomainToViewModelSingle(model); return(View(viewModel)); }
public ActionResult EditarUsuario(int id) { var model = userService.GetSingleUser(id); ViewBag.id = id; var modelView = userMap.DomainToViewModelSingle(model); return(View(modelView)); }
public ActionResult CuentaUsuario(string codigo) { var model = userService.GetUsuarioConPerfiles(codigo); var asignados = new List <TbSePerfil>(); foreach (var item in model.TbSePerfilUsuario) { asignados.Add(item.IdPerfilNavigation); } var perfiles = perfilService.GetAll(); var sinAsignar = new List <TbSePerfil>(); foreach (var item in perfiles) { var flag = false; foreach (var i in asignados) { if (item.Id == i.Id) { flag = true; break; } } if (!flag) { sinAsignar.Add(item); } } ViewData["Asignados"] = asignados; ViewData["SinAsignar"] = sinAsignar; ViewBag.EsAdmin = soyAdmin(); return(View(userMap.DomainToViewModelSingle(model))); }