private void StatusHyperlinkButton_Click(object sender, RoutedEventArgs e)
        {
            List<QuickIssue> issues = TelerikDataGrid.Items.OfType<QuickIssue>().ToList();
            List<int> ids = (from i in issues select i.Id).ToList();

            var dto = new IssueSummaryDataTranferObject();
            dto.IssueIds = ids;
            dto.SummaryType = CommonUtils.SummaryViewType.Status;

            dto.FilterName = GetFilterName(sender);

            EventAggregator.GetEvent<PrismEvents.OpenTabPrismEvent>().Publish(dto);
        }
Exemplo n.º 2
0
        private void OpenIssueSummaryListTab(IssueSummaryDataTranferObject dto)
        {
            //Check whether we already have this issue open
            bool tabAlreadyOpen = false;
            foreach (RadTabItem tabItem in MainTabControl.Items)
            {
                var view = tabItem.Content as IssueSummaryListView;

                if (view != null)
                {
                    if (view.SummaryType == dto.SummaryType && view.FilterName == dto.FilterName)
                    {
                        //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);
                if (string.IsNullOrEmpty(dto.FilterName))
                {
                    th.headerLabel.Content = "Issues [All Statuses]";
                }
                else
                {
                    th.headerLabel.Content = string.Format("Issues [{0}]", dto.FilterName);
                }

                ti.Header = th;
                ti.Content = new IssueSummaryListView(dto.IssueIds, dto.SummaryType, dto.FilterName);
                ti.IsSelected = true;
                ti.DropDownContent = th.headerLabel.Content.ToString();

                MainTabControl.Items.Add(ti);
            }
        }
 private void MyIntrayHyperlinkButton_Click(object sender, RoutedEventArgs e)
 {
     var dto = new IssueSummaryDataTranferObject();
     dto.SummaryType = CommonUtils.SummaryViewType.MyInTray;
     EventAggregator.GetEvent<PrismEvents.OpenTabPrismEvent>().Publish(dto);
 }