private void LoadShipPlanDoc() { if (this.NameValues != null && this.NameValues["BillNoItem"] != null && this.NameValues["ShipCustomer"] != null) { this.Model.ShipPlanView.Clear(); this.Toolbar2.Visible = false; //按照发票号查找预装柜表数据 long shipHead = Convert.ToInt64(this.NameValues["ShipPlanHead"].ToString()); long billNoItem = Convert.ToInt64(this.NameValues["BillNoItem"].ToString()); long customer = Convert.ToInt64(this.NameValues["ShipCustomer"].ToString()); string billNoItem_Code = this.NameValues["BillNoItem_Code"].ToString(); string billNoItem_Name = this.NameValues["BillNoItem_Name"].ToString(); //this.BillNoItemHead125.ID = billNoItem.ToString(); //this.BillNoItemHead125.Value = billNoItem_Code; //this.BillNoItemHead125.Text = billNoItem_Name; if (this.Model.InstalledArkHead.FocusedRecord != null) { this.Model.InstalledArkHead.FocusedRecord.BillNoItemHead = billNoItem; this.Model.InstalledArkHead.FocusedRecord.BillNoItemHead_BillNoItemID = billNoItem_Code; this.Model.InstalledArkHead.FocusedRecord.BillNoItemHead_BillNoItemID = billNoItem_Name; this.Model.InstalledArkHead.FocusedRecord.Customer = customer; this.Model.InstalledArkHead.FocusedRecord.Customer_Code = this.NameValues["ShipCustomer_Code"].ToString(); this.Model.InstalledArkHead.FocusedRecord.Customer_Name = this.NameValues["ShipCustomer_Name"].ToString(); } UFIDA.U9.Cust.GS.FT.OperateShipPlanBP.Proxy.GetShipPlanDocProxy proxy = new OperateShipPlanBP.Proxy.GetShipPlanDocProxy(); List <UFIDA.U9.Cust.GS.FT.OperateShipPlanBP.ShipPlanByBillHeadDTOData> listShipPlan = new List <OperateShipPlanBP.ShipPlanByBillHeadDTOData>(); proxy.BillNoItemHead = billNoItem; proxy.Customer = customer; if (billNoItem == 0) { proxy.Customer = shipHead; } proxy.Type = 1; listShipPlan = proxy.Do(); foreach (UFIDA.U9.Cust.GS.FT.OperateShipPlanBP.ShipPlanByBillHeadDTOData shipDoc in listShipPlan) { ShipPlanViewRecord recourd = this.Model.ShipPlanView.AddNewUIRecord(); recourd.ShipPlanDetailHead = shipDoc.ShipPlan; recourd.ShipPlanDetailHead_DocNo = shipDoc.DocNo; recourd.RowNo = shipDoc.RowNo; recourd.ShipLine = shipDoc.ShipLine; recourd.ItemMaster = shipDoc.ItemMaster; recourd.ItemMaster_Code = shipDoc.ItemMaster_Code; recourd.ItemMaster_Name = shipDoc.ItemMaster_Name; recourd.SPECS = shipDoc.SPECS; recourd.Qty = shipDoc.Qty; recourd.ArkQty = shipDoc.ShipCanQty; recourd.ArkCanQty = shipDoc.ShipCanQty; recourd.OuterBoxNumber = shipDoc.OutBoxNumner; recourd.InBoxNumber = shipDoc.InBoxNumber; recourd.BoxNumber = shipDoc.BoxNumber; recourd.Bulks = shipDoc.Bulks; recourd.Length = shipDoc.Length; recourd.Weith = shipDoc.Width; recourd.Higth = shipDoc.Higth; recourd.GrossWeight = shipDoc.GrossWeight; recourd.NetWeight = shipDoc.NetWeight; recourd.IsWms = shipDoc.IsWms; recourd.SrcSO = shipDoc.SrcSO; recourd.SrcSONo = shipDoc.SrcSONo; recourd.SrcSOLine = shipDoc.SrcSOLine; recourd.SrcSOLineNo = shipDoc.SrcSOLineNo; if (recourd.IsWms ?? false) { this.OnInstaledArk122.Enabled = false; this.RemoveArk0.Enabled = false; this.BtnOk.Enabled = false; } } this.Model.InstalledArkHead.Clear(); this.Model.InstalledArkHead.CurrentFilter.OPath = this.Model.InstalledArkHead.FieldBillNoItemHead.AttributeName + "=" + billNoItem; this.Action.CommonAction.Load(this.Model.InstalledArkHead); this.Action.CommonAction.Load(this.Model.InstalledArkHead_InstalledArkLine); this.Action.CommonAction.Load(this.Model.InstalledArkHead_InstalledArkLine_InstalledArkDetailLine); //this.NameValues["BillNoItem"] = null; //this.NameValues["ShipCustomer"] = null; } }
// 页面进入时,默认为对新的出运明细单进行发票号的分配,默认加载出运明细单.单据状态=审核中 and 出运明细单.已分配发票号=false的所有出运明细单; private void LoadShipPlanDoc() { //if (this.Model.BillNoItemHead.FocusedRecord == null && this.Model.BilAlllcationShipPlanView.RecordCount > 0) // return; UFIDA.U9.Cust.GS.FT.OperateShipPlanBP.Proxy.GetShipPlanDocProxy proxy = new OperateShipPlanBP.Proxy.GetShipPlanDocProxy(); List <UFIDA.U9.Cust.GS.FT.OperateShipPlanBP.ShipPlanByBillHeadDTOData> listShipPlan = new List <OperateShipPlanBP.ShipPlanByBillHeadDTOData>(); if (this.CurrentState["BillNoRefAllocation"] != null) { this.Model.BilAlllcationShipPlanView.Clear(); proxy.BillNoItemHead = (long)this.CurrentState["BillNoRefAllocation"]; } else if (this.NameValues != null && this.NameValues["BillNoItem"] != null && (this.Model.BilAlllcationShipPlanView.RecordCount <= 0 || this.Model.BilAlllcationShipPlanView.RecordCount == 1 && this.Model.BilAlllcationShipPlanView.FocusedRecord.ID == -2)) { this.Model.BilAlllcationShipPlanView.Clear(); proxy.BillNoItemHead = Convert.ToInt64(this.NameValues["BillNoItem"].ToString()); //this.Model.BillNoItemHead.Clear(); //this.Model.BillNoItemHead.CurrentFilter.OPath = this.Model.BillNoItemHead.FieldBillNoItemID.AttributeName + "='" + this.NameValues["BillNoItem"].ToString() + "'"; //this.Action.CommonAction.Load(this.Model.BillNoItemHead); this.Action.NavigateAction.MovePageAt(null, Convert.ToInt64(this.NameValues["BillNoItem"].ToString())); } else if (this.CurrentState["Cust_BillNoShipPlan"] != null) { BilAlllcationShipPlanViewRecord recourd = null; if (this.Model.BilAlllcationShipPlanView.FocusedRecord != null) { recourd = this.Model.BilAlllcationShipPlanView.FocusedRecord; } else { recourd = this.Model.BilAlllcationShipPlanView.AddNewUIRecord(); } recourd.ShipPlanDetailHead = Convert.ToInt64(this.NameValues["ShipPlanDetailHead"]); recourd.ShipPlanDetailHead_DocNo = this.NameValues["ShipPlanDetailHead_DocNo"].ToString(); recourd.Date = DateTime.Parse(this.NameValues["Date"].ToString()); recourd.Customer = Convert.ToInt64(this.NameValues["Customer"]); recourd.Customer_Code = this.NameValues["Customer_Code"].ToString(); recourd.Customer_Name = this.NameValues["Customer_Name"].ToString(); recourd.Org = Convert.ToInt64(this.NameValues["Org"]); recourd.Org_Code = this.NameValues["Org_Code"].ToString(); recourd.Org_Name = this.NameValues["Org_Name"].ToString(); recourd.Currency = this.NameValues["Currency"].ToString(); recourd.SaleMan = this.NameValues["SaleMan"].ToString(); recourd.ParkingType = this.NameValues["ParkingType"].ToString(); recourd.BillNoItem = this.NameValues["CustBillNoItem"].ToString() == "" ?0: Convert.ToInt64(this.NameValues["CustBillNoItem"]); recourd.BillNoItem_Code = this.NameValues["CustBillNoItem_Name"].ToString(); recourd.BillNoItem_Name = this.NameValues["CustBillNoItem_Name"].ToString(); this.CurrentState["Cust_BillNoShipPlan"] = null; return; } else { return; } proxy.Type = 0; listShipPlan = proxy.Do(); if (listShipPlan != null) { BilAlllcationShipPlanViewRecord recourd = this.Model.BilAlllcationShipPlanView.FocusedRecord; foreach (UFIDA.U9.Cust.GS.FT.OperateShipPlanBP.ShipPlanByBillHeadDTOData shipDoc in listShipPlan) { recourd = this.Model.BilAlllcationShipPlanView.AddNewUIRecord(); recourd.ShipPlanDetailHead = shipDoc.ShipPlan; recourd.ShipPlanDetailHead_DocNo = shipDoc.DocNo; recourd.Date = shipDoc.Date; recourd.Customer = shipDoc.Customer; recourd.Customer_Code = shipDoc.Customer_Code; recourd.Customer_Name = shipDoc.Customer_Name; recourd.Org = shipDoc.Org; recourd.Org_Code = shipDoc.Org_Code; recourd.Org_Name = shipDoc.Org_Name; recourd.Currency = shipDoc.Currenty.ToString(); recourd.SaleMan = shipDoc.SaleMan.ToString(); recourd.ParkingType = shipDoc.PackagingType; recourd.BillNoItem = shipDoc.BillNoItem; recourd.BillNoItem_Code = shipDoc.BillNoItem_Name; recourd.BillNoItem_Name = shipDoc.BillNoItem_Name; } } this.CurrentState["BillNoRefAllocation"] = null; }