/// <summary> /// 初始化页面数据 /// </summary> private void InitData() { ViewState["_AppendToEnd"] = true; txtCreateBy.Text = CurrentUser.AccountName; tbxFCustomer.OnClientTriggerClick = Window2.GetSaveStateReference(txtFCode.ClientID, tbxFCustomer.ClientID) + Window2.GetShowReference("../../Common/WinUnit.aspx"); //tbxFItemCode.OnClientTriggerClick = Window1.GetSaveStateReference(tbxFItemCode.ClientID) // + Window1.GetShowReference("../../Common/WinProduct.aspx"); //tbxFName.OnClientTriggerClick = Window2.GetSaveStateReference(hfdCode.ClientID, tbxFName.ClientID) // + Window2.GetShowReference("../../Common/WinCustomer.aspx"); //txtFAddress.OnClientTriggerClick = Window3.GetSaveStateReference(txtFAddress.ClientID) // + Window3.GetShowReference(string.Format(@"../../Common/WinCustomerLink.aspx")); tbxFBottle.OnClientTriggerClick = Window1.GetSaveStateReference(tbxFBottle.ClientID, hfdSpec.ClientID) + Window1.GetShowReference("../../Common/WinBottleToGas.aspx"); GasHelper.DropDownListDriverDataBind(ddlFDriver); GasHelper.DropDownListShipperDataBind(ddlFShipper); GasHelper.DropDownListSupercargoDataBind(ddlFSupercargo); //GasHelper.DropDownListBottleDataBind(tbxFBottle); GasHelper.DropDownListVehicleNumDataBind(ddlFVehicleNum); //GasHelper.DropDownListAreasDataBind(ddlFArea); GasHelper.DropDownListBillDataBind(ddlFBill); GasHelper.DropDownListSalesmanDataBind(ddlFSalesman); GasHelper.DropDownListDeliveryMethodDataBind(ddlDeliveryMethod); GasHelper.DropDownListBankSubjectDataBind(ddlSubject); GasHelper.DropDownListDistributionPointDataBind(ddlFDistributionPoint); // GasHelper.DropDownListDistributionPointDataBind(ddlFPoint); // //删除选中单元格的客户端脚本 string deleteScript = DeleteScript(); ////新增 //var defaultObj = new JObject //{ // {"FItemCode", ""}, // {"FItemName", ""}, // {"FSpec", ""}, // {"FUnit", ""}, // {"FPrice", ""}, // {"FQty", "0"}, // {"FAmount", "0"}, // {"FBottleQty", "0"}, // {"FBottleOweQty", "0"}, // {"FCateName", ""}, // {"colDelete", String.Format("<a href=\"javascript:;\" onclick=\"{0}\"><img src=\"{1}\"/></a>",// // deleteScript, IconHelper.GetResolvedIconUrl(Icon.Delete))}, //}; //// 在第一行新增一条数据 //btnAdd.OnClientClick = Grid1.GetAddNewRecordReference(defaultObj, AppendToEnd); txtFDate.SelectedDate = DateTime.Now.AddDays(1); txtFFreight.Text = "0.00"; }