private void OnSave() { var updatedEmployees = ManagedEmployees .Where(x => x.EditStatus == EditStatus.Modified) .Select(x => x.Commit()) .ToList(); var newEmployees = ManagedEmployees .Where(x => x.EditStatus == EditStatus.New) .Select(x => x.Commit()) .ToList(); _humanResourcesService.ModifyManagedEmployees(updatedEmployees, newEmployees); ManagedEmployees.Clear(); LoadManagedEmployees(); IsReadOnly = true; }
public void ModifyManagedEmployees(IList <ManagedEmployee> updatedEmployees, IList <ManagedEmployee> newEmployees) => _humanResourcesService.ModifyManagedEmployees(updatedEmployees, newEmployees);