private void BtnAjouter_Click(object sender, EventArgs e) { FormArticle frm = new FormArticle(); frm.Show(); frm.FormClosing += Frm_FormClosing; this.Enabled = false; }
private void BtnModifier_Click(object sender, EventArgs e) { if (this.DGVArticles.RowCount != 0) { Article a = this.GetArticleFromDGV(this.DGVArticles.SelectedRows[0]); FormArticle frm = new FormArticle(a, "MODIFICATION"); if(frm.ShowDialog()==DialogResult.OK) this.BindDataToDGV(); } else MessageBox.Show("Prière de sélectionner l'article à Modifier"); }