private void btnAnnuler_Click(object sender, EventArgs e) { AjoutProduit f1 = new AjoutProduit(reef, idClient); this.Dispose(); f1.ShowDialog(); }
private void btnValider_Click(object sender, EventArgs e) { int res; bl = new BALProduit(); dl = new Produit(); cl = new BALTProduit(); dl.CodeProduit = txtCodeProduit.Text; dl.Designation = txtDesignation.Text; dl.CodeTProduit = cl.getCodeTProduit(TPBox.Text); res = bl.AjouterProduit(dl); if (res == 1) { MessageBox.Show("Succès Ajout de noucsdsdveau Produit." + reef + "dfdfdf" + idClient); AjoutProduit win; win = new AjoutProduit(reef, idClient); win.Show(); this.Dispose(); } else { MessageBox.Show("Echec Ajout de nouveau Produit."); } }
private void EnterPressed(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { AjoutProduit f1 = new AjoutProduit(reef, idClient); this.Dispose(); f1.ShowDialog(); } }