Esempio n. 1
0
 public TopicController() {
     boardService = new ForumBoardService();
     categoryService = new ForumCategoryService();
     topicService = new ForumTopicService();
     postService = new ForumPostService();
     attachService = new AttachmentService();
 }
Esempio n. 2
0
 public PostController() {
     boardService = new ForumBoardService();
     topicService = new ForumTopicService();
     postService = new ForumPostService();
     attachService = new AttachmentService();
     moderatorService = new ModeratorService();
 }
 public AttachmentController()
 {
     boardService = new ForumBoardService();
     attachmentService = new AttachmentService();
     topicService = new ForumTopicService();
     attachService = new AttachmentService();
 }
Esempio n. 4
0
 public TopicController()
 {
     boardService = new ForumBoardService();
     topicService = new ForumTopicService();
     postService = new ForumPostService();
     incomeService = new UserIncomeService();
     attachService = new AttachmentService();
 }
 public AttachmentController() {
     boardService = new ForumBoardService();
     attachmentService = new AttachmentService();
     topicService = new ForumTopicService();
     attachService = new AttachmentService();
     currencyService = new CurrencyService();
     incomeService = new UserIncomeService();
 }
Esempio 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();
 }
 public ForumTopicService()
 {
     forumService = new ForumService();
     categoryService = new ForumCategoryService();
     boardService = new ForumBoardService();
     userService = new UserService();
     AttachmentService = new AttachmentService();
     logService = new ForumLogService();
     incomeService = new UserIncomeService();
 }
Esempio 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();
        }
Esempio 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();
        }
Esempio 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();
        }
Esempio 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);
        }
Esempio n. 12
0
 public UploaderController() {
     topicService = new ForumTopicService();
     attachService = new AttachmentService();
 }