コード例 #1
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);
         }
     }
 }
コード例 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string tempNewsID = base.Request["NewsID"];

            if (!string.IsNullOrEmpty(tempNewsID))
            {
                int NewsID;
                if (int.TryParse(tempNewsID, out NewsID))
                {
                    Chain.Model.WeiXinNews newsModel = new Chain.BLL.WeiXinNews().GetModel(NewsID);
                    if (newsModel != null)
                    {
                        this.imgUrl  = newsModel.NewsUrlFirst;
                        this.divMain = newsModel.NewsLinkContent;
                    }
                }
            }
        }