写个内部函数,比如SetComboList
Dim cate = Args(0)
Dim xll As New SQLCommand
Dim xl As DataTable
xll.C
xll.CommandText = "SEL ECT DIST INCT " & cate & " From {列表项目}"
xl = xll.ExecuteReader
If Args.length > 1 Then
For i As Integer = 1 To Args.length - 1
Dim cbo = Args(i)
cbo.ComboList = xl.GetComboListString(cate)
Next
End If
调用
Functions.Execute("SetComboList","学历",e.Form.Controls("ComboBox1"),e.Form.Controls("ComboBox1"),e.Form.Controls("ComboBox3"))