예제 #1
0
        private void bindForumTopics()
        {
            SysForumTopicService topicService = new SysForumTopicService();
            List<ForumTopic> list = topicService.GetRankByHits( 1, 10 );

            rptForumTopic.DataSource = list;
            rptForumTopic.DataBind();
        }
예제 #2
0
        private List <IBinderValue> getNewTopic(int count, Type ownerType)
        {
            if (count <= 0)
            {
                count = 10;
            }

            List <ForumTopic> list = db.find <ForumTopic>(TopicStatus.GetShowCondition() + " and OwnerType=:otype order by Id desc")
                                     .set("otype", ownerType.FullName)
                                     .list(count);

            return(SysForumTopicService.populateBinderValue(list));
        }
예제 #3
0
        public virtual List <IBinderValue> GetNewBoardTopic(String ids, int count)
        {
            if (count <= 0)
            {
                count = 10;
            }

            String sids = checkIds(ids);

            if (strUtil.IsNullOrEmpty(sids))
            {
                return(new List <IBinderValue>());
            }

            String bd = " and ForumBoardId in ( " + sids + " )";

            List <ForumTopic> list = db.find <ForumTopic>(TopicStatus.GetShowCondition() + bd + " and OwnerType=:otype order by Id desc")
                                     .set("otype", typeof(Site).FullName)
                                     .list(count);

            return(SysForumTopicService.populateBinderValue(list));
        }