示例#1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                using (var appdb = new AppContext())
                {
                    IQueryable <Provider> q = appdb.providers;
                    ddlProvider.DataSource     = q.ToList();
                    ddlProvider.DataTextField  = "Name";
                    ddlProvider.DataValueField = "SN";
                    ddlProvider.DataBind();

                    ddlSupplierId.DataSource     = q.ToList();
                    ddlSupplierId.DataTextField  = "Name";
                    ddlSupplierId.DataValueField = "SN";
                    ddlSupplierId.DataBind();

                    pstr = "({";
                    foreach (Provider p in q.ToList())
                    {
                        pstr += "\"" + p.SN.ToString() + "\":\"" + p.Name + "\",";
                    }
                    pstr  = pstr.TrimEnd(new char[] { ',' });
                    pstr += "})";
                }
                // 删除选中单元格的客户端脚本
                string deleteScript = GetDeleteScript();

                // 新增数据初始值
                JObject defaultObj = new JObject();
                defaultObj.Add("ItemNo", "");
                DayOfWeek dw = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day).DayOfWeek;
                string    ss = System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.GetDayName(dw);
                defaultObj.Add("Name", "");
                defaultObj.Add("Spec", "");
                defaultObj.Add("MaterialNo", "");
                defaultObj.Add("ItemColor", "");
                defaultObj.Add("AddReserve1", "");
                defaultObj.Add("ClassName", "");

                defaultObj.Add("deleteField", String.Format("<a href=\"javascript:;\" onclick=\"{0}\"><img src=\"{1}\"/></a>", deleteScript, IconHelper.GetResolvedIconUrl(FineUIPro.Icon.Delete)));

                // 在第一行新增一条数据
                btnNew.OnClientClick = Grid1.GetAddNewRecordReference(defaultObj, AppendToEnd);



                // 删除选中行按钮
                //btnDelete.OnClientClick = Grid1.GetNoSelectionAlertReference("请至少选择一项!") + deleteScript;
                CheckPowerWithButton("PlanDelete", btnDelete);
                ResolveDeleteButtonForGrid(btnDelete, Grid1);

                // 每页记录数
                Grid1.PageSize = ConfigHelper.PageSize;
                ddlGridPageSize.SelectedValue = ConfigHelper.PageSize.ToString();
                // 绑定表格
                //BindGrid("", 1);
                BindGrid();
            }
        }
示例#2
0
        protected void btnNew_Click(object sender, EventArgs e)
        {
            try
            {
                string sortindex = "";
                if (Grid1.GetNewAddedList().Count != 0)
                {
                    List <Dictionary <string, object> > newAddedList = Grid1.GetNewAddedList();
                    sortindex = newAddedList[0]["SortIndex"].ToString();
                    sortindex = (int.Parse(sortindex) + 1).ToString();
                }
                else
                {
                    string sql = "select count(*)+1 from GoodsClass ";
                    SQLHelper.DbHelperSQL.SetConnectionString("");
                    sortindex = SQLHelper.DbHelperSQL.GetSingle(sql, 30);
                }
                // 新增数据初始值
                JObject defaultObj   = new JObject();
                string  deleteScript = GetDeleteScript();
                defaultObj.Add("ClassCode", "");
                defaultObj.Add("ClassName", "");
                defaultObj.Add("SortIndex", sortindex);

                defaultObj.Add("deleteField", String.Format("<a href=\"javascript:;\" onclick=\"{0}\"><img src=\"{1}\"/></a>", deleteScript, IconHelper.GetResolvedIconUrl(FineUIPro.Icon.Delete)));
                PageContext.RegisterStartupScript(Grid1.GetAddNewRecordReference(defaultObj, AppendToEnd));
            }
            catch (Exception ee)
            {
                Alert.Show(ee.ToString());
            }
        }
示例#3
0
        /// <summary>
        ///     初始化页面数据
        /// </summary>
        private void InitData()
        {
            ViewState["_AppendToEnd"] = true;

            txtCreateBy.Text = CurrentUser.AccountName;

            tbxFItemCode.OnClientTriggerClick = Window1.GetSaveStateReference(tbxFItemCode.ClientID)
                                                + Window1.GetShowReference("../../Common/WinBottle.aspx");

            tbxFCustomer.OnClientTriggerClick = Window2.GetSaveStateReference(txtFCode.ClientID, tbxFCustomer.ClientID, hfdUnit.ClientID)
                                                + Window2.GetShowReference("../../Common/WinUnitAll.aspx");

            //删除选中单元格的客户端脚本
            string deleteScript = DeleteScript();

            //新增
            var defaultObj = new JObject
            {
                { "FItemCode", "" },
                { "FItemName", "" },
                { "FSpec", "" },
                { "FUnit", "" },
                { "FQty", "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;
        }
示例#4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                // 删除选中单元格的客户端脚本
                string deleteScript = GetDeleteScript();

                // 新增数据初始值
                JObject defaultObj = new JObject();
                defaultObj.Add("设备编号", "");
                defaultObj.Add("重点设备", "");
                defaultObj.Add("设备名称", "");
                defaultObj.Add("型号", "");
                defaultObj.Add("复杂系数Fj", "");
                //defaultObj.Add("Major", "未知");
                defaultObj.Add("Delete", String.Format("<a href=\"javascript:;\" onclick=\"{0}\"><img src=\"{1}\"/></a>", deleteScript, IconHelper.GetResolvedIconUrl(Icon.Delete)));


                // 在第一行新增一条数据
                btnNew.OnClientClick = Grid1.GetAddNewRecordReference(defaultObj, AppendToEnd);

                // 重置表格
                btnReset.OnClientClick = Confirm.GetShowReference("确定要重置表格数据?", String.Empty, Grid1.GetRejectChangesReference(), String.Empty);


                // 删除选中行按钮
                btnDelete.OnClientClick = Grid1.GetNoSelectionAlertReference("请至少选择一项!") + deleteScript;
            }
        }
