public override void Show(System.Windows.Controls.ContentControl contentControl, object writer) { YellowstonePathology.Document.Result.Data.AccessionOrderDataSheetData accessionOrderDataSheetData = YellowstonePathology.Business.Gateway.XmlGateway.GetAccessionOrderDataSheetData(this.MasterAccessionNo); YellowstonePathology.Document.Result.Xps.AccessionOrderDataSheet accessionOrderDataSheet = new YellowstonePathology.Document.Result.Xps.AccessionOrderDataSheet(accessionOrderDataSheetData); System.Windows.Controls.DocumentViewer documentViewer = new System.Windows.Controls.DocumentViewer(); documentViewer.Loaded += new System.Windows.RoutedEventHandler(DocumentViewer_Loaded); documentViewer.Document = accessionOrderDataSheet.FixedDocument; contentControl.Content = documentViewer; }
private void ShowAccessionDataSheet() { XpsDocumentViewer viewer = new XpsDocumentViewer(); YellowstonePathology.Document.Result.Data.AccessionOrderDataSheetData accessionOrderDataSheetData = YellowstonePathology.Business.Gateway.XmlGateway.GetAccessionOrderDataSheetData(this.m_AccessionOrder.MasterAccessionNo); YellowstonePathology.Document.Result.Xps.AccessionOrderDataSheet accessionOrderDataSheet = new Document.Result.Xps.AccessionOrderDataSheet(accessionOrderDataSheetData); viewer.LoadDocument(accessionOrderDataSheet.FixedDocument); viewer.ShowDialog(); }
public static YellowstonePathology.Document.Result.Data.AccessionOrderDataSheetData GetAccessionOrderDataSheetData(string masterAccessionNo) { XElement accessionOrderDocument = XmlGateway.GetAccessionOrder(masterAccessionNo); XElement specimenOrderDocument = XmlGateway.GetSpecimenOrder(masterAccessionNo); XElement clientOrderDocument = XmlGateway.GetClientOrders(masterAccessionNo); XElement caseNotesDocument = XmlGateway.GetOrderComments(masterAccessionNo); YellowstonePathology.Document.Result.Data.AccessionOrderDataSheetData accessionOrderDataSheetData = new YellowstonePathology.Document.Result.Data.AccessionOrderDataSheetData(accessionOrderDocument, specimenOrderDocument, clientOrderDocument, caseNotesDocument); return accessionOrderDataSheetData; }
public static YellowstonePathology.Document.Result.Data.AccessionOrderDataSheetData GetAccessionOrderDataSheetData(string masterAccessionNo) { XElement accessionOrderDocument = XmlGateway.GetAccessionOrder(masterAccessionNo); XElement specimenOrderDocument = XmlGateway.GetSpecimenOrder(masterAccessionNo); XElement clientOrderDocument = XmlGateway.GetClientOrders(masterAccessionNo); XElement caseNotesDocument = XmlGateway.GetOrderComments(masterAccessionNo); YellowstonePathology.Document.Result.Data.AccessionOrderDataSheetData accessionOrderDataSheetData = new YellowstonePathology.Document.Result.Data.AccessionOrderDataSheetData(accessionOrderDocument, specimenOrderDocument, clientOrderDocument, caseNotesDocument); return accessionOrderDataSheetData; }
public void ViewAccessionOrderPage_Loaded(object sender, RoutedEventArgs e) { YellowstonePathology.Document.Result.Data.AccessionOrderDataSheetData accessionOrderDataSheetData = YellowstonePathology.Business.Gateway.XmlGateway.GetAccessionOrderDataSheetData(this.m_AccessionOrder.MasterAccessionNo); YellowstonePathology.Document.Result.Xps.AccessionOrderDataSheet accessionOrderDataSheet = new Document.Result.Xps.AccessionOrderDataSheet(accessionOrderDataSheetData); this.DocumentViewer.Document = accessionOrderDataSheet.FixedDocument; }
private void ButtonPrintDataSheet_Click(object sender, RoutedEventArgs e) { if (this.m_AccessionOrder.PanelSetOrderCollection.Count > 0) { Business.Persistence.DocumentGateway.Instance.Save(); YellowstonePathology.Document.Result.Data.AccessionOrderDataSheetData accessionOrderDataSheetData = YellowstonePathology.Business.Gateway.XmlGateway.GetAccessionOrderDataSheetData(this.m_AccessionOrder.MasterAccessionNo); YellowstonePathology.Document.Result.Xps.AccessionOrderDataSheet accessionOrderDataSheet = new Document.Result.Xps.AccessionOrderDataSheet(accessionOrderDataSheetData); System.Printing.PrintQueue printQueue = new System.Printing.LocalPrintServer().DefaultPrintQueue; System.Windows.Controls.PrintDialog printDialog = new System.Windows.Controls.PrintDialog(); printDialog.PrintTicket.PageOrientation = System.Printing.PageOrientation.Portrait; printDialog.PrintQueue = printQueue; printDialog.PrintDocument(accessionOrderDataSheet.FixedDocument.DocumentPaginator, "AccessionDataSheet"); } else { MessageBox.Show("You must order something before the data sheet can be printed out."); } }