protected void Page_Load(object sender, EventArgs e) { ForumGroup forumGroup = ForumManager.GetForumGroupById(this.ForumGroupId); if (forumGroup != null) { string title = forumGroup.Name; SEOHelper.RenderTitle(this, title, true); } }
private void BindData() { var forumGroup = ForumManager.GetForumGroupById(this.ForumGroupId); if (forumGroup != null) { hlForumGroup.NavigateUrl = SEOHelper.GetForumGroupUrl(forumGroup); hlForumGroup.Text = Server.HtmlEncode(forumGroup.Name); } rptrForumList.DataSource = forumGroup.Forums; rptrForumList.DataBind(); }
public ForumGroup SaveInfo() { ForumGroup forumGroup = ForumManager.GetForumGroupById(this.ForumGroupId); DateTime nowDT = DateTime.UtcNow; if (forumGroup != null) { forumGroup = ForumManager.UpdateForumGroup(forumGroup.ForumGroupId, txtName.Text, txtDescription.Text, txtDisplayOrder.Value, forumGroup.CreatedOn, nowDT); } else { forumGroup = ForumManager.InsertForumGroup(txtName.Text, txtDescription.Text, txtDisplayOrder.Value, nowDT, nowDT); } return(forumGroup); }
private void BindData() { ForumGroup forumGroup = ForumManager.GetForumGroupById(this.ForumGroupId); if (forumGroup != null) { this.txtName.Text = forumGroup.Name; this.txtDescription.Text = forumGroup.Description; this.txtDisplayOrder.Value = forumGroup.DisplayOrder; this.pnlCreatedOn.Visible = true; this.lblCreatedOn.Text = DateTimeHelper.ConvertToUserTime(forumGroup.CreatedOn, DateTimeKind.Utc).ToString(); this.pnlUpdatedOn.Visible = true; this.lblUpdatedOn.Text = DateTimeHelper.ConvertToUserTime(forumGroup.UpdatedOn, DateTimeKind.Utc).ToString(); } else { this.pnlCreatedOn.Visible = false; this.pnlUpdatedOn.Visible = false; } }
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; } }
/// <summary> /// Gets forum group URL /// </summary> /// <param name="forumGroupId">Forum group identifier</param> /// <returns>Forum group URL</returns> public static string GetForumGroupUrl(int forumGroupId) { var forumGroup = ForumManager.GetForumGroupById(forumGroupId); return(GetForumGroupUrl(forumGroup)); }