Exemplo n.º 1
0
 public void SendMsg()
 {
     this.xmlDoc.LoadXml(this.postStr);
     this.MsgType      = this.xmlDoc.GetElementsByTagName("MsgType")[0].InnerText;
     this.FromUserName = this.xmlDoc.GetElementsByTagName("FromUserName")[0].InnerText;
     try
     {
         this.weiXinLogModel = this.weiXinLogBLL.GetModel(this.FromUserName);
         if (this.weiXinLogModel == null)
         {
             this.weiXinLogModel = new Chain.Model.WeiXinLog();
             this.NoLastOperating();
         }
         else
         {
             this.YesLastOperating(this.postStr);
         }
         this.sendXML = ((this.sendXML == "") ? ResponseSendStr.Text(this.postStr, this.weiXinRuleBLL.ErrorStr()) : this.sendXML);
     }
     catch (Exception e)
     {
         this.Log(e.ToString());
     }
     finally
     {
         this.Log(this.sendXML);
     }
     this.Response.Write(this.sendXML);
 }
Exemplo n.º 2
0
 private void YesLastOperating(string postStr)
 {
     if (this.MsgType == "event")
     {
         this.AttentionNews(postStr);
     }
     else
     {
         this.weiXinLogModel = this.weiXinLogBLL.GetModel(this.FromUserName);
         string statusCode = this.weiXinLogModel.StatusCode;
         if (statusCode != null)
         {
             if (!(statusCode == "0"))
             {
                 if (!(statusCode == "1"))
                 {
                     if (!(statusCode == "2"))
                     {
                         if (statusCode == "3")
                         {
                             this.Do3ForMemberTransformByReplyTelNumberOrMemberCard();
                         }
                     }
                     else
                     {
                         this.Do2MemberTransform();
                     }
                 }
                 else
                 {
                     this.Do1ForApplicationMemberByReplyTelNumber();
                 }
             }
             else
             {
                 this.Do0ForApplicationMember();
             }
         }
     }
 }