Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共4 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:权限设置

1楼
nuoyan89 发表于:2024/2/19 9:45:00
老师,我想让非以下人员对此表只有查看权限,无任何编辑权限,但是目前按照以下设置的除非以下所设置的其他人员反而可以编辑整个表,请帮忙看看,谢谢

Dim lst As new List(of String)
If "," & _UserGroup & "," Like "*,管理员,*" Then lst.AddRange({"材料编码", "材料描述", "库位", "总库存数", "单位", "备注", "规格型号", "可用结存", "最小起订量", "采购周期", "工装代码", "存放位置", "文件管理", "上传人员", "上传日期", "图纸", "线别", "目前状态"})
If "," & _UserGroup & "," Like "*,生产部文员,*" Then lst.AddRange({"材料编码", "材料描述", "库位", "总库存数", "单位", "备注", "规格型号", "可用结存", "最小起订量", "采购周期", "工装代码", "存放位置", "文件管理", "上传人员", "上传日期", "图纸", "线别", "目前状态"})
e.cancel = Not lst.contains(e.Col.Name)
2楼
有点蓝 发表于:2024/2/19 9:57:00
意思是管理员和生产部文员可以编辑集合里的列,其它人员任何列都不能编辑?
3楼
nuoyan89 发表于:2024/2/19 11:13:00
是的,就是想要二楼的那个结果,只是一楼的那个设置只能对管理员和生产部文员,其他人员却是都能编辑
[此贴子已经被作者于2024/2/19 11:14:43编辑过]
4楼
有点蓝 发表于:2024/2/19 11:15:00
全局代码:
public lst As new List(of String)

登录窗口确定按钮,判断登录成功后加上以下代码
If "," & _UserGroup & "," Like "*,管理员,*" Then lst.AddRange({"材料编码", "材料描述", "库位", "总库存数", "单位", "备注", "规格型号", "可用结存", "最小起订量", "采购周期", "工装代码", "存放位置", "文件管理", "上传人员", "上传日期", "图纸", "线别", "目前状态"})
If "," & _UserGroup & "," Like "*,生产部文员,*" Then lst.AddRange({"材料编码", "材料描述", "库位", "总库存数", "单位", "备注", "规格型号", "可用结存", "最小起订量", "采购周期", "工装代码", "存放位置", "文件管理", "上传人员", "上传日期", "图纸", "线别", "目前状态"})

prepareedit事件
If "," & _UserGroup & "," Like "*,管理员,*" orelse "," & _UserGroup & "," Like "*,生产部文员,*" then
e.cancel = Not lst.contains(e.Col.Name)
else
e.cancel = true
end if
共4 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .01953 s, 2 queries.