public ActionResult Create(int?candidateId) { ViewBag.CandidateId = new SelectList(_candidateRepository.GetAll(o => o.OrderByDescending(c => c.Id), "Person").Select(c => new { c.Id, Name = c.Person.Name + "- [" + c.Code + "]" }), "Id", "Name", candidateId); ViewBag.DesignationId = new SelectList(_designationRepository.GetAll(), "Id", "Title"); return(View()); }
public JsonResult Index() { var apiResult = TryExecute(() => { return(_designationRepository.GetAll().Select(d => new DesignationModel(d)).ToList()); }, "Designations Fetched sucessfully"); return(Json(apiResult, JsonRequestBehavior.AllowGet)); }
public EmployeeBaseData GetEmployeeData(int?employeeId) { EmployeeBaseData baseData = new EmployeeBaseData(); if (employeeId != null) { var empId = (int)employeeId; baseData.Employee = employeeRepository.Find(empId); baseData.EmployeePhoto = documentRepository.GetAllDocumentByRefId(empId, (int)DocumentType.EmployeePhoto).FirstOrDefault(); } baseData.Designation = designationRepository.GetAll(); baseData.Role = aspNetRoleRepository.GetAll(); return(baseData); }
/// <summary> /// Get Base Data /// </summary> /// <returns></returns> public EmployeeBaseResponse GetBaseData() { return(new EmployeeBaseResponse { EmpStatuses = empStatusRepository.GetAll(), Companies = companyRepository.GetAll(), JobTypes = jobTypeRepository.GetAll(), Departments = departmentRepository.GetAll(), DesigGrades = desigGradeRepository.GetAll(), WorkPlaces = workplaceRepository.GetAll(), Regions = regionRepository.GetAll(), Countries = countryRepository.GetAll(), SubRegions = subRegionRepository.GetAll(), Cities = cityRepository.GetAll(), Areas = areaRepository.GetAll(), PhoneTypes = phoneTypeRepository.GetAll(), LicenseTypes = licenseTypeRepository.GetAll(), Operations = operationRepository.GetAll(), OperationsWorkPlaces = operationsWorkPlaceRepository.GetAll(), Supervisors = employeeRepository.GetAll(), Designations = designationRepository.GetAll(), AddressTypes = addressTypeRepository.GetAll() }); }
/// <summary> /// Load all Designations /// </summary> public IEnumerable <Designation> LoadAll() { return(designationRepository.GetAll()); }
public IEnumerable <Designation> GetAllDesignations() { return(DesignationRepository.GetAll()); }
public ICollection <Designation> GetAll() { return(_designationRepository.GetAll()); }
public IEnumerable <Designation> GetAll() { var entities = repository.GetAll(); return(entities); }
public IActionResult Create() { ViewBag.DepartmentId = new SelectList(_departmentManager.GetAll(), "DepartmentId", "DepartmentName"); ViewBag.DesignationId = new SelectList(_designationRepository.GetAll(), "DesignationId", "DesignationName"); return(View()); }
public IEnumerable <Designation> GetDesignations() { return(Designation_repo.GetAll().OrderByDescending(a => a.DesignationId)); }
public IActionResult Search() { var designation = _designationRepository.GetAll(); return(View(designation)); }
public IEnumerable <Master_Designation> GetAll(Master_Designation obj, string[] param, string spName) { return(_designationRepository.GetAll(null, null, "")); }
public ActionResult Create(NewUserViewModel vm) { if (ModelState.IsValid) { var newUser = new User { EmployeeCode = vm.EmployeeCode, Username = vm.Username, Password = HashHelper.Hash(vm.Password), AccessRule = AccessRule.CreateNewUserAccessRule(true), Person = vm.Person, DepartmentId = vm.DepartmentId, LocationId = vm.LocationId, DesignationId = vm.DesignationId, ShiftId = vm.ShiftId, ReportingPersonId = vm.ReportingPersonId, ManagerId = vm.ManagerId, Experience = vm.Experience, DateOfJoin = vm.DateOfJoin, ConfirmationDate = vm.ConfirmationDate, DateOfResignation = vm.DateOfResignation, LastDate = vm.LastDate, OfficialEmail = vm.OfficialEmail, OfficialPhone = vm.OfficialPhone, OfficialMessengerId = vm.OfficialMessengerId, EmployeeStatus = vm.EmployeeStatus, RequiresTimeSheet = vm.RequiresTimeSheet, Salary = vm.Salary, Bank = vm.Bank, BankAccountNumber = vm.BankAccountNumber, PANCard = vm.PANCard, PaymentMode = vm.PaymentMode }; _userRepository.Create(newUser); _unitOfWork.Commit(); // Map the Technologies if (vm.TechnologyIds != null) { foreach (var technologyId in vm.TechnologyIds) { var newMap = new UserTechnologyMap { UserId = newUser.Id, TechnologyId = technologyId }; _userTechnologyMapRepository.Create(newMap); } _unitOfWork.Commit(); } return(RedirectToAction("Index")); } ViewBag.Roles = new MultiSelectList(_roleRepository.GetAll(), "Id", "Name", vm.RoleIds); ViewBag.Technologies = new MultiSelectList(_technologyRepository.GetAll(), "Id", "Title", vm.TechnologyIds); ViewBag.DepartmentId = new SelectList(_departmentRepository.GetAll(), "Id", "Title", vm.DepartmentId); ViewBag.DesignationId = new SelectList(_designationRepository.GetAll(), "Id", "Title", vm.DesignationId); ViewBag.LocationId = new SelectList(_locationRepository.GetAll(), "Id", "Title", vm.LocationId); ViewBag.ReportingPersonId = new SelectList(_userRepository.GetAll("Person"), "Id", "Person.Name", vm.ReportingPersonId); ViewBag.ManagerId = new SelectList(_userRepository.GetAll("Person"), "Id", "Person.Name", vm.ManagerId); ViewBag.ShiftId = new SelectList(_shiftRepository.GetAll(), "Id", "Title", vm.ShiftId); return(View(vm)); }