1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
If T_design.Text = "" Or T_qtt.Text = "" Or T_prix.Text = "" Then
MsgBox("Veuillez remplir tous les champs", MsgBoxStyle.Exclamation, "Attention")
Else
Dim cmd As DbCommand
Dim MyConnexion As OleDbConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data source=lycee.mdb")
'code qui permet l'enregistrement d'image
P_image.Image.Save("images/" + T_ref.Text + ".jpg")
MyConnexion.Open()
cmd = MyConnexion.CreateCommand()
cmd.CommandText = "UPDATE produit SET designation_prod = '" + T_design.Text + "', prix_prod = '" + T_prix.Text + "', quantite_stock = '" + T_qtt.Text + "' where num_produit = '" + T_ref.Text + "'"
cmd.ExecuteNonQuery()
Me.Hide()
End If |