示例#5
0
        /// <summary>
        ///     初始化页面数据
        /// </summary>
        private void InitData()
        {
            this.tbxFProductID.OnClientTriggerClick = Window1.GetSaveStateReference(tbxFProductID.ClientID)
                                                      + Window1.GetShowReference("../../Common/WinProduct.aspx");
            tbxFCustomer.OnClientTriggerClick = Window2.GetSaveStateReference(this.txtFCustomer.ClientID, tbxFCustomer.ClientID)
                                                + Window2.GetShowReference("../../Common/WinCustomer.aspx");
            GasHelper.DropDownListSurveyorDataBind(ddlFCtroler);
            //GasHelper.DropDownListCustomerDataBind(ddlFCustomer);
            GasHelper.DropDownListBillStatusDataBind(ddlFAccType, "1030");
            GasHelper.DropDownListBillStatusDataBind(ddlFBillType, "1031");
            //删除选中单元格的客户端脚本
            string deleteScript = DeleteScript();
            //新增
            var defaultObj = new JObject
            {
                { "FProductID", "" },
                { "FProductName", "" },
                { "FSpec", "" },
                { "FUnit", "" },
                { "FPrice", "0" },
                { "colDelete", String.Format("<a href=\"javascript:;\" onclick=\"{0}\"><img src=\"{1}\"/></a>",//
                                             deleteScript, IconHelper.GetResolvedIconUrl(Icon.Delete)) },
            };

            // 在第一行新增一条数据
            btnAdd.OnClientClick = Grid1.GetAddNewRecordReference(defaultObj, false);
            //BindData();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                // 删除选中单元格的客户端脚本
                string deleteScript = GetDeleteScript(Grid1);

                // 新增数据初始值
                JObject defaultObj = new JObject();
                defaultObj.Add("Name", "新用户");
                defaultObj.Add("Gender", "1");
                defaultObj.Add("EntranceYear", "2015");
                defaultObj.Add("EntranceDate", "2015-09-01");
                defaultObj.Add("AtSchool", false);
                defaultObj.Add("Major", "化学系");
                defaultObj.Add("Delete", String.Format("<a href=\"javascript:;\" onclick=\"{0}\"><img src=\"{1}\"/></a>", deleteScript, IconHelper.GetResolvedIconUrl(Icon.Delete)));

                // 在第一行新增一条数据
                btnNew.OnClientClick = Grid1.GetAddNewRecordReference(defaultObj, AppendToEnd);

                // 重置表格
                btnReset.OnClientClick = Confirm.GetShowReference("确定要重置表格数据?", String.Empty, Grid1.GetRejectChangesReference(), String.Empty);


                // 删除选中行按钮
                btnDelete.OnClientClick = Grid1.GetNoSelectionAlertReference("请至少选择一项!") + deleteScript;


                // 绑定表格
                BindGrid();
            }
        }
示例#7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                // 删除选中单元格的客户端脚本
                string deleteScript = GetDeleteScript();

                JObject defaultObj = new JObject();
                defaultObj.Add("propertyName", "");
                defaultObj.Add("applyCounts", "1");
                defaultObj.Add("applyUnit", "个");
                defaultObj.Add("Delete", String.Format("<a href=\"javascript:;\" onclick=\"{0}\"><img src=\"{1}\"/></a>", deleteScript, IconHelper.GetResolvedIconUrl(Icon.Delete)));


                // 在第一行新增一条数据
                btn_add.OnClientClick = Grid1.GetAddNewRecordReference(defaultObj, AppendToEnd);

                //加载办公用品类目
                loadProperty();


                //加载流程
                loadFlowInfo("OA_OfficeSupply_Main", GetUser());

                //加载申请人信息
                loadInfo(GetUser());
            }
        }
