private void TxtTextChanged(object sender, EventArgs e)
        {
            //Response.Write(Request.Form["__EVENTTARGET"]);
            if (_isListChanged)
            {
                return;
            }

            var module = new EntityModule();

            //获取用户输入的信息,赋给实体类
            FrmCommonForm.ControlToEntity(module);

            //表单控件里的onchange事件,靠不住呀。赋值就算,没办法了,只好自己判断
            if (Session["oldID"] != null)
            {
                if (Session["oldID"].ToString() != module.ModuleID.ToString(CultureInfo.InvariantCulture))
                {
                    BindForm(module);
                    BindForm2(module);
                }
            }
            else
            {
                BindForm(module);
                BindForm2(module);
            }
            Session["oldID"] = module.ModuleID;
        }
        protected void LstNewModuleTypeSelectedIndexChanged(object sender, EventArgs e)
        {
            var module = new EntityModule();

            //获取用户输入的信息,赋给实体类
            FrmCommonForm.ControlToEntity(module);

            BindForm(module);
            if (!Page.IsPostBack)
            {
                BindForm2(module);
            }
            _isListChanged = true;
        }
        private string Save()
        {
            //获取用户输入的数据
            string tmp    = FrmCommonForm.GetInputValue();
            bool   isTure = tmp.Length == 0;

            if (isTure == false)
            {
                //录入的信息的格式不正确。
                return("录入的信息的格式不正确");
            }

            //把用户输入的数据填充到节点的实例。
            var module = new EntityModule();

            FrmCommonForm.ControlToEntity(module);

            //判断序号是否重复的。
            module.DisOrderIsSample(Dal.DalCustomer, DataID);

            var operateLog = new ManagerLogOperate
            {
                AddUserID  = Int32.Parse(MyUser.BaseUser.UserID),
                Dal        = Dal.DalCustomer,
                ModuleID   = ModuleID,
                ButtonID   = ButtonID,
                PageViewID = MasterPageViewID
            };

            //定义数据变更日志
            var dataChangeLog = new ManagerLogDataChange
            {
                AddUserID    = Int32.Parse(MyUser.BaseUser.UserID),
                Dal          = Dal,
                PageViewMeta = PageViewMeta
            };

            //保存数据
            string err = FrmCommonForm.SaveData(operateLog, dataChangeLog);

            if (err.Length > 0)
            {
                //有错误发生不能继续。
                Response.Write(err);
                return("保存数据是发生意外!");
            }

            #region 创建视图和按钮
            //string viewIDs = lstView.SelectedValue;
            string width = txtWindowWidth.TextTrimNone;
            if (!Functions.IsInt(width))
            {
                Functions.PageRegisterAlert(Page, "宽度必须是数字!");
                return("宽度必须是数字!");
            }
            string height = txtWindowHeight.TextTrimNone;
            if (!Functions.IsInt(height))
            {
                Functions.PageRegisterAlert(Page, "高度必须是数字!");
                return("高度必须是数字!");
            }
            string userID = MyUser.BaseUser.UserID;
            module.CreatePageView(Dal.DalCustomer, lstView, lstTableID.SelectedValue, userID);

            //创建按钮
            module.CreateButton(Dal.DalCustomer, lstButton, userID, width, height);

            #endregion

            return("");
        }