Exemple #1
0
 private void WZZ()
 {
     if (this.memBll.GetMemByWeiXinCard(this.FromUserName) == null)
     {
         this.sendXML = ResponseSendStr.Text(this.postStr, "您目前还不是微会员,只有微会员才可以访问微网站");
     }
     else
     {
         string      xml       = File.ReadAllText(this.Server.MapPath("WWZ.xml"));
         XmlDocument xmlWZZDoc = new XmlDocument();
         xmlWZZDoc.LoadXml(xml);
         string NewsTitle    = xmlWZZDoc.GetElementsByTagName("NewsTitle")[0].InnerText;
         string NewsDesc     = xmlWZZDoc.GetElementsByTagName("NewsDesc")[0].InnerText;
         string NewsUrlFirst = string.Concat(new object[]
         {
             "http://",
             PubFunction.curParameter.strDoMain,
             xmlWZZDoc.GetElementsByTagName("NewsUrlFirst")[0].InnerText,
             "?id=",
             Guid.NewGuid()
         });
         string NewsUrlSecond = string.Concat(new string[]
         {
             "http://",
             PubFunction.curParameter.strDoMain,
             xmlWZZDoc.GetElementsByTagName("NewsUrlSecond")[0].InnerText,
             "?MemWeiXinCard=",
             this.FromUserName
         });
         List <Chain.Model.WeiXinNews> newsList = this.GetModel(NewsTitle, NewsDesc, NewsUrlFirst, NewsUrlSecond);
         this.sendXML = ResponseSendStr.News(this.postStr, newsList);
     }
 }
Exemple #2
0
 private void UnknownTextNewsHandle(string postStr, string Content)
 {
     this.ruleModel = this.weiXinRuleBLL.GetModelByNewsRuleID(Content);
     if (this.ruleModel != null)
     {
         if (this.ruleModel.RuleNewsType == "text")
         {
             this.sendXML = ResponseSendStr.Text(postStr, this.ruleModel.RuleContent);
         }
         else if (this.ruleModel.RuleNewsType == "news")
         {
             List <Chain.Model.WeiXinNews> newsList = new Chain.BLL.WeiXinNews().GetModelList("NewsRuleID=" + this.ruleModel.RuleID);
             this.sendXML = ResponseSendStr.News(postStr, newsList);
         }
     }
 }
Exemple #3
0
        private void Card(Chain.Model.Mem mem, string NewsTitle, string NewsDesc)
        {
            this.DrawImage(mem, this.FromUserName);
            string NewsUrlFirst = string.Concat(new object[]
            {
                "http://",
                PubFunction.curParameter.strDoMain,
                "/Upload/WeiXin/Images/",
                this.FromUserName,
                ".jpg?id=",
                Guid.NewGuid()
            });
            string NewsUrlSecond = "http://" + PubFunction.curParameter.strDoMain + "/ReceptionPage/index.aspx?MemWeiXinCard=" + this.FromUserName;
            List <Chain.Model.WeiXinNews> newsList = this.GetModel(NewsTitle, NewsDesc, NewsUrlFirst, NewsUrlSecond);

            this.sendXML = ResponseSendStr.News(this.postStr, newsList);
        }