Exemplo n.º 1
0
        protected override void ScanBarCode()
        {
            base.ScanBarCode();

            if (base.op == CodeMaster.BarCodeType.T.ToString())
            {
                var transOrder = this.smartDeviceService.GetTransOrder(base.barCode);
                if (transOrder != null && transOrder.TransportOrderDetailList != null)
                {
                    this.transOrderMaster = transOrder;
                    this.gvListDataBind();
                }
                
            }
            else if (base.op == CodeMaster.BarCodeType.HU.ToString() || base.op == CodeMaster.BarCodeType.DC.ToString())
            {
                if (this.transOrderMaster == null )
                {
                    DialogResult dr = MessageBox.Show("本次发货不扫描运单发货?", "非运单发货", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2);
                    if (dr == DialogResult.No)
                    {
                        this.tbBarCode.Focus();
                        return;
                    }
                    //throw new BusinessException("请先扫描订单");
                }

                Hu hu = smartDeviceService.GetShipHu(base.op == CodeMaster.BarCodeType.HU.ToString() ? base.barCode:string.Empty , base.op == CodeMaster.BarCodeType.HU.ToString() ? string.Empty : base.barCode);

                this.hus.Add(hu);
            }
            else if (base.op == CodeMaster.BarCodeType.DATE.ToString())
            {
                base.barCode = base.barCode.Substring(2, base.barCode.Length - 2);
                this.effDate = base.smartDeviceService.GetEffDate(base.barCode);

                this.lblMessage.Text = "生效时间:" + this.effDate.Value.ToString("yyyy-MM-dd HH:mm");
                this.tbBarCode.Text = string.Empty;
                this.tbBarCode.Focus();
            }
            else
            {
                throw new BusinessException("条码格式不合法");
            }
        }
Exemplo n.º 2
0
 protected override void Reset()
 {
     this.transOrderMaster = new TransportOrderMaster();
     base.Reset();
     this.lblMessage.Text = "请扫描运单或条码";
     this.effDate = null;
 }