查阅权限按钮事件
Dim value As String = e.Form.Controls("comboBox1").value
If value = "" Then
MessageBox.Show("请选择用户!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information)
Return
Else
Dim cmd As new SQLCommand
cmd.CommandText = "select '" & value & "' as 用户,分组,权限 from {shouquan} where ',' + 用户+ ',' like '%," & value & ",%'"
Dim dt As DataTable = cmd.ExecuteReader
Dim trv As WinForm.TreeView = e.Form.Controls("TreeView3")
trv.BuildTree(dt,"用户|分组|权限")
cmd.CommandText = "select '" & value & "' as 用户,分组,权限 from {shouquan} where ',' + 用户+ ',' not like '%," & value & ",%'"
dt = cmd.ExecuteReader
trv = e.Form.Controls("TreeView4")
trv.BuildTree(dt,"用户|分组|权限")
End If