private void btnModifier_Click(object sender, EventArgs e) { R_Ajouter_Salle frm = new R_Ajouter_Salle(); frm.txtnum.Text = this.dataGridView1.CurrentRow.Cells[0].Value.ToString(); frm.txtType.Text = this.dataGridView1.CurrentRow.Cells[1].Value.ToString(); frm.txtCapacite.Text = this.dataGridView1.CurrentRow.Cells[2].Value.ToString(); frm.lTitre.Text = "Modifier Salle"; frm.btnAjouter.Text = "Modifier"; frm.cas = "Modifier"; frm.txtnum.ReadOnly = true; frm.txtType.Focus(); frm.ShowDialog(); }
private void btnAjouter_Click(object sender, EventArgs e) { Form frm = new R_Ajouter_Salle(); frm.ShowDialog(); }