private void ListBoxAliquots_MouseUp(object sender, MouseButtonEventArgs e)
        {
            if (this.ListBoxAliquots.SelectedItems.Count != 0)
            {
                YellowstonePathology.Business.Specimen.Model.ThinPrepSlide  thinPrepSlide  = new Business.Specimen.Model.ThinPrepSlide();
                YellowstonePathology.Business.Specimen.Model.PantherAliquot pantherAliquot = new Business.Specimen.Model.PantherAliquot();

                YellowstonePathology.Business.Test.AliquotOrder aliquotOrder = (YellowstonePathology.Business.Test.AliquotOrder) this.ListBoxAliquots.SelectedItem;
                if (aliquotOrder.Status == YellowstonePathology.Business.Slide.Model.SlideStatusEnum.Created.ToString())
                {
                    if (aliquotOrder.AliquotType == thinPrepSlide.AliquotType)
                    {
                        this.PrintThinPrepSlide(aliquotOrder);
                    }
                    else if (aliquotOrder.AliquotType == pantherAliquot.AliquotType)
                    {
                        YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrderByAliquotOrderId(aliquotOrder.AliquotOrderId);
                        string zplCommands = Business.Label.Model.PantherZPLLabel.GetCommands(aliquotOrder.AliquotOrderId, this.m_AccessionOrder.PBirthdate.Value, this.m_AccessionOrder.PatientDisplayName, specimenOrder.Description);

                        Business.Label.Model.ZPLPrinterTCP zplPrinter = new Business.Label.Model.ZPLPrinterTCP("10.1.1.19");
                        zplPrinter.Print(zplCommands);
                    }
                    aliquotOrder.Status = YellowstonePathology.Business.TrackedItemStatusEnum.Printed.ToString();
                }

                this.NotifyPropertyChanged(string.Empty);
            }
        }
        private void PrintRowOfSlides(Queue <Business.Label.Model.HistologySlidePaperZPLLabelV2> queue)
        {
            StringBuilder result  = new StringBuilder();
            int           xOffset = 0;

            result.Append("^XA");
            for (int i = 0; i < 4; i++)
            {
                if (queue.Count != 0)
                {
                    Business.Label.Model.HistologySlidePaperZPLLabelV2 label = queue.Dequeue();
                    result.Append(label.GetCommandWithOffset(xOffset));
                    xOffset += 325;
                }
            }
            result.Append("^XZ");

            string facilityId = Business.User.UserPreferenceInstance.Instance.UserPreference.FacilityId;

            Business.Label.Model.ZPLPrinterTCP printer = new Business.Label.Model.ZPLPrinterTCP("10.1.1.21");
            if (facilityId == "YPICDY" || facilityId == "YPCDY")
            {
                printer = new Business.Label.Model.ZPLPrinterTCP("10.33.33.56");
            }

            printer.Print(result.ToString());
        }
Esempio n. 3
0
 private void ButtonPrint_Click(object sender, RoutedEventArgs e)
 {
     if (this.ListBoxLabels.SelectedItem != null)
     {
         string labelContent = (string)this.ListBoxLabels.SelectedItem;
         string zplCommands  = Business.Label.Model.PantherZPLLabel.GetCommands(labelContent, DateTime.Today, "EQC", labelContent);
         Business.Label.Model.ZPLPrinterTCP zplPrinter = new Business.Label.Model.ZPLPrinterTCP("10.1.1.19");
         zplPrinter.Print(zplCommands);
     }
 }
Esempio n. 4
0
 private void HyperLinkPrintUrineLabels_Click(object sender, RoutedEventArgs e)
 {
     if (this.IsValidYear() == true && this.RowCountIsAcceptable() == true)
     {
         Business.Label.Model.ZPLPrinterTCP printer = new Business.Label.Model.ZPLPrinterTCP("10.1.1.21");
         for (int x = 0; x < this.m_Rows; x++)
         {
             string commands = Business.Label.Model.UrineZPLLabel.GetCommands(this.m_Year);
             printer.Print(commands);
         }
     }
 }
Esempio n. 5
0
        private void ButtonPrintFedexReturnLabel_Click(object sender, RoutedEventArgs e)
        {
            for (int i = 0; i < 5; i++)
            {
                Business.MaterialTracking.Model.FedexAccountProduction    fedExAccount       = new Business.MaterialTracking.Model.FedexAccountProduction();
                Business.MaterialTracking.Model.FedexReturnLabelRequest   returnLabelRequest = new Business.MaterialTracking.Model.FedexReturnLabelRequest(this.m_Client.ClientName, this.m_Client.Telephone, this.m_Client.Address, null, this.m_Client.City, this.m_Client.State, this.m_Client.ZipCode, fedExAccount);
                Business.MaterialTracking.Model.FedexProcessShipmentReply result             = returnLabelRequest.RequestShipment();

                Business.Label.Model.ZPLPrinterTCP zplPrinter = new Business.Label.Model.ZPLPrinterTCP(Business.User.UserPreferenceInstance.Instance.UserPreference.FedExLabelPrinter);
                zplPrinter.Print(Business.Label.Model.ZPLPrinterTCP.DecodeZPLFromBase64(result.ZPLII));
            }

            MessageBox.Show("Fedex labels have been sent to the printer.");
        }
