//BtnOk_Click...
        private void BtnOk_Click_Extend(object sender, EventArgs e)
        {
            //调用模版提供的默认实现.--默认实现可能会调用相应的Action.
            if (this.Model.SelectSOLineView.SelectRecords.Count <= 0)
            {
                throw new Exception("请至少选择一行数据");
            }
            UFIDA.U9.Cust.GS.FT.CreateShipPlanBP.Proxy.CreatShipPlanProxy proxy      = new CreateShipPlanBP.Proxy.CreatShipPlanProxy();
            List <UFIDA.U9.Cust.GS.FT.CreateShipPlanBP.SOLineIDDTOData>   SOlineList = new List <CreateShipPlanBP.SOLineIDDTOData>();

            UFIDA.U9.Cust.GS.FT.CreateShipPlanBP.SOLineIDDTOData line = null;
            foreach (SelectSOLineViewRecord recourd in this.Model.SelectSOLineView.SelectRecords)
            {
                line         = new CreateShipPlanBP.SOLineIDDTOData();
                line.SOLine  = recourd.SOLine ?? 0;
                line.ShipQty = recourd.ShipQty ?? 0;
                if (recourd.ShipQty > recourd.ShipCanQty)
                {
                    throw new Exception("销售订单" + recourd.SO_DocNo + "行" + recourd.DocLineNo + "出运数量不能大于可出运数量");
                }
                SOlineList.Add(line);
            }
            proxy.SOLineIDDTO = SOlineList;
            List <UFIDA.U9.Cust.GS.FT.CreateShipPlanBP.ShipPlanIDDTOData> listShip = proxy.Do();

            if (listShip != null && listShip.Count > 0)
            {
                this.CurrentState["CustShipPlanID"] = listShip[0].ShipPlan;
            }
            this.CloseDialog(true);

            BtnOk_Click_DefaultImpl(sender, e);
        }
Esempio n. 2
0
        //BtnOk_Click...
        private void BtnOk_Click_Extend(object sender, EventArgs e)
        {
            //调用模版提供的默认实现.--默认实现可能会调用相应的Action.
            if (this.WizardControl0.SelectedIndex == 0)
            {
                if (this.Model.CustQrySOLineView.FocusedRecord.Org <= 0)
                {
                    throw new Exception("请选择接单组织");
                }
                UFIDA.U9.Cust.GS.FT.SelectSOLineForShipBP.Proxy.SelectSOLineProxy proxy = new SelectSOLineForShipBP.Proxy.SelectSOLineProxy();
                proxy.Org          = this.Model.CustQrySOLineView.FocusedRecord.Org;
                proxy.Org_Code     = this.Model.CustQrySOLineView.FocusedRecord.Org_Code;
                proxy.SODoc1       = this.Model.CustQrySOLineView.FocusedRecord.DocNo1.Trim();
                proxy.SODoc2       = this.Model.CustQrySOLineView.FocusedRecord.DocNo2.Trim();
                proxy.Date1        = this.Model.CustQrySOLineView.FocusedRecord.Date1 ?? Convert.ToDateTime("2000-1-1");
                proxy.Date2        = this.Model.CustQrySOLineView.FocusedRecord.Date2 ?? Convert.ToDateTime("2000-1-2");
                proxy.Currency     = this.Model.CustQrySOLineView.FocusedRecord.Currency ?? -1;
                proxy.Operators    = this.Model.CustQrySOLineView.FocusedRecord.Operators ?? -1;
                proxy.Department   = this.Model.CustQrySOLineView.FocusedRecord.Department ?? -1;
                proxy.Project      = this.Model.CustQrySOLineView.FocusedRecord.Project ?? -1;
                proxy.ItemMaster   = this.Model.CustQrySOLineView.FocusedRecord.ItemMaster ?? -1;
                proxy.ShippingType = this.Model.CustQrySOLineView.FocusedRecord.Shipping_Code;
                proxy.Customer     = this.Model.CustQrySOLineView.FocusedRecord.Customer ?? -1;
                List <UFIDA.U9.Cust.GS.FT.SelectSOLineForShipBP.SOLineDTOData> listLine = proxy.Do();
                AddRecordData(listLine);
                //this.CurrentState["GSSelectSOLineList"] = listLine;
                // this.CloseDialog(true);
                //this.ShowAtlasModalDialog("965e3672-2844-45a6-8cd4-f462d35098e2", "拉单选择界面", "992", "505",
                //     this.TaskId.ToString(), null, false, false, false);
                this.WizardControl0.SelectedIndex = 1;
            }
            else
            {
                //创建出运明细单
                if (this.Model.SelectSOLineView.SelectRecords.Count <= 0)
                {
                    throw new Exception("请至少选择一行数据");
                }
                UFIDA.U9.Cust.GS.FT.CreateShipPlanBP.Proxy.CreatShipPlanProxy proxy      = new CreateShipPlanBP.Proxy.CreatShipPlanProxy();
                List <UFIDA.U9.Cust.GS.FT.CreateShipPlanBP.SOLineIDDTOData>   SOlineList = new List <CreateShipPlanBP.SOLineIDDTOData>();
                UFIDA.U9.Cust.GS.FT.CreateShipPlanBP.SOLineIDDTOData          line       = null;
                foreach (SelectSOLineViewRecord recourd in this.Model.SelectSOLineView.SelectRecords)
                {
                    line         = new CreateShipPlanBP.SOLineIDDTOData();
                    line.SOLine  = recourd.SOLine ?? 0;
                    line.ShipQty = recourd.ShipQty ?? 0;
                    if (recourd.ShipQty > recourd.ShipCanQty)
                    {
                        throw new Exception("销售订单" + recourd.SO_DocNo + "行" + recourd.DocLineNo + "出运数量不能大于可出运数量");
                    }
                    SOlineList.Add(line);
                }
                proxy.SOLineIDDTO = SOlineList;
                List <UFIDA.U9.Cust.GS.FT.CreateShipPlanBP.ShipPlanIDDTOData> listShip = proxy.Do();
                if (listShip != null && listShip.Count > 0)
                {
                    this.CurrentState["CustShipPlanID"] = listShip[0].ShipPlan;
                }
                this.CloseDialog(true);
                BtnOk_Click_DefaultImpl(sender, e);
            }

            //this.CloseDialog(false);
        }