RibbonTabs("RB_System").Visible = False
RibbonTabs("RB_System").Enabled = False
RibbonTabs("RB_User").Enabled = False
RibbonTabs("RB_User").Visible = False
RibbonTabs("RB_User").Groups("User").Items("btnAItems").Enabled = False
RibbonTabs("RB_User").Groups("User").Items("mnuChartA").Enabled = False
RibbonTabs("RB_User").Groups("User").Items("mnuChartB").Enabled = False
RibbonTabs("RB_User").Groups("User").Items("mnuChartGW").Enabled = False
'RibbonTabs("RB_User").Groups("User").Items("mnuEmployees").Enabled = False
RibbonTabs("RB_User").Groups("User").Items("btnAItems").Visible = False
RibbonTabs("RB_User").Groups("User").Items("mnuChartA").Visible = False
RibbonTabs("RB_User").Groups("User").Items("mnuChartB").Visible = False
RibbonTabs("RB_User").Groups("User").Items("mnuChartGW").Visible = False
RibbonTabs("RB_User").Groups("Bonus").Items("mnuBonus").Visible = False
RibbonTabs("RB_User").Groups("Bonus").Items("mnuRank").Visible = False
'RibbonTabs("RB_User").Groups("User").Items("mnuEmployees").Visible = False
For Each tb As Table In Tables
tb.Visible = False
'tb.Visible = True
Next
Forms("frmLogin").Open
'显示所有者表格
For Each tb As Table In Tables
If Not tb.Name.StartsWith("WND_") Then
tb.Visible = True
End If
Next
TableCaptionVisible = False
If _UserName = "" Then
Syscmd.Project.Exit()
Return
End If
'RibbonTabs("BeesMain").Visible = True
'_UserGroup = "系统管理员" '调试用
'Functions.Execute("HideOrShowTable","show")
If _UserGroup = "网点" Then
Dim names() As String = _Username.Split("]")
LoginBranchID = names(0).Substring(1)
LoginBranchName = names(1)
MainNodeCode = LoginBranchID
MainNodename = LoginBranchName
Else
LoginBranchID = MainNodeCode
LoginBranchName = "无锡分行"
RibbonTabs("RB_System").Visible = True
RibbonTabs("RB_System").Enabled = True
RibbonTabs("RB_User").Selected = True
RibbonTabs("RB_User").Groups("User").Items("btnAItems").Enabled = True
RibbonTabs("RB_User").Groups("User").Items("mnuChartA").Enabled = True
RibbonTabs("RB_User").Groups("User").Items("mnuChartB").Enabled = True
RibbonTabs("RB_User").Groups("User").Items("mnuChartGW").Enabled = True
RibbonTabs("RB_User").Groups("Bonus").Items("mnuBonus").Visible = True
RibbonTabs("RB_User").Groups("Bonus").Items("mnuRank").Visible = True
RibbonTabs("RB_User").Groups("User").Items("btnAItems").Visible = True
RibbonTabs("RB_User").Groups("User").Items("mnuChartA").Visible = True
RibbonTabs("RB_User").Groups("User").Items("mnuChartB").Visible = True
RibbonTabs("RB_User").Groups("User").Items("mnuChartGW").Visible = True
RibbonTabs("RB_User").Groups("User").Items("mnuEmployees").Enabled = False
RibbonTabs("RB_User").Groups("User").Items("mnuEmployees").Visible = False
End If
_MainNodeCodeLen = MainNodeCode.Length
If _UserGroup = "网点" Then
_ProjectQueryString = "[BankCode] = '" & MainCode & "' And [Year] = '" & MainYear & "' And [BranchID] = '" & MainNodeCode & "'"
_Filter = "[BankCode] = '" & MainCode & "' And [BranchID] = '" & MainNodeCode & "'"
Else
_ProjectQueryString = "[BankCode] = '" & MainCode & "' And [Year] = '" & MainYear & "' And Substring(BranchID,1," & _MainNodeCodeLen & ") = '" & MainNodeCode & "' And [BranchID] <> '" & MainNodeCode & "'"
_Filter = "[BankCode] = '" & MainCode & "' And Substring(BranchID,1," & _MainNodeCodeLen & ") = '" & MainNodeCode & "' And [BranchID] <> '" & MainNodeCode & "'"
End If
_QStrBYQ = "[BankCode] = '" & MainCode & "' And [Year] = '" & MainYear & "' And [Quarter] = '" & MainQuarter & "'"
StatusBar.Message1 = "当前登录用户为: " & _UserName
StatusBar.Message2 = " 今天是 : " & Date.Today
StatusBar.Message3 = MainName & "无锡分行 " & MainNodeName
RibbonTabs("RB_User").Enabled = True
RibbonTabs("RB_User").Visible = True
'设置各主窗口表的隐藏
Tables("base_branches").Cols("ClassCode").Combolist = DataTables("base_branch_class").GetComboListString("ClassName")
Dim dr As DataRow = DataTables("system").Find("[Parent] = '" & MainNodeCode & "' And [Name] = 'SysMainTables'")
If dr IsNot Nothing Then
Dim mtl() As String = dr("Value").Split("#")
Dim j As Integer = mtl.Length
For i As Integer = 0 To j - 1
Tables(mtl(i).Split("|")(0)).Cols(0).Visible = False
Next
End If
'Functions.Execute("HideOrShowTable","hide")
'初始化临时表
DataTables("temp_TblA_ColsName").datarows.clear
Functions.Execute("InitFileTempTables")
DataTables("temp_TblRole_ColName").DataRows.Clear
For Each dt As Table In Tables
If dt.Name.Contains("evaluate_B_AAA") Then
Dim ci As Integer = dt.Cols.Count - 1
For i As Integer = 0 To ci - 1
If dt.Cols(i).IsNumeric And (Not dt.Cols(i).Name.Contains("zhl")) And dt.Cols(i).Name <> "_Identify" And dt.Cols(i).Name <> "ID" Then
Dim ro As Row = Tables("temp_TblRole_ColName").AddNew
ro("RoleCode") = dt.Cols(i).Name.SubString(0,5)
ro("Name") = dt.Cols(i).Name
ro("Items") = dt.Cols(i).Caption
End If
Next
End If
Next
If _UserGroup = "网点" Then
Forms("frmScoreTable").Open
MainTable = Tables("WND_ScoreTable")
Else
Forms("frmScorePartA").Open
MainTable = Tables("WND_ScorePartA")
End If