Beispiel #1
0
        //获得箱的相关信息
        public void GetData(string cartonNo)
        {
            CARTONINFO objCartonInfo = m_PackageFacade.GetCARTONINFO(cartonNo) as CARTONINFO;

            if (objCartonInfo != null)
            {
                this.m_CartonCollection           = new CartonCollection();
                this.m_CartonCollection.CAPACITY  = objCartonInfo.CAPACITY;
                this.m_CartonCollection.COLLECTED = objCartonInfo.COLLECTED;

                object[] objs = m_PackageFacade.GetCarton2LotByCartonNO(cartonNo);
                if (objs != null)
                {
                    this.m_Carton2Lot = new Carton2Lot[objs.Length];
                    for (int i = 0; i < objs.Length; i++)
                    {
                        this.m_Carton2Lot[i] = (Carton2Lot)objs[i];
                    }
                }
                if (this.m_Carton2Lot != null)
                {
                    this.m_CartonCollection.MOCode = this.m_Carton2Lot[0].MOCode;
                    object obj = m_PackageFacade.GetItemCodeByMOCode(this.m_Carton2Lot[0].MOCode);
                    if (obj != null)
                    {
                        this.m_CartonCollection.ItemCode        = ((CartonCollection)obj).ItemCode;
                        this.m_CartonCollection.ItemDescription = ((CartonCollection)obj).ItemDescription;
                        Item2LotCheck item2LotCheck = (Item2LotCheck)m_ItemLotFacade.GetItem2LotCheck(((CartonCollection)obj).ItemCode);
                        if (item2LotCheck != null)
                        {
                            //if (item2LotCheck.SNLength > 0)
                            //{
                            //    chkLotCodeLen.Checked = true;
                            //    chkLotCodeLen.Value = item2LotCheck.SNLength.ToString();
                            //}

                            //if (!string.IsNullOrEmpty(item2LotCheck.SNPrefix))
                            //{
                            //    chkLotCodeFChar.Checked = true;
                            //    chkLotCodeFChar.Value = item2LotCheck.SNPrefix;
                            //}
                        }
                    }
                }
            }
        }
        /// <summary>
        /// 获取当前需要处理的实体,新增和保存时均会调用
        /// </summary>
        /// <returns>需要处理的object</returns>
        protected override object GetEditObject()
        {
            if (m_ItemLotFacade == null)
            {
                m_ItemLotFacade = new ItemLotFacade(this.DataProvider);
            }

            Item2LotCheck item2LotCheck = this.m_ItemLotFacade.CreateNewItem2LotCheck();

            item2LotCheck.ItemCode = FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtItemCode.Text, 40));
            item2LotCheck.SNPrefix = FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtSNPrefix.Text, 40));
            if (this.txtSNLength.Text.Trim().Length > 0)
            {
                item2LotCheck.SNLength = int.Parse(this.txtSNLength.Text);
            }
            item2LotCheck.CreateType     = this.RadioButtonListCreateTypeEdit.SelectedValue;
            item2LotCheck.SNContentCheck = this.chkSNContentCheck.Checked ? SNContentCheckStatus.SNContentCheckStatus_Need : SNContentCheckStatus.SNContentCheckStatus_NONeed;
            item2LotCheck.MUser          = this.GetUserCode();

            return(item2LotCheck);
        }
Beispiel #3
0
 public void DeleteItem2LotCheck(Item2LotCheck item2LotCheck)
 {
     this._helper.DeleteDomainObject(item2LotCheck);
 }
Beispiel #4
0
 public void UpdateItem2LotCheck(Item2LotCheck item2LotCheck)
 {
     this._helper.UpdateDomainObject(item2LotCheck);
 }
Beispiel #5
0
 public void AddItem2LotCheck(Item2LotCheck item2LotCheck)
 {
     this._helper.AddDomainObject(item2LotCheck);
 }