示例#8
0
        /// <summary>
        ///     初始化页面数据
        /// </summary>
        private void InitData()
        {
            ViewState["_AppendToEnd"] = true;

            txtCreateBy.Text = CurrentUser.AccountName;

            tbxFItemCode.OnClientTriggerClick = Window1.GetSaveStateReference(tbxFItemCode.ClientID)
                                                + Window1.GetShowReference("../../Common/WinBottle.aspx");

            tbxFCustomer.OnClientTriggerClick = Window2.GetSaveStateReference(txtFCode.ClientID, tbxFCustomer.ClientID, hfdCate.ClientID)
                                                + Window2.GetShowReference("../../Common/WinUnit.aspx");

            txtFAddress.OnClientTriggerClick = Window3.GetSaveStateReference(txtFAddress.ClientID)
                                               + Window3.GetShowReference(string.Format(@"../../Common/WinCustomerLink.aspx"));

            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.DropDownListDistributionPointDataBind(ddlFDistributionPoint); //作业区

            //删除选中单元格的客户端脚本
            string deleteScript = DeleteScript();

            //新增
            var defaultObj = new JObject
            {
                { "FItemCode", "" },
                { "FItemName", "" },
                { "FSpec", "" },
                { "FUnit", "" },
                { "FPrice", "" },
                { "FQty", "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);

            //btnClose.OnClientClick = ActiveWindow.GetHidePostBackReference();

            txtFDate.SelectedDate = DateTime.Now;
        }
示例#9
0
        /// <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";
        }
示例#10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            PageBase pb = new PageBase();

            if (Request.Cookies["Cookies"] == null)
            {
                Response.Redirect("../../Login.aspx");
            }
            if (!IsPostBack)
            {
                FineUI.DropDownList       drop  = new FineUI.DropDownList();
                List <Entity.MonitorItem> items = DAL.MonitorItem.GetMonitorItemList(1);
                //foreach (Entity.MonitorItem item in items)
                //{
                //    FineUI.ListItem li = new FineUI.ListItem();
                //    li.Text = item.ItemName;
                //    li.Value = item.ItemCode;
                //    drop.Items.Add(li);
                //}
                string Code = "";
                if (items.Count > 0)
                {
                    Code = items[0].ItemName;
                }
                string  deleteScript = GetDeleteScript();
                JObject defaultObj   = new JObject();
                defaultObj.Add("ResultID", 999999);
                defaultObj.Add("ItemName", Code);
                defaultObj.Add("Result", 9.1234);
                defaultObj.Add("Delete", String.Format("<a href=\"javascript:;\" onclick=\"{0}\"><img src=\"{1}\"/></a>", deleteScript, IconHelper.GetResolvedIconUrl(Icon.Delete)));

                // 在第一行新增一条数据
                btnNew.OnClientClick = Grid1.GetAddNewRecordReference(defaultObj, AppendToEnd);

                // 重置表格
                //btnReset.OnClientClick = Confirm.GetShowReference("确定要重置表格数据?", String.Empty, Grid1.GetRejectChangesReference(), String.Empty);


                // 删除选中行按钮
                btnDelete.OnClientClick = Grid1.GetNoSelectionAlertReference("请至少选择一项!") + deleteScript;
                //BindGrid();

                BindDropdownList();

                if (Request.QueryString["id"] != null)
                {
                    sGuid = Request.QueryString["id"].ToString().Trim();
                    LoadData(sGuid);
                    BindGrid();
                }
                //BindGrid();
            }
        }
示例#11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                JObject defaultObj = new JObject();
                defaultObj.Add("id", getMaxId());
                defaultObj.Add("CostItemName", "");

                btn_addNew.OnClientClick = Grid1.GetAddNewRecordReference(defaultObj, AppendToEnd);

                bindGrid();
            }
        }
示例#12
0
        /// <summary>
        ///     初始化页面数据
        /// </summary>
        private void InitData()
        {
            txtCreateBy.Text = CurrentUser.AccountName;

            tbxBankCode.OnClientTriggerClick = Window1.GetSaveStateReference(tbxBankCode.ClientID)
                                               + Window1.GetShowReference("../../Common/WinBank.aspx");

            tbxFCustomer.OnClientTriggerClick = Window2.GetSaveStateReference(txtFCode.ClientID, tbxFCustomer.ClientID)
                                                + Window2.GetShowReference("../../Common/WinEmployee.aspx");

            tbxFSubjectCode.OnClientTriggerClick = Window4.GetSaveStateReference(tbxFSubjectCode.ClientID)
                                                   + Window4.GetShowReference("../../Common/WinSubject.aspx");

            //删除选中单元格的客户端脚本
            string deleteScript  = DeleteScript();
            string deleteSubject = DeleteSubject();

            //新增
            var defaultObj = new JObject
            {
                { "FItemCode", "" },
                { "FItemName", "" },
                { "FSpec", "" },
                { "FUnit", "" },
                { "FPrice", "" },
                { "FQty", "0" },
                { "FBottleQty", "0" },
                { "FBottleOweQty", "0" },
                { "FCateName", "" },
                { "colDelete", String.Format("<a href=\"javascript:;\" onclick=\"{0}\"><img src=\"{1}\"/></a>",//
                                             deleteScript, IconHelper.GetResolvedIconUrl(Icon.Delete)) },
            };

            //报销项目
            var subjectObj = new JObject
            {
                { "FSubjectCode", "" },
                { "FSubjectName", "" },
                { "FAmount", "" },
                { "FMemo", "" },
                { "colDeleteSubject", String.Format("<a href=\"javascript:;\" onclick=\"{0}\"><img src=\"{1}\"/></a>",//
                                                    deleteSubject, IconHelper.GetResolvedIconUrl(Icon.Delete)) },
            };

            // 在第一行新增一条数据
            btnAdd.OnClientClick = Grid1.GetAddNewRecordReference(defaultObj, AppendToEnd);

            btnAddSubject.OnClientClick = Grid2.GetAddNewRecordReference(subjectObj, AppendSubjectToEnd);

            txtFDate.SelectedDate = DateTime.Now;
        }
