Private Sub ComboBox1_SelectedValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedValueChanged
listStock.Items.Clear()
Try
With listStock
dsCeCls()
SqlCmd = "select distinct ProductID,SumTotal from stock where stockid='" & ComboBox1.Text & "'"
dsTempCls()
dsTemp = WebDB.SQLRead(SqlCmd)
Application.DoEvents()
For Each ReadRow In dsTemp.Tables(0).Rows
ListViewAdd = New ListViewItem
ListViewAdd.Text = ReadRow("productid")
TmpStr = ReadRow("SumTotal")
ListViewAdd.SubItems.Add(TmpStr)
ListViewAdd.ImageIndex = 1
.Items.Add(ListViewAdd)
Next
End With
Catch ex As Exception
MsgBox(i & ex.Message)
End Try
End Sub