public void Click() { ActualEmployees.AddRange(AvailableEmployees.Where(x => x.IsSelected).ToList()); AvailableEmployees.RemoveRange(ActualEmployees); NotifyOfPropertyChange(() => AvailableEmployees); NotifyOfPropertyChange(() => ActualEmployees); }
public void AddEmployee() { foreach (var item in AvailableEmployees.Where(x => x.IsSelected).Reverse()) { SelectedEmployeeToAdd.IsSelected = false; SelectedEmployees.Add(SelectedEmployeeToAdd); AvailableEmployees.Remove(SelectedEmployeeToAdd); } NotifyOfPropertyChange(() => SelectedEmployees); NotifyOfPropertyChange(() => AvailableEmployees); NotifyOfPropertyChange(() => CanSave); NotifyOfPropertyChange(() => CanReset); SortEmployees(SelectedEmployees); SortEmployees(AvailableEmployees); }