public ViewMembersNeeding(string request) { collectionViewSource = new CollectionViewSource(); switch (request) { case "RequestRefresher": this.Title = "Members Needing Refresher This Year"; reportTitle = "Members Needing Refresher This Year"; RefresherList refresherList = new RefresherList(); collectionViewSource.Source = refresherList.refresherListCollection; break; case "RequestHazMat": this.Title = "Members Needing HazMat Refresher"; reportTitle = "Members Needing HazMat Refresher"; HazMatRefresherList hazMatRefresherList = new HazMatRefresherList(); collectionViewSource.Source = hazMatRefresherList.members; break; default: break; } InitializeComponent(); dataGrid.IsReadOnly = true; dataGrid.ItemsSource = collectionViewSource.View; }
public ViewMembersNeedingControl(string request) { InitializeComponent(); collectionViewSource = new CollectionViewSource(); collectionViewSource.Filter += FilterMemberView; appName = Application.Current.Properties["AppName"].ToString(); if (appName == "CompanyViews") { CompanyFilterPanel.Visibility = Visibility.Hidden; CompanyFilterPanel.Visibility = Visibility.Collapsed; CompanyGridColumn.Visibility = Visibility.Hidden; CompanyGridColumn.Visibility = Visibility.Collapsed; } switch (request) { case "RequestRefresher": reportTitle = "Members Needing Refresher This Year"; RefresherList refresherList = new RefresherList(); collectionViewSource.Source = refresherList.refresherListCollection; break; case "RequestHazMat": reportTitle = "Members Needing HazMat Refresher"; HazMatRefresherList hazMatRefresherList = new HazMatRefresherList(); collectionViewSource.Source = hazMatRefresherList.members; break; case "RequestMaskConfidence": reportTitle = "Members Needing Mask Confidence"; NeedMaskConfidenceList needMaskConfidenceList = new NeedMaskConfidenceList(); collectionViewSource.Source = needMaskConfidenceList.members; break; case "RequestFitTest": reportTitle = "Members Needing Fit Test"; NeedFitTest needFitTest = new NeedFitTest(); collectionViewSource.Source = needFitTest.members; break; case "RequestPSS": reportTitle = "Members Needing PSS"; NeedPSS needPSS = new NeedPSS(); collectionViewSource.Source = needPSS.members; break; default: break; } InitializeComponent(); dataGrid.IsReadOnly = true; dataGrid.ItemsSource = collectionViewSource.View; }
public MembersNeedingHMatRefresher() { HazMatRefresherList hazMatRefresherList = new HazMatRefresherList(); cvs = new CollectionViewSource() { Source = hazMatRefresherList.members }; InitializeComponent(); hazMatDataGrid.ItemsSource = cvs.View; }