private void buttonDelete_Click(object sender, EventArgs e) { if (condition()) { int id = Int32.Parse(textID.Text); try { ModeleBDD con = new ModeleBDD(); con.supEvent(id); textID.Text = ""; textBox1.Text = ""; textBox2.Text = ""; textBox3.Text = ""; textBox4.Text = ""; dateTimePicker1.Value = DateTime.Now; textBox7.Text = ""; comboBox1.Text = ""; comboBox2.Text = ""; dataGridView1.ClearSelection(); FillDataGridView(); }catch (Exception e3) { MessageBox.Show("Message d'erreur : " + e3.Message + " \nType de l'exception " + e3.GetType() + " \nPile d'appel" + e3.StackTrace); } } else { MessageBox.Show("Veuillez remplir tout les champs"); } }
private void buttonDelete_Click(object sender, EventArgs e) { if (condition()) { int id = Int32.Parse(textID.Text); ModeleBDD con = new ModeleBDD(); con.supEvent(id); textID.Text = ""; textBox1.Text = ""; textBox2.Text = ""; textBox3.Text = ""; textBox4.Text = ""; dateTimePicker1.Value = DateTime.Now; textBox7.Text = ""; comboBox1.Text = ""; comboBox2.Text = ""; dataGridView1.ClearSelection(); FillDataGridView(); } else { MessageBox.Show("Veuillez remplir tout les champs"); } }