private void btnAjouter_Click(object sender, EventArgs e) { FormTypeDocument frm = new FormTypeDocument(1, 0); frm.ShowDialog(); RaffraichirGrid(); }
private void btnModifier_Click(object sender, EventArgs e) { if (DGVTypeDocument.Rows.Count > 0) { int x = DGVTypeDocument.CurrentRow.Index; int id = int.Parse(dt.Rows[x][0].ToString()); FormTypeDocument frm = new FormTypeDocument(2, id); frm.ShowDialog(); RaffraichirGrid(); } else { MessageBox.Show("Aucun Document sélectionnée!!"); } }