示例#13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //获取ID值
                hidId.Text = RequestHelper.GetInt0("Id") + "";

                //绑定下拉列表
                // BranchBll.GetInstence().BandDropDownList(this, ddlParentId);

                //加载数据
                //  LoadData();

                LoadData1();

                // 删除选中单元格的客户端脚本
                string deleteScript = GetDeleteScript(Grid1);

                //  SNo	PROD_ID	PROD_NAME1	PROD_SPEC	PROD_UNIT	ON_QUAN	Cost	QUAN1	Order_QUAN	PROD_MEMO

                // 新增数据初始值
                JObject defaultObj = new JObject();

                defaultObj.Add("SNo", 0);
                defaultObj.Add("PROD_NAME1", "0");
                defaultObj.Add("PROD_ID", "0");
                // defaultObj.Add("PROD_NAME1", "请选择");
                defaultObj.Add("PROD_SPEC", "");
                defaultObj.Add("PROD_UNIT", "");

                defaultObj.Add("ON_QUAN", 1);
                defaultObj.Add("Cost", 0);

                defaultObj.Add("QUAN1", 0);
                defaultObj.Add("Delete", String.Format("<a href=\"javascript:;\" onclick=\"{0}\"><img src=\"{1}\"/></a>", deleteScript, IconHelper.GetResolvedIconUrl(Icon.Delete)));

                // 在第一行新增一条数据
                btnNew.OnClientClick = Grid1.GetAddNewRecordReference(defaultObj, AppendToEnd);

                // 重置表格
                btnReset.OnClientClick = Confirm.GetShowReference("确定要重置表格数据?", String.Empty, Grid1.GetRejectChangesReference(), String.Empty);


                // 删除选中行按钮
                btnDelete.OnClientClick = Grid1.GetNoSelectionAlertReference("请至少选择一项!") + deleteScript;


                // 绑定表格
                //  BindGrid();
            }
        }
示例#14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                JObject defaultObj = new JObject();
                defaultObj.Add("id", getMaxId());
                defaultObj.Add("goodsNo", "");
                defaultObj.Add("goodsName", "");
                defaultObj.Add("specification", "");
                defaultObj.Add("enabled", false);

                btn_addNew.OnClientClick = Grid1.GetAddNewRecordReference(defaultObj, AppendToEnd);

                bindGrid("ALL");
            }
        }
示例#15
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                JObject defaultObj = new JObject();
                defaultObj.Add("id", getMaxId());
                defaultObj.Add("propertyName", "");
                defaultObj.Add("propertyNo", "");
                defaultObj.Add("BuyDate", DateTime.Now.ToShortDateString());
                defaultObj.Add("UseStatus", true);
                defaultObj.Add("propertyType", "1");

                btn_addNew.OnClientClick = Grid1.GetAddNewRecordReference(defaultObj, AppendToEnd);

                bindGrid();
            }
        }
示例#16
0
        /// <summary>
        ///     初始化页面数据
        /// </summary>
        private void InitData()
        {
            ViewState["_AppendToEnd"] = true;

            txtCreateBy.Text = CurrentUser.AccountName;

            GasHelper.DropDownListDriverDataBind(ddlFDriver);

            GasHelper.DropDownListSupercargoDataBind(ddlFSupercargo);

            GasHelper.DropDownListVehicleNumDataBind(ddlFVehicleNum);

            //删除选中单元格的客户端脚本
            string deleteScript = DeleteScript();

            //新增
            var defaultObj = new JObject
            {
                { "KeyId", "" },
                { "FDate", DateTime.Now.ToString("yyyy-MM-dd") },
                { "FCode", "" },
                { "FName", "" },
                { "FArea", "1" },
                { "FItemName", "0" },
                { "FSp", "0" },
                { "FSpPrice", "0" },
                { "FKp", "0" },
                { "FKpPrice", "0" },
                { "FSumPrice", "0" },
                { "FDriver", "" },
                { "FDriverPrice", "0" },
                { "FSupercargo", "" },
                { "FSupercargoPrice", "0" },
                { "FVehicleNum", "" },
                { "FMemo", "" },

                { "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;
        }
示例#17
0
        /// <summary>
        ///     初始化页面数据
        /// </summary>
        private void InitData()
        {
            ViewState["_AppendToEnd"] = true;

            txtCreateBy.Text = CurrentUser.AccountName;

            //原料
            tbxFItemCode.OnClientTriggerClick = Window1.GetSaveStateReference(tbxFItemCode.ClientID)
                                                + Window1.GetShowReference("../../Common/WinFormula.aspx");

            //产品
            tbxFName.OnClientTriggerClick = Window2.GetSaveStateReference(txtFCode.ClientID, tbxFName.ClientID, tbxFBottle.ClientID)
                                            + Window2.GetShowReference("../../Common/WinProducReference.aspx");

            GasHelper.DropDownListProducerDataBind(ddlFProducer);

            GasHelper.DropDownListBottleDataBind(tbxFBottle);

            GasHelper.DropDownListSurveyorDataBind(ddlFSurveyor);

            GasHelper.DropDownListWorkshopDataBind(ddlWorkShop);

            //删除选中单元格的客户端脚本
            string deleteScript = DeleteScript();

            //新增
            var defaultObj = new JObject
            {
                { "FItemCode", "" },
                { "FItemName", "" },
                { "FSpec", "" },
                { "FUnit", "" },
                { "FPrice", "" },
                { "FQty", "0" },
                { "FAmount", "0" },
                { "FCateName", "" },
                { "colDelete", String.Format("<a href=\"javascript:;\" onclick=\"{0}\"><img src=\"{1}\"/></a>",//
                                             deleteScript, IconHelper.GetResolvedIconUrl(Icon.Delete)) },
            };

            // 在第一行新增一条数据
            btnAddFormula.OnClientClick = Grid1.GetAddNewRecordReference(defaultObj, AppendToEnd);

            txtFDate.SelectedDate = DateTime.Now;
        }
示例#18
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string curUser = GetUser();

                JObject defaultObj = new JObject();
                defaultObj.Add("id", getMaxId());
                defaultObj.Add("goodsNo", "");
                defaultObj.Add("goodsSpec", "");
                defaultObj.Add("targetNo", "");
                defaultObj.Add("isMinUnitOrNo", false);
                defaultObj.Add("UnitTimes", 0);
                defaultObj.Add("isOrder", false);

                btn_addNew.OnClientClick = Grid1.GetAddNewRecordReference(defaultObj, AppendToEnd);

                bindGrid("ALL");
            }
        }
