コード例 #1
0
ファイル: AddParticipant.cs プロジェクト: Naxisx/FilnDB
        private void AddParticipant_Load(object sender, EventArgs e)
        {
            textBox1.Text = first.FirstName;
            textBox2.Text = first.LastName;
            textBox3.Text = first.SurName;

            FilmsList five = FilmsList.SelectFilms();

            comboBox1.DataSource    = five;
            comboBox1.DisplayMember = "NameFilm";
            comboBox1.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();

            comboBox2.DataSource    = six;
            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();
                }
            }
        }
コード例 #2
0
 private void Update_Flims_Click(object sender, EventArgs e)
 {
     Filmes = FilmsList.SelectFilms();
     dataGridView1.DataSource = null;
     dataGridView1.DataSource = Filmes;
     dataGridView1.AutoResizeColumns();
 }