public void SelectPeople() { var chosenItem = MovieReservationAvailableMoviesItem.chosenItem; //clear select page and shows new result SelectPeoplePanel.Controls.Clear(); FoodMenuPanel.Controls.Clear(); //fills select page with all chosen movies <- Temp contains list of string arrays (which contains movietitle, filmtechnology, runtime and date) for (int i = 0, j = 0; i < Temp.Count; i++) { SelectPeopleItem[] SelectPeopleItems = new SelectPeopleItem[Temp.Count]; SelectPeopleItems[i] = new SelectPeopleItem(chosenItem); SelectPeopleItems[i].MovieTitle = Temp[i][j]; SelectPeopleItems[i].FilmTechnology = Temp[i][j + 1]; SelectPeopleItems[i].Runtime = Temp[i][j + 2]; SelectPeopleItems[i].Date = Temp[i][j + 3]; SelectPeopleItems[i].Screen = Temp[i][j + 4]; SelectPeoplePanel.Controls.Add(SelectPeopleItems[i]); } //Fills customer reservation page with all chosen movies for (int i = 0, j = 0; i < Temp.Count; i++) { CustomerReservation[] CustomerReservations = new CustomerReservation[Temp.Count]; CustomerReservations[i] = new CustomerReservation(chosenItem); CustomerReservations[i].MovieTitle = Temp[i][j]; CustomerReservations[i].FilmTechnology = Temp[i][j + 1]; CustomerReservations[i].Runtime = Temp[i][j + 2]; CustomerReservations[i].Date = Temp[i][j + 3]; CustomerReservations[i].Screen = Temp[i][j + 4]; CustomerReservationPage.Controls.Add(CustomerReservations[i]); } //fills food menu page with all chosen movies for (int i = 0, j = 0; i < Temp.Count; i++) { FoodMenuMovieItem[] FoodMenuMovieItems = new FoodMenuMovieItem[Temp.Count]; FoodMenuMovieItems[i] = new FoodMenuMovieItem(chosenItem); FoodMenuMovieItems[i].MovieTitle = Temp[i][j]; FoodMenuMovieItems[i].FilmTechnology = Temp[i][j + 1]; FoodMenuMovieItems[i].Runtime = Temp[i][j + 2]; FoodMenuMovieItems[i].Date = Temp[i][j + 3]; FoodMenuPanel.Controls.Add(FoodMenuMovieItems[i]); } }
public void DefaultSelected(FoodMenuMovieItem item) { item.comboBox1.SelectedIndex = 0; item.comboBox2.SelectedIndex = 0; item.comboBox3.SelectedIndex = 0; item.comboBox4.SelectedIndex = 0; item.comboBox5.SelectedIndex = 0; item.comboBox6.SelectedIndex = 0; item.comboBox7.SelectedIndex = 0; item.comboBox8.SelectedIndex = 0; item.comboBox9.SelectedIndex = 0; item.comboBox10.SelectedIndex = 0; item.comboBox11.SelectedIndex = 0; item.comboBox12.SelectedIndex = 0; item.comboBox13.SelectedIndex = 0; item.comboBox14.SelectedIndex = 0; item.comboBox15.SelectedIndex = 0; item.comboBox16.SelectedIndex = 0; item.comboBox17.SelectedIndex = 0; item.comboBox18.SelectedIndex = 0; item.comboBox19.SelectedIndex = 0; }