Пример #1
0
        //获得箱的相关信息
        public void GetData(string lotCode)
        {
            object[] objobjSimulations = m_DataCollectFacade.QueryLotSimulationReport(lotCode);
            if (objobjSimulations == null)
            {
                return;
            }
            LotSimulationReport objSimulation = objobjSimulations[0] as LotSimulationReport;

            if (objSimulation != null)
            {
                this.m_CartonCollection                 = new CartonCollection();
                this.m_CartonCollection.CAPACITY        = m_CartonCapacity;
                this.m_CartonCollection.COLLECTED       = objSimulation.LotQty - m_PackageFacade.SumCartonQty(lotCode.Trim().ToUpper());
                this.m_CartonCollection.MOCode          = objSimulation.MOCode;
                this.m_CartonCollection.ItemCode        = objSimulation.ItemCode;
                this.m_CartonCollection.ItemDescription = ((m_PackageFacade.GetItemCodeByMOCode(objSimulation.MOCode)) as CartonCollection).ItemDescription;

                object[] objs = m_PackageFacade.GetCarton2LotByLotCode(lotCode);
                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)
                {
                    object obj = m_PackageFacade.GetItemCodeByMOCode(this.m_Carton2Lot[0].MOCode);
                    if (obj != null)
                    {
                        //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;
                        //    }
                        //}
                    }
                }
            }
        }