Пример #1
0
 public void Click()
 {
     ActualEmployees.AddRange(AvailableEmployees.Where(x => x.IsSelected).ToList());
     AvailableEmployees.RemoveRange(ActualEmployees);
     NotifyOfPropertyChange(() => AvailableEmployees);
     NotifyOfPropertyChange(() => ActualEmployees);
 }
Пример #2
0
 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);
 }