Esempio n. 1
0
            private static MasterOnlyTabItem[] GetTabInfo(UpdateOfficesPage page)
            {
                var masterOnlyTabInfo = new MasterOnlyTabItem[]
                {
                    new MasterOnlyClassesToLockTabItem(page)
                    {
                        Column      = "ClassesToLock",
                        Description = "Office classes to Lock",
                        SubTab      = MasterOnlySubTab.LockClasses
                    },
                    new MasterOnlyChangeKeyTabItem(page)
                    {
                        Column      = "ChangeKeyPrefix",
                        Description = "Jurisdictional Prefix",
                        SubTab      = MasterOnlySubTab.ChangeKey
                    },
                    new MasterOnlyChangeKeyTabItem(page)
                    {
                        Column      = "OldKey",
                        Description = "Old Office Key",
                        SubTab      = MasterOnlySubTab.ChangeKey
                    },
                    new MasterOnlyChangeKeyTabItem(page)
                    {
                        Column      = "NewKey",
                        Description = "New Office Key",
                        SubTab      = MasterOnlySubTab.ChangeKey
                    },
                    new MasterOnlyConsolidateTabItem(page)
                    {
                        Column      = "ConsolidatePrefix",
                        Description = "Jurisdictional Prefix",
                        SubTab      = MasterOnlySubTab.Consolidate
                    },
                    new MasterOnlyConsolidateTabItem(page)
                    {
                        Column      = "Key1",
                        Description = "Office Key 1",
                        SubTab      = MasterOnlySubTab.Consolidate
                    },
                    new MasterOnlyConsolidateTabItem(page)
                    {
                        Column      = "Key2",
                        Description = "Office Key 2",
                        SubTab      = MasterOnlySubTab.Consolidate
                    }
                };

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

                InitializeGroup(page, GroupName);

                return(masterOnlyTabInfo);
            }
Esempio n. 2
0
            // ReSharper disable UnusedMember.Local
            // Invoked via Reflection
            internal static void Initialize(UpdateOfficesPage page)
            // ReSharper restore UnusedMember.Local
            {
                page._MasterOnlyTabInfo = GetTabInfo(page);

                page._MasterOnlySubTabs = new List <MasterOnlySubTab>
                {
                    MasterOnlySubTab.LockClasses,
                    MasterOnlySubTab.ChangeKey,
                    MasterOnlySubTab.Consolidate
                };

                if (!IsMasterUser)
                {
                    page.TabMasterItem.Visible = false;
                }
            }
Esempio n. 3
0
 protected OfficesDataItem(UpdateOfficesPage page, string groupName)
     : base(groupName)
 {
     Page = page;
 }
Esempio n. 4
0
 internal MasterOnlyConsolidateTabItem(UpdateOfficesPage page)
     : base(page)
 {
 }
Esempio n. 5
0
 protected MasterOnlyTabItem(UpdateOfficesPage page) : base(page, GroupName)
 {
 }
Esempio n. 6
0
 internal MasterOnlyChangeKeyTabItem(UpdateOfficesPage page)
     : base(page)
 {
 }
Esempio n. 7
0
 internal MasterOnlyClassesToLockTabItem(UpdateOfficesPage page)
     : base(page)
 {
 }
Esempio n. 8
0
            private static EditOfficeDialogItem[] GetDialogInfo(UpdateOfficesPage page)
            {
                var editPoliticianInfo = new[]
                {
                    new EditOfficeDialogItem(page)
                    {
                        Column      = "OfficeLine1",
                        Description = "1st Line of Office Title",
                        Validator   = ValidateRequired
                    },
                    new EditOfficeDialogItem(page)
                    {
                        Column      = "OfficeLine2",
                        Description = "1st Line of Office Title"
                    },
                    new EditOfficeDialogItem(page)
                    {
                        Column      = "Incumbents",
                        Description = "Incumbents",
                        Validator   = ValidateNumeric
                    },
                    new EditOfficeDialogItem(page)
                    {
                        Column      = "ElectionPositions",
                        Description = "Election Positions",
                        Validator   = ValidateNumeric
                    },
                    new EditOfficeDialogItem(page)
                    {
                        Column      = "SyncPositions",
                        Description = "Keep Incumbents, Election Positions and Primary Positions in sync",
                        ConvertFn   = ToBool
                    },
                    new EditOfficeDialogItem(page)
                    {
                        Column      = "PrimaryPositions",
                        Description = "Primary Positions",
                        Validator   = ValidateNumeric
                    },
                    new EditOfficeDialogItem(page)
                    {
                        Column      = "PrimaryRunoffPositions",
                        Description = "Primary Runoff Positions",
                        Validator   = ValidateSignedNumeric
                    },
                    new EditOfficeDialogItem(page)
                    {
                        Column      = "GeneralRunoffPositions",
                        Description = "General Runoff Positions",
                        Validator   = ValidateSignedNumeric
                    },
                    new EditOfficeDialogItem(page)
                    {
                        Column      = "ShowWriteIn",
                        Description = "Show Write In",
                        ConvertFn   = ToBool
                    },
                    new EditOfficeDialogItem(page)
                    {
                        Column      = "IsRunningMateOffice",
                        Description = "Is General Running Mate Office",
                        ConvertFn   = ToBool
                    },
                    new EditOfficeDialogItem(page)
                    {
                        Column      = "IsPrimaryRunningMateOffice",
                        Description = "Is Primary Running Mate Office",
                        ConvertFn   = ToBool
                    },
                    new EditOfficeDialogItem(page)
                    {
                        Column      = "IsOnlyForPrimaries",
                        Description = "Is Only For Primaries",
                        ConvertFn   = ToBool
                    },
                    new EditOfficeDialogItem(page)
                    {
                        Column      = "IsInactive",
                        Description = "Is Inactive",
                        ConvertFn   = ToBool
                    },
                    new EditOfficeDialogItem(page)
                    {
                        Column      = "PrimaryAdRate",
                        Description = "Primary Ad Rate",
                        Validator   = ValidateMoneyOptional
                    },
                    new EditOfficeDialogItem(page)
                    {
                        Column      = "GeneralAdRate",
                        Description = "General Ad Rate",
                        Validator   = ValidateMoneyOptional
                    }
                };

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

                InitializeGroup(page, GroupName);

                return(editPoliticianInfo);
            }
Esempio n. 9
0
 private EditOfficeDialogItem(UpdateOfficesPage page) : base(page, GroupName)
 {
 }
Esempio n. 10
0
 // ReSharper disable UnusedMember.Local
 // Invoked via Reflection
 internal static void Initialize(UpdateOfficesPage page)
 // ReSharper restore UnusedMember.Local
 => page._EditOfficeDialogInfo = GetDialogInfo(page);