Ejemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string id = Request["aid"];

        DataGrid1.DataSource = Movies.GetMoviesByAward(id);
        DataGrid1.DataBind();
        Page.Title      = Awards.GetAwardByID(id).GetAward();
        TitleLabel.Text = Awards.GetAwardByID(id).GetAward() + " Movies";
    }
Ejemplo n.º 2
0
    public static Award[] GetAwardsByMovieID(string id)
    {
        DataSet ds = DBConn.RunDataSetSQL("select * from MoviesAndAwards where MovieID=" + id);

        Award[] a1 = new Award[ds.Tables[0].Rows.Count];

        for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
        {
            Award tempAward = Awards.GetAwardByID(ds.Tables[0].Rows[i]["AwardID"].ToString());
            a1[i] = new Award(tempAward.GetID(), tempAward.GetAward(), int.Parse(ds.Tables[0].Rows[i]["Year"].ToString()));
        }
        return(a1);
    }