以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  权限错误 汗  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=89224)

--  作者:yifan3429
--  发布时间:2016/8/17 15:17:00
--  权限错误 汗
If e.Row("执行人") <> User.Name Then
    MessageBox.Show("呵呵! 对于同事不可关心过度!")
    e.Cancel = True
Else
    e.Row("执行人") =  Nothing Then
    e.Cancel = False
End If


--  作者:大红袍
--  发布时间:2016/8/17 15:23:00
--  

1、代码写到StartEdit事件,不要写到prepareEdit事件

 

2、代码这样写

 

If e.Row.IsNull("执行人") = False AndAlso e.Row("执行人") <> User.Name Then
    MessageBox.Show("呵呵! 对于同事不可关心过度!")
    e.Cancel = True
Else
    e.Cancel = False
End If