private void PreferredEquipmentHandler(object parameter) { var summaryViewDataTranferObject = new SummaryViewDataTranferObject(CommonUtils.SummaryViewType.PreferredEquipment); summaryViewDataTranferObject.Payload = CommonUtils.EquipmentTypeCode.PIPE; EventAggregator.GetEvent<PrismEvents.OpenTabPrismEvent>().Publish(summaryViewDataTranferObject); }
private void SetUpFilteredLinkControl() { var filteredViewModel = new EquipmentSummaryViewModel("Filtered", 0) { IsHyperLink = true }; //filtered link filteredViewModel.LinkClickedFunction = () => { var summaryViewDataTranferObject = new SummaryViewDataTranferObject(CommonUtils.SummaryViewType.Pipes); summaryViewDataTranferObject.Payload = Pipes.Select(x => x.Id).ToList(); EventAggregator.GetEvent<PrismEvents.OpenTabPrismEvent>().Publish(summaryViewDataTranferObject); return null; }; FilteredControlDataContext = filteredViewModel; RaisePropertyChanged("FilteredControlDataContext"); }
public void SetCachedIdsAndFilteredLink() { //set cached doc ids. mFilteredQuickDocuments = telerikResultsGridControl.Items.OfType<QuickDocument>().ToList(); CMS.Cache.FilteredExportDocIdList = mFilteredQuickDocuments.Select(item => item.Id).ToList(); //filtered link mEquipmentSummaryViewModel = new EquipmentSummaryViewModel("Filtered", CMS.Cache.FilteredExportDocIdList.Count); mEquipmentSummaryViewModel.IsHyperLink = true; mEquipmentSummaryViewModel.LinkClickedFunction = () => { var summaryViewDataTranferObject = new SummaryViewDataTranferObject(CommonUtils.SummaryViewType.Documents); summaryViewDataTranferObject.Payload = mFilteredQuickDocuments; EventAggregator.GetEvent<PrismEvents.OpenTabPrismEvent>().Publish(summaryViewDataTranferObject); return null; }; DocumentsTotalSummaryControl.DataContext = mEquipmentSummaryViewModel; }
private void OpenActiveOverrideSummaryListTab(SummaryViewDataTranferObject dto) { //Check whether we already have this issue open bool tabAlreadyOpen = false; foreach (RadTabItem tabItem in MainTabControl.Items) { var view = tabItem.Content as ActiveOverrideSummaryListView; if (view != null) { //Issue is already open so select it tabItem.IsSelected = true; tabAlreadyOpen = true; break; } } if (tabAlreadyOpen == false) { var ti = new RadTabItem(); var th = new TabHeader(ti, this); th.headerLabel.Content = string.Format("Active Overrides"); ti.Header = th; ti.Content = new ActiveOverrideSummaryListView(dto.IncludeRemoved); ti.IsSelected = true; ti.DropDownContent = th.headerLabel.Content.ToString(); MainTabControl.Items.Add(ti); } }
private void OverdueCalibrationsHandler() { var summaryViewDataTranferObject = new SummaryViewDataTranferObject(CommonUtils.SummaryViewType.OverdueCalibrations); EventAggregator.GetEvent<PrismEvents.OpenTabPrismEvent>().Publish(summaryViewDataTranferObject); }