Exemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!RecentCommentsCore.Comments.Any())
     {
         if (PanelRecentComments != null)
         {
             PanelRecentComments.Visible = false;
         }
     }
     else
     {
         if (ListViewRecentComments != null)
         {
             ListViewRecentComments.DataSource = RecentCommentsCore.Comments;
             ListViewRecentComments.DataBind();
         }
     }
 }
Exemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            var totalToShow = CurrentBlog.DisplayCommentSidebarCountNumeric;

            var comments = ManagerFactory.CommentManagerInstance.GetCommentsByBlog(CurrentBlog.ID, totalToShow);

            if (comments.Length == 0)
            {
                if (PanelRecentComments != null)
                {
                    PanelRecentComments.Visible = false;
                }
            }
            else
            {
                if (ListViewRecentComments != null)
                {
                    ListViewRecentComments.DataSource = comments;
                    ListViewRecentComments.DataBind();
                }
            }
        }