Пример #1
0
 private void HyperLinkPrintLabel_Click(object sender, RoutedEventArgs e)
 {
     if (string.IsNullOrEmpty(this.m_ZPLII) == false)
     {
         ZPLPrinterTCP zplPrinter = new ZPLPrinterTCP("10.1.1.33");
         zplPrinter.Print(this.m_ZPLII);
     }
     else
     {
         MessageBox.Show("The label cannot be printed until a tracking number exists.");
     }
 }
Пример #2
0
        private void HyperLinkPrintReturnLabel_Click(object sender, RoutedEventArgs e)
        {
            FedexAccountProduction  fedExAccount       = new FedexAccountProduction();
            FedexReturnLabelRequest returnLabelRequest = new FedexReturnLabelRequest($"{this.m_ClientOrder.PFirstName} {this.m_ClientOrder.PLastName}",
                                                                                     this.m_ClientOrder.PPhone, this.m_ClientOrder.PAddress1, null, this.m_ClientOrder.PCity, this.m_ClientOrder.PState, this.m_ClientOrder.PZipCode, fedExAccount);
            FedexProcessShipmentReply result = returnLabelRequest.RequestShipment();

            ZPLPrinterTCP zplPrinter = new ZPLPrinterTCP("10.1.1.33");

            zplPrinter.Print(ZPLPrinterTCP.DecodeZPLFromBase64(result.ZPLII));

            MessageBox.Show("Fedex labels have been sent to the printer.");
        }