public Sub BuildPage()
' initialize the theme
BuildTheme
' initialize this page using our theme
page.InitializeWithTheme(Name, "/ws/" & AppName & "/" & Name, False, theme)
page.ShowLoader=True
page.NeedsChips = True
ABMShared.BuildNavigationBar(page, ABMShared.pgActionName , "../images/logo.png", "", "Config", ABMShared.pgActionName)
' create the page grid
page.AddRowsM( 1,True, 15, 0, "rowtheme").AddCellsOSMP(1,0,0,0,4,4,4,5,5,30,10,"").AddCellsOSMP(1,0,0,0,4,4,4,5,5,30,10,"").AddCellsOSMP(1,0,0,0,4,4,4,5,5,30,10,"")
page.AddRowsM( 1,True, 0, 5, "").AddCells12( 1,"") ' spare row
page.AddRowsM( 1,True, 20, 5, "").AddCells12( 1,"")
page.BuildGrid 'IMPORTANT once you loaded the complete grid AND before you start adding components
Dim btntruck As ABMButton
btntruck.InitializeFlat( page , "btntruck", "mdi-maps-local-shipping", "LEFT", "Trucks","bigblue")
page.Cell(1,1).AddComponent(btntruck)
page.Row(1).Visibility = ABM.VISIBILITY_HIDE_ALL
Dim btntrailer As ABMButton
btntrailer.InitializeFlat( page , "btntrailer", "mdi-editor-format-strikethrough", "LEFT", "Trailers","bigblue")
page.Cell(1,2).AddComponent(btntrailer)
page.Row(1).Visibility = ABM.VISIBILITY_HIDE_ALL
Dim btnother As ABMButton
btnother.InitializeFlat( page , "btnother", "mdi-maps-directions-car", "LEFT", "Other","bigblue")
page.Cell(1,3).AddComponent(btnother)
page.Row(1).Visibility = ABM.VISIBILITY_HIDE_ALL
If ABMShared.pgActionName = "Vehicles" Or ABMShared.pgActionName = "Inspections" Then
page.Row(1).Visibility = ABM.VISIBILITY_ALL
End If
' add a modal sheet template to enter user information
page.AddModalSheetTemplate(BuildInputSheet)
' add a modal sheet template for a yes no msgbox
page.AddModalSheetTemplate(BuildMsgBoxYesNo)
' add a modal sheet template for a msgbox
page.AddModalSheetTemplate(BuildMsgBox)
' add a modal sheet template for an upload
page.AddModalSheetTemplate(BuildAttachmentSheet)
' add a modal sheet template to enter case information
page.AddModalSheetTemplate(BuildNoteInputSheet)
' create a table
Dim tblCases As ABMTable
Select Case ABMShared.pgActionName
Case "Company"
tblCases.Initialize(page, "tblCases", False, True, True, "tbltheme")
tblCases.SetHeaders( Array As String( "ID" ,"User Name", "Owner Name" , "City" , "Pass Code","View / Edit" ,"Delete" ))
tblCases.SetHeaderThemes( Array As String( "bgc" , "bgc" , "bgc" , "bgc" , "bgc" , "bgc" ,"bgc" ))
Case "Users"
tblCases.Initialize(page, "tblCases", False, True, True, "tbltheme")
tblCases.SetHeaders( Array As String( "ID" ,"User Name", "Login Name" , "Type" , "Active","View / Edit" ,"Delete" ))
tblCases.SetHeaderThemes( Array As String( "bgc" , "bgc" , "bgc" , "bgc" , "bgc" , "bgc" ,"bgc" ))
Case "Terminals"
tblCases.Initialize(page, "tblCases", False, True, True, "tbltheme")
tblCases.SetHeaders( Array As String( "ID" ,"Terminal Name", "Address" , "City" , "State/Prov","View / Edit" ,"Delete" ))
tblCases.SetHeaderThemes( Array As String( "bgc" , "bgc" , "bgc" , "bgc" , "bgc" , "bgc" ,"bgc" ))
Case "Inspections"
tblCases.Initialize(page, "tblCases", False, True, True, "tbltheme")
tblCases.SetHeaders( Array As String( "ID" ,"Vehicle Name", "Unit Type" , "Image", "View / Edit" ,"Delete" ))
tblCases.SetHeaderThemes( Array As String( "bgc" , "bgc" , "bgc" , "bgc" , "bgc" ,"bgc" ))
Case "HOS"
tblCases.Initialize(page, "tblCases", False, True, True, "tbltheme")
tblCases.SetHeaders( Array As String( "ID" ,"Rule Name", "Description" , "Selected", "View / Edit" ,"Delete" ))
tblCases.SetHeaderThemes( Array As String( "bgc" , "bgc" , "bgc" , "bgc" , "bgc" ,"bgc" ))
Case "Employees"
tblCases.Initialize(page, "tblCases", False, True, True, "tbltheme")
tblCases.SetHeaders( Array As String("ID" ,"Number", "First Name" , "Last Name" , "Type","View / Edit" ,"Delete"))
tblCases.SetHeaderThemes( Array As String("bgc" , "bgc" , "bgc" , "bgc" , "bgc" , "bgc" ,"bgc" ))
Case "Vehicles"
tblCases.Initialize(page, "tblCases", False, True, True, "tbltheme")
tblCases.SetHeaders( Array As String( "ID" ,"Vehicle Number", "VIN" , "Notes" , "Type","View / Edit" ,"Delete" ))
tblCases.SetHeaderThemes( Array As String( "bgc" , "bgc" , "bgc" , "bgc" , "bgc" , "bgc" ,"bgc" ))
Case "Devices"
tblCases.Initialize(page, "tblCases", False, True, True, "tbltheme")
tblCases.SetHeaders( Array As String( "ID" ,"User Name", "Serial #" , "Make" , "Model","View / Edit" ,"Delete" ))
tblCases.SetHeaderThemes( Array As String( "bgc" , "bgc" , "bgc" , "bgc" , "bgc" , "bgc" ,"bgc" ))
End Select
tblCases.SetFooter("Total number of records: 0", 12,"bg")
page.Cell(3,1).AddComponent(tblCases)
BuildFooterFixed
End Sub