Пример #1
0
 // ReSharper disable UnusedMember.Local
 // Invoked via Reflection
 internal static void Initialize(UpdateVolunteersPage page)
 // ReSharper restore UnusedMember.Local
 {
     page._AddVolunteerTabInfo = GetTabInfo(page);
     if (!page.IsPostBack)
     {
         StateCache.Populate(page.ControlAddVolunteerState, "--- Select state ---", string.Empty);
         Parties.PopulateNationalParties(page.ControlAddVolunteerParty, true, null, true);
     }
 }
Пример #2
0
            private static AddVolunteerTabItem[] GetTabInfo(UpdateVolunteersPage page)
            {
                var addVolunteerTabInfo = new[]
                {
                    new AddVolunteerTabItem(page)
                    {
                        Column      = "Email",
                        Description = "Email",
                        Validator   = ValidateEmailRequired
                    },
                    new AddVolunteerTabItem(page)
                    {
                        Column      = "FirstName",
                        Description = "First Name",
                        Validator   = ValidateRequired
                    },
                    new AddVolunteerTabItem(page)
                    {
                        Column      = "LastName",
                        Description = "Last Name",
                        Validator   = ValidateRequired
                    },
                    new AddVolunteerTabItem(page)
                    {
                        Column      = "Phone",
                        Description = "Phone"
                    },
                    new AddVolunteerTabItem(page)
                    {
                        Column      = "Password",
                        Description = "Password"
                    },
                    new AddVolunteerTabItem(page)
                    {
                        Column      = "State",
                        Description = "State",
                        Validator   = ValidateRequired
                    },
                    new AddVolunteerTabItem(page)
                    {
                        Column      = "Party",
                        Description = "Party Preference",
                        Validator   = ValidateRequired
                    },
                    new AddVolunteerTabItem(page)
                    {
                        Column      = "Notes",
                        Description = "Notes"
                    }
                };

                addVolunteerTabInfo.Initialize(page, GroupName);

                return(addVolunteerTabInfo);
            }
Пример #3
0
            private static EditVolunteerDialogItem[] GetDialogInfo(UpdateVolunteersPage page)
            {
                var editVolunteerInfo = new[]
                {
                    new EditVolunteerDialogItem(page)
                    {
                        Column      = "Password",
                        Description = "Password",
                        Validator   = ValidateRequired
                    },
                    new EditVolunteerDialogItem(page)
                    {
                        Column      = "FirstName",
                        Description = "First Name"
                    },
                    new EditVolunteerDialogItem(page)
                    {
                        Column      = "LastName",
                        Description = "Last Name"
                    },
                    new EditVolunteerDialogItem(page)
                    {
                        Column      = "Phone",
                        Description = "Phone"
                    },
                    new EditVolunteerDialogItem(page)
                    {
                        Column      = "StateCode",
                        Description = "State"
                    },
                    new EditVolunteerDialogItem(page)
                    {
                        Column      = "PartyCode",
                        Description = "Party"
                    },
                    // this must be last because it can change the key
                    new EditVolunteerDialogItem(page)
                    {
                        Column      = "Email",
                        Description = "Email Address",
                        Validator   = ValidateUniqueEmail
                    }
                };

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

                InitializeGroup(page, GroupName);

                return(editVolunteerInfo);
            }
Пример #4
0
 private EditVolunteerDialogItem(UpdateVolunteersPage page)
     : base(GroupName)
 {
     _Page = page;
 }
Пример #5
0
 // ReSharper disable UnusedMember.Local
 // Invoked via Reflection
 internal static void Initialize(UpdateVolunteersPage page)
 // ReSharper restore UnusedMember.Local
 {
     page._EditVolunteerDialogInfo = GetDialogInfo(page);
 }
Пример #6
0
 private AddVolunteerTabItem(UpdateVolunteersPage page)
     : base(GroupName)
 {
     _Page = page;
 }