Rss & SiteMap
Foxtable(狐表) http://www.foxtable.com
请问以下代码中,的加粗部份应该如何写好呢?我试好几个方法都不行。
Select Case e.Table.Name
Case "员工资料","工序编码表","工序单价表","工资录入表","扣费表","评级工记录表"
For Each dr1 As DataRow In DataTables("授权表").Select("用户名 = '" & Vars("_UserName") & "'" )
if dr1("表名") =e.Table.name AndAlso dr1("只能编辑个人数据")=true then
if Vars("_UserName") <> e.row("修改用户") then
e.cancel=true
Messagebox.Show("你已经被限制只能编缉属于你自己的数据!,如有疑问,请与管理员联系","提示",MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
end if
if dr1("表名") =e.Table.name andalso dr1("只能编辑部门数据")=true then
if e.row.isnull("部门") then
Return
elseif e.row("部门") not in dr1("部门范围") then
e.cancel=true
Messagebox.Show("你已经被限制只能编缉属于你的部门数据!,如有疑问,请与管理员联系","提示",MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
end if
next
End Select
谢谢,可以了!