IsHasTransformerDetail() public static method

public static IsHasTransformerDetail ( Resolver resolver ) : bool
resolver Resolver
return bool
コード例 #1
0
 protected virtual void OrderConfirm()
 {
     try
     {
         if (Utility.IsHasTransformerDetail(this.resolver))
         {
             this.isKeyUp            = false;
             this.resolver.Input     = BusinessConstants.BARCODE_SPECIAL_MARK + BusinessConstants.BARCODE_HEAD_OK;
             this.resolver           = TheSmartDeviceMgr.ScanBarcode(this.resolver);
             this.lblMessage.Text    = this.resolver.Result;
             this.lblMessage.Visible = true;
             this.InitialAll();
         }
         else
         {
             this.btnHidden.Focus();
             Utility.ShowMessageBox("明细不能为空");
         }
     }
     catch (SoapException ex)
     {
         this.btnHidden.Focus();
         this.lblMessage.Text    = Utility.FormatExMessage(ex.Message);
         this.lblMessage.Visible = true;
         Utility.ShowMessageBox(ex.Message);
     }
     catch (Exception ex)
     {
         this.InitialAll();
         this.btnHidden.Focus();
         Utility.ShowMessageBox(ex.Message);
     }
 }
コード例 #2
0
        protected virtual void tbBarCode_KeyUp(object sender, KeyEventArgs e)
        {
            try
            {
                if ((e.KeyData & Keys.KeyCode) == Keys.Enter)
                {
                    this.BarCodeScan();
                }
                else if (((e.KeyData & Keys.KeyCode) == Keys.Escape))
                {
                    if (!Utility.IsHasTransformerDetail(this.resolver))
                    {
                        return;
                    }
                    if (this.enableCache)
                    {
                        Utility.CancelOperation(this.resolver);
                    }
                    else
                    {
                        this.resolver.Input = BusinessConstants.BARCODE_SPECIAL_MARK + BusinessConstants.BARCODE_HEAD_CANCEL;
                        this.resolver       = TheSmartDeviceMgr.ScanBarcode(this.resolver);
                    }
                    this.DataBind();
                }
                else if ((e.KeyData & Keys.KeyCode) == Keys.F1)
                {
                    string message = HelpMessage();
                    Utility.ShowMessageBox(message);
                }

                this.tbBarCode.Text = this.tbBarCode.Text.Trim();
                this.tbBarCode.Select(this.tbBarCode.TextLength, 0);
                if (!this.timerCtrl.Enabled)
                {
                    //this.timerCtrl.Enabled = true;
                    this.timerCtrl.Interval = 2000;
                }
            }
            catch (SoapException ex)
            {
                this.btnHidden.Focus();
                this.tbBarCode.Text = string.Empty;
                Utility.ShowMessageBox(ex.Message);
            }
            catch (Exception ex)
            {
                this.InitialAll();
                this.btnHidden.Focus();
                Utility.ShowMessageBox(ex.Message);
            }
        }
コード例 #3
0
        protected override void BarCodeScan()
        {
            //不汇总 不考虑非HU检验
            this.tbBarCode.Text = this.tbBarCode.Text.Trim();

            #region 当输入框为空时,按回车焦点跳转
            if (Utility.IsHasTransformerDetail(this.resolver) && this.tbBarCode.Text.Trim() == string.Empty)
            {
                if (this.resolver.IsScanHu)
                {
                    this.btnOrder.Focus();
                    this.gvHuListDataBind();
                }
                return;
            }
            #endregion

            base.BarCodeScan();
        }
コード例 #4
0
        protected virtual void BarCodeScan()
        {
            this.tbBarCode.Text = this.tbBarCode.Text.Trim();

            #region 当输入框为空时,按回车焦点跳转
            if (Utility.IsHasTransformerDetail(this.resolver) && this.tbBarCode.Text == string.Empty)
            {
                this.gvListDataBind();
                //if (this.resolver.IsScanHu /*|| this.resolver.IsDetailContainHu*/)
                //{
                this.btnOrder.Focus();
                //}
                //else
                //{
                //    this.dgList.Focus();
                //    this.dgList.Select(0);
                //    dgList_Click(null, null);
                //}
                return;
            }
            if (this.tbBarCode.Text == string.Empty)
            {
                return;
            }
            #endregion
            else
            {
                this.resolver.Input = this.tbBarCode.Text;
                if (this.enableCache)
                {
                    this.originalResolver = Utility.ProcessOriginalResolver(this.resolver, this.originalResolver);
                    this.originalResolver = TheSmartDeviceMgr.ScanBarcode(this.originalResolver);
                    this.resolver         = Utility.MergeResolver(this.resolver, this.originalResolver);
                }
                else
                {
                    this.resolver = TheSmartDeviceMgr.ScanBarcode(this.resolver);
                }
                this.DataBind();
            }
        }