예제 #1
0
            private static SocialMediaTabItem[] GetSocialMediaTabInfo(
                UpdateIntro2Page page)
            {
                var list = new List <SocialMediaTabItem>
                {
                    // Build a dummy item for web site
                    new SocialMediaTabItem(page,
                                           new SocialMedium("WebSite", "Web Site", string.Empty, string.Empty, null, true),
                                           "PublicWebAddress")
                };

                // 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);
            }
예제 #2
0
 private SocialMediaTabItem(UpdateIntro2Page page, SocialMedium socialMedium,
                            string column) : base(page, GroupName)
 {
     _SocialMedium = socialMedium;
     Column        = column;
     Description   = socialMedium.DisplayName;
     Validator     = ValidateWebAddress;
 }
예제 #3
0
 // ReSharper disable UnusedMember.Local
 // Invoked via Reflection
 internal static void Initialize(UpdateIntro2Page page)
 // ReSharper restore UnusedMember.Local
 {
     page.BuildReasonsAndObjectivesTab();
     page.RegisterUpdateAll(page.UpdateAllReasons);
     new MainTabItem {
         TabName = GroupName
     }.Initialize(page);
     if (!page.IsPostBack)
     {
         page.LoadReasonsTabData();
     }
 }
예제 #4
0
 // ReSharper disable UnusedMember.Local
 // Invoked via Reflection
 private static void Initialize(UpdateIntro2Page 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();
     }
 }
예제 #5
0
 // ReSharper disable UnusedMember.Global
 // Invoked via Reflection
 internal static void Initialize(UpdateIntro2Page page)
 // ReSharper restore UnusedMember.Global
 {
     page._ContactTabInfo = GetContactTabInfo(page);
     page.RegisterUpdateAll(page.UpdateAllContacts);
     new MainTabItem {
         TabName = GroupName
     }.Initialize(page);
     if (!page.IsPostBack)
     {
         page.LoadContactTabData();
         page.RefreshContactTab();
     }
 }
예제 #6
0
 protected PoliticianDataItem(UpdateIntro2Page page, string groupName)
     : base(groupName)
 {
     _Page = page;
 }
예제 #7
0
 private SocialMediaTabItem(UpdateIntro2Page page, SocialMedium socialMedium)
     : this(page, socialMedium, socialMedium.DatabaseColumn)
 {
     _SocialMedium = socialMedium;
 }
예제 #8
0
            private static ContactTabItem[] GetContactTabInfo(UpdateIntro2Page 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   = ValidateDateOfBirth
                    },
                    new ContactTabItem(page)
                    {
                        Column      = "PartyKey",
                        Description = "Political Party"
                    }
                };

                foreach (var item in contactTabInfo)
                {
                    item.InitializeItem(page);
                }

                InitializeGroup(page, GroupName);

                return(contactTabInfo);
            }
예제 #9
0
 private ContactTabItem(UpdateIntro2Page page) : base(page, GroupName)
 {
 }
예제 #10
0
 public ReasonsTabItem(UpdateIntro2Page page, string groupName)
     : base(page, groupName)
 {
 }
예제 #11
0
 public Bio2TabItem(UpdateIntro2Page page, string groupName)
     : base(page, groupName)
 {
 }