For Each nd1 As WinForm.TreeNode In e.Form.Controls("TreeView1").AllNodes
Dim das As List(Of DataRow) = DataTables("授权表").SQLSelect("[用户姓名] = '" & nd2.Name & "' And [版块管理] = '" & nd1.Name & "' And [权限分配] = '" & nd1.Name & "' And ([锁定] Is Null Or [锁定] = false)")
msgbox(das.count)
For Each da As DataRow In das
If da IsNot Nothing Then
For Each c1 As DataCol In DataTables("授权表").DataCols
msgbox(c1.Name)
If c1.Name = "所属部门" OrElse c1.Name = "职位" OrElse c1.Name = "用户姓名" OrElse c1.Name = "版块管理" OrElse c1.Name = "表名" OrElse c1.Name = "权限分配" OrElse c1.Name = "锁定" Then
msgbox("Continue ")
Continue For
ElseIf nd1.Name = c1.Name And nd1.Checked = True Then
msgbox("c1=true")
da(c1) = True
ElseIf nd1.Name = c1.Name And nd1.Checked = False Then
msgbox("c1=False")
da(c1) = False
End If
Next
End If
Next
DataTables("授权表").SQLUpdate(das)
Next
DataTables("授权表").load
End If