For Each t As Table In Tables t.Visible = True t.AllowEdit = True For Each c As Col In t.Cols c.Visible = True c.AllowEdit = True Next Next Tables("授权表").Visible = (User.Type <> UserTypeEnum.User ) If User.Type <> UserTypeEnum.User Then For Each dr As DataRow In DataTables("授权表").Select("用户分组 = \'" & User.Group & "\'" ) If dr.IsNull("列名") Then Tables(dr("表名")).Visible = Not dr("不可见") Tables(dr("表名")).AllowEdit = Not dr("不可编辑") Else Tables(dr("表名")).Cols(dr("列名")).Visible = Not dr("不可见") Tables(dr("表名")).Cols(dr("列名")).AllowEdit = Not dr("不可编辑") End If Next End If
同时我用导航栏窗口:
在
TopicLinkClick
代码为:Select Case e.link.Text Case "授权表" MainTable = Tables("授权表") Case "基本信息" MainTable = Tables("基本信息") Case "职工人事档案" MainTable = Tables("职工人事档案") Case "即时数据汇总" MainTable = Tables("即时数据汇总") Case "安全综合管理" MainTable = Tables("安全综合管理")
等等
End Select
代码为:
Dim tpb As WinForm.TopicBar = e.Form.Controls("TopicBar1") For Each page As WinForm.TopicPage In tpb.Pages If page.Name <> e.Page.Name Then page.Collapsed = True End If Next |