老师好
If User.Type <> UserTypeEnum.User Then
Return
End If
For Each dr As DataRow In DataTables("授权表").Select("(',' + 姓名 + ',' like '%," & _UserName & ",%' or ',' + 用户分组 + ',' like '%," & _Usergroup & ",%')")
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
老师,上面代码不起作用,列名不隐藏。
此主题相关图片如下:image 1.png
[此贴子已经被作者于2021/5/24 10:32:52编辑过]