Esempio n. 1
0
        private void BindPost()
        {
            PostQueries postRepository = new PostQueries(Config.GetLog());
            int         postId         = this.GetCurrentPostId();

            MyBlog.Reporting.Projections.DTOPost post = postRepository.FindById(postId);

            this.litPublishDate.Text  = Utils.FormatDate(post.PublishDate.Value);
            this.litSubject.Text      = Utils.FormatText(post.Subject);
            this.litBody.Text         = Utils.FormatText(post.Body);
            this.litCommentCount.Text = post.Comments.Count().ToString();
            this.litCategories.Text   = FormatCategories(post.Categories);

            //Up to the page to decide how to order the comments
            this.repReplies.DataSource = post.Comments.OrderBy(c => c.CreationDate);
            this.repReplies.DataBind();

            pnlReply.Visible = post.CommentsEnabled;
        }
Esempio n. 2
0
 public string FormatBody(object o)
 {
     return(Utils.FormatText(o as string));
 }