以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  BUG修改  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=12195)

--  作者:youyuweinihao
--  发布时间:2011/8/25 13:48:00
--  BUG修改


图片点击可在新窗口打开查看此主题相关图片如下:qq截图20110825134521.png
图片点击可在新窗口打开查看

 

Dim tpb As WinForm.TopicBar = e.Form.Controls("TopicBar1")

With Ctype(tpb.BaseControl, C1Command.C1TopicBar)

    If System.Environment.OSVersion.Version.Major < 6 Then

        .VisualStyle = C1Command.VisualStyle.WindowsXP

    Else

        .VisualStyle = C1Command.VisualStyle.Office2010Blue

    End If

    .Padding = New Windows.Forms.Padding(4)

End With

tpb.Animation = False

If user.IsRole = "管理员" Then

    e.Form.Controls("TopicBar1").Pages("系统设置").Visible = True

    e.Form.Controls("TopicBar1").Pages("基础数据").Visible = True

    e.Form.Controls("TopicBar1").Pages("员工管理").Visible = True

Else e.Form.Controls("TopicBar1").Pages("系统设置").Visible = False

     e.Form.Controls("TopicBar1").Pages("基础数据").Visible = False

     e.Form.Controls("TopicBar1").Pages("员工管理").Visible = False

End If

 

 

窗口AFTERLOAD中运行出现如图错误,不是太明白


--  作者:youyuweinihao
--  发布时间:2011/8/25 13:48:00
--  

要如何修改


--  作者:czy
--  发布时间:2011/8/25 13:56:00
--  
User.Name = "管理没" 不行吗?
--  作者:狐狸爸爸
--  发布时间:2011/8/25 14:02:00
--  

判断用户具备某个角色:

 

If User.IsRole("审核") Then
     MessageBox.Show("当前用户具备审核功能!")
End If


--  作者:youyuweinihao
--  发布时间:2011/8/25 14:43:00
--  
User.Name = "管理没" 不行吗?

这样不行

我要实现的是部门之间的权限管理啊

人员多了

按人员来设置太麻烦啊


--  作者:czy
--  发布时间:2011/8/25 15:46:00
--  
呵呵,我落伍了,我还没安装最新版,还没有角色功能。
--  作者:czy
--  发布时间:2011/8/25 15:53:00
--  

那就不用判断直接这样好了。

 

e.Form.Controls("TopicBar1").Pages("系统设置").Visible = User.IsRole("管理员")
e.Form.Controls("TopicBar1").Pages("基础数据").Visible = User.IsRole("管理员")
e.Form.Controls("TopicBar1").Pages("员工管理").Visible = User.IsRole("管理员")