Пример #1
0
 private void HyperLinkOptiFreight_Click(object sender, RoutedEventArgs e)
 {
     Fedex.FedexAccountProduction fedexAccount = new Fedex.FedexAccountProduction();
     this.m_AccountNo   = fedexAccount.OptiFreightAccountNo;
     this.m_PaymentType = "THIRD_PARTY";
     this.NotifyPropertyChanged(string.Empty);
 }
Пример #2
0
        private void HyperLinkGetTrackingNumber_Click(object sender, RoutedEventArgs e)
        {
            if (this.IsOKToGetTrackingNumber() == true)
            {
                Fedex.FedexAccountProduction fedExAccount    = new Fedex.FedexAccountProduction();
                FedexShipmentRequest         shipmentRequest = new FedexShipmentRequest(fedExAccount,
                                                                                        this.m_ClientOrder.PLastName, this.m_PaymentType, this.m_ServiceType, this.m_TrackingNumber,
                                                                                        this.m_ShipToName, this.m_ShipToPhone, this.m_ShipToAddress1,
                                                                                        this.m_ShipToAddress2, this.m_ShipToCity, this.m_ShipToState,
                                                                                        this.m_ShipToZip, this.m_AccountNo);
                FedexProcessShipmentReply result = shipmentRequest.RequestShipment();

                if (result.RequestWasSuccessful == true)
                {
                    this.m_TrackingNumber = result.TrackingNumber;
                    this.m_ZPLII          = ZPLPrinterTCP.DecodeZPLFromBase64(result.ZPLII);
                    this.NotifyPropertyChanged(string.Empty);
                }
                else
                {
                    MessageBox.Show(result.Message);
                }
            }
            else
            {
                MessageBox.Show("We are unable to get the tracking number at this point because there are problems with the data.");
            }
        }