Example #1
0
        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");
        }
Example #2
0
 public CardFilter(CardFilterParams filterParams)
 {
     if (filterParams != null)
     {
         FilterParams = filterParams;
     }
 }
Example #3
0
        private void ClearFilterMethod()
        {
            Filter = new CardFilter();
            ComplexFilterParams = new CardFilterParams();
            InitFilter();

            if (string.IsNullOrEmpty(SearchString))
            {
                IsSearched = false;
            }

            if (RefreshCommand != null)
            {
                RefreshCommand.Execute(null);
            }
        }