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

            if (base.op == CodeMaster.BarCodeType.INS.ToString())
            {
                this.Reset();
                this.inspectMaster = base.smartDeviceService.GetInspect(base.barCode, true);

                //检查订单类型
                if (this.inspectMaster.Type == InspectType.Quantity)
                {
                    throw new BusinessException("不能执行数量检验单");
                }
                //检查订单状态
                if (this.inspectMaster.Status == InspectStatus.Close)
                {
                    throw new BusinessException("已关闭状态的检验单不能判定");
                }

                if (this.inspectMaster.InspectDetails == null || this.inspectMaster.InspectDetails.Length == 0)
                {
                    throw new BusinessException("没有检验单明细");
                }
                foreach (var inspectDetail in this.inspectMaster.InspectDetails)
                {
                    inspectDetail.CurrentQty = inspectDetail.InspectQty;
                }
                this.gvListDataBind();
            }
            else if (base.op == CodeMaster.BarCodeType.HU.ToString())
            {
                if (this.inspectMaster == null)
                {
                    throw new BusinessException("请先扫描检验单");
                }

                Hu hu = smartDeviceService.GetHu(barCode);
                //
                this.MatchHu(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.inspectMaster = null;
     base.Reset();
     this.lblMessage.Text = "请扫描检验单";
     this.effDate = null;
 }
Exemplo n.º 3
0
 /// <remarks/>
 public System.IAsyncResult BeginDoJudgeInspect(InspectMaster inspectMaster, string[] HuIdList, System.Nullable<System.DateTime> effDate, string userCode, System.AsyncCallback callback, object asyncState) {
     return this.BeginInvoke("DoJudgeInspect", new object[] {
                 inspectMaster,
                 HuIdList,
                 effDate,
                 userCode}, callback, asyncState);
 }
Exemplo n.º 4
0
 public void DoJudgeInspect(InspectMaster inspectMaster, string[] HuIdList, [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] System.Nullable<System.DateTime> effDate, string userCode) {
     this.Invoke("DoJudgeInspect", new object[] {
                 inspectMaster,
                 HuIdList,
                 effDate,
                 userCode});
 }