Dim lst As WinForm.ListBox = e.form.Controls("ListBox1")
Dim Count As Integer = DataTables("SFMX").Compute("Count(ZT)","DY = 0")
If Count > 0 Then
Dim Arys As List(Of String())
Arys = DataTables("SFMX").GetUniqueValues("", "BH","BRXM","MC")
For Each Ary As String() In Arys
lst.items.Add(ary(0) & "," & ary(1) & "," & ary(2))
Next
End If
上面代码放在窗口按钮中,没按一次,就会生成重复的项目。如何在点击按钮后先清空ListBox中的项目items,然后再生成新的项目。
此主题相关图片如下:未命名.jpg
[此贴子已经被作者于2013-3-8 16:57:54编辑过]