1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| Public Sub AddDetailCommande(ByVal Reference As Integer, ByVal NumCommande As Integer, ByVal Prix_unitaire As Double, ByVal Quantite As Integer, ByVal PVenteHT As Double, ByVal taux As Integer, ByVal TVA As Integer, ByVal PrixVenteTTC As Double, ByVal Remise As Integer, ByVal MontantTotPrixVente As Double)
'-------------------------1ere methode-----------------------
'-----------------------------------------------------------
Using CN As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\GesCom\Base\GesCom.accdb")
Using command As New OleDbCommand("insert into Details_commandes(Reference, NumCommande, Prix_unitaire, Quantite, PVenteHT, Taux, TVA, PrixVenteTTC, Remise, MontantTotPrixVente) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", CN)
command.Parameters.AddWithValue("Reference", Reference)
command.Parameters.AddWithValue("NumCommande", NumCommande)
command.Parameters.AddWithValue("Prix_unitaire", Prix_unitaire)
command.Parameters.AddWithValue("Quantite", Quantite)
command.Parameters.AddWithValue("PVenteHT", PVenteHT)
command.Parameters.AddWithValue("Taux", taux)
command.Parameters.AddWithValue("TVA", TVA)
command.Parameters.AddWithValue("PrixVenteTTC", PrixVenteTTC)
command.Parameters.AddWithValue("Remise", Remise)
command.Parameters.AddWithValue("MontantTotPrixVente", MontantTotPrixVente)
CN.Open()
command.ExecuteNonQuery()
command.Dispose()
End Using
End Using
End Sub |
Partager