关于权限有二个问题:1.下面代码没起作用,是什么问题?
Dim ctl As WinForm.Control = e.Sender
Select Case ctl.BindingField
Case "订单.产品", "订单.客户", "订单.雇员"
If User.Name = "张三" Then
ctl.ReadOnly = BooleanEnum.False '允许编辑
Else
ctl.ReadOnly = BooleanEnum.True '禁止编辑
End If
Case "订单.已付款", "订单.批准"
If User.Name = "张明" Then
ctl.ReadOnly = BooleanEnum.False '允许编辑
Else
ctl.ReadOnly = BooleanEnum.True '禁止编辑
End If
End Select
上面代码,根据下面帮助做.
Dim ctl As WinForm.Control = e.Sender
Select Case ctl.BindingField
Case "表A.第一列", "表A.第二列", "表A.第三列"
If User.Name = "张三" Then
ctl.ReadOnly = BooleanEnum.False '允许编辑
Else
ctl.ReadOnly = BooleanEnum.True '禁止编辑
End If
Case "表A.第四列", "表A.第五列", "表A.第六列"
If User.Name = "李四" Then
ctl.ReadOnly = BooleanEnum.False '允许编辑
Else
ctl.ReadOnly = BooleanEnum.True '禁止编辑
End If
End Select
2,如何实现图的权限?关键是如何查看“下级”的成员的数据?谢谢
此主题相关图片如下:权限.jpg