예제 #1
0
 public void Print()
 {
     this.m_PrintDocument = new System.Drawing.Printing.PrintDocument();
     System.Printing.PrintServer printServer = new System.Printing.LocalPrintServer();
     System.Printing.PrintQueue printQueue = printServer.GetPrintQueue(YellowstonePathology.Business.User.UserPreferenceInstance.Instance.UserPreference.HistologySlideLabelPrinter);
     this.m_PrintDocument.PrinterSettings.PrinterName = printQueue.FullName;
     this.m_PrintDocument.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(PrintDocument_PrintPage);
     this.m_PrintDocument.Print();
 }
예제 #2
0
 public void Print()
 {
     this.m_PrintDocument = new System.Drawing.Printing.PrintDocument();
     System.Printing.PrintServer printServer = new System.Printing.LocalPrintServer();
     System.Printing.PrintQueue  printQueue  = printServer.GetPrintQueue(YellowstonePathology.Business.User.UserPreferenceInstance.Instance.UserPreference.HistologySlideLabelPrinter);
     this.m_PrintDocument.PrinterSettings.PrinterName = printQueue.FullName;
     this.m_PrintDocument.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(PrintDocument_PrintPage);
     this.m_PrintDocument.Print();
 }
예제 #3
0
        private void PrintPaperLabel(YellowstonePathology.Business.Slide.Model.SlideOrder slideOrder)
        {
            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.HistologySlideLabelPrinter);
            printDialog.PrintQueue = printQueue;

            YellowstonePathology.Business.Label.Model.HistologySlidePaperLabel histologySlidePaperLabel = new Business.Label.Model.HistologySlidePaperLabel(slideOrder.SlideOrderId,
                                                                                                                                                            slideOrder.ReportNo, slideOrder.Label, slideOrder.PatientLastName, slideOrder.TestAbbreviation, slideOrder.AccessioningFacility);
            YellowstonePathology.Business.Label.Model.HistologySlidePaperLabelPrinter histologySlidePaperLabelPrinter = new Business.Label.Model.HistologySlidePaperLabelPrinter();
            histologySlidePaperLabelPrinter.Queue.Enqueue(histologySlidePaperLabel);
            histologySlidePaperLabelPrinter.Print();
        }
예제 #4
0
        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 ButtonPrint_Click(object sender, RoutedEventArgs e)
        {
            if (this.m_Copies > 0)
            {
                if (this.ComboBoxForm.SelectedItem != null)
                {
                    if (this.ComboBoxPrinter.SelectedItem != null)
                    {
                        System.Printing.PrintServer printServer = new System.Printing.LocalPrintServer();
                        System.Printing.PrintQueue  printQueue  = printServer.GetPrintQueue(YellowstonePathology.Business.User.UserPreferenceInstance.Instance.UserPreference.RequisitionPrinter);

                        ComboBoxItem comboBoxItem = (ComboBoxItem)this.ComboBoxForm.SelectedItem;
                        switch (comboBoxItem.Content.ToString())
                        {
                        case "Standard":
                            StandardRequisition standardRequisition = new StandardRequisition(this.m_ClientId);
                            standardRequisition.Print(this.m_Copies, printQueue);
                            break;

                        case "Cytology":
                            CytologyRequisition cytologyRequisition = new CytologyRequisition(this.m_ClientId);
                            cytologyRequisition.Print(this.m_Copies, printQueue);
                            break;

                        case "Oncology":
                            OncologyRequisition oncologyRequisition = new OncologyRequisition(this.m_ClientId);
                            oncologyRequisition.Print(this.m_Copies, printQueue);
                            break;

                        case "IHC/Molecular":
                            IHCMolecularRequisition ihcMolecularRequisition = new IHCMolecularRequisition(this.m_ClientId);
                            ihcMolecularRequisition.Print(this.m_Copies, printQueue);
                            break;
                        }
                        Close();
                    }
                    else
                    {
                        MessageBox.Show("You must select a printer.");
                    }
                }
                else
                {
                    MessageBox.Show("You must select a form type.");
                }
            }
        }
예제 #6
0
        public static System.Printing.PrintQueue GetSlideLabelPrintQueue(string slideLabelPrinter)
        {
            System.Printing.PrintQueue printQueue = null;
            System.Printing.PrintServer printServer = null;

            switch (slideLabelPrinter)
            {
                case "Histology Slide Label Printer":
                    printServer = new System.Printing.LocalPrintServer();
                    printQueue = printServer.GetPrintQueue("Histology Slide Label Printer");
                    break;
                case "Cytology Slide Label Printer":
                    printServer = new System.Printing.PrintServer(@"\\YPIIHISTO03");
                    printQueue = printServer.GetPrintQueue("CytologySlideLabelPrinter");
                    break;
            }

            return printQueue;
        }