Esempio n. 6
0
 private void HyperLinkPrintLabel_Click(object sender, RoutedEventArgs e)
 {
     if (string.IsNullOrEmpty(this.m_ZPLII) == false)
     {
         if (string.IsNullOrEmpty(Business.User.UserPreferenceInstance.Instance.UserPreference.FedExLabelPrinter) == false)
         {
             Business.Label.Model.ZPLPrinterTCP zplPrinter = new Business.Label.Model.ZPLPrinterTCP(Business.User.UserPreferenceInstance.Instance.UserPreference.FedExLabelPrinter);
             zplPrinter.Print(this.m_ZPLII);
         }
         else
         {
             MessageBox.Show("You need to go into User Preferences and choose your FedEx label printer before your label can be printed.");
         }
     }
     else
     {
         MessageBox.Show("The label cannot be printed until a tracking number exists.");
     }
 }
 private void ButtonOk_Click(object sender, RoutedEventArgs e)
 {
     if (!string.IsNullOrEmpty(this.ComboboxDocumentType.Text))
     {
         if (this.TextBlockRowCount.Text.Length > 0)
         {
             Business.Label.Model.ZPLPrinterTCP printer = new Business.Label.Model.ZPLPrinterTCP("10.1.1.21");
             int pageCount = this.GetPageCount();
             for (int x = 0; x < pageCount; x++)
             {
                 string commands = Business.Label.Model.ContainerZPLLabel.GetCommands();
                 printer.Print(commands);
             }
         }
         else
         {
             MessageBox.Show("The row count is not set correctly.");
         }
     }
 }
Esempio n. 8
0
 private void HyperLinkPrintLabel_Click(object sender, RoutedEventArgs e)
 {
     Business.Task.Model.TaskOrderDetailFedexShipment taskOrderDetail = this.m_TaskOrder.TaskOrderDetailCollection.GetFedexShipment();
     if (string.IsNullOrEmpty(taskOrderDetail.ZPLII) == false)
     {
         if (string.IsNullOrEmpty(Business.User.UserPreferenceInstance.Instance.UserPreference.FedExLabelPrinter) == false)
         {
             Business.Label.Model.ZPLPrinterTCP zplPrinter = new Business.Label.Model.ZPLPrinterTCP(Business.User.UserPreferenceInstance.Instance.UserPreference.FedExLabelPrinter);
             zplPrinter.Print(taskOrderDetail.ZPLII);
             taskOrderDetail.LabelHasBeenPrinted = true;
         }
         else
         {
             MessageBox.Show("You need to go into User Preferences and choose your FedEx label printer before your label can be printed.");
         }
     }
     else
     {
         MessageBox.Show("The label cannot be printed until a tracking number exists.");
     }
 }
        private void ButtonReprintSelected_Click(object sender, RoutedEventArgs e)
        {
            if (this.ListBoxAliquots.SelectedItem != null)
            {
                YellowstonePathology.Business.Test.AliquotOrder             aliquotOrder   = (YellowstonePathology.Business.Test.AliquotOrder) this.ListBoxAliquots.SelectedItem;
                YellowstonePathology.Business.Specimen.Model.ThinPrepSlide  thinPrepSlide  = new Business.Specimen.Model.ThinPrepSlide();
                YellowstonePathology.Business.Specimen.Model.PantherAliquot pantherAliquot = new Business.Specimen.Model.PantherAliquot();

                if (aliquotOrder.AliquotType == thinPrepSlide.AliquotType)
                {
                    this.PrintThinPrepSlide(aliquotOrder);
                }
                else if (aliquotOrder.AliquotType == pantherAliquot.AliquotType)
                {
                    YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrderByAliquotOrderId(aliquotOrder.AliquotOrderId);
                    string zplCommands = Business.Label.Model.PantherZPLLabel.GetCommands(aliquotOrder.AliquotOrderId, this.m_AccessionOrder.PBirthdate.Value, this.m_AccessionOrder.PatientDisplayName, specimenOrder.Description);

                    Business.Label.Model.ZPLPrinterTCP zplPrinter = new Business.Label.Model.ZPLPrinterTCP("10.1.1.19");
                    zplPrinter.Print(zplCommands);
                }
            }
        }