Exemplo n.º 1
0
        protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
        {
            if (keyData == (Keys.Control | Keys.Enter))
            {
                this.btnShip_Click(null, null);
                return(true);
            }
            else if (keyData == (Keys.Control | Keys.P))
            {
                this.PrintReceiver();
                return(true);
            }

            if (this.tbBarCode.Focused)
            {
                if (keyData == Keys.Enter)
                {
                    this.OrderNoScan();
                    return(true);
                }
                if (keyData == Keys.Escape)
                {
                    this.resolver.Input = BusinessConstants.BARCODE_SPECIAL_MARK + BusinessConstants.BARCODE_HEAD_CANCEL;
                    this.resolver       = TheClientMgr.ScanBarcode(this.resolver);
                    this.DataBind();
                }
            }
            else if (this.btnShipReturn.Focused)
            {
                if (keyData == Keys.Enter)
                {
                    this.OrderConfirm();
                    return(true);
                }
            }
            else if (this.gvList.Focused)
            {
                if (keyData == Keys.Enter)
                {
                    if (this.resolver != null && !this.resolver.IsScanHu)
                    {
                        int currentRowIndex = this.gvList.CurrentCell.RowIndex;
                        if (currentRowIndex == this.gvList.Rows.Count - 1)
                        {
                            this.gvHuList.ClearSelection();
                            this.btnShipReturn.Focus();
                        }
                    }
                    else
                    {
                        this.btnShipReturn.Focus();
                    }
                }
            }
            return(base.ProcessCmdKey(ref msg, keyData));
        }
Exemplo n.º 2
0
        private void WorkOrderScan()
        {
            try
            {
                this.InitialAll();
                if (orderNo.Length > 5)
                {
                    this.resolver.Input      = this.orderNo;
                    this.resolver.UserCode   = this.user.Code;
                    this.resolver.ModuleType = this.moduleType;

                    this.resolver = TheClientMgr.ScanBarcode(this.resolver);

                    this.lblMessage.Text      = resolver.Result;
                    this.lblMessage.ForeColor = Color.Black;
                    //this.resolver = TheClientMgr.GetTransformer(this.resolver);

                    this.gvOrderDataBind();
                    if (this.gvWODetail.Rows.Count > 0)
                    {
                        this.gvWODetail.Rows[0].Cells[this.gvWODetail.ColumnCount - 1].Selected = true;
                    }
                    this.gvWODetail.Focus();
                    //SendKeys.Send("{Tab}");
                    this.tbWO.Text      = this.orderNo;
                    this.tbWO.ForeColor = Color.Black;
                }
                else
                {
                    this.tbWO.Text            = string.Empty;
                    this.lblMessage.Text      = "请输入正确的工单号!";
                    this.lblMessage.ForeColor = Color.Red;
                    this.tbWO.Focus();
                }
            }
            catch (FaultException ex)
            {
                MessageBox.Show(this, Utility.FormatExMessage(ex.Message));
                this.tbWO.Text = string.Empty;
                this.tbWO.Focus();
            }
            catch (Exception ex)
            {
                MessageBox.Show(this, ex.Message, "程序内部错误,请与管理员联系", MessageBoxButtons.OK, MessageBoxIcon.Error);
                this.tbWO.Text = string.Empty;
                this.tbWO.Focus();
            }
        }
Exemplo n.º 3
0
 private void BtnStart_Click(object sender, EventArgs e)
 {
     this.resolver.Input = BusinessConstants.BARCODE_SPECIAL_MARK + BusinessConstants.BARCODE_HEAD_NOTE + this.txtHuId.Text.Trim();
     resolver            = TheClientMgr.ScanBarcode(resolver);
     this.txtHuId.Text   = string.Empty;
     Databind();
 }
