コード例 #1
0
        private int AddNew(ForumPost forumPost)
        {
            if (_pinnedDropDownList == null)
            {
                return(ForumDB.AddPost(forumPost, ForumID));
            }

            DateTime pinnedDate;

            GetPinnedInfo(out pinnedDate);

            return(ForumDB.AddPostPinned(forumPost, ForumID, pinnedDate));
        }
コード例 #2
0
        private int AddReply(ForumPost forumPost)
        {
            // Add reply
            int postID = ForumDB.AddPost(forumPost, ForumID);

            // Check to see whether author of parent post should be notified
            ForumPost parentForumPost = ForumDB.GetPost(forumPost.ParentPostID);

            // Send e-mail
            if (parentForumPost.Notify && parentForumPost.User.UserID != forumPost.User.UserID)
            {
                EmailReplyNotification(parentForumPost, forumPost);
            }

            // Return identifier of newly created post
            return(postID);
        }