Пример #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        documentedCandidatesLookup = new Dictionary <int, bool>();
        People documentedCandidates = Election.September2010.GetDocumentedCandidates(Organization.PPSE);

        foreach (Person person in documentedCandidates)
        {
            documentedCandidatesLookup[person.Identity] = true;
        }

        this.RepaterBallots.DataSource = Ballots.ForElection(Election.September2010);
        this.RepaterBallots.DataBind();
    }
Пример #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        this.TextCandidates.Style[HtmlTextWriterStyle.Width] = "100%";

        if (_currentUser.Identity != 1 && _currentUser.Identity != 11443 && _currentUser.Identity != 967)
        {
            throw new UnauthorizedAccessException("No access to page");
        }

        if (!Page.IsPostBack)
        {
            Ballots ballots = Ballots.ForElection(Election.September2010);

            foreach (Ballot ballot in ballots)
            {
                this.DropBallots.Items.Add(new ListItem(ballot.Name, ballot.Identity.ToString()));
            }
        }
    }