--
老师,下面的代码,确认ls可以输出内容,r1("绑定到分组")也可以输入内容,r1("绑定到分组")的内容包含在ls中,但是排除失败,使用MessageBox.show()代码测试,(0)可以弹出,(1)却不能弹出,应该是If ls.Contains(r1("绑定到分组")) Then 没有判断到重复值,不知道是哪段代码的问题?
----------------------------------------------------------------------------
Dim cmd As New SQLCommand
Dim r As Row =Foxtools.Tools.Rows(eform)
cmd.C
cmd.CommandText = "S-ELECT * From {ZD_一级字典} Where 上级字典= \'语音话术\' and 字典名称= \'绑定到分组\'"
Dim dt As DataTable = cmd.ExecuteReader(False)
\'eform.controls(sender.name).ComboList=dt.GetComboListString("字典值")
Dim ls As List(Of String) = dt.getvalues("字典值")
MessageBox.show(0)
For Each r1 As Row In Tables("语音话术_Table1").Rows
If ls.Contains(r1("绑定到分组")) Then
MessageBox.show(1)
ls.Remove(r1("绑定到分组"))
End If
Next
eform.controls(sender.name).ComboList = String.Join("|", ls.ToArray)