Exemple #1
0
 private void HyperlinkViewDocument_Click(object sender, RoutedEventArgs e)
 {
     if (this.ListViewSearchResults.SelectedItems.Count != 0)
     {
         YellowstonePathology.YpiConnect.Contract.Search.SearchResult searchResult = (YellowstonePathology.YpiConnect.Contract.Search.SearchResult) this.ListViewSearchResults.SelectedItem;
         if (searchResult.FinalTime.HasValue == true)
         {
             this.m_ReportBrowserUI.ViewDocument(searchResult);
         }
         else
         {
             MessageBox.Show("This Report is not final and cannot be downloaded.");
         }
     }
 }
        public void ViewDocument(YellowstonePathology.YpiConnect.Contract.Search.SearchResult searchResult)
        {
            CaseDocument caseDocument = new CaseDocument(searchResult.ReportNo, YellowstonePathology.YpiConnect.Contract.CaseDocumentTypeEnum.XPS);

            YellowstonePathology.YpiConnect.Contract.MethodResult methodResult = caseDocument.Download();
            if (methodResult.Success == true)
            {
                XpsDocumentViewer xpsDocumentViewer = new XpsDocumentViewer();
                xpsDocumentViewer.LoadDocument(caseDocument.XpsDocument);
                xpsDocumentViewer.ShowDialog();
            }
            else
            {
                System.Windows.MessageBox.Show(methodResult.Message);
            }
        }
Exemple #3
0
 private void MenuItemShowResultSummaryText_Click(object sender, RoutedEventArgs e)
 {
     if (this.ListViewSearchResults.SelectedItem != null)
     {
         YellowstonePathology.YpiConnect.Contract.Search.SearchResult searchResult = (YellowstonePathology.YpiConnect.Contract.Search.SearchResult) this.ListViewSearchResults.SelectedItem;
         if (searchResult.FinalTime.HasValue == true)
         {
             YellowstonePathology.YpiConnect.Proxy.FileTransferServiceProxy fileTransferServiceProxy = new Proxy.FileTransferServiceProxy();
             string summaryResultString = fileTransferServiceProxy.GetSummaryResultString(searchResult.ReportNo);
             ResultSummaryTextDialog resultSummaryTextDialog = new ResultSummaryTextDialog(summaryResultString);
             resultSummaryTextDialog.ShowDialog();
         }
         else
         {
             MessageBox.Show("The result summary is not available until the case is final.");
         }
     }
 }