protected void Page_PreRender(object sender, EventArgs e) { MovieUtilities mu = new MovieUtilities(); GridView1.DataSource = mu.SelectAll(); GridView1.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { MovieUtilities mu = new MovieUtilities(); Repeater1.DataSource = mu.SelectAll(); Repeater1.DataBind(); string id; try { if (Request.QueryString["id"].ToString() != null) { id = Request.QueryString["id"].ToString(); } else { id = "1"; } MovieData md = new MovieData(); GridView1.DataSource = md.getMoviesById(Convert.ToInt32(id)); GridView1.DataBind(); } catch { } }
protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e) { int id = Convert.ToInt32(e.Keys["id"]); String title = e.NewValues["Title"].ToString(); String director = e.NewValues["Director"].ToString(); String description = e.NewValues["Description"].ToString(); MovieUtilities mu = new MovieUtilities(); mu.updateMovie(id, title, director, description); GridView1.DataBind(); }
public void SelectOptionActorSubmenu() { switch (Option) { case "1": ActorUtilities.addActor(); break; case "2": ActorUtilities.editActor(); break; case "3": ActorUtilities.removeActor(); break; case "4": MovieUtilities.assignMovie(); break; case "5": ActorUtilities.performMovie(); break; case "6": ActorUtilities.quitMovie(); break; case "7": ActorUtilities.showActorList(); break; case "8": ActorUtilities.showActorById(); break; case "9": ActorUtilities.showActorMovies(); break; case "10": Finished = true; break; } }
public void SelectOptionMovieSubmenu() { switch (Option) { case "1": MovieUtilities.addMovie(); break; case "2": MovieUtilities.editMovie(); break; case "3": MovieUtilities.assignMovie(); break; case "4": MovieUtilities.removeMovie(); break; case "5": MovieUtilities.showMoviesList(); break; case "6": MovieUtilities.showMovieById(); break; case "7": ActorUtilities.showActorMovies(); break; case "8": Finished = true; break; } }
protected void Page_Load(object sender, EventArgs e) { MovieUtilities mu = new MovieUtilities(); GridView1.DataSource = mu.selectAll(); }