示例#19
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                JObject defaultObj = new JObject();
                defaultObj.Add("Name", "用户名");
                defaultObj.Add("Gender", "1");
                defaultObj.Add("EntranceYear", "2015");
                defaultObj.Add("EntranceDate", "2015-09-01");
                defaultObj.Add("AtSchool", false);
                defaultObj.Add("Major", "化学系");

                // 第一行新增一条数据
                btnNew.OnClientClick = Grid1.GetAddNewRecordReference(defaultObj, AppendToEnd);

                btnReset.OnClientClick = Grid1.GetRejectChangesReference();

                BindGrid();
            }
        }
示例#20
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string curUser = GetUser();

                //新增一行数据
                JObject defaultObj = new JObject();
                defaultObj.Add("id", getMaxId());
                defaultObj.Add("goodsNo", "");
                defaultObj.Add("giftNo", "");
                defaultObj.Add("enabled", true);
                defaultObj.Add("startDte", DateTime.Now.ToShortDateString());
                defaultObj.Add("endDte", "2020-01-01");

                btn_addNew.OnClientClick = Grid1.GetAddNewRecordReference(defaultObj, AppendToEnd);

                bindGrid("ALL");
            }
        }
示例#21
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                JObject defaultObj = new JObject();
                defaultObj.Add("Name", "新用户");
                defaultObj.Add("Gender", "1");
                defaultObj.Add("EntranceYear", "2015");
                defaultObj.Add("EntranceDate", "2015-09-01");
                defaultObj.Add("AtSchool", false);
                defaultObj.Add("Major", "化学系");

                // 新增一条数据(新增数据后定位到[所学专业]列)
                btnNew.OnClientClick = Grid1.GetAddNewRecordReference(defaultObj, AppendToEnd, "Major");

                btnReset.OnClientClick = Confirm.GetShowReference("确定要重置表格数据?", String.Empty, Grid1.GetRejectChangesReference(), String.Empty);

                BindGrid();
            }
        }
示例#22
0
        /// <summary>
        ///     初始化页面数据
        /// </summary>
        private void InitData()
        {
            //删除选中单元格的客户端脚本
            string deleteScript = DeleteScript();

            //新增
            var defaultObj = new JObject
            {
                { "FLinkman", "" },
                { "FAddress", "" },
                { "FPhome", "" },
                { "FMoile", "" },
                { "FMemo", "" },
                { "colDelete", String.Format("<a href=\"javascript:;\" onclick=\"{0}\"><img src=\"{1}\"/></a>",//
                                             deleteScript, IconHelper.GetResolvedIconUrl(Icon.Delete)) },
            };

            // 在第一行新增一条数据
            btnAdd.OnClientClick = Grid1.GetAddNewRecordReference(defaultObj, AppendToEnd);


            btnClose.OnClientClick = ActiveWindow.GetHidePostBackReference();
        }
