private void button3_Click_1(object sender, EventArgs e) { Form_Add_edit FrmAjout = new Form_Add_edit(); FrmAjout.Show(); FrmAjout.button_edit.Visible = false; }
private void button_edit_menu_Click(object sender, EventArgs e) { Form_Add_edit Frmedit = new Form_Add_edit(); Frmedit.label1.Text = "Modifier un client"; Frmedit.button_Save.Visible = false; if (dataGridView1.CurrentRow != null) { Frmedit.textBox_ID.Text = dataGridView1.CurrentRow.Cells[0].Value.ToString(); Frmedit.textBox_ajout_nom.Text = dataGridView1.CurrentRow.Cells[1].Value.ToString(); Frmedit.textBox_ajout_prenom.Text = dataGridView1.CurrentRow.Cells[2].Value.ToString(); Frmedit.textBox_ajoute_adress.Text = dataGridView1.CurrentRow.Cells[3].Value.ToString(); Frmedit.textBox_ajoute_tele.Text = dataGridView1.CurrentRow.Cells[4].Value.ToString(); Frmedit.textBox_ajoute_ville.Text = dataGridView1.CurrentRow.Cells[5].Value.ToString(); Frmedit.textBox_ajoute_pays.Text = dataGridView1.CurrentRow.Cells[6].Value.ToString(); Frmedit.Show(); } else { MessageBox.Show("Choisir un Client d'abord", "Editer", MessageBoxButtons.OK, MessageBoxIcon.Error); } }