예제 #1
0
 private void LoadComments()
 {
     if (Pub.Any())
     {
         lblcommentstatus.Visible = false;
         GridComments.DataSource  = Pub;
         GridComments.DataBind();
         btnPublish.Visible = true;
         btnDelete.Visible  = true;
         CheckPublishComment();
     }
     else
     {
         lblcommentstatus.Visible = true;
         lblcommentstatus.Text    = "No comments found";
     }
 }
예제 #2
0
        /// <summary>
        /// Load all the comments in sitecore comment editor.
        /// </summary>
        private void LoadComments()
        {
            GetCommonSettings newGetCommonSettings = new GetCommonSettings();
            Database          context = Sitecore.Context.ContentDatabase;
            var commonSetting         = newGetCommonSettings.GetCommonSetting(context);

            if (Pub.Any())
            {
                lblcommentstatus.Visible = false;
                GridComments.PageSize    = commonSetting.PageSize;
                GridComments.DataSource  = Pub;
                GridComments.DataBind();
                btnPublish.Visible = true;
                btnDelete.Visible  = true;
                CheckApproveComment();
            }
            else
            {
                lblcommentstatus.Visible = true;
                lblcommentstatus.Text    = "No comments found";
            }
        }