以文本方式查看主题

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

--  作者:even0898
--  发布时间:2012/12/10 16:43:00
--  关于菜单配置栏按钮的引用帮忙看下正确与否
Dim xt As RibbonMenu.Button
xt = ConfigBar.Items("设计系统登录")
If _UserGroup <> "开发者"
    TableCaptionVisible = False
    xt.Visible = False
End If

--  作者:lin_hailun
--  发布时间:2012/12/10 16:50:00
--  
 对呀,有什么问题吗?

 如果错的话,只能是_UserGroup错了。

--  作者:even0898
--  发布时间:2012/12/10 16:58:00
--  

那应该不是这里的问题,下面的代码是我自定义登录窗口“确定”的代码

我中途要切换用户无法完成是怎么回事?我查了下系统命令里没有重新载入的命令呀。。

 

 

Dim UserName As String = e.Form.Controls("用户名").Value
Dim cmd As New SQLCommand
Dim dt As DataTable
Dim dr As DataRow
cmd.C
If UserName = ""  Then
    Messagebox.show("请选择用户!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
    Return
End If
cmd.CommandText = "Select * From {用户管理} Where [用户名] = \'" & UserName & "\'"
dt = cmd.ExecuteReader
If dt.DataRows.Count = 0 Then
    Messagebox.show("此用户不存在!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
    Return
End If
dr = dt.DataRows(0)
If e.Form.Controls("密码").Value = dr("密码") Then
    _UserName = UserName
    _UserGroup = dr("用户分组")
    _UserDep = dr("部门")
    e.Form.Close
Else
    Messagebox.show("密码错误!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If

 

Dim xt As RibbonMenu.Button
xt = ConfigBar.Items("设计系统登录")
If _UserGroup <> "开发者"
    TableCaptionVisible = False
    xt.Visible = False
End If
Forms("系统主窗口").Open()
Dim tl1 As WinForm.TopicLink
tl1 = Forms("系统主窗口").Controls("TopicBar1").pages("用户管理").links("用户设置")
If _UserGroup <> "开发者" AndAlso _UserGroup <> "系统管理员"
    tl1.Visible = False
End If

 


--  作者:even0898
--  发布时间:2012/12/10 17:00:00
--  

Syscmd.Project.Load()

加入这条命令后就出现错误了

 


图片点击可在新窗口打开查看此主题相关图片如下:123.jpg
图片点击可在新窗口打开查看

--  作者:lin_hailun
--  发布时间:2012/12/10 17:16:00
--  
 那应该是你配置栏按钮的名称写错了吧?注意它的名称属性。