Пример #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            DAODemande d = new DAODemande();
            MySqlCommand req = new MySqlCommand("UPDATE demande SET debut = '" + textBox3.Text + "', fin =' " + textBox4.Text + "', remarque = '" + richTextBox1.Text + "', idProduit = " + leProduit + " WHERE idDemande = " + textBox1.Text+",");
            req.ExecuteNonQuery();

            Form2 Form2 = new Form2();
            Form2.Show();
            this.Hide(); ;
        }
Пример #2
0
        private void Form2_Load(object sender, EventArgs e)
        {
            DAODemande daoD = new DAODemande();
            dataGridView1.Visible = true;
            // on associe dataset et datagrid
            DataSet donnees = daoD.GetAllDemandesInDataSet();
            dataGridView1.DataSource = donnees;

            dataGridView1.DataMember = donnees.Tables[0].ToString();
        }