Exemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Student.IsAuthenticated(Session, Request))
        {
            Response.Redirect("Login.aspx");
        }
        else if (!Page.IsPostBack)
        {
            DataTable opportunities = Opportunity.GetAllUpcoming();

            ListOpportunities(opportunities);

            // populate filter ddls
            DataTable emirates = Opportunity.GetAllEmirates();
            ddlEmirates.DataSource     = emirates;
            ddlEmirates.DataTextField  = "Emirate";
            ddlEmirates.DataValueField = "Emirate";
            ddlEmirates.DataBind();

            DataTable organizations = Organization.GetNames();
            ddlOrganizations.DataSource     = organizations;
            ddlOrganizations.DataTextField  = "Name";
            ddlOrganizations.DataValueField = "OrganizationID";
            ddlOrganizations.DataBind();
        }
    }