1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| Try
If RadioButton1.Checked = True Then
type = "En marche"
Else
type = "Pas en marche"
End If
cnx.Open()
Dim chaine As String = "insert into intervention (dateint, diagnostique, symtone, etatdem, type_panne, id_demandeur, id_iq) values ('" + Label13.Text + "','" + TextBox2.Text + "','" + TextBox1.Text + "','Nouvelle','" + type + "'," & Val(Label10.Text) & ", " & Val(ComboBox1.Text) & ")"
cmd.Connection = cnx
cmd.CommandText = chaine
cmd.ExecuteNonQuery()
MsgBox("Nouvelle demande à été transmise avec succes")
Catch ex As Exception
MsgBox(ex.Message)
Finally
cnx.Close()
End Try |
Partager