コード例 #1
0
ファイル: PostModels.cs プロジェクト: sish/Development
 /// <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
ファイル: PostModels.cs プロジェクト: sish/Development
 /// <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();
 }