Exemplo n.º 1
0
 private void MaintenanceByEmpId()
 {
     AllMaintenanceFiltered = new ObservableCollection <CarPresalesMaintenance>(AllMaintenance.Where(rid => rid.Employee.Id == SelectedEmployee.Id));
 }
Exemplo n.º 2
0
 private void FilterMaintenance(object param)
 {
     if (!string.IsNullOrWhiteSpace(SearchedText))
     {
         AllMaintenanceFiltered = new ObservableCollection <CarPresalesMaintenance>(AllMaintenanceFiltered.Where(kl => kl.RegNr.ToLower().StartsWith(SearchedText.ToLower())));
     }
     else
     {
         if (SelectedEmployee == null)
         {
             AllMaintenanceFiltered = new ObservableCollection <CarPresalesMaintenance>(AllMaintenance);
         }
         else
         {
             AllMaintenanceFiltered = new ObservableCollection <CarPresalesMaintenance>(AllMaintenance.Where(rid => rid.Employee.Id == SelectedEmployee.Id));
         }
     }
 }