コード例 #1
0
        public virtual void DeleteToTrash(ForumPost post, User creator, String ip)
        {
            post.Status = TopicStatus.Delete;
            post.update("Status");

            ForumTopic topic = topicService.GetByPost(post.Id);

            topic.Replies = topicService.CountReply(topic.Id);
            topic.update("Replies");

            forumLogService.AddPost(creator, post.AppId, post.Id, ForumLogAction.Delete, ip);
        }
コード例 #2
0
ファイル: ForumPostService.cs プロジェクト: zhdwwf/wojilu
        public virtual void DeleteToTrash(ForumPost post, User creator, String ip)
        {
            post.Status = TopicStatus.Delete;
            post.update("Status");

            ForumTopic topic = topicService.GetByPost(post.Id);

            topic.Replies = topicService.CountReply(topic.Id);
            topic.update("Replies");

            // 积分规则中本身定义的是负值,所以此处用AddIncome
            AddAuthorIncome(post, UserAction.Forum_PostDeleted.Id, "删除");

            forumLogService.AddPost(creator, post.AppId, post.Id, ForumLogAction.Delete, ip);
        }
コード例 #3
0
ファイル: ForumPostService.cs プロジェクト: happyYao/wojilu
        public virtual void DeleteToTrash( ForumPost post, User creator, String ip )
        {
            post.Status = TopicStatus.Delete;
            post.update( "Status" );

            ForumTopic topic = topicService.GetByPost( post.Id );
            topic.Replies = topicService.CountReply( topic.Id );
            topic.update( "Replies" );

            // 积分规则中本身定义的是负值,所以此处用AddIncome
            AddAuthorIncome( post, UserAction.Forum_PostDeleted.Id, "删除" );

            forumLogService.AddPost( creator, post.AppId, post.Id, ForumLogAction.Delete, ip );
        }
コード例 #4
0
        public virtual void DeleteToTrash( ForumPost post, User creator, String ip )
        {
            post.Status = TopicStatus.Delete;
            post.update( "Status" );

            ForumTopic topic = topicService.GetByPost( post.Id );
            topic.Replies = topicService.CountReply( topic.Id );
            topic.update( "Replies" );

            forumLogService.AddPost( creator, post.AppId, post.Id, ForumLogAction.Delete, ip );
        }