using System; using System.Data; using System.Web; using System.Web.UI; using CMS.GlobalHelper; using CMS.PortalControls; public partial class CMSWebParts_Membership_Registration_RegistrationConfirmation : CMSAbstractWebPart { #region "Properties" /// /// Gets or sets the value that indicates whether administrator should be informed about new user. /// public bool NotifyAdministrator { get { return ValidationHelper.GetBoolean(GetValue("NotifyAdministrator"), false); } set { SetValue("NotifyAdministrator", value); registrationApproval.NotifyAdministrator = value; } } /// /// Gets or sets email address of sender. /// public string FromAddress { get { return ValidationHelper.GetString(GetValue("FromAddress"), ""); } set { SetValue("FromAddress", value); registrationApproval.FromAddress = value; } } /// /// Gets or sets email address of sender. /// public string AdministratorEmail { get { return ValidationHelper.GetString(GetValue("AdministratorEmail"), ""); } set { SetValue("AdministratorEmail", value); registrationApproval.AdministratorEmail = value; } } /// /// Gets or sets successful approval text. /// public string SuccessfulApprovalText { get { return ValidationHelper.GetString(GetValue("SuccessfulApprovalText"), ""); } set { SetValue("SuccessfulApprovalText", value); registrationApproval.SuccessfulApprovalText = value; } } /// /// Gets or sets unsuccesfull approval text. /// public string UnsuccessfulApprovalText { get { return ValidationHelper.GetString(GetValue("UnsuccessfulApprovalText"), ""); } set { SetValue("UnsuccessfulApprovalText", value); registrationApproval.UnsuccessfulApprovalText = value; } } /// /// Gets or sets unsuccesfull approval text. /// public string UserDeletedText { get { return ValidationHelper.GetString(GetValue("UserDeletedText"), ""); } set { SetValue("UserDeletedText", value); registrationApproval.UserDeletedText = value; } } #endregion /// /// Initialization event handler. /// protected override void OnInit(EventArgs e) { base.OnInit(e); registrationApproval.StopProcessing = string.IsNullOrEmpty(QueryHelper.GetString("hash", string.Empty)); } /// /// Content loaded event handler. /// public override void OnContentLoaded() { base.OnContentLoaded(); SetupControl(); } /// /// Initializes the control properties. /// protected void SetupControl() { if (StopProcessing) { registrationApproval.StopProcessing = true; } else { // set address to underlying control registrationApproval.FromAddress = FromAddress; registrationApproval.NotifyAdministrator = NotifyAdministrator; registrationApproval.AdministratorEmail = AdministratorEmail; registrationApproval.SuccessfulApprovalText = SuccessfulApprovalText; registrationApproval.UnsuccessfulApprovalText = UnsuccessfulApprovalText; registrationApproval.UserDeletedText = UserDeletedText; } } protected override void OnPreRender(EventArgs e) { base.OnPreRender(e); Visible = registrationApproval.Visible; } }