private void InitFilter() { ComplexFilterParams = new CardFilterParams(); var staffRepository = new StaffRepository(); var filterDepartmentList = staffRepository.GetDepartments(); var filterStaffList = staffRepository.GetAll(staff => staff.Name.DisplayName); _filterStaffCheckList = new ObservableCollection <CheckBoxItem <Staff> >(); foreach (var staff in filterStaffList) { FilterStaffCheckList.Add(new CheckBoxItem <Staff> { Item = staff }); } OnPropertyChanged("FilterStaffCheckList"); _filterDepartmentCheckList = new ObservableCollection <CheckBoxItem <string> >(); foreach (var department in filterDepartmentList) { FilterDepartmentCheckList.Add(new CheckBoxItem <string> { Item = department }); } OnPropertyChanged("FilterDepartmentCheckList"); }
public CardFilter(CardFilterParams filterParams) { if (filterParams != null) { FilterParams = filterParams; } }
private void ClearFilterMethod() { Filter = new CardFilter(); ComplexFilterParams = new CardFilterParams(); InitFilter(); if (string.IsNullOrEmpty(SearchString)) { IsSearched = false; } if (RefreshCommand != null) { RefreshCommand.Execute(null); } }