Foxtable(狐表)用户栏目专家坐堂 → [求助]组合框


  共有2565人关注过本帖树形打印复制链接

主题:[求助]组合框

帅哥哟,离线,有人找我吗?
Hyphen
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:狐神 帖子:5015 积分:25363 威望:0 精华:0 注册:2015/8/18 9:21:00
  发帖心情 Post By:2016/3/15 9:17:00 [显示全部帖子]

写个内部函数,比如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"))

 回到顶部