private static SocialMediaTabItem[] GetSocialMediaTabInfo( UpdateIntroPage page) { var list = new List <SocialMediaTabItem> { // Build dummy items for web site and email new SocialMediaTabItem(page, new SocialMedium("WebSite", "Web Site", Empty, Empty, null, true), "PublicWebAddress"), new SocialMediaTabItem(page, new SocialMedium("Email", "Email", Empty, Empty, null, true), "PublicEmail") { Validator = ValidateEmail } }; // Add the existing Social Media table list.AddRange( SocialMedia.SocialMediaList.Select( medium => new SocialMediaTabItem(page, medium))); var socialMediaTabInfo = list.ToArray(); foreach (var item in socialMediaTabInfo) { item.InitializeItem(page); } InitializeGroup(page, GroupName); return(socialMediaTabInfo); }
// ReSharper disable UnusedMember.Local // Invoked via Reflection internal static void Initialize(UpdateIntroPage page) // ReSharper restore UnusedMember.Local { page.BuildBio2Tab(); page.RegisterUpdateAll(page.UpdateAllBio2); new MainTabItem { TabName = GroupName }.Initialize(page); if (!page.IsPostBack) { page.LoadBio2TabData(); } }
// ReSharper disable UnusedMember.Local // Invoked via Reflection private static void Initialize(UpdateIntroPage page) // ReSharper restore UnusedMember.Local { page._SocialMediaTabInfo = GetSocialMediaTabInfo(page); page.RegisterUpdateAll(page.UpdateAllSocialMedia); new MainTabItem { TabName = GroupName }.Initialize(page); if (!page.IsPostBack) { page.LoadSocialMediaTabData(); page.RefreshSocialMediaTab(); } }
private SocialMediaTabItem(UpdateIntroPage page, SocialMedium socialMedium, string column) : base(page, GroupName) { _SocialMedium = socialMedium; Column = column; Description = socialMedium.DisplayName; if (socialMedium.Name == "YouTube") { Validator = ValidateYouTubeAddressOptional; } else { Validator = ValidateWebAddress; } }
// Invoked via Reflection // ReSharper disable once UnusedMember.Local internal static void Initialize(UpdateIntroPage page) // ReSharper restore UnusedMember.Global { LoadPartiesDropdown(Politicians.GetStateCodeFromKey(page.PoliticianKey), page.ControlContactPartyKey, Empty, PartyCategories.None, PartyCategories.StateParties, PartyCategories.NationalParties, PartyCategories.NonParties); page._ContactTabInfo = GetContactTabInfo(page); page.RegisterUpdateAll(page.UpdateAllContacts); new MainTabItem { TabName = GroupName }.Initialize(page); if (!page.IsPostBack) { page.LoadContactTabData(); page.RefreshContactTab(); } }
private static ContactTabItem[] GetContactTabInfo(UpdateIntroPage page) { var contactTabInfo = new[] { new ContactTabItem(page) { Column = "FName", Description = "First Name", Validator = ValidateFirstName }, new ContactTabItem(page) { Column = "MName", Description = "Middle Name", Validator = ValidateMiddleName }, new ContactTabItem(page) { Column = "Nickname", Description = "Nickname", Validator = ValidateNickname }, new ContactTabItem(page) { Column = "LName", Description = "Last Name", Validator = ValidateLastName }, new ContactTabItem(page) { Column = "Suffix", Description = "Suffix", Validator = ValidateSuffix }, new ContactTabItem(page) { Column = "PublicAddress", Description = "Street Address", Validator = ValidateStreet }, new ContactTabItem(page) { Column = "PublicCityStateZip", Description = "City, State Zip", Validator = ValidateCityStateZip }, new ContactTabItem(page) { Column = "PublicPhone", Description = "Phone", Validator = ValidateWhiteSpace }, new ContactTabItem(page) { Column = "PublicEmail", Description = "Email", Validator = ValidateEmail }, new ContactTabItem(page) { Column = "DateOfBirth", Description = "Date of Birth", Validator = i => UserSecurityClass == PoliticianSecurityClass ? ValidateDateOfBirth(i) : ValidateDateOfBirthOptional(i) }, new ContactTabItem(page) { Column = "PartyKey", Description = "Political Party" } }; foreach (var item in contactTabInfo) { item.InitializeItem(page); } InitializeGroup(page, GroupName); return(contactTabInfo); }
private ContactTabItem(UpdateIntroPage page) : base(page, GroupName) { }
private SocialMediaTabItem(UpdateIntroPage page, SocialMedium socialMedium) : this(page, socialMedium, socialMedium.DatabaseColumn) { _SocialMedium = socialMedium; }
public Bio2TabItem(UpdateIntroPage page, string groupName) : base(page, groupName) { }
protected PoliticianDataItem(UpdateIntroPage page, string groupName) : base(groupName) { Page = page; }
public ReasonsTabItem(UpdateIntroPage page, string groupName) : base(page, groupName) { }