Ejemplo n.º 1
0
 public TopicController() {
     boardService = new ForumBoardService();
     categoryService = new ForumCategoryService();
     topicService = new ForumTopicService();
     postService = new ForumPostService();
     attachService = new AttachmentService();
 }
Ejemplo n.º 2
0
 public PostController() {
     boardService = new ForumBoardService();
     topicService = new ForumTopicService();
     postService = new ForumPostService();
     attachService = new AttachmentService();
     moderatorService = new ModeratorService();
 }
Ejemplo n.º 3
0
 public AttachmentController()
 {
     boardService = new ForumBoardService();
     attachmentService = new AttachmentService();
     topicService = new ForumTopicService();
     attachService = new AttachmentService();
 }
Ejemplo n.º 4
0
 public TopicController()
 {
     boardService = new ForumBoardService();
     topicService = new ForumTopicService();
     postService = new ForumPostService();
     incomeService = new UserIncomeService();
     attachService = new AttachmentService();
 }
Ejemplo n.º 5
0
 public AttachmentController() {
     boardService = new ForumBoardService();
     attachmentService = new AttachmentService();
     topicService = new ForumTopicService();
     attachService = new AttachmentService();
     currencyService = new CurrencyService();
     incomeService = new UserIncomeService();
 }
Ejemplo n.º 6
0
 public PostController() {
     boardService = new ForumBoardService();
     topicService = new ForumTopicService();
     postService = new ForumPostService();
     attachService = new AttachmentService();
     moderatorService = new ModeratorService();
     buyService = new ForumBuyLogService();
     incomeService = new UserIncomeService();
 }
Ejemplo n.º 7
0
 public ForumTopicService()
 {
     forumService = new ForumService();
     categoryService = new ForumCategoryService();
     boardService = new ForumBoardService();
     userService = new UserService();
     AttachmentService = new AttachmentService();
     logService = new ForumLogService();
     incomeService = new UserIncomeService();
 }
Ejemplo n.º 8
0
        public TopicController() {
            boardService = new ForumBoardService();
            topicService = new ForumTopicService();
            postService = new ForumPostService();
            incomeService = new UserIncomeService();
            attachService = new AttachmentService();

            userService = new UserService();
            rateService = new ForumRateService();
            currencyService = new CurrencyService();
            buylogService = new ForumBuyLogService();
            moderatorService = new ModeratorService();
        }
Ejemplo n.º 9
0
        public ForumPostService()
        {
            forumService = new ForumService();
            categoryService = new ForumCategoryService();
            boardService = new ForumBoardService();
            topicService = new ForumTopicService();
            userService = new UserService();
            forumLogService = new ForumLogService();
            rateService = new ForumRateService();
            attachmentService = new AttachmentService();
            msgService = new MessageService();

            incomeService = new UserIncomeService();

            notificationService = new NotificationService();
            microblogService = new MicroblogService();
        }
Ejemplo n.º 10
0
        public ForumPostService()
        {
            forumService      = new ForumService();
            categoryService   = new ForumCategoryService();
            boardService      = new ForumBoardService();
            topicService      = new ForumTopicService();
            userService       = new UserService();
            forumLogService   = new ForumLogService();
            rateService       = new ForumRateService();
            attachmentService = new AttachmentService();
            msgService        = new MessageService();

            incomeService = new UserIncomeService();

            notificationService = new NotificationService();
            feedService         = new FeedService();
        }
Ejemplo n.º 11
0
        public virtual void DeleteTrue(ForumTopic topic, User viewer, String ip)
        {
            // 作者的帖子数
            int creatorId = topic.Creator.Id;

            userService.DeletePostCount(creatorId);

            // 帖子本身和tag
            topic.Tag.DeleteTags();
            db.delete(topic);

            // 主题相关的post
            ForumPost postByTopic = GetPostByTopic(topic.Id);
            //postByTopic.delete();
            List <ForumPost> posts = db.find <ForumPost>("TopicId=" + topic.Id).list();

            foreach (ForumPost p in posts)
            {
                db.delete(p);
            }

            // 相关的附件
            int postId = postByTopic.Id;

            AttachmentService.DeleteByPost(postId);

            // 更新板块的统计
            //int replies = topic.Replies;
            //int forumBoardId = topic.ForumBoard.Id;
            //boardService.DeleteTopicCount( forumBoardId, replies, topic.OwnerId );

            // 更新作者的收入
            if (creatorId > 0)   // 规避已注销用户
            {
                incomeService.AddIncome(topic.Creator, UserAction.Forum_TopicDeleted.Id);
            }

            logService.AddTopic(viewer, topic.AppId, topic.Id, ForumLogAction.DeleteTrue, ip);
        }
Ejemplo n.º 12
0
 public UploaderController() {
     topicService = new ForumTopicService();
     attachService = new AttachmentService();
 }