private void ButtonOk_Click(object sender, RoutedEventArgs e)
 {
     if (!string.IsNullOrEmpty(this.ComboboxDocumentType.Text))
     {
         if (this.TextBlockRowCount.Text.Length > 0)
         {
             Business.Label.Model.ZPLPrinter printer = new Business.Label.Model.ZPLPrinter("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.");
         }
     }
 }
Exemplo n.º 2
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)
     {
         Business.Label.Model.ZPLPrinter zplPrinter = new Business.Label.Model.ZPLPrinter("10.1.1.20");
         zplPrinter.Print(taskOrderDetail.ZPLII);
         taskOrderDetail.LabelHasBeenPrinted = true;
     }
     else
     {
         MessageBox.Show("The label cannot be printed until a tracking number exists.");
     }
 }
        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.ZPLPrinter zplPrinter = new Business.Label.Model.ZPLPrinter("10.1.1.19");
                        zplPrinter.Print(zplCommands);
                    }
                    aliquotOrder.Status = YellowstonePathology.Business.TrackedItemStatusEnum.Printed.ToString();
                }

                this.NotifyPropertyChanged(string.Empty);
            }
        }
Exemplo n.º 4
0
        private void ButtonPrintFedexReturnLabel_Click(object sender, RoutedEventArgs e)
        {
            if(this.Client.ClientId == 879 || this.Client.ClientId == 1513)
            {
                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.ZPLPrinter zplPrinter = new Business.Label.Model.ZPLPrinter("10.1.1.20");
                zplPrinter.Print(Business.Label.Model.ZPLPrinter.DecodeZPLFromBase64(result.ZPLII));
            }
            else
            {
                MessageBox.Show("Fedex labels have not been setup for this client.");
            }
        }
        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.ZPLPrinter zplPrinter = new Business.Label.Model.ZPLPrinter("10.1.1.19");
                    zplPrinter.Print(zplCommands);
                }
            }
        }