Beispiel #1
0
        static private void ReportPollResults(MeetingElection poll, bool stillOpen)
        {
            SchulzeProcessor processor = new SchulzeProcessor();

            processor.Candidates = poll.Candidates;
            processor.Votes      = MeetingElectionVotes.ForInternalPoll(poll);

            processor.Process();

            MailRawElectionResults(poll, processor, stillOpen);
        }
Beispiel #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string parameterString = Request["PollId"];

        if (!String.IsNullOrEmpty(parameterString))
        {
            int             pollId = Int32.Parse(parameterString);
            MeetingElection poll   = MeetingElection.FromIdentity(pollId);
            Page.Title = "Vote Verification - Internal Poll - " + poll.Name;
            if (poll.VotingCloses > DateTime.Now)
            {
                throw new UnauthorizedAccessException("Voting for this poll is not yet closed.");
            }

            MeetingElectionVotes votes = MeetingElectionVotes.ForInternalPoll(poll);
            personIdLookup = poll.GetCandidatePersonMap();
            this.RepeaterVotes.DataSource = votes;
            this.RepeaterVotes.DataBind();

            this.LabelVoteCount.Text = votes.Count.ToString();
        }
    }