コード例 #1
0
        private void PreferredEquipmentHandler(object parameter)
        {
            var summaryViewDataTranferObject = new SummaryViewDataTranferObject(CommonUtils.SummaryViewType.PreferredEquipment);
            summaryViewDataTranferObject.Payload = CommonUtils.EquipmentTypeCode.PIPE;

            EventAggregator.GetEvent<PrismEvents.OpenTabPrismEvent>().Publish(summaryViewDataTranferObject);
        }
コード例 #2
0
        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");
        }
コード例 #3
0
        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;
        }
コード例 #4
0
ファイル: MainPage.xaml.cs プロジェクト: barrett2474/CMS2
        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);
            }
        }
コード例 #5
0
 private void OverdueCalibrationsHandler()
 {
     var summaryViewDataTranferObject = new SummaryViewDataTranferObject(CommonUtils.SummaryViewType.OverdueCalibrations);
     EventAggregator.GetEvent<PrismEvents.OpenTabPrismEvent>().Publish(summaryViewDataTranferObject);
 }