以文本方式查看主题

-  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=96792)

--  作者:ayiken
--  发布时间:2017/2/27 23:01:00
--  当前用户
请问删除行时,当前用户只能能删除自己编辑的行,我编得这个代码能提示,但删除不了当前行,怎么回事儿

If UserName <> "操作员" And e.DataRow("住院号") > 0 Then
    MessageBox.Show("其他用户编辑的,你不能删除,别乱来!", "提示")
    e.Cancel = True
End If
请纠正一下

--  作者:shyilin
--  发布时间:2017/2/27 23:05:00
--  
好像没有删除行的代码,只有不能编辑吧


--  作者:有点蓝
--  发布时间:2017/2/27 23:10:00
--  
这个意思?

If UserName <> e.DataRow("操作员") And e.DataRow("住院号") > 0 Then
    MessageBox.Show("其他用户编辑的,你不能删除,别乱来!", "提示")
    e.Cancel = True
End If

--  作者:有点色
--  发布时间:2017/2/28 9:20:00
--  
If User.Name <> e.DataRow("操作员") And e.DataRow("住院号") > 0 Then
    MessageBox.Show("其他用户编辑的,你不能删除,别乱来!", "提示")
    e.Cancel = True
End If