Example #1
0
        private void bindAppInfo( BlogApp blog )
        {
            set( "blog.Count", blog.BlogCount );
            set( "blog.Hits", blog.Hits );
            set( "blog.CommentCount", getBlogComments( blog ) );
            set( "blog.RssUrl", Link.To( new BlogController().Rss ) );

            Page.RssLink = Link.To( new BlogController().Rss );
        }
        private void bindAppInfo( BlogApp blog )
        {
            int nComments = (int)getBlogComments( blog );

            set( "blog.Count", blog.BlogCount );
            set( "blog.Hits", blog.Hits );
            set( "blog.CommentCount", nComments );
            set("blog.Score", blog.BlogCount * 10 + 5 * nComments + blog.Hits);
            //set( "blog.RssUrl", Link.To( new BlogController().Rss ) );

            Page.RssLink = Link.To( new BlogController().Rss );
        }
Example #3
0
        private object getBlogComments( BlogApp blog )
        {
            return BlogPostComment.count( "AppId=" + blog.Id );

            //return blog.CommentCount;
        }
Example #4
0
 public virtual void AddHits( BlogApp app ) {
     HitsJob.Add( app );
 }
Example #5
0
        public virtual void UpdateCount( BlogApp blog ) {

            int count = BlogPost.count( "AppId=" + blog.Id );
            blog.BlogCount = count;
            blog.update( "BlogCount" );
        }
 private int getBlogComments( BlogApp blog ) {
     return blog.CommentCount;
 }