Example #1
0
        private static void AddJurisdictionsMenu(Control ul)
        {
            var stateCode = SecurePage.GetViewStateStateCode();

            if (!StateCache.IsValidStateCode(stateCode))
            {
                stateCode = string.Empty;
            }
            AddMenuItem(ul, "Jurisdictions",
                        SecureAdminPage.GetUpdateJurisdictionsPageUrl(stateCode,
                                                                      SecurePage.GetViewStateCountyCode(), SecurePage.GetViewStateLocalCode()));
        }
Example #2
0
        private static void AddElectionsMenu(Control ul)
        {
            // Admins always see an elections menu
            // Masters see it if they are on any Admin page
            string stateCode = null;

            if (SecurePage.IsAdminUser ||
                (SecurePage.IsMasterUser && SecurePage.IsAdminPage))
            {
                stateCode = SecurePage.GetViewStateStateCode();
            }
            if (StateCache.IsValidStateCode(stateCode))
            {
                AddMenuItem(ul, "Elections",
                            SecureAdminPage.GetUpdateElectionsPageUrl(stateCode,
                                                                      SecurePage.GetViewStateCountyCode(), SecurePage.GetViewStateLocalCode()));
            }
        }