public EmployeeViewModel EditAccountInformation(InfomationViewModel info) { var employee = GetViewModel(info.Id); var editEmployee = new EmployeeViewModel() { Id = employee.Id, Password = employee.Password, UserName = employee.UserName, EmployeeName = employee.EmployeeName, Address = info.Address, Email = info.Email, Phone = info.Phone, DateOfBirth = info.DateOfBirth, HireDay = info.HireDay, UnitId = employee.UnitId, PositionId = employee.PositionId, BasicSalary = employee.BasicSalary, Coefficient = employee.Coefficient }; try { UpdateViewModel(editEmployee); return(editEmployee); } catch (Exception e) { _logger.LogError(e.Message); } return(editEmployee); }
public EmployeeViewModel EditAccountInformation([FromBody] InfomationViewModel info) { var info1 = _employeeService.EditAccountInformation(info); return(info1); }