Dim db = HySq-l.DataBaseFactory.CreateDatabase("YF123")
'Dim Sq-l2 = "selec-t * from Users"
'Dim dt2 As system.data.DataTable = db.ExecuteDataSet(Sq-l2).Tables(0)
'dt2.TableName = "Users"
'Dim t2 As Table = e.Form.Controls("Table2").Table
't2.datasource = dt2
't2.AllowEdit = True
Dim Sq-l = "selec-t * from 页面权限"
Dim dt As system.data.DataTable = db.ExecuteDataSet(Sq-l).Tables(0)
dt.TableName = "页面权限"
Dim t As Table = e.Form.Controls("Table1").Table
t.datasource = dt
t.AllowEdit = True
Msgbox(1)
下面代码执行,没报错,但失效,如何解决?
For Each dr3 As DataRow In DataTables("主界面窗口_Table1").Select("用户名 = '" & _UserName & "' And 窗口名= '" & e.Form.Name & "'")
'For Each dr3 As DataRow In DataTables("页面权限").Select("用户名 = '" & _UserName & "' And 窗口名= '" & e.Form.Name & "'")
Dim tab As WinForm.TabControl = e.Form.Controls(dr3("控件名称"))
tab.TabPages(dr3("页名")).Visible = Not dr3("不可见")
tab.TabPages(dr3("页名")).Enabled = Not dr3("不可编辑")
Next
Msgbox(2)