Exemple #1
0
        //保存
        private void BtnAdd161_Click_Extend(object sender, EventArgs e)
        {
            UFIDA.U9.Cust.GS.FT.SoBomBP.Proxy.SOBomAddOrRemoveBPProxy soProxy = new SoBomBP.Proxy.SOBomAddOrRemoveBPProxy();
            List <SoBomBP.ReturnUpDownLineDtoData> soBOMs = new List <SoBomBP.ReturnUpDownLineDtoData>();

            if (this.CurrentState["DTO"] != null)
            {
                ReturnUpDownBrokerageDTOData dto = this.CurrentState["DTO"] as ReturnUpDownBrokerageDTOData;
                foreach (OrderBomHeadRecord record in this.Model.OrderBomHead.Records)
                {
                    if (record.DataRecordState == DataRowState.Added)
                    {
                        SoBomBP.ReturnUpDownLineDtoData soReturn = new SoBomBP.ReturnUpDownLineDtoData();
                        soReturn.ItemInfo_ItemID = record.SubKey.Value + "";
                        soReturn.Qty             = record.Dosage.Value;
                        soReturn.SoLineID        = dto.SoLineID;
                        soReturn.SoID            = record.ID;
                        soBOMs.Add(soReturn);
                    }
                }
                soProxy.SOLineID = dto.SoLineID;
            }
            soProxy.InParams   = soBOMs;
            soProxy.ActionType = 0;
            soProxy.Do(); OnRefresh();
        }
        /// <summary>
        /// 下一行
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnNextLine_Click_Extend(object sender, EventArgs e)
        {
            ReturnUpDownLineDtoData l = CurrentState["DTO"] as ReturnUpDownLineDtoData;

            //调用模版提供的默认实现.--默认实现可能会调用相应的Action.
            if (l != null)
            {
                UpDownLineBomProxy proxy = new UpDownLineBomProxy();
                proxy.SoID        = l.SoID;
                proxy.SoLineRowNo = l.RowNo;
                proxy.Type        = 0;//下一行
                SoBomBP.ReturnUpDownLineDtoData dto = proxy.Do();
                if (dto != null)
                {
                    CurrentState["DTO"] = dto;
                    StrState            = "Next";
                    LoadData(dto.SoLineID.ToString(), dto.RowNo.ToString(), dto.ItemInfo_ItemID, dto.ItemInfo_ItemName, dto.Qty, dto.Uom, dto.Precision_Qty);
                }
            }
            btnNextLine_Click_DefaultImpl(sender, e);
        }