For Each dr As DataRow In DataTables("授权表").Select("(',' + Name + ',' like '%," & User.Name & ",%' or ',' + Config + ',' like '%," & User.group & ",%')")
If dr.IsNull("列名") Then
For Each t As Table In Tables
If t.DataTable.Name = dr("表名") Then
t.Visible = Not dr("不可见")
t.AllowEdit = Not dr("不可编辑")
End If
Next
Else
For Each t As Table In Tables
If t.DataTable.Name = dr("表名") Then
Dim cls() As String = dr("列名").split(",")
For Each c As String In cls
If t.Cols.Contains(c) Then
t.Cols(c).Visible = Not dr("不可见")
t.Cols(c).AllowEdit = Not dr("不可编辑")
End If
Next
End If
Next
End If
Next