示例#23
0
        /// <summary>
        /// 加载页面
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
                this.ProjectId = this.CurrUser.LoginProjectId;
                this.InitDropDownList();
                this.CheckSpecialId = Request.Params["CheckSpecialId"];
                var checkSpecial = Check_CheckSpecialService.GetCheckSpecialByCheckSpecialId(this.CheckSpecialId);
                if (checkSpecial != null)
                {
                    this.ProjectId = checkSpecial.ProjectId;
                    if (this.ProjectId != this.CurrUser.LoginProjectId)
                    {
                        this.InitDropDownList();
                    }
                    this.txtCheckSpecialCode.Text = CodeRecordsService.ReturnCodeByDataId(this.CheckSpecialId);
                    if (checkSpecial.CheckTime != null)
                    {
                        this.txtCheckDate.Text = string.Format("{0:yyyy-MM-dd}", checkSpecial.CheckTime);
                    }
                    this.txtPartInPersonNames.Text = checkSpecial.PartInPersonNames;
                    if (!string.IsNullOrEmpty(checkSpecial.CheckItemSetId))
                    {
                        this.drpSupCheckItemSet.SelectedValue = checkSpecial.CheckItemSetId;
                        this.getCheckItemDrp();
                    }
                    if (!string.IsNullOrEmpty(checkSpecial.PartInPersonIds))
                    {
                        this.drpPartInPersons.SelectedValueArray = checkSpecial.PartInPersonIds.Split(',');
                    }
                    checkSpecialDetails = (from x in Funs.DB.View_CheckSpecialDetail
                                           where x.CheckSpecialId == this.CheckSpecialId
                                           orderby x.CheckItem
                                           select x).ToList();
                    if (checkSpecialDetails.Count() > 0)
                    {
                        this.drpSupCheckItemSet.Readonly = true;
                    }
                }
                else
                {
                    ////自动生成编码
                    this.txtCheckSpecialCode.Text         = CodeRecordsService.ReturnCodeByMenuIdProjectId(BLL.Const.ProjectCheckSpecialMenuId, this.ProjectId, this.CurrUser.UnitId);
                    this.txtCheckDate.Text                = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
                    this.drpSupCheckItemSet.SelectedIndex = 0;
                    this.drpSupCheckItemSet.SelectedIndex = 0;
                }

                // 删除选中单元格的客户端脚本
                string deleteScript = GetDeleteScript();
                // 新增数据初始值
                JObject defaultObj = new JObject
                {
                    { "WorkArea", "" },
                    { "UnitName", "" },
                    { "Unqualified", "" },
                    { "CheckContent", "" },
                    { "CompleteStatusName", "" },
                    { "HandleStepStr", "" },
                    { "HandleStep", "" },
                    { "UnitId", "" },
                    { "Delete", String.Format("<a href=\"javascript:;\" onclick=\"{0}\"><img src=\"{1}\"/></a>", deleteScript, IconHelper.GetResolvedIconUrl(Icon.Delete)) }
                };
                // 在第一行新增一条数据
                btnNew.OnClientClick = Grid1.GetAddNewRecordReference(defaultObj, false);
                // 删除选中行按钮
                //btnDelete.OnClientClick = Grid1.GetNoSelectionAlertReference("请至少选择一项!") + deleteScript;

                Grid1.DataSource = checkSpecialDetails;
                Grid1.DataBind();
            }
        }
示例#24
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                ttbSearchMessage.Text = GetQueryValue("t");
                using (var appdb = new AppContext())
                {
                    IQueryable <Client> q = appdb.clients;
                    q = q.Where(u => u.subjectcode != null);
                    txtClientCode.DataSource     = q.ToList();
                    txtClientCode.DataTextField  = "subjectcode";
                    txtClientCode.DataValueField = "subjectcode";
                    txtClientCode.DataBind();
                }
                IQueryable <User> yw = DB.Users;
                txtRecOrderPerson.DataSource     = yw.ToList();
                txtRecOrderPerson.DataTextField  = "ChineseName";
                txtRecOrderPerson.DataValueField = "ChineseName";
                txtRecOrderPerson.DataBind();
                // 删除选中单元格的客户端脚本
                string deleteScript = GetDeleteScript();

                // 新增数据初始值
                JObject defaultObj = new JObject();
                defaultObj.Add("OrderNo", "");
                DayOfWeek dw = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day).DayOfWeek;
                string    ss = System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.GetDayName(dw);
                defaultObj.Add("ClientOrderNo", "");
                defaultObj.Add("LotNo", "");
                defaultObj.Add("ClientCode", "");
                defaultObj.Add("RecOrderPerson", "");
                defaultObj.Add("RecOrderDate", DateTime.Now.ToString("yyyy-MM-dd"));
                defaultObj.Add("SendOrderDate", "");
                defaultObj.Add("OutGoodsDate", "");
                defaultObj.Add("Inputer", User.Identity.Name);
                defaultObj.Add("InputerDate", DateTime.Now.ToString("yyyy-MM-dd"));

                defaultObj.Add("deleteField", String.Format("<a href=\"javascript:;\" onclick=\"{0}\"><img src=\"{1}\"/></a>", deleteScript, IconHelper.GetResolvedIconUrl(FineUIPro.Icon.Delete)));

                // 在第一行新增一条数据
                btnNew.OnClientClick       = Grid1.GetAddNewRecordReference(defaultObj, AppendToEnd);
                btnAddDetail.Enabled       = false;
                btnDeleteSelected2.Enabled = false;
                btnBOM.Enabled             = false;
                btnHeaderBom.Enabled       = false;
                //txtOrderNo.Attributes.Add("onkeydown", "if (window.event.keyCode==13) window.event.keyCode=9;");

                // 删除选中行按钮
                //btnDelete.OnClientClick = Grid1.GetNoSelectionAlertReference("请至少选择一项!") + deleteScript;
                CheckPowerWithButton("OrderDelete", btnDelete);
                ResolveDeleteButtonForGrid(btnDelete, Grid1);
                CheckPowerWithButton("OrderDelete", btnDeleteSelected2);
                ResolveDeleteButtonForGrid(btnDeleteSelected2, Grid2);

                btnReset.OnClientClick = SF2.GetResetReference();
                btnClear.OnClientClick = SF1.GetResetReference();
                LoadData();
            }
            else
            {
                string requestArg = GetRequestEventArgument(); // 此函数所在文件:PageBase.cs
                //log.Info(requestArg);
                if (requestArg.Equals("RefreshGrid2"))
                {
                    BindGrid2();
                }
                else if (requestArg.Equals("RefreshGrid"))
                {
                    BindGrid();
                }
            }
        }
