private void Form2_Load(object sender, EventArgs e) { dao = new DAOAdmin(); daoanim = new DAOAnim(); dataGridView1.Visible = true; // on associe dataset et datagrid DataSet donnees = dao.GetAllDemandesInDataSet(); dataGridView1.DataSource = donnees; dataGridView1.DataMember = donnees.Tables[0].ToString(); hidetb(); DataSet test = daoanim.getAllanim2(); comboBox2.DataSource = test.Tables[0]; comboBox2.ValueMember = "id"; comboBox2.DisplayMember = "nom"; /*foreach(Animateur anim in lAnim) { comboBox2.Items.Add(anim); comboBox2.SelectedIndex = 0; }*/ }
public Form1() { InitializeComponent(); dao = new DAOAdmin(); }