public async Task <PartialViewResult> CreateOrEditSalaryCompunentModal(int?id, int employeeId) { var output = new SalaryDto(); if (id != null) { output = _employeeService.GetSalary(new GetSalaryInput { SalaryId = id.Value }); } var viewModel = new CreateOrEditSalaryModel(output, id == null || id == 0); ViewBag.EmployeeId = employeeId; ViewBag.SalaryComponentId = new SelectList(_configurationService.GetSalaryCompunents().Items, "Id", "Name", output.SalaryComponentId); ViewBag.PayGradeId = new SelectList(_jobConfigurationService.GetPayGrades().Items, "Id", "Name", output.PayGradeId); ViewBag.PayFrequencyId = new SelectList(_configurationService.GetPayFrequencies().Items, "Id", "Name", output.PayFrequencyId); ViewBag.CurrencyId = new SelectList(_configurationService.GetCurrencies().Items, "Id", "Name", output.CurrencyId); return(PartialView("EmployeeDetail/Salary/_CreateOrEditSalaryModal", viewModel)); }