public void billGrid_GridCustomerPostBackEvent(object sender, GridCustomerPostBackEventArgs e)
        {
            if (e.ColIndex == -1)
            {
                return;
            }
            if (e.RowIndex == -1)
            {
                return;
            }

            this.DataCollect();
            DataTable dt = this.CurrentState["ReturnShipBillNoListID"] as DataTable;//参照中选择的数据

            if (dt != null && dt.Rows.Count > 0)
            {
                BillNoItemHead_BillNoItemLineRecord recourd = null;
                recourd = this.Model.BillNoItemHead_BillNoItemLine.FocusedRecord;
                if (recourd == null)
                {
                    //this.Model.ErrorMessage.Message = "没有发票号信息";
                    //return;
                    //DataGrid6.CollectData();
                    //DataGrid6.BindData();
                    //return;
                    recourd = this.Model.BillNoItemHead_BillNoItemLine.AddNewUIRecord();
                }
                recourd.BillNoid          = long.Parse(dt.Rows[0]["ID"] + "");
                recourd.BillNoid_BillNoID = dt.Rows[0]["Code"] + "";
                recourd.BillNoid_BillNoID = dt.Rows[0]["Name"] + "";
                //recourd.SetParentRecord(this.Model.BillNoItemHead.FocusedRecord);
                for (int i = 1; i < dt.Rows.Count; i++)
                {
                    recourd                   = this.Model.BillNoItemHead_BillNoItemLine.AddNewUIRecord();
                    recourd.BillNoid          = long.Parse(dt.Rows[i]["ID"] + "");
                    recourd.BillNoid_BillNoID = dt.Rows[i]["Code"] + "";
                    recourd.BillNoid_BillNoID = dt.Rows[i]["Name"] + "";
                    recourd.SetParentRecord(this.Model.BillNoItemHead.FocusedRecord);
                }
            }
            this.CurrentState["ReturnShipBillNoListID"] = null;
            //DataGrid6.CollectData();
            //DataGrid6.BindData();
            //this.DataCollect();
        }
        public void itemGrid_GridCustomerPostBackEvent(object sender, GridCustomerPostBackEventArgs e)
        {
            this.DataCollect();
            DataTable dt = this.CurrentState["ReturnBillNoListID"] as DataTable;//参照中选择的数据

            if (dt != null && dt.Rows.Count > 0)
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    BillNoItemHead_BillNoItemLineRecord Record = this.Model.BillNoItemHead_BillNoItemLine.AddNewUIRecord();
                    Record.BillNoid            = long.Parse(dt.Rows[i]["ID"] + "");
                    Record.BillNoid_BillNoID   = dt.Rows[i]["Code"] + "";
                    Record.BillNoid_BillNoName = dt.Rows[i]["Name"] + "";
                    Record.SetParentRecord(this.Model.BillNoItemHead.FocusedRecord);
                }
            }
            // this.DataGrid5.CollectData();
            this.DataGrid5.BindData();
        }