Пример #1
0
        public EditFinancialInformationForEmployeeViewModel GetFinancialInformationForEdit(int?id)
        {
            var employee = _employeeRepository.GetById(id);

            var model = new EditFinancialInformationForEmployeeViewModel
            {
                Id                 = employee.FinancialInformation.Id,
                EmployeeId         = employee.Id,
                Salary             = employee.FinancialInformation.Salary,
                NextSalaryIncrease = employee.FinancialInformation.NextSalaryIncrease,
                AccountNumber      = employee.FinancialInformation.AccountNumber,
                Bank               = employee.FinancialInformation.Bank
            };

            return(model);
        }
 public ActionResult EditFinancialInformation(EditFinancialInformationForEmployeeViewModel input)
 {
     _employeeService.EditFinancialInformation(input.Id, input.Salary, input.NextSalaryIncrease, input.AccountNumber, input.Bank);
     return(RedirectToAction("Index"));
 }