Пример #1
0
        protected void ButtonIdentifyWinners_OnClick(object sender, EventArgs e)
        {
            switch (IdentifyWinnersReloading.Value)
            {
            case "reloading":
            {
                IdentifyWinnersReloading.Value = Empty;
                IdentifyWinnersDataArea.RemoveCssClass("hidden");
                _IdentifyWinnersTabInfo.LoadControls();
                SetElectionHeading(HeadingIdentifyWinners);
                FeedbackIdentifyWinners.AddInfo(
                    $"{IdentifyWinnersTabItem.OfficeCount} offices loaded.");
            }
            break;

            case "":
            {
                // normal update
                _IdentifyWinnersTabInfo.Update(FeedbackIdentifyWinners);
            }
            break;

            default:
                throw new VoteException(
                          $"Unknown reloading option: '{IdentifyWinnersReloading.Value}'");
            }
        }
Пример #2
0
        protected void ButtonIdentifyWinners_OnClick(object sender, EventArgs e)
        {
            switch (IdentifyWinnersReloading.Value)
            {
            case "reloading":
            {
                IdentifyWinnersReloading.Value = string.Empty;
                //if (Elections.IsPrimaryElection(GetElectionKey()))
                //{
                //  IdentifyWinnersDataArea.AddCssClasses("hidden");
                //  HeadingIdentifyWinners.InnerHtml =
                //    "This panel is not available for primary elections";
                //  FeedbackIdentifyWinners.AddError(
                //    "This panel is not available for primary elections");
                //}
                //else
                {
                    //if (Elections.IsPrimaryElection(GetElectionKey()))
                    //  ControlI
                    IdentifyWinnersDataArea.RemoveCssClass("hidden");
                    _IdentifyWinnersTabInfo.LoadControls();
                    SetElectionHeading(HeadingIdentifyWinners);
                    FeedbackIdentifyWinners.AddInfo($"{IdentifyWinnersTabItem.OfficeCount} offices loaded.");
                }
            }
            break;

            case "":
            {
                // normal update
                _IdentifyWinnersTabInfo.Update(FeedbackIdentifyWinners);
            }
            break;

            default:
                throw new VoteException("Unknown reloading option");
            }
        }