/// <summary> /// 初始化页面数据 /// </summary> private void InitData() { ViewState["_AppendToEnd"] = true; txtCreateBy.Text = CurrentUser.AccountName; tbxFItemCode.OnClientTriggerClick = Window1.GetSaveStateReference(tbxFItemCode.ClientID) + Window1.GetShowReference("../../Common/WinProduct.aspx"); GasHelper.DropDownListBottleDataBind(tbxFBottle); GasHelper.DropDownListStockOutCateDataBind(ddlFCate); GasHelper.DropDownListDataBindOrgnization(ddlOrgnization); GasHelper.DropDownListDataBindReceiveSendType(ddlT6ReceiveSendType); GasHelper.DropDownListWarehouseDataBind(ddlFWarehouse); GasHelper.DropDownListGodownKeeperDataBind(ddlFReceiver); GasHelper.DropDownListGroupDataBind(ddlFGroup); //班组 GasHelper.DropDownListDistributionPointDataBind(ddlFDistributionPoint); //作业区 //删除选中单元格的客户端脚本 string deleteScript = DeleteScript(); //新增 var defaultObj = new JObject { { "FItemCode", "" }, { "FItemName", "" }, { "FSpec", "" }, { "FUnit", "" }, { "FPrice", "0" }, { "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; //txtFFreight.Text = "0.00"; }
/// <summary> /// 加载页面数据 /// </summary> private void LoadData() { switch (Actions) { case WebAction.Details: GasHelper.DropDownListDataBindOrgnization(ddlOrgnization); GasHelper.DropDownListDataBindReceiveSendType(ddlT6ReceiveSendType); txtKeyId.Text = KeyId; if (StockOut != null) { WebControlHandler.BindObjectToControls(StockOut, SimpleForm1); txtFDate.Text = StockOut.FDate.ToString(); //tbxFCustomer.Text = StockOut.FName; //if (!string.IsNullOrEmpty(StockOut.FDriver)) // ddlFDriver.SelectedValueArray = StockOut.FDriver.Split(','); //if (!string.IsNullOrEmpty(StockOut.FShipper)) // ddlFShipper.SelectedValueArray = StockOut.FShipper.Split(','); //if (!string.IsNullOrEmpty(StockOut.FSupercargo)) // ddlFSupercargo.SelectedValueArray = StockOut.FSupercargo.Split(','); //if (!string.IsNullOrEmpty(StockOut.FSalesman)) // ddlFSalesman.SelectedValueArray = StockOut.FSalesman.Split(','); //ddlFVehicleNum.SelectedValue = StockOut.FVehicleNum; //ddlFArea.SelectedValue = StockOut.FArea; //ddlDeliveryMethod.SelectedValue = StockOut.FDeliveryMethod; txtFCate.Text = StockOut.FCate; ddlOrgnization.SelectedValue = StockOut.FCode; txtFReceiver.Text = StockOut.FSalesman; txtFWarehouse.Text = StockOut.FT6Warehouse; ddlT6ReceiveSendType.SelectedValue = StockOut.FT6ReceiveSendTypeNum; txtFGroup.Text = StockOut.FGroup; txtFDistributionPoint.Text = StockOut.FDistributionPoint; txtFMemo.Text = StockOut.FMemo; //发货单据 BindDataGrid(); } break; } }
/// <summary> /// 初始化页面数据 /// </summary> private void InitData() { ViewState["_AppendToEnd"] = true; txtCreateBy.Text = CurrentUser.AccountName; tbxFItemCode.OnClientTriggerClick = Window1.GetSaveStateReference(tbxFItemCode.ClientID) + Window1.GetShowReference("../../Common/WinProduct.aspx"); tbxFCustomer.OnClientTriggerClick = Window2.GetSaveStateReference(txtFCode.ClientID, tbxFCustomer.ClientID) + Window2.GetShowReference("../../Common/WinSupplier.aspx"); tbxFLogisticsNumber.OnClientTriggerClick = Window2.GetSaveStateReference(tbxFLogisticsNumber.ClientID) + Window2.GetShowReference("../../Common/WinTask.aspx?FType=45"); GasHelper.DropDownListDriverDataBind(ddlFDriver); GasHelper.DropDownListShipperDataBind(ddlFShipper); GasHelper.DropDownListSupercargoDataBind(ddlFSupercargo); GasHelper.DropDownListBottleDataBind(tbxFBottle); GasHelper.DropDownListVehicleNumDataBind(ddlFVehicleNum); GasHelper.DropDownListAreasDataBind(ddlFArea); GasHelper.DropDownListSalesmanDataBind(ddlFSalesman); GasHelper.DropDownListDeliveryMethodDataBind(ddlDeliveryMethod); GasHelper.DropDownListBankSubjectDataBind(ddlSubject); GasHelper.DropDownListDataBindPurchaseType(ddlFT6PurchaseType); GasHelper.DropDownListDataBindReceiveSendType(ddlT6ReceiveSendType); GasHelper.DropDownListWarehouseDataBind(tbxFWarehouse); GasHelper.DropDownListDataBindCurrencyType(ddlFT6Currency); GasHelper.DropDownListWarehouseDataBind(ddlWarehouse); GasHelper.DropDownListDistributionPointDataBind(ddlFDistributionPoint); //作业区 //删除选中单元格的客户端脚本 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; txtFFreight.Text = "0.00"; }