Digicust, Timas, Essensbestellungen
This commit is contained in:
@@ -49,7 +49,7 @@ Public Class cTimasAPI
|
||||
|
||||
End Function
|
||||
|
||||
Public Sub getTimeSaldo(maid As Integer, ByRef info As String, Optional ByRef requestDone As Boolean = False)
|
||||
Public Sub getTimeSaldo(maid As Integer, ByRef info As String, Optional isEndpointRunning As Boolean = True)
|
||||
Try
|
||||
Dim returnText As String = ""
|
||||
Dim failureText As String = ""
|
||||
@@ -66,10 +66,12 @@ Public Class cTimasAPI
|
||||
|
||||
Dim success As Boolean
|
||||
|
||||
|
||||
rest.IdleTimeoutMs = 5000
|
||||
Dim responseJson As String = rest.FullRequestNoBody("GET", "/rest/web-api/employees/" & maid & "/balance")
|
||||
If (rest.LastMethodSuccess <> True) Then
|
||||
Debug.WriteLine(rest.LastErrorText)
|
||||
isEndpointRunning = rest.LastMethodSuccess
|
||||
rest.IdleTimeoutMs = 30000 'defualt
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
@@ -117,7 +119,7 @@ Public Class cTimasAPI
|
||||
|
||||
End Sub
|
||||
|
||||
Public Function getTimeEntries(ByVal maid As Integer, ByRef dtZeiten As DataTable, Optional ByRef entryExistingToday As Boolean = True, Optional ByRef requestDone As Boolean = False) As Boolean
|
||||
Public Function getTimeEntries(ByVal maid As Integer, ByRef dtZeiten As DataTable, Optional ByRef entryExistingToday As Boolean = True, Optional ByRef requestDone As Boolean = False, Optional isEndpointRunning As Boolean = True) As Boolean
|
||||
Try
|
||||
|
||||
Dim isPresent = False
|
||||
@@ -141,10 +143,15 @@ Public Class cTimasAPI
|
||||
|
||||
|
||||
Dim Response As String
|
||||
rest.IdleTimeoutMs = 5000 '5 sec
|
||||
Response = rest.FullRequestNoBody("GET", "/rest/web-api/employees/" & maid & "/bookings")
|
||||
If (rest.LastMethodSuccess <> True) Then
|
||||
Debug.WriteLine(rest.LastErrorText)
|
||||
isEndpointRunning = rest.LastMethodSuccess
|
||||
rest.IdleTimeoutMs = 30000 'defualt
|
||||
Return isPresent
|
||||
Else
|
||||
rest.IdleTimeoutMs = 30000
|
||||
End If
|
||||
|
||||
If (rest.ResponseStatusCode <> 200) Then
|
||||
|
||||
Reference in New Issue
Block a user