private void HyperLinkPrintLabel_Click(object sender, RoutedEventArgs e) { YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder = this.m_AccessionOrder.PanelSetOrderCollection.GetPAP(); YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(panelSetOrder.ReportNo); string dummyReportNo = (orderIdParser.ReportNoYear + 50).ToString() + "-" + orderIdParser.MasterAccessionNoNumber + "." + orderIdParser.ReportNoLetter; YellowstonePathology.UI.Login.CytologySlideLabelDocument cytologySlideLabelDocument = new Login.CytologySlideLabelDocument(dummyReportNo, this.m_AccessionOrder.PLastName, false); System.Windows.Controls.PrintDialog printDialog = new System.Windows.Controls.PrintDialog(); System.Printing.PrintServer printServer = new System.Printing.LocalPrintServer(); System.Printing.PrintQueue printQueue = printServer.GetPrintQueue(YellowstonePathology.Business.User.UserPreferenceInstance.Instance.UserPreference.CytologySlideLabelPrinter); printDialog.PrintQueue = printQueue; printDialog.PrintDocument(cytologySlideLabelDocument.DocumentPaginator, "Slide Labels"); }
private void HyperLinkPrintLabel_Click(object sender, RoutedEventArgs e) { YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder = this.m_AccessionOrder.PanelSetOrderCollection.GetPAP(); YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(panelSetOrder.ReportNo); string dummyReportNo = (orderIdParser.ReportNoYear + 50).ToString() + "-" + orderIdParser.MasterAccessionNoNumber + "." + orderIdParser.ReportNoLetter; YellowstonePathology.UI.Login.CytologySlideLabelDocument cytologySlideLabelDocument = new Login.CytologySlideLabelDocument(dummyReportNo, this.m_AccessionOrder.PLastName, false); System.Windows.Controls.PrintDialog printDialog = new System.Windows.Controls.PrintDialog(); System.Printing.PrintServer printServer = new System.Printing.LocalPrintServer(); System.Printing.PrintQueue printQueue = printServer.GetPrintQueue(YellowstonePathology.Business.User.UserPreferenceInstance.Instance.UserPreference.CytologySlideLabelPrinter); printDialog.PrintQueue = printQueue; printDialog.PrintDocument(cytologySlideLabelDocument.DocumentPaginator, "Slide Labels"); }