示例#1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                string txtKeywords       = "";
                string openid            = Request.Params["openId"];
                BLL.wx_message_list gbll = new BLL.wx_message_list();
                gbll.Deleteopenid(openid);


                BLL.wx_message_blacklist gbllblack = new BLL.wx_message_blacklist();
                Model.wx_userweixin      weixin    = GetWeiXinCode();
                int      wid      = weixin.id;
                DateTime datetime = DateTime.Now;

                //拉黑记录
                BLL.wx_message_blacklist   settingBll = new BLL.wx_message_blacklist();
                Model.wx_message_blacklist setting    = new Model.wx_message_blacklist();
                setting.wid       = wid;
                setting.openid    = openid;
                setting.blacktime = datetime;
                settingBll.Add(setting);

                // AddAdminLog(MXEnums.ActionEnum.Delete.ToString(), ""); //记录日志
                AddAdminLog(MXEnums.ActionEnum.Add.ToString(), "增加黑名单,openid为" + openid); //记录日志
                JscriptMsg("拉黑成功!", Utils.CombUrlTxt("message_list.aspx", "keywords={0}", txtKeywords), "Success");
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                string txtKeywords = "";
                string openid = Request.Params["openId"];
                BLL.wx_message_list gbll = new BLL.wx_message_list();
                gbll.Deleteopenid(openid);


                BLL.wx_message_blacklist gbllblack = new BLL.wx_message_blacklist();
                Model.wx_userweixin weixin = GetWeiXinCode();
                int wid = weixin.id;
                DateTime datetime = DateTime.Now;

                //拉黑记录
                BLL.wx_message_blacklist settingBll = new BLL.wx_message_blacklist();
                Model.wx_message_blacklist setting = new Model.wx_message_blacklist();
                setting.wid = wid;
                setting.openid = openid;
                setting.blacktime = datetime;
                settingBll.Add(setting);

               // AddAdminLog(MXEnums.ActionEnum.Delete.ToString(), ""); //记录日志
                AddAdminLog(MXEnums.ActionEnum.Add.ToString(), "增加黑名单,openid为" + openid); //记录日志
                JscriptMsg("拉黑成功!", Utils.CombUrlTxt("message_list.aspx", "keywords={0}", txtKeywords), "Success");
            }
            
        }
示例#3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string openid = MyCommFun.RequestOpenid();
              
                wid = MyCommFun.RequestInt("wid");
                if (  wid == 0 || openid == "")
                {
                    return;
                }

                BLL.wx_message_list gbll = new BLL.wx_message_list();
                DataSet ds = gbll.GetListDetail(wid);



                BLL.wx_message_setting sBll = new BLL.wx_message_setting();
                IList<Model.wx_message_setting> settinglist = sBll.GetModelList(wid);
                if (settinglist == null || settinglist.Count <= 0)
                {
                    return;
                }

                this.zjpic.ImageUrl = settinglist[0].picUrl;
                this.Title = settinglist[0].title;
                this.adminOpenid.Value = settinglist[0].adminOpenid;
                this.needSH.Value = settinglist[0].needSH.ToString();


                IList<Model.wx_message_list> mlist = new List<Model.wx_message_list>();
                if (settinglist[0].needSH)
                {
                    mlist = gbll.GetModelList("wid=" + wid + " and hasSH='"+true+"' order by createDate desc");
                }
                else
                {
                    mlist = gbll.GetModelList("wid=" + wid + " order by createDate desc");
                }
                if (mlist != null && mlist.Count > 0)
                {
                    MessageStr(mlist);

                    IList<Model.wx_message_list> mlist_last = (from m in mlist where m.openId == openid orderby m.createDate descending select m).ToArray<Model.wx_message_list>();
                    if (mlist_last != null && mlist_last.Count > 0)
                    {
                        nicheng = mlist_last[0].userName;
                    }

                }
            }

        }
