客户 enter代码如下:想实现不同的用户登录进来,客户下拉栏只出现已加载的客户值,而不是所有客户的所有数据值都显示。请帮我看看需要怎么改?
Dim kh As WinForm.ComboBox = e.Form.Controls("客户")
Dim druser As DataRow = DataTables("技术支持信息表").SqlFind("name = '" & user.name & "'")
If User.Name.Trim() = "liujiyong@bdcom.com.cn" Then
kh.ComboList=DataTables("临时版本跟踪表").SQLGetComboListString("客户")
Else
Select Case user.Group
Case "录入"
If druser.Isnull("新负责人邮箱") Then
DataTables("临时版本跟踪表").LoadFilter = "技术支持邮箱 = '" & User.Name.trim() & "'"
DataTables("临时版本跟踪表").Load()
kh.ComboList=DataTables("临时版本跟踪表").SQLGetComboListString("客户")
Else
DataTables("临时版本跟踪表").LoadFilter = "技术支持邮箱 = '" & User.Name.trim() & "' or 技术支持邮箱 in ('" & druser("新负责人邮箱").Trim().Replace(",", "','") & "') "
DataTables("临时版本跟踪表").Load()
kh.ComboList=DataTables("临时版本跟踪表").SQLGetComboListString("客户")
End If
Case "审核"
DataTables("临时版本跟踪表").LoadFilter = ""
Case "协议一组","协议二组","交换组","R驱动组","S驱动组","EPON组","ONU组","网管组","网络组","路由组","PTN应用组","链路组"
If user.Roles = "测试组长" Then
Dim str As String = "1=2"
For Each u As UserInfo In users
If u.Group = user.Group Then
str &= " or 研发邮箱 like '%" & User.Name.trim() & "%' And (状态 = 'Confirming' or 状态 = 'Bound' or 状态 = 'Submitted' or 状态 = 'Nopass' or 状态 is null)"
End If
Next
DataTables("临时版本跟踪表").LoadFilter = str
DataTables("临时版本跟踪表").Load()
kh.ComboList=DataTables("临时版本跟踪表").SQLGetComboListString("客户")
Else
DataTables("临时版本跟踪表").LoadFilter = "研发邮箱 like '%" & User.Name.trim() & "%' And (状态 = 'Confirming' or 状态 = 'Bound' or 状态 = 'Submitted' or 状态 = 'Nopass' or 状态 is null)"
DataTables("临时版本跟踪表").Load()
kh.ComboList=DataTables("临时版本跟踪表").SQLGetComboListString("客户")
End If
Case "测试epon"
DataTables("临时版本跟踪表").LoadFilter = "邮件通知 like '%eponver@bdcom.com.cn%' And (状态 = 'Confirming' or 状态 = 'Bound' or 状态 = 'Submitted' or 状态 = 'Nopass')"
DataTables("临时版本跟踪表").Load()
kh.ComboList=DataTables("临时版本跟踪表").SQLGetComboListString("客户")
Case "测试switch"
DataTables("临时版本跟踪表").LoadFilter = "邮件通知 like '%switchver@bdcom.com.cn%' And (状态 = 'Confirming' or 状态 = 'Bound' or 状态 = 'Submitted' or 状态 = 'Nopass')"
DataTables("临时版本跟踪表").Load()
kh.ComboList=DataTables("临时版本跟踪表").SQLGetComboListString("客户")
Case "测试router"
DataTables("临时版本跟踪表").LoadFilter = "邮件通知 like '%routerver@bdcom.com.cn%' And (状态 = 'Confirming' or 状态 = 'Bound' or 状态 = 'Submitted' or 状态 = 'Nopass')"
DataTables("临时版本跟踪表").Load()
kh.ComboList=DataTables("临时版本跟踪表").SQLGetComboListString("客户")
End Select
End If