Пример #1
0
        private void townComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            this.cinemaComboBox.Items.Clear();
            this.movieComboBox.Items.Clear();
            this.dateComboBox.Items.Clear();
            this.timeComboBox.Items.Clear();
            this.typeComboBox.Items.Clear();
            this.seatComboBox.Items.Clear();
            var cinemaNames = cinemaService.GetCinemasNamesBySelectedTown(this.townComboBox.SelectedItem.ToString());

            this.cinemaComboBox.Items.AddRange(cinemaNames);
        }
Пример #2
0
        private void townComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            ClearScreeningsHolder();

            this.cinemaComboBox.Text = "Select cinema: ";
            this.cinemaComboBox.Items.Clear();
            this.movieComboBox.Text = "";
            this.movieComboBox.Items.Clear();

            this._townName = this.townComboBox.SelectedItem.ToString();
            var cinemaNames = cinemaService.GetCinemasNamesBySelectedTown(this._townName);

            //adds options to the Cinema select box
            this.cinemaComboBox.Items.AddRange(cinemaNames);

            //default
            if (this.cinemaComboBox.Items.Count == 0)
            {
                this.cinemaComboBox.Text = "(no cinemas)";
            }
        }
Пример #3
0
 private void TownsList_SelectedIndexChanged(object sender, EventArgs e)
 {
     this.CinemasList.Items.Clear();
     this.CinemasList.Items.AddRange(CinemaService.GetCinemasNamesBySelectedTown(TownsList.SelectedItem.ToString()));
 }