示例#25
0
        /// <summary>
        ///     初始化页面数据
        /// </summary>
        private void InitData()
        {
            GasHelper.DropDownListLiquidDataBind(tbxFItemName);

            GasHelper.DropDownListVehicleNumDataBind(ddlFVehicleNum);

            GasHelper.DropDownListDriverDataBind(ddlFDriver);

            GasHelper.DropDownListSupercargoDataBind(ddlFSupercargo);

            GasHelper.DropDownListVehicleNumDataBind(tbxFVehicleNum);

            GasHelper.DropDownListSupercargoDataBind(tbxFSupercargo);

            GasHelper.DropDownListSupplierDataBind(ddlSuper);

            GasHelper.DropDownListSupplierDataBind(tbxFSupplierName);

            GasHelper.DropDownListCustomerDataBind(ddlCustomer);

            GasHelper.DropDownListLiquidDataBind(ddlFName);

            GasHelper.DropDownListCustomerDataBind(tbxFName1);

            GasHelper.DropDownListCustomerDataBind(tbxFName2);

            GasHelper.DropDownListCustomerDataBind(tbxFName3);


            //删除选中单元格的客户端脚本
            string deleteScript = DeleteScript();

            //新增
            var defaultObj = new JObject
            {
                { "KeyId", "" },
                { "FDate", DateTime.Now.ToString("yyyy-MM-dd") },
                { "FItemName", "" },
                { "FBill", "进销" },
                { "FDriver", "" },
                { "FSupercargo", "" },
                { "FMargin", "0" },
                { "FPurchasedDate", "" },
                { "FSupplierName", "" },
                { "FPurchasedQty", "0" },
                { "FPurchasedPQty", "0" },
                { "FPurchasedPrice", "0" },

                { "FDate1", DateTime.Now.ToString("yyyy-MM-dd") },
                { "FName1", "" },
                { "FPQty1", "0" },
                { "FQty1", "0" },
                { "FPrice1", "0" },

                { "FDate2", DateTime.Now.ToString("yyyy-MM-dd") },
                { "FName2", "" },
                { "FPQty2", "0" },
                { "FQty2", "0" },
                { "FPrice2", "0" },

                { "FDate3", DateTime.Now.ToString("yyyy-MM-dd") },
                { "FName3", "" },
                { "FPQty3", "0" },
                { "FQty3", "0" },
                { "FPrice3", "0" },

                { "FMarginEnd", "0" },
                { "FMemo", "" },

                { "colDelete", String.Format("<a href=\"javascript:;\" onclick=\"{0}\"><img src=\"{1}\"/></a>",//
                                             deleteScript, IconHelper.GetResolvedIconUrl(Icon.Delete)) },
            };

            // 在第一行新增一条数据
            btnAdd.OnClientClick = Grid1.GetAddNewRecordReference(defaultObj, AppendToEnd);

            btnMerge.OnClientClick = Window1.GetShowReference(string.Format("./LiquidPlanMerge.aspx?action=1"), "进销合并操作");

            dateBegin.SelectedDate = DateTime.Now.AddDays(-3);
            dateEnd.SelectedDate   = DateTime.Now.AddDays(3);
        }
示例#26
0
        protected void Page_Load(object sender, EventArgs e)
        {
            PageBase pb = new PageBase();

            if (Request.Cookies["Cookies"] == null)
            {
                Response.Redirect("../../Login.aspx");
            }
            if (!IsPostBack)
            {
                if (drop_Pond.SelectedIndex == 0)
                {
                    Entity.Pond entity = DAL.Pond.GetPond(int.Parse(drop_Pond.SelectedValue));
                    txt_WasteName.Text = entity.WasteName;
                }
                List <Entity.Waste> items = DAL.Waste.GetPartWasteEx(2);
                string WasteName1         = "";
                if (items.Count > 0)
                {
                    WasteName1 = items[0].WasteName;
                }
                //List<Entity.Waste> items2 = DAL.Waste.GetPartWasteEx(3);
                //string WasteName2 = "";
                //if (items2.Count > 0)
                //{
                //    WasteName2= items2[0].WasteName;
                //}
                List <Entity.Pond> items3 = DAL.Pond.GetAllPondEx2(2);
                string             Pond   = "";
                if (items3.Count > 0)
                {
                    Pond = items3[0].Name;
                }

                string  deleteScript = GetDeleteScript();
                JObject defaultObj   = new JObject();
                defaultObj.Add("DetailID", 9999);
                defaultObj.Add("WasteName", WasteName1);
                defaultObj.Add("Amount", 10);
                defaultObj.Add("Name", Pond);
                defaultObj.Add("Delete", String.Format("<a href=\"javascript:;\" onclick=\"{0}\"><img src=\"{1}\"/></a>", deleteScript, IconHelper.GetResolvedIconUrl(Icon.Delete)));

                // 在第一行新增一条数据
                btnNew.OnClientClick = Grid1.GetAddNewRecordReference(defaultObj, AppendToEnd);


                // 删除选中行按钮
                btnDelete.OnClientClick = Grid1.GetNoSelectionAlertReference("请至少选择一项!") + deleteScript;
                //BindGrid();


                //string deleteScript2 = GetDeleteScriptEx();
                //JObject defaultObj2 = new JObject();
                //defaultObj2.Add("FWID", 9999);
                //defaultObj2.Add("WasteName2", WasteName2);
                //defaultObj2.Add("Result2", 10);
                //defaultObj2.Add("Delete2", String.Format("<a href=\"javascript:;\" onclick=\"{0}\"><img src=\"{1}\"/></a>", deleteScript2, IconHelper.GetResolvedIconUrl(Icon.Delete)));

                //// 在第一行新增一条数据
                //btnNew2.OnClientClick = Grid2.GetAddNewRecordReference(defaultObj2, AppendToEnd);


                //// 删除选中行按钮
                //btnDelete2.OnClientClick = Grid2.GetNoSelectionAlertReference("请至少选择一项!") + deleteScript2;


                if (Request.QueryString["id"] != null)
                {
                    sGuid = Request.QueryString["id"].ToString().Trim();
                    LoadData(sGuid);
                    BindGrid();
                }
                //BindGrid();
            }
        }
