예제 #1
0
 public int AddComment(Comment c)
 {
     OpenSession();
     OpenTransaction();
     session.Save(c);
     CommitTransaction();
     CloseSession();
     return c.CommentID;
 }
예제 #2
0
        public int AddComment(Comment c, string ajaxSessionKey)
        {
            CheckRequest(ajaxSessionKey);

            CommentManager cm = new CommentManager();
            c.CreationDate = DateTime.Now;
            c.Status = Comment.CommentStatus.Approved;
            int ret = cm.AddComment(c);

            return ret;
        }