Foxtable(狐表)用户栏目专家坐堂 → [求助]权限公式


  共有2151人关注过本帖树形打印复制链接

主题:[求助]权限公式

帅哥哟,离线,有人找我吗?
wusim
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:小狐 帖子:390 积分:3168 威望:0 精华:0 注册:2008/8/31 20:44:00
[求助]权限公式  发帖心情 Post By:2015/5/24 14:38:00 [只看该作者]

要求:
当确认列不为空,锁定行,只有角色是“电梯审核“时,可以编辑审核退回意见,只有是角色是批准时,可以编辑审批退回意见,

当确认列为空,锁定行,除了审核退回意见列和审批退回意见列,不能编辑。

If e.Row.IsNull("确认") = False Then '如果确认列不为空
   e.Cancel =True
End If
 If e.Row.IsNull("审核") = True Then
 If e.Col.Name = "审核退回意见" Then
  If User.Isrole("电梯审核") Then
  e.Cancel = False
End If
End If
End If
  If e.Row.IsNull("批准") = True Then
  If e.Col.Name = "批准退回意见" Then
  If User.Isrole("审批") Then
  e.Cancel = False
End If
End If
End If
 If e.Col.Name = "审核退回意见" And e.Col.Name = "审批退回意见"  Then   
  If User.Isrole  ("录入") Then
  e.Cancel =True
End If
End If

哪里出现问题?

 回到顶部
帅哥哟,离线,有人找我吗?
大红袍
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:贵宾 帖子:39310 积分:196782 威望:0 精华:1 注册:2015/4/25 9:23:00
  发帖心情 Post By:2015/5/24 14:53:00 [只看该作者]

Select Case e.Col.name
    Case "审核退回意见", "批准退回意见"
        If e.Row.IsNull("确认") = False Then
            If e.Col.Name = "审核退回意见" Then
                If User.Isrole("电梯审核") = False Then
                    e.Cancel = True
                End If
            Else If e.Col.Name = "批准退回意见" Then
                If User.Isrole("审批") = False Then
                    e.Cancel = True
                End If
            End If
        Else
            e.cancel = True
        End If
    Case Else
        If e.Row.IsNull("确认") = False Then
            e.cancel = True
        End If
End Select

 回到顶部