示例#27
0
        /// <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";
        }
示例#28
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                using (var appdb = new AppContext())
                {
                    IQueryable <Provider> pq = appdb.providers;
                    ddlSupplierId.DataSource     = pq.ToList();
                    ddlSupplierId.DataTextField  = "Name";
                    ddlSupplierId.DataValueField = "SN";
                    ddlSupplierId.DataBind();
                    pstr = "({";
                    foreach (Provider p in pq.ToList())
                    {
                        pstr += "\"" + p.SN.ToString() + "\":\"" + p.Name + "\",";
                    }
                    pstr  = pstr.TrimEnd(new char[] { ',' });
                    pstr += "})";
                    //var qw =from a in appdb.allitems where a.WorkShop!=null select new { a.WorkShop };
                }

                SQLHelper.DbHelperSQL.SetConnectionString("");
                string    sql = "select typename from basedata where stype='车间'  order by SortIndex";
                DataTable dt  = SQLHelper.DbHelperSQL.ReturnDataTable(sql, 30);
                ddlWorkShop.DataSource     = dt;
                ddlWorkShop.DataValueField = "typename";
                ddlWorkShop.DataTextField  = "typename";
                ddlWorkShop.DataBind();
                sql = "select typename from basedata where stype='类别'  order by SortIndex";
                dt  = SQLHelper.DbHelperSQL.ReturnDataTable(sql, 30);
                ddlItemClass.DataSource     = dt;
                ddlItemClass.DataTextField  = "typename";
                ddlItemClass.DataValueField = "typename";
                ddlItemClass.DataBind();

                sql = "select typename from basedata where stype='主要来源'  order by SortIndex";
                dt  = SQLHelper.DbHelperSQL.ReturnDataTable(sql, 30);
                ddlMainFrom.DataSource     = dt;
                ddlMainFrom.DataValueField = "typename";
                ddlMainFrom.DataTextField  = "typename";
                ddlMainFrom.DataBind();
                sql = "select typename from basedata where stype='仓库'  order by SortIndex ";
                dt  = SQLHelper.DbHelperSQL.ReturnDataTable(sql, 30);
                ddlStoreHouse.DataSource     = dt;
                ddlStoreHouse.DataValueField = "typename";
                ddlStoreHouse.DataTextField  = "typename";
                ddlStoreHouse.DataBind();
                sql = "select typename from basedata where stype='总成'  order by SortIndex ";
                dt  = SQLHelper.DbHelperSQL.ReturnDataTable(sql, 30);
                ddlZongCheng.DataSource     = dt;
                ddlZongCheng.DataValueField = "typename";
                ddlZongCheng.DataTextField  = "typename";
                ddlZongCheng.DataBind();
                // 删除选中单元格的客户端脚本
                string deleteScript = GetDeleteScript();

                // 新增数据初始值
                JObject defaultObj = new JObject();
                defaultObj.Add("ItemNo", "");
                DayOfWeek dw = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day).DayOfWeek;
                string    ss = System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.GetDayName(dw);
                defaultObj.Add("Name", "");
                defaultObj.Add("Spec", "");
                defaultObj.Add("Material", "");
                defaultObj.Add("ItemColor", "");
                defaultObj.Add("ClassName", "");

                defaultObj.Add("deleteField", String.Format("<a href=\"javascript:;\" onclick=\"{0}\"><img src=\"{1}\"/></a>", deleteScript, IconHelper.GetResolvedIconUrl(FineUIPro.Icon.Delete)));

                // 在第一行新增一条数据
                btnNew.OnClientClick = Grid1.GetAddNewRecordReference(defaultObj, AppendToEnd);



                // 删除选中行按钮
                //btnDelete.OnClientClick = Grid1.GetNoSelectionAlertReference("请至少选择一项!") + deleteScript;
                CheckPowerWithButton("AllitemDelete", btnDelete);
                ResolveDeleteButtonForGrid(btnDelete, Grid1);

                // 每页记录数
                Grid1.PageSize = ConfigHelper.PageSize;
                ddlGridPageSize.SelectedValue = ConfigHelper.PageSize.ToString();
                // 绑定表格
                //BindGrid("", 1);
                BindGrid();
                if (!CheckPower("FinanceView"))
                {
                    GridColumn column = Grid1.FindColumn("Price");
                    column.Hidden = !column.Hidden;
                }
                BindGrid2();
            }
        }