Beispiel #1
0
        public static ForumMessageReply CreateFromReader(IDataReader dr)
        {
            ForumMessageReply reply = new ForumMessageReply();

            reply._messageId     = new Guid(dr["MessageID"].ToString());
            reply._forum         = new Guid(dr["ForumID"].ToString());
            reply._account       = new Guid(dr["AccountID"].ToString());
            reply._creationDate  = Convert.ToDateTime(dr["CreationDate"]);
            reply._modifiedDate  = Convert.ToDateTime(dr["ModifiedDate"]);
            reply._forumThreadId = new Guid(dr["ThreadID"].ToString());
            MessageVO vo = new MessageVO();

            vo.Body         = Utils.Utils.HtmlDecode(dr["Body"].ToString());
            vo.Subject      = dr["Subject"].ToString();
            vo.RewardPoints = Convert.ToInt32(dr["RewardPoints"]);

            reply._messageVO = vo;

            return(reply);
        }
Beispiel #2
0
 /// <summary>
 /// 新回复
 /// </summary>
 /// <param name="forumMessageReply">回复消息ForumMessageReply</param>
 public void AddNewMessage(ForumMessageReply forumMessageReply)
 {
     this._forumState.AddMessageCount();            //添加回复数
     this._forumState.LastPost = forumMessageReply; //最后回复
 }