以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- [求助]代码修改 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=65994) |
-- 作者:jygyyl -- 发布时间:2015/3/27 10:20:00 -- [求助]代码修改 以下代码实现窗口控件的权限控制,数据表权限控制代码如何编写?求老师指教!谢谢! Dim ctl As WinForm.Control = e.Sender Select Case ctl.BindingField Case "CSsmdj.BCNo", "CSsmdj.签发日期","CSsmdj.YBCNo" If _UserGroup = "签证机构" Then ctl.ReadOnly = BooleanEnum.False \'允许编辑 Else ctl.ReadOnly = BooleanEnum.True \'禁止编辑 End If Case "CSsmdj.GB307", "CSsmdj.GB301", "CSsmdj.登记机关", "CSsmdj.登记日期" If _UserGroup = "公安户籍" Then ctl.ReadOnly = BooleanEnum.False \'允许编辑 Else ctl.ReadOnly = BooleanEnum.True \'禁止编辑 End If End Select |
-- 作者:有点甜 -- 发布时间:2015/3/27 10:22:00 -- 你指的是什么样的控制?
看完权限管理一章 http://www.foxtable.com/help/topics/2253.htm
|
-- 作者:jygyyl -- 发布时间:2015/3/27 11:08:00 -- 回复:(有点甜) 你指的是什么样的控制?&nbs... 自定义用户,想实现不同用户组编辑不同列,如"BCNo","签发日期","YBCNo"只能"签证机构"组用户编辑,"GB307","GB301","登记机关" ,"登记日期"只能"公安户籍"组用户编辑,下面代码不能实现,不知错在哪? Select Case _UserGroup Case "签证机构" Select Case e.Col.Name Case "BCNo","签发日期","YBCNo" e.Cancel = True End Select Case "公安户籍" Select Case e.Col.Name Case "GB307","GB301","登记机关" ,"登记日期" e.Cancel = True End Select End Select
|
-- 作者:有点甜 -- 发布时间:2015/3/27 11:11:00 -- Select Case e.Col.Name Case "BCNo","签发日期","YBCNo" If _UserGroup <> "签证机构" Then e.cancel = True End If Case "GB307","GB301","登记机关" ,"登记日期" If _UserGroup <> "公安户籍" Then e.cancel = True End If End Select
|
-- 作者:jygyyl -- 发布时间:2015/3/27 11:51:00 -- 谢谢甜老师 谢谢甜老师! |