Exemplo n.º 1
0
        public void View(Business.Test.AccessionOrder accessionOrder, Business.Test.PanelSetOrder panelSetOrder)
        {
            YellowstonePathology.Business.PanelSet.Model.PanelSet panelSet = YellowstonePathology.Business.PanelSet.Model.PanelSetCollection.GetAll().GetPanelSet(panelSetOrder.PanelSetId);
            YellowstonePathology.Business.Interface.ICaseDocument doc      = YellowstonePathology.Business.Document.DocumentFactory.GetDocument(accessionOrder, panelSetOrder, Business.Document.ReportSaveModeEnum.Draft);
            doc.Render();
            YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(panelSetOrder.ReportNo);

            string fileName = string.Empty;

            if (panelSet.ResultDocumentSource == Business.PanelSet.Model.ResultDocumentSourceEnum.PublishedDocument ||
                panelSet.ResultDocumentSource == Business.PanelSet.Model.ResultDocumentSourceEnum.RetiredTestDocument)
            {
                fileName = YellowstonePathology.Business.Document.CaseDocument.GetCaseFileNameXPS(orderIdParser);
            }
            else
            {
                fileName = YellowstonePathology.Business.Document.CaseDocument.GetDraftDocumentFilePath(orderIdParser);
            }

            switch (doc.NativeDocumentFormat)
            {
            case Business.Document.NativeDocumentFormatEnum.Word:
                YellowstonePathology.Business.Document.CaseDocument.OpenWordDocumentWithWordViewer(fileName);
                break;

            case Business.Document.NativeDocumentFormatEnum.XPS:
                YellowstonePathology.UI.XpsDocumentViewer xpsDocumentViewer = new XpsDocumentViewer();
                xpsDocumentViewer.ViewDocument(fileName);
                xpsDocumentViewer.ShowDialog();
                break;
            }
        }
Exemplo n.º 2
0
 private void ButtonPrintList_Click(object sender, RoutedEventArgs e)
 {
     UI.RetrospectiveReviewReport report = new UI.RetrospectiveReviewReport(this.m_RetrospectiveReviewList);
     YellowstonePathology.UI.XpsDocumentViewer xpsDocumentViewer = new XpsDocumentViewer();
     xpsDocumentViewer.LoadDocument(report.FixedDocument);
     xpsDocumentViewer.ShowDialog();
 }
Exemplo n.º 3
0
        public void View(Business.Test.AccessionOrder accessionOrder, Business.Test.PanelSetOrder panelSetOrder)
        {
            YellowstonePathology.Business.PanelSet.Model.PanelSet panelSet = YellowstonePathology.Business.PanelSet.Model.PanelSetCollection.GetAll().GetPanelSet(panelSetOrder.PanelSetId);
            YellowstonePathology.Business.Interface.ICaseDocument doc = YellowstonePathology.Business.Document.DocumentFactory.GetDocument(accessionOrder, panelSetOrder, Business.Document.ReportSaveModeEnum.Draft);
            doc.Render();
            YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(panelSetOrder.ReportNo);

            string fileName = string.Empty;
            if (panelSet.ResultDocumentSource == Business.PanelSet.Model.ResultDocumentSourceEnum.PublishedDocument ||
                panelSet.ResultDocumentSource == Business.PanelSet.Model.ResultDocumentSourceEnum.RetiredTestDocument)
            {
                fileName = YellowstonePathology.Business.Document.CaseDocument.GetCaseFileNameXPS(orderIdParser);
            }
            else
            {
                fileName = YellowstonePathology.Business.Document.CaseDocument.GetDraftDocumentFilePath(orderIdParser);
            }

            switch (doc.NativeDocumentFormat)
            {
                case Business.Document.NativeDocumentFormatEnum.Word:
                    YellowstonePathology.Business.Document.CaseDocument.OpenWordDocumentWithWordViewer(fileName);
                    break;
                case Business.Document.NativeDocumentFormatEnum.XPS:
                    YellowstonePathology.UI.XpsDocumentViewer xpsDocumentViewer = new XpsDocumentViewer();
                    xpsDocumentViewer.ViewDocument(fileName);
                    xpsDocumentViewer.ShowDialog();
                    break;
            }
        }