示例#4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string openid = MyCommFun.RequestOpenid();

                wid = MyCommFun.RequestInt("wid");
                if (wid == 0 || openid == "")
                {
                    return;
                }

                BLL.wx_message_list gbll = new BLL.wx_message_list();
                DataSet             ds   = gbll.GetListDetail(wid);



                BLL.wx_message_setting           sBll        = new BLL.wx_message_setting();
                IList <Model.wx_message_setting> settinglist = sBll.GetModelList(wid);
                if (settinglist == null || settinglist.Count <= 0)
                {
                    return;
                }

                this.zjpic.ImageUrl    = settinglist[0].picUrl;
                this.Title             = settinglist[0].title;
                this.adminOpenid.Value = settinglist[0].adminOpenid;
                this.needSH.Value      = settinglist[0].needSH.ToString();


                IList <Model.wx_message_list> mlist = new List <Model.wx_message_list>();
                if (settinglist[0].needSH)
                {
                    mlist = gbll.GetModelList("wid=" + wid + " and hasSH='" + true + "' order by createDate desc");
                }
                else
                {
                    mlist = gbll.GetModelList("wid=" + wid + " order by createDate desc");
                }
                if (mlist != null && mlist.Count > 0)
                {
                    MessageStr(mlist);

                    IList <Model.wx_message_list> mlist_last = (from m in mlist where m.openId == openid orderby m.createDate descending select m).ToArray <Model.wx_message_list>();
                    if (mlist_last != null && mlist_last.Count > 0)
                    {
                        nicheng = mlist_last[0].userName;
                    }
                }
            }
        }
示例#5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                int id = Convert.ToInt32(Request.Params["id"]);

                BLL.wx_message_list   settingBll = new BLL.wx_message_list();
                Model.wx_message_list setting    = new Model.wx_message_list();
                Model.wx_userweixin   weixin     = GetWeiXinCode();
                int wid = weixin.id;
                setting.id    = id;
                setting.wid   = wid;
                setting.hasSH = true;
                settingBll.Update(setting);

                // AddAdminLog(MXEnums.ActionEnum.Delete.ToString(), ""); //记录日志
                AddAdminLog(MXEnums.ActionEnum.Delete.ToString(), "审核留言,id为" + id); //记录日志
                JscriptMsg("审核成功!", Utils.CombUrlTxt("message_list.aspx", "keywords={0}", ""), "Success");
            }
        }
示例#6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                int id = Convert.ToInt32(Request.Params["id"]);

                BLL.wx_message_list settingBll = new BLL.wx_message_list();
                Model.wx_message_list setting = new Model.wx_message_list();
                Model.wx_userweixin weixin = GetWeiXinCode();
                int wid = weixin.id;
                setting.id = id;
                setting.wid = wid;
                setting.hasSH =true;
                settingBll.Update(setting);

                // AddAdminLog(MXEnums.ActionEnum.Delete.ToString(), ""); //记录日志
                AddAdminLog(MXEnums.ActionEnum.Delete.ToString(), "审核留言,id为" + id); //记录日志
                JscriptMsg("审核成功!", Utils.CombUrlTxt("message_list.aspx", "keywords={0}", ""), "Success");
            }
        }
示例#7
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/json";
            string _action = MyCommFun.QueryString("myact");
            string openid  = MyCommFun.RequestOpenid(); //得到微信用户的openid
            Dictionary <string, string> jsonDict = new Dictionary <string, string>();

            //黑名单权限openid


            BLL.wx_message_blacklist blackBll = new BLL.wx_message_blacklist();

            if (_action == "commit")
            {
                //留言



                if (blackBll.ExistsByOpenid(openid))
                {
                    jsonDict.Add("ret", "fail");
                    jsonDict.Add("content", "留言失败");

                    context.Response.Write(MyCommFun.getJsonStr(jsonDict));

                    return;
                }
                else
                {
                    int    wid      = MyCommFun.RequestInt("wid");
                    string nickname = MyCommFun.QueryString("nickname");
                    string info     = MyCommFun.QueryString("info");
                    bool   hasSH    = Convert.ToBoolean(MyCommFun.QueryString("hasSH"));

                    BLL.wx_message_list   mBll    = new BLL.wx_message_list();
                    Model.wx_message_list message = new Model.wx_message_list();
                    message.wid        = wid;
                    message.title      = info;
                    message.userName   = nickname;
                    message.createDate = DateTime.Now;
                    message.openId     = openid;
                    message.parentId   = 0;
                    if (hasSH)
                    {
                        message.hasSH = false;
                    }
                    else
                    {
                        message.hasSH = true;
                    }
                    mBll.Add(message);

                    //AddAdminLog(MXEnums.ActionEnum.Add.ToString(), ""); //记录日志


                    jsonDict.Add("ret", "ok");
                    jsonDict.Add("content", "留言成功");

                    context.Response.Write(MyCommFun.getJsonStr(jsonDict));
                }
            }
            //回复
            if (_action == "setly")
            {
                if (blackBll.ExistsByOpenid(openid))
                {
                    jsonDict.Add("ret", "fail");
                    jsonDict.Add("content", "留言失败");

                    context.Response.Write(MyCommFun.getJsonStr(jsonDict));

                    return;
                }
                else
                {
                    int    wid                    = MyCommFun.RequestInt("wid");
                    string info                   = MyCommFun.QueryString("info");
                    bool   hasSH                  = Convert.ToBoolean(MyCommFun.QueryString("hasSH"));
                    int    parentid               = MyCommFun.RequestInt("parentid");
                    string nickname               = MyCommFun.QueryString("nickname");
                    BLL.wx_message_list   mBll    = new BLL.wx_message_list();
                    Model.wx_message_list message = new Model.wx_message_list();
                    message.wid        = wid;
                    message.title      = info;
                    message.userName   = nickname;
                    message.createDate = DateTime.Now;
                    message.openId     = openid;
                    message.parentId   = parentid;

                    if (hasSH)
                    {
                        message.hasSH = false;
                    }
                    else
                    {
                        message.hasSH = true;
                    }
                    mBll.Add(message);

                    //AddAdminLog(MXEnums.ActionEnum.Add.ToString(), ""); //记录日志


                    jsonDict.Add("ret", "ok");
                    jsonDict.Add("content", "回复成功");

                    context.Response.Write(MyCommFun.getJsonStr(jsonDict));
                }
            }
        }
