示例#1
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="comment">CreateComment method.</param>
 public CommentModel(CreateComment comment)
 {
     this.Comments   = comment.Comments;
     this.PostID     = comment.HeadID;
     this.ReplyID    = (comment.IsReply ? comment.ID : -1);
     this.AddComment = true;
 }
示例#2
0
 /// <summary>
 /// Construcotr
 /// </summary>
 /// <param name="comment">CreateComment object.</param>
 public ViewLeftSideModel(CreateComment comment)
 {
     this.ID          = comment.ID;
     this.HeadID      = comment.HeadID;
     this.UpVotes     = comment.UpVotes;
     this.DownVotes   = comment.DownVotes;
     this.HasSolution = comment.HasSolution;
     this.IsSolution  = false;
     this.IsReply     = comment.IsReply;
     this.PostAuthor  = comment.Author.ToLower();
     this.Author      = comment.Author.ToLower();
 }