PrintOrder() public static method

public static PrintOrder ( string fileUrl, IWin32Window win32Window, string printer ) : void
fileUrl string
win32Window IWin32Window
printer string
return void
Esempio n. 1
0
 protected override void OrderConfirm()
 {
     try
     {
         this.resolver.Input    = BusinessConstants.BARCODE_SPECIAL_MARK + BusinessConstants.BARCODE_HEAD_OK;
         this.resolver.PrintUrl = string.Empty;
         this.resolver          = TheClientMgr.ScanBarcode(this.resolver);
         if (this.resolver.PrintUrl != null && this.resolver.PrintUrl != string.Empty && this.resolver.NeedPrintAsn)
         {
             Utility.PrintOrder(this.resolver.PrintUrl, this, null);
         }
         this.lblMessage.Text = this.resolver.Result;
         InitialAll();
     }
     catch (FaultException ex)
     {
         this.lblMessage.Text = Utility.FormatExMessage(ex.Message);
         MessageBox.Show(this, Utility.FormatExMessage(ex.Message));
         this.tbBarCode.Focus();
     }
     catch (Exception ex)
     {
         MessageBox.Show(this, ex.Message, "程序内部错误,请与管理员联系", MessageBoxButtons.OK, MessageBoxIcon.Error);
         InitialAll();
     }
 }
Esempio n. 2
0
 private bool PrintReceiptNote()
 {
     if (this.dgList != null && this.dgList.CurrentCell != null)
     {
         int currentRowIndex = this.dgList.CurrentCell.RowIndex;
         if (currentRowIndex > -1)
         {
             if (this.tabModule.SelectedTab == this.tabProcurement)
             {
                 this.resolver.Code = this.dgList["ReceiptNo", currentRowIndex].Value.ToString();
             }
             else if (this.tabModule.SelectedTab == this.tabDistribution)
             {
                 this.resolver.Code = this.dgList["IpNo", currentRowIndex].Value.ToString();
             }
             else if (this.tabModule.SelectedTab == this.tabProduction)
             {
                 this.resolver.Code = this.dgList["HuId", currentRowIndex].Value.ToString();
             }
             else
             {
                 return(true);
             }
             this.resolver.Input = BusinessConstants.BARCODE_SPECIAL_MARK + BusinessConstants.BARCODE_HEAD_PRINT;
             this.resolver       = TheClientMgr.ScanBarcode(this.resolver);
             Utility.PrintOrder(this.resolver.PrintUrl, this, null);
         }
     }
     return(true);
 }
Esempio n. 3
0
        private void Repack()
        {
            try
            {
                this.resolver.Input = BusinessConstants.BARCODE_SPECIAL_MARK + BusinessConstants.BARCODE_HEAD_OK;
                this.resolver       = TheClientMgr.ScanBarcode(this.resolver);

                if (this.resolver.PrintUrl != null && this.resolver.PrintUrl != string.Empty)
                {
                    Utility.PrintOrder(this.resolver.PrintUrl, this, null);
                }

                this.InitialAll();
                this.BindTransformer();
                this.lblMessage.Text = "翻箱成功!";
            }
            catch (FaultException ex)
            {
                MessageBox.Show(this, Utility.FormatExMessage(ex.Message), "错误:翻箱失败!", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                this.tbBarCode.Focus();
                //InitialAll();
            }
            catch (Exception ex)
            {
                MessageBox.Show(this, ex.Message, "程序内部错误,请与管理员联系", MessageBoxButtons.OK, MessageBoxIcon.Error);
                this.InitialAll();
            }
        }
Esempio n. 4
0
 protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
 {
     try
     {
         if (keyData == Keys.Enter)
         {
             this.gvList.EndEdit();
             if (this.gvList.Focused)
             {
                 this.btnConfirm.Focus();
                 return(true);
             }
         }
         else if (keyData == (Keys.Control | Keys.P))
         {
             if (this.resolver.PrintUrl != null && this.resolver.PrintUrl != string.Empty)
             {
                 Utility.PrintOrder(this.resolver.PrintUrl, this, null);
             }
             return(true);
         }
     }
     catch (Exception)
     {
         this.InitialAll();
         return(true);
     }
     return(base.ProcessCmdKey(ref msg, keyData));
 }
Esempio n. 5
0
 protected override void OrderConfirm()
 {
     base.OrderConfirm();
     if (this.resolver.PrintUrl != null && this.resolver.PrintUrl != string.Empty && this.resolver.NeedPrintReceipt)
     {
         Utility.PrintOrder(this.resolver.PrintUrl, this, null);
     }
 }
Esempio n. 6
0
 private void OrderOffline()
 {
     if (!Utility.IsHasTransformer(this.resolver))
     {
         this.lblMessage.Text = "明细不能为空";
         this.tbBarCode.Focus();
         return;
     }
     Utility.RemoveLot(resolver);
     this.resolver.PrintUrl = string.Empty;
     this.resolver.Input    = BusinessConstants.BARCODE_SPECIAL_MARK + BusinessConstants.BARCODE_HEAD_OK;
     this.resolver          = TheClientMgr.ScanBarcode(this.resolver);
     if (this.resolver.AutoPrintHu && this.resolver.PrintUrl != null && this.resolver.PrintUrl != string.Empty)
     {
         Utility.PrintOrder(this.resolver.PrintUrl, this, null);
     }
     this.lblMessage.Text = this.resolver.Result;
     InitialAll();
 }
Esempio n. 7
0
 private void ReceiveOrder()
 {
     try
     {
         if (this.resolver.Transformers != null && this.resolver.Transformers.Length > 0)
         {
             List <string[]> workingHoursList = new List <string[]>();
             foreach (DataRow dr in this.dt.Rows)
             {
                 string[] stringArray = new string[2];
                 stringArray[0] = dr[0].ToString();
                 stringArray[1] = dr[2].ToString();
                 workingHoursList.Add(stringArray);
             }
             this.resolver.WorkingHours = workingHoursList.ToArray();
             this.resolver.Input        = BusinessConstants.BARCODE_SPECIAL_MARK + BusinessConstants.BARCODE_HEAD_OK;
             this.resolver = TheClientMgr.ScanBarcode(this.resolver);
             if (this.resolver.AutoPrintHu)
             {
                 Utility.PrintOrder(this.resolver.PrintUrl, this, null);
             }
             this.InitialAll();
             this.lblMessage.Text      = "收货成功!";
             this.lblMessage.ForeColor = Color.Green;
         }
         else
         {
             MessageBox.Show(this, "没有可收的货物!", "收货失败", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
     catch (FaultException ex)
     {
         MessageBox.Show(this, Utility.FormatExMessage(ex.Message));
     }
     catch (Exception ex)
     {
         this.InitialAll();
         MessageBox.Show(this, ex.Message, "收货失败", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Esempio n. 8
0
 private void DoPrint(string printUrl, string printer)
 {
     Utility.PrintOrder(printUrl, this, printer);
 }