예제 #1
0
        /// <summary>
        /// 数据保存
        /// </summary>
        protected void btnSave_Click(object sender, EventArgs e)
        {
            if (!AuthUserOperationPermission(Permission.Edit))
            {
                return;
            }

            IMGroupOption config = new IMGroupOption();

            config.OptionName     = CtrlHelper.GetText(txtStatusName);
            config.OptionValue    = CtrlHelper.GetInt(txtStatusValue, 0);
            config.OptionTip      = CtrlHelper.GetText(txtStatusTip);
            config.OptionDescribe = CtrlHelper.GetText(txtStatusDescription);

            int result = FacadeManage.aideGroupFacade.UpdateGroupOption(config);

            if (result > 0)
            {
                ShowInfo("修改成功");
            }
            else
            {
                ShowError("修改失败");
            }
        }
예제 #2
0
        /// <summary>
        /// 修改配置信息
        /// </summary>
        /// <param name="optionInfo">配置信息</param>
        /// <returns></returns>
        public int UpdateGroupOption(IMGroupOption optionInfo)
        {
            string sqlQuery = @"UPDATE IMGroupOption SET OptionValue=@OptionValue,SortID=@SortID,
                    OptionTip=@OptionTip,OptionDescribe=@OptionDescribe WHERE OptionName=@OptionName";

            var prams = new List <DbParameter>
            {
                Database.MakeInParam("OptionValue", optionInfo.OptionValue),
                Database.MakeInParam("SortID", optionInfo.SortID),
                Database.MakeInParam("OptionTip", optionInfo.OptionTip),
                Database.MakeInParam("OptionDescribe", optionInfo.OptionDescribe),
                Database.MakeInParam("OptionName", optionInfo.OptionName)
            };

            return(Database.ExecuteNonQuery(CommandType.Text, sqlQuery, prams.ToArray()));
        }
예제 #3
0
        /// <summary>
        /// 数据绑定
        /// </summary>
        private void BindData()
        {
            PagerSet pagerSet = FacadeManage.aideGroupFacade.GetList(IMGroupOption.Tablename, SearchItems, Orderby, 1, 100);

            rptDataList.DataSource = pagerSet.PageSet;
            rptDataList.DataBind();

            IMGroupOption config = FacadeManage.aideGroupFacade.GetGroupOption(string.IsNullOrEmpty(StrParam) ? "MaxMemberCount" : StrParam);

            if (config == null)
            {
                return;
            }
            CtrlHelper.SetText(txtStatusName, config.OptionName);
            CtrlHelper.SetText(txtStatusValue, config.OptionValue.ToString());
            CtrlHelper.SetText(txtStatusTip, config.OptionTip);
            CtrlHelper.SetText(txtStatusDescription, config.OptionDescribe);
        }
예제 #4
0
 /// <summary>
 /// 修改配置信息
 /// </summary>
 /// <param name="optionInfo">配置信息</param>
 /// <returns></returns>
 public int UpdateGroupOption(IMGroupOption optionInfo)
 {
     return(groupData.UpdateGroupOption(optionInfo));
 }