Example #1
0
        //关闭
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            // ChkAdminLevel("channel_" + this.channel_name + "_list", MXEnums.ActionEnum.Delete.ToString()); //检查权限
            string btnText = btnDelete.Text;

            BLL.wx_userweixin   uwBll  = new BLL.wx_userweixin();
            Model.wx_userweixin weixin = GetWeiXinCode();
            if (btnText == "关闭自动回复")
            {
                //关闭
                uwBll.UpdateField(weixin.id, "closeKW=1");
                weixin.closeKW = true;
                AddAdminLog(MXEnums.ActionEnum.Delete.ToString(), weixin.id + "关闭了自动回复"); //记录日志
                JscriptMsg("成功关闭了自动回复!", Utils.CombUrlTxt("reqrespData.aspx", "keywords={0}", txtKeywords.Text), "Success");
            }
            else
            {
                //开启
                uwBll.UpdateField(weixin.id, "closeKW=0");
                weixin.closeKW = false;
                AddAdminLog(MXEnums.ActionEnum.Delete.ToString(), weixin.id + "开启了自动回复"); //记录日志

                JscriptMsg("成功开启了自动回复!", Utils.CombUrlTxt("reqrespData.aspx", "keywords={0}", txtKeywords.Text), "Success");
            }

            Session["nowweixin"] = weixin;
        }