public ActionResult Edit() { var mappedTechnologies = _userTechnologyMapRepository.GetAllBy(m => m.UserId == WebUser.Id).Select(m => m.TechnologyId).ToList(); var mappedSkills = _userSkillRepository.GetAllBy(m => m.UserId == WebUser.Id).Select(m => m.SkillId).ToList(); var mappedHobbies = _userHobbyRepository.GetAllBy(m => m.UserId == WebUser.Id).Select(m => m.HobbyId).ToList(); var mappedCertifications = _userCertificationRepository.GetAllBy(m => m.UserId == WebUser.Id).Select(m => m.CertificationId).ToList(); ViewBag.Technologies = new MultiSelectList(_technologyRepository.GetAll(), "Id", "Title", mappedTechnologies); ViewBag.Skills = new MultiSelectList(_skillRepository.GetAll(), "Id", "Title", mappedSkills); ViewBag.Hobbies = new MultiSelectList(_hobbyRepository.GetAll(), "Id", "Title", mappedHobbies); ViewBag.Certifications = new MultiSelectList(_certificationRepository.GetAll(), "Id", "Title", mappedCertifications); var selectedUser = _userRepository.GetBy(u => u.Id == WebUser.Id, "Person"); var vm = new EditUserViewModel(selectedUser); return(View(vm)); }
public ActionResult Edit(int id) { var user = _userRepository.Get(id, "Person"); if (user == null) { return(HttpNotFound()); } var mappedRoles = _roleMemberRepository.GetAllBy(m => m.UserId == user.Id) .Select(m => m.RoleId) .ToList(); var mappedTechnologies = _userTechnologyMapRepository.GetAllBy(m => m.UserId == user.Id) .Select(m => m.TechnologyId) .ToList(); var mappedSkills = _userSkillRepository.GetAllBy(m => m.UserId == user.Id) .Select(m => m.SkillId) .ToList(); var mappedHobbies = _userHobbyRepository.GetAllBy(m => m.UserId == user.Id) .Select(m => m.HobbyId) .ToList(); var mappedCertifications = _userCertificationRepository.GetAllBy(m => m.UserId == user.Id) .Select(m => m.CertificationId) .ToList(); ViewBag.Roles = new MultiSelectList(_roleRepository.GetAll(), "Id", "Name", mappedRoles); ViewBag.Technologies = new MultiSelectList(_technologyRepository.GetAll(), "Id", "Title", mappedTechnologies); ViewBag.Skills = new MultiSelectList(_skillRepository.GetAll(), "Id", "Title", mappedSkills); ViewBag.Hobbies = new MultiSelectList(_hobbyRepository.GetAll(), "Id", "Title", mappedHobbies); ViewBag.Certifications = new MultiSelectList(_certificationRepository.GetAll(), "Id", "Title", mappedCertifications); ViewBag.DepartmentId = new SelectList(_departmentRepository.GetAll(), "Id", "Title", user.DepartmentId); ViewBag.DesignationId = new SelectList(_designationRepository.GetAllBy(d => d.DepartmentId == user.DepartmentId), "Id", "Title", user.DesignationId); ViewBag.LocationId = new SelectList(_locationRepository.GetAll(), "Id", "Title", user.LocationId); ViewBag.ReportingPersonId = new SelectList(_userRepository.GetAllBy(u => u.EmployeeStatus != EmployeeStatus.Ex && u.Id != 1, "Person"), "Id", "Person.Name", user.ReportingPersonId); ViewBag.ManagerId = new SelectList(_userRepository.GetAllBy(u => u.EmployeeStatus != EmployeeStatus.Ex && u.Id != 1, "Person"), "Id", "Person.Name", user.ManagerId); ViewBag.ShiftId = new SelectList(_shiftRepository.GetAll(), "Id", "Title", user.ShiftId); var vm = new EditUserViewModel(user); return(View(vm)); }
public DLModel.Certification GetCertificationAll(int _organizationID) { return(_certificationRepository.GetAll(rk => rk.OrganizationID == _organizationID).Select(acc => new DLModel.Certification().InjectFrom(acc)).Cast <DLModel.Certification>().SingleOrDefault()); }
public ActionResult Index() { var certifications = _certificationRepository.GetAll(s => s.OrderBy(c => c.Title)).ToList(); return(View(certifications)); }
// GET: CertificationController public ActionResult Index() { ViewBag.CategorieID = new SelectList(categorieRepository.GetAll(), "CategorielID", "CategorieName"); return(View(certificationRepository.GetAll())); }
public JsonResult Index() { var apiResult = TryExecute(() => _certificationRepository.GetAll(), "Certifications Fetched sucessfully"); return(Json(apiResult, JsonRequestBehavior.AllowGet)); }
public List <CertificationDto> GetAll(int pageSize = -1, int pageNo = -1) { return(repo.GetAll(pageSize, pageNo).ToList()); }