public IActionResult EditEmployee(int id) { int companyId = (int)CurrentUser.CompanyID; ViewBag.AccessType = new SelectList(accessTypeService.getAll(), "Id", "AccessTypeName"); ViewBag.BankAccountType = new SelectList(bankAccountTypeService.getAll(), "Id", "BankAccountTypeName"); ViewBag.BloodGroup = new SelectList(bloodGroupService.getAll(), "Id", "BloodKind"); ViewBag.City = new SelectList(cityService.getAll(), "Id", "Name"); ViewBag.ContractType = new SelectList(contractType.getAll(), "Id", "ContractName"); ViewBag.Country = new SelectList(countryService.getAll(), "Id", "CountryName"); ViewBag.Disability = new SelectList(disabilitySituationService.getAll(), "Id", "DisabilityName"); ViewBag.EducationLevel = new SelectList(educationLevelService.getAll(), "Id", "EducationLevelName"); ViewBag.EducationStatus = new SelectList(educationStatusService.getAll(), "Id", "StatusName"); ViewBag.EmploymentType = new SelectList(employmentTypeService.getAll(), "Id", "EmploymentTypeName"); ViewBag.Gender = new SelectList(genderService.getAll(), "Id", "GenderName"); ViewBag.MaritalStatus = new SelectList(maritalStatusService.getAll(), "Id", "StatusName"); ViewBag.Companies = new SelectList(companyService.getAll(companyId), "Id", "CompanyName"); ViewBag.CompanyBranchs = new SelectList(companyBranchService.getSelectByCompanyId(companyId), "Id", "BranchName"); ViewBag.CompanyDepartments = new SelectList(companyDepartmentService.getSelectByCompanyId(companyId), "Id", "Name"); EmployeeModel model = new EmployeeModel(); //TODO:employeePosition düzelt model.Employee = service.getEmployee(id); if (model.Employee.EmployeePositions.Count != 0) { model.Employee.EmployeePositions[0].Position = positionService.getPositions(id); } //model.Employee.EmployeePositions = positionService.getEmployeePosition(id); var empDetail = employeeDetailService.getEmployeeDetail(id); var empOtherInfo = employeeOtherInfoService.getEmployeeOtherInfo(id); if (empDetail == null) { model.EmployeeDetail = new EmployeeDetailDTO(); } else { model.EmployeeDetail = empDetail; } if (empOtherInfo == null) { model.EmployeeOtherInfo = new EmployeeOtherInfoDTO(); } else { model.EmployeeOtherInfo = empOtherInfo; } //kullanıcının detayı ve update işlemi return(View(model)); }
public IViewComponentResult Invoke() { return(View(educationLevelService.getAll())); }
public HttpResponseMessage Get() { List <EducationLevelDTO> accessTypelist = service.getAll(); return(Request.CreateResponse(HttpStatusCode.OK, accessTypelist)); }