private void BindData()
        {
            var forumGroup = this.ForumService.GetForumGroupById(this.ForumGroupId);

            if (forumGroup != null)
            {
                hlForumGroup.NavigateUrl = SEOHelper.GetForumGroupUrl(forumGroup);
                hlForumGroup.Text        = Server.HtmlEncode(forumGroup.Name);
            }

            rptrForumList.DataSource = forumGroup.Forums;
            rptrForumList.DataBind();
        }
Пример #2
0
        public void BindData()
        {
            hlHome.NavigateUrl       = CommonHelper.GetStoreLocation();
            hlForumsHome.NavigateUrl = SEOHelper.GetForumMainUrl();

            //topic
            var forumTopic = ForumManager.GetTopicById(this.ForumTopicId);

            if (forumTopic != null)
            {
                hlForumTopic.NavigateUrl = SEOHelper.GetForumTopicUrl(forumTopic);
                hlForumTopic.Text        = Server.HtmlEncode(forumTopic.Subject);
            }
            else
            {
                phForumTopic.Visible = false;
            }

            //forum
            Forum forum = null;

            if (forumTopic != null)
            {
                forum = ForumManager.GetForumById(forumTopic.ForumId);
            }
            else
            {
                forum = ForumManager.GetForumById(this.ForumId);
            }

            if (forum != null)
            {
                hlForum.NavigateUrl = SEOHelper.GetForumUrl(forum);
                hlForum.Text        = Server.HtmlEncode(forum.Name);
            }
            else
            {
                phForum.Visible = false;
            }

            //forum group
            ForumGroup forumGroup = null;

            if (forum != null)
            {
                forumGroup = ForumManager.GetForumGroupById(forum.ForumGroupId);
            }
            else
            {
                forumGroup = ForumManager.GetForumGroupById(this.ForumGroupId);
            }

            if (forumGroup != null)
            {
                hlForumGroup.NavigateUrl = SEOHelper.GetForumGroupUrl(forumGroup);
                hlForumGroup.Text        = Server.HtmlEncode(forumGroup.Name);
            }
            else
            {
                phForumTopic.Visible = false;
            }
        }