public List <Object> GetProfilsAndUsers() { ProfilService service = ApplicationManager.Instance.ControllerFactory.ServiceFactory.GetProfilService(); List <Domain.Profil> profils = service.getAll(); UserService userservice = ApplicationManager.Instance.ControllerFactory.ServiceFactory.GetUserService(); List <Domain.User> users = userservice.getAll(); List <Object> items = new List <object>(profils); items.AddRange(users); return(items); }
/// <summary> /// Gets ProfilService /// </summary> public ProfilService GetProfilService() { if (profilService == null) { profilService = new ProfilService(); profilService.ResourcePath = AdministrationResourcePath.SECURITY_PROFIL_RESOURCE_PATH; profilService.GroupService = GetGroupService(); configureService(profilService); } return(profilService); }
public ActionResult ProfilDetails() { ProfilService ps = new ProfilService(); user u = ps.GetById(User.Identity.GetUserId()); profilModel p = new profilModel { firstName = u.firstName, lastName = u.lastName, adress = u.adress, email = u.Email, age = u.age, file = u.file, }; return(View(p)); }
// GET: Event/Edit/5 public ActionResult Edit() { ProfilService c = new ProfilService(); user u = c.GetById(User.Identity.GetUserId()); profilModel pm = new profilModel { firstName = u.firstName, lastName = u.lastName, adress = u.adress, email = u.Email, age = u.age, file = u.file, }; return(View(pm)); }
public ActionResult Edit(profilModel E) { ProfilService c = new ProfilService(); if (!ModelState.IsValid) { RedirectToAction("Edit"); } user user = c.GetById(User.Identity.GetUserId()); user.firstName = E.firstName; user.lastName = E.lastName; user.adress = E.adress; user.Email = E.email; user.age = E.age; user.file = E.file; c.Update(user); c.Commit(); return(RedirectToAction("Index")); }
public void InitService(UserService userServic) { profilService = userServic.ProfilService; roleService = userServic.RoleService; userService = userServic; }