예제 #7
0
        public static System.Printing.PrintQueue GetSlideLabelPrintQueue(string slideLabelPrinter)
        {
            System.Printing.PrintQueue  printQueue  = null;
            System.Printing.PrintServer printServer = null;

            switch (slideLabelPrinter)
            {
            case "Histology Slide Label Printer":
                printServer = new System.Printing.LocalPrintServer();
                printQueue  = printServer.GetPrintQueue("Histology Slide Label Printer");
                break;

            case "Cytology Slide Label Printer":
                printServer = new System.Printing.PrintServer(@"\\YPIIHISTO03");
                printQueue  = printServer.GetPrintQueue("CytologySlideLabelPrinter");
                break;
            }

            return(printQueue);
        }
        private void HyperLinkPrintAllPaperSlides_Click(object sender, RoutedEventArgs e)
        {
            foreach (Business.Specimen.Model.SpecimenOrder specimenOrder in this.m_AccessionOrder.SpecimenOrderCollection)
            {
                foreach (Business.Test.AliquotOrder aliquotOrder in specimenOrder.AliquotOrderCollection)
                {
                    foreach (Business.Slide.Model.SlideOrder slideOrder in aliquotOrder.SlideOrderCollection)
                    {
                        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.HistologySlideLabelPrinter);
                        printDialog.PrintQueue = printQueue;

                        YellowstonePathology.Business.Label.Model.HistologySlidePaperLabel histologySlidePaperLabel = new Business.Label.Model.HistologySlidePaperLabel(slideOrder.SlideOrderId,
                                                                                                                                                                        slideOrder.ReportNo, slideOrder.Label, slideOrder.PatientLastName, slideOrder.TestAbbreviation, slideOrder.AccessioningFacility);
                        YellowstonePathology.Business.Label.Model.HistologySlidePaperLabelPrinter histologySlidePaperLabelPrinter = new Business.Label.Model.HistologySlidePaperLabelPrinter();
                        histologySlidePaperLabelPrinter.Queue.Enqueue(histologySlidePaperLabel);
                        histologySlidePaperLabelPrinter.Print();
                    }
                }
            }
        }
예제 #9
0
        private void PrintPaperLabel(YellowstonePathology.Business.Slide.Model.SlideOrder slideOrder)
        {
            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.HistologySlideLabelPrinter);
            printDialog.PrintQueue = printQueue;

            YellowstonePathology.Business.Label.Model.HistologySlidePaperLabel histologySlidePaperLabel = new Business.Label.Model.HistologySlidePaperLabel(slideOrder.SlideOrderId,
                slideOrder.ReportNo, slideOrder.Label, slideOrder.PatientLastName, slideOrder.TestAbbreviation, slideOrder.Location);
            YellowstonePathology.Business.Label.Model.HistologySlidePaperLabelPrinter histologySlidePaperLabelPrinter = new Business.Label.Model.HistologySlidePaperLabelPrinter();
            histologySlidePaperLabelPrinter.Queue.Enqueue(histologySlidePaperLabel);
            histologySlidePaperLabelPrinter.Print();
        }
        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 ButtonPrint_Click(object sender, RoutedEventArgs e)
        {
            if (this.m_Copies > 0)
            {
                if (this.ComboBoxForm.SelectedItem != null)
                {
                    if (this.ComboBoxPrinter.SelectedItem != null)
                    {
                        System.Printing.PrintServer printServer = new System.Printing.LocalPrintServer();
                        System.Printing.PrintQueue printQueue = printServer.GetPrintQueue(YellowstonePathology.Business.User.UserPreferenceInstance.Instance.UserPreference.RequisitionPrinter);

                        ComboBoxItem comboBoxItem = (ComboBoxItem)this.ComboBoxForm.SelectedItem;
                        switch (comboBoxItem.Content.ToString())
                        {
                            case "Standard":
                                StandardRequisition standardRequisition = new StandardRequisition(this.m_ClientId);
                                standardRequisition.Print(this.m_Copies, printQueue);
                                break;
                            case "Oncology":
                                OncologyRequisition oncologyRequisition = new OncologyRequisition(this.m_ClientId);
                                oncologyRequisition.Print(this.m_Copies, printQueue);
                                break;
                            case "IHC/Molecular":
                                IHCMolecularRequisition ihcMolecularRequisition = new IHCMolecularRequisition(this.m_ClientId);
                                ihcMolecularRequisition.Print(this.m_Copies, printQueue);
                                break;
                        }
                        Close();
                    }
                    else
                    {
                        MessageBox.Show("You must select a printer.");
                    }
                }
                else
                {
                    MessageBox.Show("You must select a form type.");
                }
            }
        }