Exemplo n.º 4
0
 private void BarCodeScan()
 {
     try
     {
         if (Utility.IsHasTransformer(this.resolver) && this.tbBarCode.Text.Trim() == string.Empty)
         {
             if (this.resolver.IOType == BusinessConstants.IO_TYPE_IN)
             {
                 this.resolver.IOType = BusinessConstants.IO_TYPE_OUT;
                 this.lblBarCode.Text = "拆箱后条码";
                 this.tbBarCode.Focus();
             }
             else if (this.resolver.Transformers[1] != null && this.resolver.Transformers[1].TransformerDetails != null &&
                      this.resolver.Transformers[1].TransformerDetails.Length > 0)
             {
                 this.btnDevanning.Focus();
             }
             return;
         }
         if (this.tbBarCode.Text.Trim() == string.Empty)
         {
             return;
         }
         this.tbBarCode.Text      = this.tbBarCode.Text.Trim();
         this.resolver.Input      = this.tbBarCode.Text;
         this.resolver.UserCode   = this.user.Code;
         this.resolver.ModuleType = BusinessConstants.TRANSFORMER_MODULE_TYPE_DEVANNING;
         this.resolver            = TheClientMgr.ScanBarcode(this.resolver);
         this.BindTransformer();
     }
     catch (FaultException ex)
     {
         MessageBox.Show(this, Utility.FormatExMessage(ex.Message), "获取扫条码信息失败!", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         this.tbBarCode.Text = string.Empty;
         this.tbBarCode.Focus();
         this.lblMessage.Text      = Utility.FormatExMessage(ex.Message);
         this.lblMessage.ForeColor = Color.Red;
     }
     catch (Exception ex)
     {
         MessageBox.Show(this, ex.Message, "程序内部错误, 请与管理员联系", MessageBoxButtons.OK, MessageBoxIcon.Error);
         this.InitialAll();
     }
 }
Exemplo n.º 5
0
        private void CodeScan()
        {
            try
            {
                this.tbWO.Text = this.tbWO.Text.Trim().ToUpper();
                string woNo = this.tbWO.Text;
                this.resolver.Input = woNo;
                ClientMgrWSSoapClient TheClientMgr = new ClientMgrWSSoapClient();

                if (this.resolver.Input == string.Empty || this.resolver.Input == null)
                {
                    this.lblmessage.Text = "请扫描工单";
                    this.tbWO.Focus();
                    return;
                }
                string onlineDate = TheClientMgr.ScanBarcode(resolver).Result;
                this.lblmessage.Text = "工单:" + woNo + "上线成功!";
                if (resolver.ModuleType == BusinessConstants.TRANSFORMER_MODULE_TYPE_PICKLISTONLINE)
                {
                    this.lblmessage.Text = "拣货单:" + woNo + "上线成功!";
                }
                this.lblmessage.ForeColor = Color.Green;
                this.ShowOrders(woNo, onlineDate);
                this.tbWO.ForeColor = Color.Black;
                this.tbWO.Text      = string.Empty;
                this.tbWO.Focus();
            }
            catch (FaultException ex)
            {
                MessageBox.Show(this, Utility.FormatExMessage(ex.Message));
                this.tbWO.Text = string.Empty;
            }
            catch (Exception ex)
            {
                MessageBox.Show(this, ex.Message, "程序内部错误,请与管理员联系", MessageBoxButtons.OK, MessageBoxIcon.Error);
                this.tbWO.Text = string.Empty;
            }
        }
Exemplo n.º 6
0
        private void CodeScan()
        {
            try
            {
                this.tbWO.Text = this.tbWO.Text.Trim().ToUpper();
                string woNo = this.tbWO.Text;
                this.resolver.Input = woNo;
                ClientMgrWSSoapClient TheClientMgr = new ClientMgrWSSoapClient();

                if (this.resolver.Input == string.Empty || this.resolver.Input == null)
                {
                    this.lblmessage.Text = "请扫描工单";
                    this.tbWO.Focus();
                    return;
                }
                string onlineDate = TheClientMgr.ScanBarcode(resolver).Result;
                this.lblmessage.Text = "工单:" + woNo + "上线成功!";
                if (resolver.ModuleType == BusinessConstants.TRANSFORMER_MODULE_TYPE_PICKLISTONLINE)
                {
                    this.lblmessage.Text = "拣货单:" + woNo + "上线成功!";
                }
                this.lblmessage.ForeColor = Color.Green;
                this.ShowOrders(woNo, onlineDate);
                this.tbWO.ForeColor = Color.Black;
                this.tbWO.Text = string.Empty;
                this.tbWO.Focus();
            }
            catch (FaultException ex)
            {
                MessageBox.Show(this, Utility.FormatExMessage(ex.Message));
                this.tbWO.Text = string.Empty;
            }
            catch (Exception ex)
            {
                MessageBox.Show(this, ex.Message, "程序内部错误,请与管理员联系", MessageBoxButtons.OK, MessageBoxIcon.Error);
                this.tbWO.Text = string.Empty;
            }
        }
Exemplo n.º 7
0
        protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
        {
            if (keyData == (Keys.Control | Keys.Enter))
            {
                this.btnOrderReturn_Click(null, null);
                return(true);
            }
            else if (keyData == (Keys.Control | Keys.P))
            {
                this.PrintReceiver();
                return(true);
            }

            if (this.tbBarCode.Focused)
            {
                if (keyData == Keys.Enter)
                {
                    this.OrderNoScan();
                    return(true);
                }
                if (keyData == Keys.Escape)
                {
                    try
                    {
                        this.tbBarCode.Focus();
                        this.tbBarCode.Text = string.Empty;
                        this.resolver.Input = BusinessConstants.BARCODE_SPECIAL_MARK + BusinessConstants.BARCODE_HEAD_CANCEL;
                        this.resolver       = TheClientMgr.ScanBarcode(this.resolver);
                        this.DataBind();
                    }
                    catch (FaultException ex)
                    {
                        this.lblMessage.Text = Utility.FormatExMessage(ex.Message);
                        MessageBox.Show(this, Utility.FormatExMessage(ex.Message), "扫描条码失败", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show(this, ex.Message, "程序内部错误,请与管理员联系", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        this.InitialAll();
                    }
                }
            }
            else if (this.btnOrderReturn.Focused)
            {
                if (keyData == Keys.Enter)
                {
                    this.OrderConfirm();
                    return(true);
                }
            }
            else if (this.gvList.Focused)
            {
                if (keyData == Keys.Enter)
                {
                    if (this.resolver != null && !this.resolver.IsScanHu)
                    {
                        int currentRowIndex = this.gvList.CurrentCell.RowIndex;
                        if (currentRowIndex == this.gvList.Rows.Count - 1)
                        {
                            this.gvHuList.ClearSelection();
                            this.btnOrderReturn.Focus();
                        }
                    }
                    else
                    {
                        this.btnOrderReturn.Focus();
                    }
                }
            }
            return(base.ProcessCmdKey(ref msg, keyData));
        }
Exemplo n.º 8
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            try
            {
                lock (locker)
                {
                    string regionCode = this.txtRegion1.Text.Trim();
                    if (regionCode != null && regionCode.Trim() != string.Empty)
                    {
                        this.resolver.Input = BusinessConstants.BARCODE_SPECIAL_MARK + BusinessConstants.BARCODE_HEAD_NOTE;

                        if (this.cbRec1.Checked)
                        {
                            this.resolver.Input += BusinessConstants.PRINT_ORDER_TYPE_RECEIPT;
                        }

                        if (this.cbASN1.Checked)
                        {
                            if (this.resolver.Input.Length > 2)
                            {
                                this.resolver.Input += "|" + BusinessConstants.PRINT_ORDER_TYPE_ASN;
                            }
                            else
                            {
                                this.resolver.Input += BusinessConstants.PRINT_ORDER_TYPE_ASN;
                            }
                        }

                        if (this.cbPL1.Checked)
                        {
                            if (this.resolver.Input.Length > 2)
                            {
                                this.resolver.Input += "|" + BusinessConstants.PRINT_ORDER_TYPE_PICKLIST;
                            }
                            else
                            {
                                this.resolver.Input += BusinessConstants.PRINT_ORDER_TYPE_PICKLIST;
                            }
                        }

                        if (this.cbInp1.Checked)
                        {
                            if (this.resolver.Input.Length > 2)
                            {
                                this.resolver.Input += "|" + BusinessConstants.PRINT_ORDER_TYPE_INSPECT;
                            }
                            else
                            {
                                this.resolver.Input += BusinessConstants.PRINT_ORDER_TYPE_INSPECT;
                            }
                        }

                        if (this.cbOrd1.Checked)
                        {
                            if (this.resolver.Input.Length > 2)
                            {
                                this.resolver.Input += "|" + BusinessConstants.PRINT_ORDER_TYPE_ORDER;
                            }
                            else
                            {
                                this.resolver.Input += BusinessConstants.PRINT_ORDER_TYPE_ORDER;
                            }
                        }

                        if (this.resolver.Input.Length > 2 && regionCode != string.Empty)
                        {
                            this.resolver.Input += "&" + regionCode;
                            resolver             = TheClientMgr.ScanBarcode(resolver);
                            if (resolver.ReceiptNotes != null)
                            {
                                foreach (ReceiptNote receiptNote in resolver.ReceiptNotes)
                                {
                                    DoPrint(receiptNote.PrintUrl, (this.comboBoxPrint1.SelectedItem == null ? string.Empty : this.comboBoxPrint1.SelectedItem.ToString()));
                                    receiptNote.Dock = this.comboBoxPrint1.SelectedItem == null ? string.Empty : this.comboBoxPrint1.SelectedItem.ToString();
                                }
                            }
                            Databind();
                        }
                    }

                    string regionCode2 = this.txtRegion2.Text.Trim();
                    if (regionCode2 != null && regionCode2.Trim() != string.Empty)
                    {
                        this.resolver.Input = BusinessConstants.BARCODE_SPECIAL_MARK + BusinessConstants.BARCODE_HEAD_NOTE;

                        if (this.cbRec2.Checked)
                        {
                            this.resolver.Input += BusinessConstants.PRINT_ORDER_TYPE_RECEIPT;
                        }

                        if (this.cbASN2.Checked)
                        {
                            if (this.resolver.Input.Length > 2)
                            {
                                this.resolver.Input += "|" + BusinessConstants.PRINT_ORDER_TYPE_ASN;
                            }
                            else
                            {
                                this.resolver.Input += BusinessConstants.PRINT_ORDER_TYPE_ASN;
                            }
                        }

                        if (this.cbPL2.Checked)
                        {
                            if (this.resolver.Input.Length > 2)
                            {
                                this.resolver.Input += "|" + BusinessConstants.PRINT_ORDER_TYPE_PICKLIST;
                            }
                            else
                            {
                                this.resolver.Input += BusinessConstants.PRINT_ORDER_TYPE_PICKLIST;
                            }
                        }

                        if (this.cbInp2.Checked)
                        {
                            if (this.resolver.Input.Length > 2)
                            {
                                this.resolver.Input += "|" + BusinessConstants.PRINT_ORDER_TYPE_INSPECT;
                            }
                            else
                            {
                                this.resolver.Input += BusinessConstants.PRINT_ORDER_TYPE_INSPECT;
                            }
                        }

                        if (this.cbOrd2.Checked)
                        {
                            if (this.resolver.Input.Length > 2)
                            {
                                this.resolver.Input += "|" + BusinessConstants.PRINT_ORDER_TYPE_ORDER;
                            }
                            else
                            {
                                this.resolver.Input += BusinessConstants.PRINT_ORDER_TYPE_ORDER;
                            }
                        }

                        if (this.resolver.Input.Length > 2 && regionCode2 != string.Empty)
                        {
                            this.resolver.Input += "&" + regionCode2;
                            resolver             = TheClientMgr.ScanBarcode(resolver);
                            if (resolver.ReceiptNotes != null)
                            {
                                foreach (ReceiptNote receiptNote in resolver.ReceiptNotes)
                                {
                                    DoPrint(receiptNote.PrintUrl, (this.comboBoxPrint2.SelectedItem == null ? string.Empty : this.comboBoxPrint2.SelectedItem.ToString()));
                                    receiptNote.Dock = this.comboBoxPrint2.SelectedItem == null ? string.Empty : this.comboBoxPrint2.SelectedItem.ToString();
                                }
                            }
                            Databind();
                        }
                    }

                    string regionCode3 = this.txtRegion3.Text.Trim();
                    if (regionCode3 != null && regionCode3.Trim() != string.Empty)
                    {
                        this.resolver.Input = BusinessConstants.BARCODE_SPECIAL_MARK + BusinessConstants.BARCODE_HEAD_NOTE;

                        if (this.cbRec3.Checked)
                        {
                            this.resolver.Input += BusinessConstants.PRINT_ORDER_TYPE_RECEIPT;
                        }

                        if (this.cbASN3.Checked)
                        {
                            if (this.resolver.Input.Length > 2)
                            {
                                this.resolver.Input += "|" + BusinessConstants.PRINT_ORDER_TYPE_ASN;
                            }
                            else
                            {
                                this.resolver.Input += BusinessConstants.PRINT_ORDER_TYPE_ASN;
                            }
                        }

                        if (this.cbPL3.Checked)
                        {
                            if (this.resolver.Input.Length > 2)
                            {
                                this.resolver.Input += "|" + BusinessConstants.PRINT_ORDER_TYPE_PICKLIST;
                            }
                            else
                            {
                                this.resolver.Input += BusinessConstants.PRINT_ORDER_TYPE_PICKLIST;
                            }
                        }

                        if (this.cbInp3.Checked)
                        {
                            if (this.resolver.Input.Length > 2)
                            {
                                this.resolver.Input += "|" + BusinessConstants.PRINT_ORDER_TYPE_INSPECT;
                            }
                            else
                            {
                                this.resolver.Input += BusinessConstants.PRINT_ORDER_TYPE_INSPECT;
                            }
                        }

                        if (this.cbOrd3.Checked)
                        {
                            if (this.resolver.Input.Length > 2)
                            {
                                this.resolver.Input += "|" + BusinessConstants.PRINT_ORDER_TYPE_ORDER;
                            }
                            else
                            {
                                this.resolver.Input += BusinessConstants.PRINT_ORDER_TYPE_ORDER;
                            }
                        }

                        if (this.resolver.Input.Length > 2 && regionCode3 != string.Empty)
                        {
                            this.resolver.Input += "&" + regionCode3;
                            resolver             = TheClientMgr.ScanBarcode(resolver);
                            if (resolver.ReceiptNotes != null)
                            {
                                foreach (ReceiptNote receiptNote in resolver.ReceiptNotes)
                                {
                                    DoPrint(receiptNote.PrintUrl, (this.comboBoxPrint3.SelectedItem == null ? string.Empty : this.comboBoxPrint3.SelectedItem.ToString()));
                                    receiptNote.Dock = this.comboBoxPrint3.SelectedItem == null ? string.Empty : this.comboBoxPrint3.SelectedItem.ToString();
                                }
                            }
                            Databind();
                        }
                    }

                    string regionCode4 = this.txtRegion4.Text.Trim();
                    if (regionCode4 != null && regionCode4.Trim() != string.Empty)
                    {
                        this.resolver.Input = BusinessConstants.BARCODE_SPECIAL_MARK + BusinessConstants.BARCODE_HEAD_NOTE;

                        if (this.cbRec4.Checked)
                        {
                            this.resolver.Input += BusinessConstants.PRINT_ORDER_TYPE_RECEIPT;
                        }

                        if (this.cbASN4.Checked)
                        {
                            if (this.resolver.Input.Length > 2)
                            {
                                this.resolver.Input += "|" + BusinessConstants.PRINT_ORDER_TYPE_ASN;
                            }
                            else
                            {
                                this.resolver.Input += BusinessConstants.PRINT_ORDER_TYPE_ASN;
                            }
                        }

                        if (this.cbPL4.Checked)
                        {
                            if (this.resolver.Input.Length > 2)
                            {
                                this.resolver.Input += "|" + BusinessConstants.PRINT_ORDER_TYPE_PICKLIST;
                            }
                            else
                            {
                                this.resolver.Input += BusinessConstants.PRINT_ORDER_TYPE_PICKLIST;
                            }
                        }

                        if (this.cbInp4.Checked)
                        {
                            if (this.resolver.Input.Length > 2)
                            {
                                this.resolver.Input += "|" + BusinessConstants.PRINT_ORDER_TYPE_INSPECT;
                            }
                            else
                            {
                                this.resolver.Input += BusinessConstants.PRINT_ORDER_TYPE_INSPECT;
                            }
                        }

                        if (this.cbOrd4.Checked)
                        {
                            if (this.resolver.Input.Length > 2)
                            {
                                this.resolver.Input += "|" + BusinessConstants.PRINT_ORDER_TYPE_ORDER;
                            }
                            else
                            {
                                this.resolver.Input += BusinessConstants.PRINT_ORDER_TYPE_ORDER;
                            }
                        }

                        if (this.resolver.Input.Length > 2 && regionCode4 != string.Empty)
                        {
                            this.resolver.Input += "&" + regionCode4;
                            resolver             = TheClientMgr.ScanBarcode(resolver);
                            if (resolver.ReceiptNotes != null)
                            {
                                foreach (ReceiptNote receiptNote in resolver.ReceiptNotes)
                                {
                                    DoPrint(receiptNote.PrintUrl, (this.comboBoxPrint4.SelectedItem == null ? string.Empty : this.comboBoxPrint4.SelectedItem.ToString()));
                                    receiptNote.Dock = this.comboBoxPrint4.SelectedItem == null ? string.Empty : this.comboBoxPrint4.SelectedItem.ToString();
                                }
                            }
                            Databind();
                        }
                    }

                    string regionCode5 = this.txtRegion5.Text.Trim();
                    if (regionCode5 != null && regionCode5.Trim() != string.Empty)
                    {
                        this.resolver.Input = BusinessConstants.BARCODE_SPECIAL_MARK + BusinessConstants.BARCODE_HEAD_NOTE;

                        if (this.cbRec5.Checked)
                        {
                            this.resolver.Input += BusinessConstants.PRINT_ORDER_TYPE_RECEIPT;
                        }

                        if (this.cbASN5.Checked)
                        {
                            if (this.resolver.Input.Length > 2)
                            {
                                this.resolver.Input += "|" + BusinessConstants.PRINT_ORDER_TYPE_ASN;
                            }
                            else
                            {
                                this.resolver.Input += BusinessConstants.PRINT_ORDER_TYPE_ASN;
                            }
                        }

                        if (this.cbPL5.Checked)
                        {
                            if (this.resolver.Input.Length > 2)
                            {
                                this.resolver.Input += "|" + BusinessConstants.PRINT_ORDER_TYPE_PICKLIST;
                            }
                            else
                            {
                                this.resolver.Input += BusinessConstants.PRINT_ORDER_TYPE_PICKLIST;
                            }
                        }

                        if (this.cbInp5.Checked)
                        {
                            if (this.resolver.Input.Length > 2)
                            {
                                this.resolver.Input += "|" + BusinessConstants.PRINT_ORDER_TYPE_INSPECT;
                            }
                            else
                            {
                                this.resolver.Input += BusinessConstants.PRINT_ORDER_TYPE_INSPECT;
                            }
                        }

                        if (this.cbOrd5.Checked)
                        {
                            if (this.resolver.Input.Length > 2)
                            {
                                this.resolver.Input += "|" + BusinessConstants.PRINT_ORDER_TYPE_ORDER;
                            }
                            else
                            {
                                this.resolver.Input += BusinessConstants.PRINT_ORDER_TYPE_ORDER;
                            }
                        }

                        if (this.resolver.Input.Length > 2 && regionCode5 != string.Empty)
                        {
                            this.resolver.Input += "&" + regionCode5;
                            resolver             = TheClientMgr.ScanBarcode(resolver);
                            if (resolver.ReceiptNotes != null)
                            {
                                foreach (ReceiptNote receiptNote in resolver.ReceiptNotes)
                                {
                                    DoPrint(receiptNote.PrintUrl, (this.comboBoxPrint5.SelectedItem == null ? string.Empty : this.comboBoxPrint5.SelectedItem.ToString()));
                                    receiptNote.Dock = this.comboBoxPrint5.SelectedItem == null ? string.Empty : this.comboBoxPrint5.SelectedItem.ToString();
                                }
                            }
                            Databind();
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                //Utility.Log("Error:UCPrintMonitor:" + ex.Message);
            }
        }
Exemplo n.º 9
0
 protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
 {
     try
     {
         if (keyData == (Keys.Control | Keys.Enter))
         {
             this.OrderConfirm();
             return(true);
         }
         else if (keyData == Keys.F1)
         {
             string message = HelpMessage();
             if (message != null)
             {
                 MessageBox.Show(this, message);
             }
         }
         if (this.tbBarCode.Focused)
         {
             if (keyData == Keys.Enter)
             {
                 this.BarCodeScan();
                 return(true);
             }
             if (keyData == Keys.Escape)
             {
                 if (this.enableCache)
                 {
                     Utility.CancelOperation(this.resolver);
                 }
                 else
                 {
                     this.resolver.Input = BusinessConstants.BARCODE_SPECIAL_MARK + BusinessConstants.BARCODE_HEAD_CANCEL;
                     this.resolver       = TheClientMgr.ScanBarcode(this.resolver);
                 }
                 this.DataBind();
                 return(true);
             }
         }
         else if (this.btnConfirm.Focused)
         {
             if (keyData == Keys.Enter)
             {
                 if (this.tbBarCode.Text.Trim() != string.Empty)
                 {
                     this.BarCodeScan();
                 }
                 else
                 {
                     this.OrderConfirm();
                 }
                 return(true);
             }
         }
         else if (this.btnQualified.Visible && this.btnQualified.Focused)
         {
             if (keyData == Keys.Enter)
             {
                 this.btnQualified_Click(null, null);
                 return(true);
             }
         }
         else if (this.gvList.Focused)
         {
             if (keyData == Keys.Enter)
             {
                 if (this.resolver != null && !this.resolver.IsScanHu)
                 {
                     int currentRowIndex = this.gvList.CurrentCell.RowIndex;
                     if (currentRowIndex == this.gvList.Rows.Count - 1)
                     {
                         this.gvHuList.ClearSelection();
                         this.btnConfirm.Focus();
                     }
                 }
                 else
                 {
                     this.btnConfirm.Focus();
                 }
                 return(true);
             }
         }
     }
     catch (Exception ex)
     {
         this.InitialAll();
         return(true);
     }
     return(base.ProcessCmdKey(ref msg, keyData));
 }