Exemplo n.º 1
0
        public void AddLigneCommande()
        {
            if (!btnAjouter.Enabled)
                return;

            _formForCreate = new FormProduitSelectForCreate { IsUpdate = false, LigneCommande = null, LigneCommandes = LigneCommandes, SelectedFamille = -1 };
            OpenSelectionForm();
        }
Exemplo n.º 2
0
        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 FormProduitSelectForCreate
                        {
                            LigneCommande = dgvLigneCommande.SelectedRows[0].DataBoundItem as LigneCommande,
                            IsUpdate = true,
                            LigneCommandes = LigneCommandes
                        };

            OpenSelectionForm();
        }