Exemple #1
0
        private void InitializeForStateAdmin()
        {
            DialogCredentialMessage.InnerHtml = "Your sign-in credentials allow any " +
                                                States.GetName(_SecureAdminPage.StateCode) +
                                                " jurisdiction to be selected.";

            StateName.InnerHtml = States.GetName(_SecureAdminPage.StateCode);
            StateDropDownList.AddCssClasses("hidden");
            CountyName.AddCssClasses("hidden");

            switch (_SecureAdminPage.AdminPageLevel)
            {
            case AdminPageLevel.State:
                StateRadioButton.Checked  = true;
                LocalRadioButton.Disabled = true;
                PopulateCountyDropDown(true);
                LocalDropDownList.AddCssClasses("hidden");
                break;

            case AdminPageLevel.County:
                CountyRadioButton.Checked = true;
                PopulateCountyDropDown();
                PopulateLocalDropDown(true);
                LocalName.AddCssClasses("hidden");
                break;

            case AdminPageLevel.Local:
                LocalRadioButton.Checked = true;
                PopulateCountyDropDown();
                PopulateLocalDropDown();
                LocalName.AddCssClasses("hidden");
                break;
            }
        }
Exemple #2
0
        private void InitializeForMaster()
        {
            DialogCredentialMessage.InnerHtml =
                "Your sign-in credentials permit any jurisdiction to be selected.";
            StateName.AddCssClasses("hidden");

            switch (_SecureAdminPage.AdminPageLevel)
            {
            case AdminPageLevel.President:
            case AdminPageLevel.PresidentTemplate:
            case AdminPageLevel.Federal:
                StateRadioButton.Checked   = true;
                CountyRadioButton.Disabled = true;
                LocalRadioButton.Disabled  = true;
                PopulateStateDropDown();
                CountyDropDownList.AddCssClasses("hidden");
                LocalDropDownList.AddCssClasses("hidden");
                break;

            case AdminPageLevel.State:
                StateRadioButton.Checked  = true;
                LocalRadioButton.Disabled = true;
                PopulateStateDropDown();
                PopulateCountyDropDown(true);
                CountyName.AddCssClasses("hidden");
                LocalDropDownList.AddCssClasses("hidden");
                break;

            case AdminPageLevel.County:
                CountyRadioButton.Checked = true;
                PopulateStateDropDown();
                PopulateCountyDropDown();
                CountyName.AddCssClasses("hidden");
                PopulateLocalDropDown(true);
                LocalName.AddCssClasses("hidden");
                break;

            case AdminPageLevel.Local:
                LocalRadioButton.Checked = true;
                PopulateStateDropDown();
                PopulateCountyDropDown();
                PopulateLocalDropDown();
                CountyName.AddCssClasses("hidden");
                LocalName.AddCssClasses("hidden");
                break;

            case AdminPageLevel.Unknown:
                StateRadioButton.Checked   = true;
                CountyRadioButton.Disabled = true;
                LocalRadioButton.Disabled  = true;
                PopulateStateDropDown(true);
                CountyDropDownList.AddCssClasses("hidden");
                LocalDropDownList.AddCssClasses("hidden");
                break;
            }
        }
Exemple #3
0
        private void PopulateLocalDropDown(bool includeSelectMessage = false)
        {
            bool hasLocals;

            if (includeSelectMessage)
            {
                hasLocals = LocalDistricts.Populate(LocalDropDownList, _SecureAdminPage.StateCode,
                                                    _SecureAdminPage.CountyCode, "<select a local district>", Empty);
            }
            else
            {
                hasLocals = LocalDistricts.Populate(LocalDropDownList, _SecureAdminPage.StateCode,
                                                    _SecureAdminPage.CountyCode, _SecureAdminPage.LocalKey);
            }
            if (!hasLocals)
            {
                LocalRadioButton.Disabled = true;
                LocalDropDownList.AddCssClasses("hidden");
                LocalName.RemoveCssClass("hidden");
                LocalName.InnerHtml = "no local districts available";
            }
        }