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 26 27 28 29 30
| Dim parc As New ComboBox
parc.Parent = list_art
parc.Location = New System.Drawing.Point(65, 65)
parc.Size = New System.Drawing.Point(182, 21)
parc.Items.Clear()
parc.Visible = False
Dim obus As New ComboBox
obus.Parent = list_art
obus.Location = New System.Drawing.Point(65, 65)
obus.Size = New System.Drawing.Point(182, 21)
obus.Items.Clear()
obus.Visible = False
Dim MySQLCmd As String = "SELECT t_parc.parc_numero, t_oxygene_obus.obus_numero_lot FROM t_interventions_article_tampons LEFT JOIN t_parc ON t_parc.parc_id = t_interventions_article_tampons.parc_id LEFT JOIN t_oxygene_obus ON t_oxygene_obus.obus_id = t_interventions_article_tampons.obus_id WHERE t_interventions_article_tampons.art_id = '" & art_comb.Tag(art_comb.SelectedIndex) & "'"
Dim reader As MySqlDataReader
Dim cmd As New MySqlCommand(MySQLCmd, Connection)
reader = cmd.ExecuteReader()
While reader.Read
If reader.IsDBNull(0) = False Then
'MsgBox(reader.GetString(0))
parc.Items.Add(reader.GetString(0))
parc.Visible = True
ElseIf reader.IsDBNull(1) = False Then
'MsgBox(reader.GetString(1))
obus.Items.Add(reader.GetString(1))
obus.Visible = True
End If
End While
reader.Close() |
Partager