Exemplo n.º 1
0
 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;
         }
     }
 }
Exemplo n.º 2
0
        private void LoadProjectTypesFilter()
        {
            FilterListItem fi;

            foreach (ProjectTypeModel ag in ProjectTypes)
            {
                fi = new FilterListItem
                {
                    ID           = ag.ID,
                    Name         = ag.Name,
                    IsSelected   = allprojecttypes,
                    VisibleState = Visibility.Visible,
                    Colour       = ag.Colour
                };
                fi.PropertyChanged += FlProjectTypes_PropertyChanged;
                ProjectTypesFilter.Add(fi);
            }
        }
Exemplo n.º 3
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());
        }