Sub Globals
Dim wbwTable As WebView
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("WebReport"
ShowTableInWebView
End Sub
Sub ShowTableInWebView
If emplvl.Text = "" Then
Msgbox("Select Name Properly", "")
Return
End If
If emplvl.Text = 0 Then
Msgbox("Higher level Data Cannot be shown", "")
Return
End If
Dim txt As String
Dim x As Int
x= Main.x
Select x
Case 0
txt = "select [DR], [HOSPNAME], [AREANAME], [EID], [DRID], [HID] FROM " & Main.DBTableName &" "& "where [EID]=" & empid.Text
wbwTable.LoadHtml(DBUtils.ExecuteHtml2(Main.SQL1, txt, Null, 0, True, 10 * Scale.GetScaleX))
Case 1
txt = "select DISTINCT [HOSPNAME], [AREANAME], [EID], [HID] FROM " & Main.DBTableName &" "& "where [EID]=" & empid.Text
wbwTable.LoadHtml(DBUtils.ExecuteHtml3(Main.SQL1, txt, Null, 0, True, 10 * Scale.GetScaleX))
'xs=1
Case 2
txt = "select DISTINCT [AREANAME], [EID], [AID] FROM " & Main.DBTableName &" "& "where [EID]=" & empid.Text
wbwTable.LoadHtml(DBUtils.ExecuteHtml4(Main.SQL1, txt, Null, 0, True, 10 * Scale.GetScaleX))
End Select
End Sub
Sub wbwTable_OverrideUrl (Url As String) As Boolean
Dim values() As String
Log (Url)
If Url.Contains("Activity_A") Then
StartActivity(DBWebView2)
xs =0
End If
End Sub