Esempio n. 1
0
        public virtual int GetPageCount(int topicId, int pageSize)
        {
            String strCondition = "TopicId=" + topicId + " and " + getNonDelCondition();
            int    count        = ForumPost.count(strCondition);
            int    page         = count / pageSize;
            int    imod         = count % pageSize;

            return(imod > 0 ? page + 1 : page);
        }
Esempio n. 2
0
        public virtual int GetPageCount(long topicId, int pageSize)
        {
            String strCondition = "TopicId=" + topicId + " and " + TopicStatus.GetShowCondition();
            int    count        = ForumPost.count(strCondition);
            int    page         = count / pageSize;
            int    imod         = count % pageSize;

            return(imod > 0 ? page + 1 : page);
        }
Esempio n. 3
0
        public virtual int GetPostPage(int postId, int topicId, int pageSize)
        {
            int count = ForumPost.count("Id<=" + postId + " and TopicId=" + topicId + " and " + TopicStatus.GetShowCondition());

            return(getPage(count, pageSize));
        }