Пример #1
0
        private void btSupprimerArticle_Click(object sender, EventArgs e)
        {
            string id_panier = "";

            foreach (DataGridViewRow Lig in dgvPanier.SelectedRows)
            {
                id_panier = dgvPanier.Rows[Lig.Index].Cells["id"].Value.ToString();
            }

            Requete_Sql = "delete from panier where id = '" + id_panier + "'";
            sc.AjoutSupModifPanierSql(Requete_Sql);
            RafraichirPanier();
        }
Пример #2
0
        private void btPanier_Click(object sender, EventArgs e)
        {
            int lig = dgvArticle.CurrentCell.OwningRow.Index;

            Id_Produit  = dgvArticle.Rows[lig].Cells["Id"].Value.ToString();
            Requete_Sql = @"insert into panier (id,id_produit,quantite,panier.prix_vente,id_client) select null,id as id_produit,1,prix_vente," + PageAcceuil.NumUtilisateur + " from produit where id = " + Id_Produit;
            sc.AjoutSupModifPanierSql(Requete_Sql);

            this.Close();
        }