コード例 #1
0
        /**
         *
         * 修改区域表信息*
         *
         ***/
        protected void Update(object sender, EventArgs e)
        {
            //获取输入的数据
            string REGION_KEY   = Request.Form["region_key2"];
            string REGION_NAME2 = Request.Form["region_name2"];

            Re_Leng(REGION_NAME2, "区域名");
            string SUBINVENTORY_KEY2 = Request.Form["subinventory_name2"];
            string ENABLED2          = Request.Form["enabled2"];
            string DESCRIPTION2      = Request.Form["description2"];

            Des_Leng(DESCRIPTION2, "描述");
            string UPDATE_BY2 = Session["LoginName"].ToString();

            //判断更改者是否为空
            if (Session["LoginId"] == null)
            {
                PageUtil.showToast(this, "更改者为空!");
                return;
            }

            //修改数据
            RegionDC regionDC2 = new RegionDC();
            DataSet  ds        = new DataSet();

            try
            {
                ds = regionDC2.updateRegion(REGION_KEY, REGION_NAME2, SUBINVENTORY_KEY2, UPDATE_BY2, ENABLED2, DESCRIPTION2);
                Line_Repeater.DataSource = ds;
                Line_Repeater.DataBind();
                PageUtil.showToast(this, "修改区域表信息成功!");
            }
            catch
            {
                PageUtil.showToast(this, "修改区域表信息失败!");
            }
        }