コード例 #1
0
 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;
         }
     }
 }
コード例 #2
0
        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());
        }
コード例 #3
0
 /// <summary>
 /// 降权
 /// </summary>
 private void OnDemote()
 {
     Associates.Where(associate => associate.IsSelected == true)
     .ForEach(associate => _service.Demote(associate));
 }
コード例 #4
0
 /// <summary>
 /// 发送通知
 /// </summary>
 private void OnNotify()
 {
     Associates.Where(associate => associate.IsSelected == true)
     .ForEach(associate => _service.Notify(associate));
 }