//获得箱的相关信息 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; // } //} } } } }
//private void RefreshCartonNumber() //{ // string cartonNo = FormatHelper.CleanString(this.ucLabelCartonNo.Value.Trim().ToUpper()); // CARTONINFO objCartonInfo = (new Package.PackageFacade(DataProvider)).GetCARTONINFO(cartonNo) as CARTONINFO; // //Refresh CartonCapacity and Lot Capacity // if (objCartonInfo != null) // { // this.ucLabelCartonCollected.Value = objCartonInfo.COLLECTED.ToString(); // } // else // { // this.ucLabelCartonCollected.Value = ""; // } // //Check // if (objCartonInfo != null && objCartonInfo.CAPACITY == objCartonInfo.COLLECTED) // { // ucMessage.AddEx(this._FunctionName, "包装箱号: " + this.ucLabelCartonNo.Value, new UserControl.Message(MessageType.Normal, "$CARTON_ALREADY_FULL_PlEASE_CHANGE"), false); // this.m_FlowControl = 1; // this.SetInputMessageByFlowControl(); // return; // } // this.m_FlowControl = 3; // this.SetInputMessageByFlowControl(); // //End Add //} public void GetData(string cartonNo) { PackageFacade pf = new PackageFacade(DataProvider); CARTONINFO objCartonInfo = pf.GetCARTONINFO(cartonNo) as CARTONINFO; if (objCartonInfo != null) { this.cartonCollection = new CartonCollection(); this.cartonCollection.CAPACITY = objCartonInfo.CAPACITY; this.cartonCollection.COLLECTED = objCartonInfo.COLLECTED; object[] objs = pf.GetCarton2RCARDByCartonNO(cartonNo); if (objs != null) { this.carton2RCARD = new Carton2RCARD[objs.Length]; for (int i = 0; i < objs.Length; i++) { this.carton2RCARD[i] = (Carton2RCARD)objs[i]; } } if (this.carton2RCARD != null) { this.cartonCollection.MOCode = this.carton2RCARD[0].MOCode; object obj = pf.GetItemCodeByMOCode(this.carton2RCARD[0].MOCode); if (obj != null) { this.cartonCollection.ItemCode = ((CartonCollection)obj).ItemCode; this.cartonCollection.ItemDescription = ((CartonCollection)obj).ItemDescription; ItemFacade itemFacade = new ItemFacade(this.DataProvider); Item2SNCheck item2SNCheck = (Item2SNCheck)itemFacade.GetItem2SNCheck(((CartonCollection)obj).ItemCode, ItemCheckType.ItemCheckType_SERIAL); if (item2SNCheck != null) { if (item2SNCheck.SNLength > 0) { chkCardLen.Checked = true; chkCardLen.Value = item2SNCheck.SNLength.ToString(); } if (!string.IsNullOrEmpty(item2SNCheck.SNPrefix)) { chkCardFChar.Checked = true; chkCardFChar.Value = item2SNCheck.SNPrefix; } } } } } }
//获得箱的相关信息 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; //} } } } } }
//设置需要显示的信息 public void SetUCLabelValue(CartonCollection cartonCollection) { if (cartonCollection == null) { this.ucLabelItemCode.Value = string.Empty; //this.ucLabelItemName.Value = string.Empty; this.ucLabelMOCode.Value = string.Empty; this.ucLabelCartonCapacity.Value = string.Empty; this.ucLabelCartonCollecting.Value = string.Empty; } else { this.ucLabelItemCode.Value = cartonCollection.ItemCode + "-" + cartonCollection.ItemDescription; //this.ucLabelItemName.Value = cartonCollection.ItemDescription; this.ucLabelMOCode.Value = cartonCollection.MOCode; this.ucLabelCartonCapacity.Value = cartonCollection.CAPACITY.ToString(); this.ucLabelCartonCollecting.Value = cartonCollection.COLLECTED.ToString(); } this.m_CartonCollection = null; }