以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  不同组,编辑不同的列  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=95069)

--  作者:ming8604
--  发布时间:2017/1/9 15:41:00
--  不同组,编辑不同的列
订单副表,不同组,编辑不同的列。


要求:
A,B,C这3列,只有FIN部门编辑。

其他列,FIN部门不能编辑。

(管理员角色能编辑所有)


是哪个表的事件代码呢?订单主表,还是订单副表这?
代码如何写呢??
帮助那边是每列都写出来了,但是我这个表列数太多呢?

--  作者:有点色
--  发布时间:2017/1/9 15:55:00
--  

 在主表的表事件StartEdit写代码

 

If e.Table.name = "窗口1_Table1" Then
    If user.Type = UserTypeEnum.User Then
        Dim ary() As String = {"第一列", "第二列"}
        If array.indexOf(ary, e.Col.name) >= 0 Then
            If user.Group <> "FIN" Then
                e.cancel = True
            End If
        Else
            If user.Group = "FIN" Then
                e.cancel = True
            End If
        End If
    End If
End If