private void button7_Click(object sender, EventArgs e) { Age_Ratings = Age_ratingList.SelectName_Of_Rating(); dataGridView3.DataSource = null; dataGridView3.DataSource = Age_Ratings; dataGridView3.AutoResizeColumns(); }
private void Add_Films_Load(object sender, EventArgs e) { textBox1.Text = first.NameFilm; textBox3.Text = first.Place_Of_Movie; textBox4.Text = first.Budget.ToString(); textBox5.Text = first.Number_Of_Participants.ToString(); textBox6.Text = first.Time_Of_Movie; textBox7.Text = first.The_Duration_Of_The_Movie; dateTimePicker1.Text = first.The_Date_Of_The_Beginning.ToString(); Name_Of_GenreGenreList four = Name_Of_GenreGenreList.SelectNameGenre(); comboBox1.DataSource = four; comboBox1.DisplayMember = "Name_Of_Genre"; comboBox1.ValueMember = "id"; if (four.Count == 0) { DialogResult da = MessageBox.Show("List Empty", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); if (da == DialogResult.OK) { this.Close(); } } Age_ratingList five = Age_ratingList.SelectName_Of_Rating(); comboBox2.DataSource = five; comboBox2.DisplayMember = "Name_Of_Rating"; comboBox2.ValueMember = "id"; if (five.Count == 0) { DialogResult da = MessageBox.Show("List Empty", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); if (da == DialogResult.OK) { this.Close(); } } Rating_FKList six = Rating_FKList.SelectRating_FK(); comboBox3.DataSource = six; comboBox3.DisplayMember = "Name_of_Rating"; comboBox3.ValueMember = "id"; if (five.Count == 0) { DialogResult da = MessageBox.Show("List Empty", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); if (da == DialogResult.OK) { this.Close(); } } }