private void FlAssociates_PropertyChanged(object sender, PropertyChangedEventArgs e) { if (e.PropertyName == "IsSelected") { string temp = string.Join(",", Associates.Where(t => t.IsSelected == true).Select(x => x.ID).ToList()); if (!string.IsNullOrEmpty(temp)) { AssociatesSrchString = temp; } else { AssociatesSrchString = 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()); }
/// <summary> /// 降权 /// </summary> private void OnDemote() { Associates.Where(associate => associate.IsSelected == true) .ForEach(associate => _service.Demote(associate)); }
/// <summary> /// 发送通知 /// </summary> private void OnNotify() { Associates.Where(associate => associate.IsSelected == true) .ForEach(associate => _service.Notify(associate)); }