예제 #1
0
 protected override void  OnPreRender(EventArgs e)
 {
     if (IsPostBack)
     {
         if (PeopleInMovie2.gridPeopleInMovie.SelectedIndex > -1)
         {
             GetPersonInfo(PeopleInMovie2.gridPeopleInMovie.SelectedRow.Cells[(int)PeopleInMovie2.FirstName].Text,
                           PeopleInMovie2.gridPeopleInMovie.SelectedRow.Cells[(int)PeopleInMovie2.LastName].Text);
             PeopleInMovie2.SetLabelText("Actor's Full Information");
         }
     }
 }
예제 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                PeopleInMovie2.SetLabelText("Actors in " + "\"" + Request.QueryString["movieTitle"] + "\"" + " Movie");
            }
            switch (Request.QueryString["selector"])
            {
            case "actorsInMovie":
                ActorsInMovieHandler();
                break;

            case "actorFoundByName":
                PeopleInMovie2.SetLabelText("Actor's Full Information");
                ActorFoundByNameHandler();
                break;
            }
        }
예제 #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                PeopleInMovie2.SetLabelText("Actors in " + "\"" + Request.QueryString["movieTitle"] + "\"" + " Movie");
            }
            MoviePeopleServices actors        = new MoviePeopleServices();
            GridView            actorsInMovie = new GridView();

            actorsInMovie = PeopleInMovie2.gridPeopleInMovie;
            int movieId = Convert.ToInt32(Request.QueryString["movieId"]);
            List <MoviePersonDTO> person;

            person = actors.GetMoviePeopleByMovieId(movieId, "Actor");
            if (person != null)
            {
                actorsInMovie.DataSource = person;
                actorsInMovie.DataBind();
                GetAppropriateView(actorsInMovie);
            }
            // actorsInMovie.DataSource = actors.GetMoviePeopleByMovieId(movieId, "Actor");
        }