private void Btn_Add_Click(object sender, EventArgs e) { Ajout_Modif_Fournisseur_Form form = new Ajout_Modif_Fournisseur_Form(connexion); this.Hide(); if (form.ShowDialog() == DialogResult.Cancel) { this.Show(); } Rechercher(Tb_Search.Text); UpdateControls(); }
private void Btn_Modif_Click(object sender, EventArgs e) { String id = "-1"; if (Dtv_Info_Fournisseur.SelectedRows != null) id = Dtv_Info_Fournisseur.SelectedRows[0].Cells[0].Value.ToString(); Ajout_Modif_Fournisseur_Form form = new Ajout_Modif_Fournisseur_Form(connexion, id); this.Hide(); if (form.ShowDialog() == DialogResult.Cancel) { this.Show(); } Rechercher(Tb_Search.Text); UpdateControls(); }