Sub ConnectNavigationBar()
' Clear the dummies we created in BuildNavigationBar
page.NavigationBar.Clear
'connect the items in the navigation bar
Dim header As String = ABMShared.SessionStorageRead(page, "header")
If header.Length > 0 Then
page.NavigationBar.Title = "Group Permissions: " & header
End If
page.NavigationBar.AddTopItemEx("NewRecord", "", "mdi-content-add", "", True, ABM.COLOR_WHITE, ABM.INTENSITY_NORMAL, ABM.ICONALIGN_CENTER)
page.NavigationBar.AddTopItem("GoBack", "", "mdi-image-navigate-before", "../frmUserGroups/frmUserGroups.html", False)
page.NavigationBar.AddTopItemEx("LogOff", "", "fa fa-sign-out", "../frmSignIn/frmSignIn.html", True, ABM.COLOR_WHITE, ABM.INTENSITY_NORMAL, ABM.ICONALIGN_CENTER)
If ABMShared.HasPermission("frmAdministration","canread") = True Then
page.NavigationBar.AddSideBarItem("frmAdministration", "Administration", "mdi-action-work", "../frmAdministration/frmAdministration.html")
End If
If ABMShared.HasPermission("frmAdministration","canread") = True Then
page.NavigationBar.AddSideBarDivider
End If
If ABMShared.HasPermission("frmIYMUpdate","canread") = True Then
page.NavigationBar.AddSideBarSubItem("frmAdministration", "frmIYMUpdate", "IYM Update", "mdi-action-bookmark", "../frmIYMUpdate/frmIYMUpdate.html")
End If
If ABMShared.HasPermission("frmAdministration","canread") = True Then
page.NavigationBar.AddSideBarSubDivider("frmAdministration")
End If
If ABMShared.HasPermission("frmProgrammes","canread") = True Then
page.NavigationBar.AddSideBarSubItem("frmAdministration", "frmProgrammes", "IYM vs Procurement Plan", "mdi-action-bookmark", "../frmProgrammes/frmProgrammes.html")
End If
If ABMShared.HasPermission("frmAdministration","canread") = True Then
page.NavigationBar.AddSideBarSubDivider("frmAdministration")
End If
If ABMShared.HasPermission("frmProcPlan","canread") = True Then
page.NavigationBar.AddSideBarSubItem("frmAdministration", "frmProcPlan", "Procurement Plan", "mdi-action-bookmark", "../frmProcPlan/frmProcPlan.html")
End If
If ABMShared.HasPermission("frmAdministration","canread") = True Then
page.NavigationBar.AddSideBarSubDivider("frmAdministration")
End If
If ABMShared.HasPermission("frmAddProgrammes","canread") = True Then
page.NavigationBar.AddSideBarSubItem("frmAdministration", "frmAddProgrammes", "Programmes", "mdi-action-bookmark", "../frmAddProgrammes/frmAddProgrammes.html")
End If
If ABMShared.HasPermission("frmAdministration","canread") = True Then
page.NavigationBar.AddSideBarSubDivider("frmAdministration")
End If
If ABMShared.HasPermission("frmReporting","canread") = True Then
page.NavigationBar.AddSideBarItem("frmReporting", "Reporting", "mdi-av-my-library-books", "../frmReporting/frmReporting.html")
End If
If ABMShared.HasPermission("frmReporting","canread") = True Then
page.NavigationBar.AddSideBarDivider
End If
If ABMShared.HasPermission("frmIYMTYD","canread") = True Then
page.NavigationBar.AddSideBarSubItem("frmReporting", "frmIYMTYD", "Chart: YTD IYM", "mdi-action-bookmark", "../frmIYMTYD/frmIYMTYD.html")
End If
If ABMShared.HasPermission("frmReporting","canread") = True Then
page.NavigationBar.AddSideBarSubDivider("frmReporting")
End If
If ABMShared.HasPermission("frmIYMMonthly","canread") = True Then
page.NavigationBar.AddSideBarSubItem("frmReporting", "frmIYMMonthly", "Chart: Monthly IYM", "mdi-action-bookmark", "../frmIYMMonthly/frmIYMMonthly.html")
End If
If ABMShared.HasPermission("frmReporting","canread") = True Then
page.NavigationBar.AddSideBarSubDivider("frmReporting")
End If
If ABMShared.HasPermission("frmIYMPercentageExpenditure","canread") = True Then
page.NavigationBar.AddSideBarSubItem("frmReporting", "frmIYMPercentageExpenditure", "Chart: Percentage Expenditure", "mdi-action-bookmark", "../frmIYMPercentageExpenditure/frmIYMPercentageExpenditure.html")
End If
If ABMShared.HasPermission("frmReporting","canread") = True Then
page.NavigationBar.AddSideBarSubDivider("frmReporting")
End If
If ABMShared.HasPermission("frmIYMPercentageChange","canread") = True Then
page.NavigationBar.AddSideBarSubItem("frmReporting", "frmIYMPercentageChange", "Chart: Percentage Change", "mdi-action-bookmark", "../frmIYMPercentageChange/frmIYMPercentageChange.html")
End If
If ABMShared.HasPermission("frmReporting","canread") = True Then
page.NavigationBar.AddSideBarSubDivider("frmReporting")
End If
If ABMShared.HasPermission("frmIYMProjectionsPerProgramme","canread") = True Then
page.NavigationBar.AddSideBarSubItem("frmReporting", "frmIYMProjectionsPerProgramme", "Chart: Monthly Projections Analysis", "mdi-action-bookmark", "../frmIYMProjectionsPerProgramme/frmIYMProjectionsPerProgramme.html")
End If
If ABMShared.HasPermission("frmReporting","canread") = True Then
page.NavigationBar.AddSideBarSubDivider("frmReporting")
End If
If ABMShared.HasPermission("frmIYMExpenditurePerProgramme","canread") = True Then
page.NavigationBar.AddSideBarSubItem("frmReporting", "frmIYMExpenditurePerProgramme", "Chart: Actual Monthly Expenditure Analysis", "mdi-action-bookmark", "../frmIYMExpenditurePerProgramme/frmIYMExpenditurePerProgramme.html")
End If
If ABMShared.HasPermission("frmReporting","canread") = True Then
page.NavigationBar.AddSideBarSubDivider("frmReporting")
End If
If ABMShared.HasPermission("frmIYMPercentageExpenditurePerProgramme","canread") = True Then
page.NavigationBar.AddSideBarSubItem("frmReporting", "frmIYMPercentageExpenditurePerProgramme", "Chart: Monthly Percentage Expenditure Analysis", "mdi-action-bookmark", "../frmIYMPercentageExpenditurePerProgramme/frmIYMPercentageExpenditurePerProgramme.html")
End If
If ABMShared.HasPermission("frmReporting","canread") = True Then
page.NavigationBar.AddSideBarSubDivider("frmReporting")
End If
If ABMShared.HasPermission("frmIYMVariancesPerProgramme","canread") = True Then
page.NavigationBar.AddSideBarSubItem("frmReporting", "frmIYMVariancesPerProgramme", "Chart: Monthly Variance Analysis", "mdi-action-bookmark", "../frmIYMVariancesPerProgramme/frmIYMVariancesPerProgramme.html")
End If
If ABMShared.HasPermission("frmReporting","canread") = True Then
page.NavigationBar.AddSideBarSubDivider("frmReporting")
End If
If ABMShared.HasPermission("frmIYMYTDExpenditurePerProgramme","canread") = True Then
page.NavigationBar.AddSideBarSubItem("frmReporting", "frmIYMYTDExpenditurePerProgramme", "Chart: YTD Expenditure Analysis", "mdi-action-bookmark", "../frmIYMYTDExpenditurePerProgramme/frmIYMYTDExpenditurePerProgramme.html")
End If
If ABMShared.HasPermission("frmReporting","canread") = True Then
page.NavigationBar.AddSideBarSubDivider("frmReporting")
End If
If ABMShared.HasPermission("frmIYMYTDProjectionsPerProgramme","canread") = True Then
page.NavigationBar.AddSideBarSubItem("frmReporting", "frmIYMYTDProjectionsPerProgramme", "Chart: YTD Projections Analysis", "mdi-action-bookmark", "../frmIYMYTDProjectionsPerProgramme/frmIYMYTDProjectionsPerProgramme.html")
End If
If ABMShared.HasPermission("frmReporting","canread") = True Then
page.NavigationBar.AddSideBarSubDivider("frmReporting")
End If
If ABMShared.HasPermission("frmIYMYTDPercentageExpenditure","canread") = True Then
page.NavigationBar.AddSideBarSubItem("frmReporting", "frmIYMYTDPercentageExpenditure", "Chart: YTD Percentage Expenditure Analysis", "mdi-action-bookmark", "../frmIYMYTDPercentageExpenditure/frmIYMYTDPercentageExpenditure.html")
End If
If ABMShared.HasPermission("frmReporting","canread") = True Then
page.NavigationBar.AddSideBarSubDivider("frmReporting")
End If
If ABMShared.HasPermission("frmProcPlanCalendar","canread") = True Then
page.NavigationBar.AddSideBarSubItem("frmReporting", "frmProcPlanCalendar", "Procurement Plan Calendar", "mdi-action-bookmark", "../frmProcPlanCalendar/frmProcPlanCalendar.html")
End If
If ABMShared.HasPermission("frmReporting","canread") = True Then
page.NavigationBar.AddSideBarSubDivider("frmReporting")
End If
If ABMShared.HasPermission("frmProcPlanGantt","canread") = True Then
page.NavigationBar.AddSideBarSubItem("frmReporting", "frmProcPlanGantt", "Procurement Project Plan", "mdi-action-bookmark", "../frmProcPlanGantt/frmProcPlanGantt.html")
End If
If ABMShared.HasPermission("frmReporting","canread") = True Then
page.NavigationBar.AddSideBarSubDivider("frmReporting")
End If
If ABMShared.HasPermission("frmReferences","canread") = True Then
page.NavigationBar.AddSideBarItem("frmReferences", "References", "mdi-content-link", "../frmReferences/frmReferences.html")
End If
If ABMShared.HasPermission("frmReferences","canread") = True Then
page.NavigationBar.AddSideBarDivider
End If
If ABMShared.HasPermission("frmResources","canread") = True Then
page.NavigationBar.AddSideBarSubItem("frmReferences", "frmResources", "Resources", "mdi-action-bookmark", "../frmResources/frmResources.html")
End If
If ABMShared.HasPermission("frmReferences","canread") = True Then
page.NavigationBar.AddSideBarSubDivider("frmReferences")
End If
If ABMShared.HasPermission("frmHolidays","canread") = True Then
page.NavigationBar.AddSideBarSubItem("frmReferences", "frmHolidays", "Holidays", "mdi-action-bookmark", "../frmHolidays/frmHolidays.html")
End If
If ABMShared.HasPermission("frmReferences","canread") = True Then
page.NavigationBar.AddSideBarSubDivider("frmReferences")
End If
If ABMShared.HasPermission("frmClassOfGoods","canread") = True Then
page.NavigationBar.AddSideBarSubItem("frmReferences", "frmClassOfGoods", "Class of Goods", "mdi-action-bookmark", "../frmClassOfGoods/frmClassOfGoods.html")
End If
If ABMShared.HasPermission("frmReferences","canread") = True Then
page.NavigationBar.AddSideBarSubDivider("frmReferences")
End If
If ABMShared.HasPermission("frmProcStatus","canread") = True Then
page.NavigationBar.AddSideBarSubItem("frmReferences", "frmProcStatus", "Procurement Status", "mdi-action-bookmark", "../frmProcStatus/frmProcStatus.html")
End If
If ABMShared.HasPermission("frmReferences","canread") = True Then
page.NavigationBar.AddSideBarSubDivider("frmReferences")
End If
If ABMShared.HasPermission("frmUserAdministration","canread") = True Then
page.NavigationBar.AddSideBarItem("frmUserAdministration", "User Administration", "mdi-action-account-circle", "../frmUserAdministration/frmUserAdministration.html")
End If
If ABMShared.HasPermission("frmUserAdministration","canread") = True Then
page.NavigationBar.AddSideBarDivider
End If
If ABMShared.HasPermission("frmUserGroups","canread") = True Then
page.NavigationBar.AddSideBarSubItem("frmUserAdministration", "frmUserGroups", "User Groups", "mdi-action-bookmark", "../frmUserGroups/frmUserGroups.html")
End If
If ABMShared.HasPermission("frmUserAdministration","canread") = True Then
page.NavigationBar.AddSideBarSubDivider("frmUserAdministration")
End If
'refresh the navigation bar
page.NavigationBar.Refresh ' IMPORTANT
End Sub