private void Page_Load(object sender, System.EventArgs e) { this._module = base.Module as ForumModule; this.btnCancel.Attributes.Add("onClick", String.Format("document.location.href='AdminForum.aspx{0}'", base.GetBaseQueryString())); if (! this.IsPostBack) { } if (Request.QueryString["TagId"] != null) { int tagId = Int32.Parse(Request.QueryString["TagId"]); if (tagId > 0) { this._forumtag = this._module.GetTagById(tagId); if (! this.IsPostBack) { BindTag(); } this.btnDelete.Visible = true; this.btnDelete.Attributes.Add("onClick", "return confirm('Are you sure?');"); } } }
private void Page_Load(object sender, System.EventArgs e) { this._module = base.Module as ForumModule; this._forumForum = this._module.GetForumById(this._module.CurrentForumId); this._module.CurrentForumCategoryId = this._forumForum.CategoryId; this.BindTopFooter(); if(this._forumForum.AllowGuestPost == 1 || this.Page.User.Identity.IsAuthenticated) { this.hplNewTopic.Visible = true; this.hplReply.Visible = true; this.hplQuotePost.Visible = true; } else { this.hplNewTopic.Visible = false; this.hplReply.Visible = false; this.hplQuotePost.Visible = false; } if(!this.IsPostBack) { if(this._module.DownloadId != 0) { this.DownloadCurrentFile(); } this.BindLinks(); this.BindForumPost(); this.BindForumPostReplies(); this.LocalizeControls(); } }
private void BindTopFooter() { ForumTop tForumTop; ForumFooter tForumFooter; this._module = this.Module as ForumModule; tForumTop = (ForumTop)this.LoadControl("~/Modules/Forum/ForumTop.ascx"); tForumTop.Module = this._module; this.phForumTop.Controls.Add(tForumTop); tForumFooter = (ForumFooter)this.LoadControl("~/Modules/Forum/ForumFooter.ascx"); tForumFooter.Module = this._module; this.phForumFooter.Controls.Add(tForumFooter); }
private void Page_Load(object sender, System.EventArgs e) { base.Title = "Forum administration"; this._module = base.Module as ForumModule; if (! this.IsPostBack) { this.rptForumCategories.DataSource = this._module.GetAllCategories(); this.rptForumCategories.DataBind(); this.rptForumlist.DataSource = this._module.GetAllForums(); this.rptForumlist.DataBind(); this.rptEmoticons.DataSource = this._module.GetAllEmoticons(); this.rptEmoticons.DataBind(); this.rptTags.DataSource = this._module.GetAllTags(); this.rptTags.DataBind(); } }
private void Page_Load(object sender, System.EventArgs e) { this._module = this.Module as ForumModule; this.ForumBreadCrumb(); this.Translate(); }
private void Page_Load(object sender, System.EventArgs e) { this._module = base.Module as ForumModule; this.btnCancel.Attributes.Add("onClick", String.Format("document.location.href='AdminForum.aspx{0}'", base.GetBaseQueryString())); if (! this.IsPostBack) { IList categories = this._module.GetAllCategories(); foreach (ForumCategory category in categories) { this.lstCategories.Items.Add(new ListItem(category.Name, category.Id.ToString())); } if (this.lstCategories.Items.Count == 0) { this.LabelNoCategory.Visible = true; this.btnSave.Visible = false; } else { this.LabelNoCategory.Visible = false; this.btnSave.Visible = true; } } if (Request.QueryString["ForumId"] != null) { int forumId = Int32.Parse(Request.QueryString["ForumId"]); if (forumId > 0) { this._forum = this._module.GetForumById(forumId); if (! this.IsPostBack) { BindForum(); } this.btnDelete.Visible = true; this.btnDelete.Attributes.Add("onClick", "return confirm('Are you sure?');"); } } }