示例#8
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/json";
            string _action = MyCommFun.QueryString("myact");
            string openid = MyCommFun.RequestOpenid();  //得到微信用户的openid
            Dictionary<string, string> jsonDict = new Dictionary<string, string>();

            //黑名单权限openid

            BLL.wx_message_blacklist blackBll = new BLL.wx_message_blacklist();

            if (_action == "commit")
            {
                //留言

                if (blackBll.ExistsByOpenid(openid))
                {
                    jsonDict.Add("ret", "fail");
                    jsonDict.Add("content", "留言失败");

                    context.Response.Write(MyCommFun.getJsonStr(jsonDict));

                    return;
                }
                else
                {

                    int wid = MyCommFun.RequestInt("wid");
                    string nickname = MyCommFun.QueryString("nickname");
                    string info = MyCommFun.QueryString("info");
                    bool hasSH = Convert.ToBoolean(MyCommFun.QueryString("hasSH"));

                    BLL.wx_message_list mBll = new BLL.wx_message_list();
                    Model.wx_message_list message = new Model.wx_message_list();
                    message.wid = wid;
                    message.title = info;
                    message.userName = nickname;
                    message.createDate = DateTime.Now;
                    message.openId = openid;
                    message.parentId = 0;
                    if (hasSH)
                    {
                        message.hasSH = false;
                    }
                    else
                    {
                        message.hasSH = true;
                    }
                    mBll.Add(message);

                    //AddAdminLog(MXEnums.ActionEnum.Add.ToString(), ""); //记录日志

                    jsonDict.Add("ret", "ok");
                    jsonDict.Add("content", "留言成功");

                    context.Response.Write(MyCommFun.getJsonStr(jsonDict));

                }
            }
            //回复
            if (_action == "setly")
            {
                if (blackBll.ExistsByOpenid(openid))
                {
                    jsonDict.Add("ret", "fail");
                    jsonDict.Add("content", "留言失败");

                    context.Response.Write(MyCommFun.getJsonStr(jsonDict));

                    return;
                }
                else
                {

                    int wid = MyCommFun.RequestInt("wid");
                    string info = MyCommFun.QueryString("info");
                    bool hasSH = Convert.ToBoolean(MyCommFun.QueryString("hasSH"));
                    int parentid = MyCommFun.RequestInt("parentid");
                    string nickname = MyCommFun.QueryString("nickname");
                    BLL.wx_message_list mBll = new BLL.wx_message_list();
                    Model.wx_message_list message = new Model.wx_message_list();
                    message.wid = wid;
                    message.title = info;
                    message.userName = nickname;
                    message.createDate = DateTime.Now;
                    message.openId = openid;
                    message.parentId = parentid;

                    if (hasSH)
                    {
                        message.hasSH = false;
                    }
                    else
                    {
                        message.hasSH = true;
                    }
                    mBll.Add(message);

                    //AddAdminLog(MXEnums.ActionEnum.Add.ToString(), ""); //记录日志

                    jsonDict.Add("ret", "ok");
                    jsonDict.Add("content", "回复成功");

                    context.Response.Write(MyCommFun.getJsonStr(jsonDict));
                }
            }
        }