public void AddLigneCommande() { if (!btnAjouter.Enabled) return; _formForCreate = new FormProduitSelect { IsUpdate = false, LigneCommande = null, LigneCommandes = LigneCommandes }; OpenSelectionForm(); }
public void UpdateLigneCommande() { if (!btnModifier.Enabled) return; if (dgvLigneCommande.SelectedRows.Count == 0) { MessageBox.Show(@"Aucun produit séléctionné", @"Ajout Commande", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } _formForCreate = new FormProduitSelect { LigneCommande = dgvLigneCommande.SelectedRows[0].DataBoundItem as LigneCommande, IsUpdate = true, LigneCommandes = LigneCommandes }; OpenSelectionForm(); }