using System; using System.Web.UI.WebControls; using SiberTek.Xenta.Enums; using SiberTek.Xenta.Presentation; using SiberTek.Xenta.Presentation.Utils; using SiberTek.Xenta.Presentation.Resources; using SiberTek.Xenta.Utils; using SiberTek.Xenta.Web.Home.Modules; using SiberTek.Xenta.Web.Utils; namespace SiberTek.Xenta.Web.Home.Pages { public partial class AccountManagePage : StaticPageBase { #region Properties private Guid QParamCode { get { string value = HttpHelper.GetQueryParam("Code"); return StringHelper.IsGuid(value) ? new Guid(value) : Guid.Empty; } } #endregion #region Handlers protected override void OnInit(EventArgs e) { if(!IsPostBack) { if(UserContext.Current.IsAuthenticated) { Response.Redirect(UrlHelper.GetUrl("home", "home.aspx")); } if(SystemHelper.GetSystemParam<UserActivationMethod>("User.ActivationMethod") != UserActivationMethod.ManualByUser) { Response.Redirect(UrlHelper.GetUrl("home", "login.aspx")); } btnActivate.CommandName = "Activate"; btnDeactivate.CommandName = "Deactivate"; btnActivate.Text = StringManager.GetString("Home.AccountManagePage.btnActivate.Text"); btnDeactivate.Text = StringManager.GetString("Home.AccountManagePage.btnDeactivate.Text"); } btnActivate.Command += frmAccountManagementForm.OnCommand; btnDeactivate.Command += frmAccountManagementForm.OnCommand; base.OnInit(e); } protected override void OnLoadComplete(EventArgs e) { if(!IsPostBack) { frmAccountManagementForm.Guid = QParamCode; } base.OnLoadComplete(e); } #endregion } }
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.
This article, along with any associated source code and files, is licensed under The MIT License