/* Public Methods */ #region Public Methods /// <summary> /// Initializes the ThanksList controls. /// </summary> /// <param name="thanksList"> /// The control which is being initialized. /// </param> /// <param name="currentMode"> /// the CurrentMode property of the control. /// </param> /// <param name="userID"> /// the UserID of the control. /// </param> /// <param name="thanksInfo"> /// The Dataview for the control's data. /// </param> public void InitializeThanksList([NotNull] ViewThanksList thanksList, ThanksListMode currentMode, int userID, [NotNull] DataTable thanksInfo) { thanksList.CurrentMode = currentMode; thanksList.UserID = userID; thanksList.ThanksInfo = thanksInfo; }
/// <summary> /// Load the Selected Tab Content /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> protected void ChangeTabClick(object sender, EventArgs e) { switch (this.hidLastTabId.Value) { case "ThanksFromTab": this.CurrentTab = ThanksListMode.FromUser; break; case "ThanksToTab": this.CurrentTab = ThanksListMode.ToUser; break; default: this.CurrentTab = ThanksListMode.FromUser; break; } this.RefreshTab(); }
/// <summary> /// Initializes the ThanksList controls. /// </summary> /// <param name="thanksList"> /// The control which is being initialized. /// </param> /// <param name="currentMode"> /// the CurrentMode property of the control. /// </param> /// <param name="userID"> /// the UserID of the control. /// </param> /// <param name="thanksInfo"> /// The Dataview for the control's data. /// </param> public void InitializeThanksList([NotNull] ViewThanksList thanksList, ThanksListMode currentMode, int userID, [NotNull] DataTable thanksInfo) { thanksList.CurrentMode = currentMode; thanksList.UserID = userID; thanksList.ThanksInfo = thanksInfo; }
/// <summary> /// The Page_ Load Event. /// </summary> /// <param name="sender"> /// The sender. /// </param> /// <param name="e"> /// The e. /// </param> protected void Page_Load([NotNull] object sender, [NotNull] EventArgs e) { var userId = (int)Security.StringToLongOrRedirect(this.Request.QueryString.GetFirstOrDefault("u")); if (this.IsPostBack) return; this.PageLinks.Clear(); this.PageLinks.AddLink(this.PageContext.BoardSettings.Name, YafBuildLink.GetLink(ForumPages.forum)); this.PageLinks.AddLink( this.PageContext.BoardSettings.EnableDisplayName ? UserMembershipHelper.GetDisplayNameFromID(userId) : UserMembershipHelper.GetUserNameFromID(userId), YafBuildLink.GetLink(ForumPages.profile, "u={0}", userId)); this.PageLinks.AddLink(this.GetText("TITLE"), string.Empty); this.CurrentTab = ThanksListMode.FromUser; this.ThanksFromList.AutoDatabind = true; this.ThanksFromList.DataBind(); }