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
设定窗口录入权限,这么写可不可以,因为是单窗口录入双表,控件没绑定表,字段前面加表名也没用。