01.
Private
Sub
ComboBox1_SelectedValueChanged(
ByVal
sender
As
Object
,
ByVal
e
As
System.EventArgs)
Handles
ComboBox1.SelectedValueChanged
02.
listStock.Items.Clear()
03.
Try
04.
With
listStock
05.
dsCeCls()
06.
07.
SqlCmd =
"select distinct ProductID,SumTotal from stock where stockid='"
& ComboBox1.Text &
"'"
08.
dsTempCls()
09.
dsTemp = WebDB.SQLRead(SqlCmd)
10.
Application.DoEvents()
11.
For
Each
ReadRow
In
dsTemp.Tables(0).Rows
12.
13.
ListViewAdd =
New
ListViewItem
14.
15.
ListViewAdd.Text = ReadRow(
"productid"
)
16.
17.
TmpStr = ReadRow(
"SumTotal"
)
18.
ListViewAdd.SubItems.Add(TmpStr)
19.
20.
ListViewAdd.ImageIndex = 1
21.
.Items.Add(ListViewAdd)
22.
Next
23.
End
With
24.
Catch
ex
As
Exception
25.
MsgBox(i & ex.Message)
26.
End
Try
27.
End
Sub