void FlProjectTypes_PropertyChanged(object sender, PropertyChangedEventArgs e) { if (e.PropertyName == "IsSelected") { string temp = string.Join(",", ProjectTypesFilter.Where(t => t.IsSelected == true).Select(x => x.ID).ToList()); if (!string.IsNullOrEmpty(temp)) { ProjectTypesSrchString = temp; } else { ProjectTypesSrchString = string.Empty; } } }
public FilterModule() { LoadProjectTypesFilter(); LoadProjectStatusTypesFilter(); LoadBusinessUnitFilter(); AllProjectStatusTypesCommand = new RelayCommand(SelectProjectStatuses, param => this.canExecute); AllProjectTypesCommand = new RelayCommand(SelectProjectTypes, param => this.canExecute); AllBusinessUnitsCommand = new RelayCommand(SelectBusinessUnits, param => this.canExecute); AllAssociatesCommand = new RelayCommand(SelectAssociates, param => this.canExecute); ExpandAssociateButtonCommand = new RelayCommand(ShowAssociates, param => this.canExecuteAssoc); //initialise filters InitBusinessUnits(); BusinessUnitSrchString = string.Join(",", BusinessUnitFilter.Where(t => t.IsSelected == true).Select(x => x.ID).ToList()); InitProjectTypes(); ProjectTypesSrchString = string.Join(",", ProjectTypesFilter.Where(t => t.IsSelected == true).Select(x => x.ID).ToList()); InitProjectStatusTypes(1); ProjectStatusTypesSrchString = string.Join(",", ProjectStatusTypesFilter.Where(t => t.IsSelected == true).Select(x => x.ID).ToList()); InitAssociates(); AssociatesSrchString = string.Join(",", Associates.Where(t => t.IsSelected == true).Select(x => x.ID).ToList()); }