messenger, Ueberstunden, timas
This commit is contained in:
@@ -385,7 +385,7 @@ Public Class cTimasAPI
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public Function getEmployee(mitarbeiterID As String, ByRef datatableTimas As DataTable) As cTimasEmployee
|
||||
Public Function getEmployee(mitarbeiterID As String) As cTimasEmployee
|
||||
|
||||
Try
|
||||
|
||||
@@ -469,13 +469,53 @@ Public Class cTimasAPI
|
||||
i = i + 1
|
||||
End While
|
||||
|
||||
|
||||
Debug.WriteLine(json)
|
||||
|
||||
Return emp
|
||||
|
||||
Catch ex As WebException
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
Public Function getEmployeecustomFields(mitarbeiterID As String) As DataTable
|
||||
|
||||
Try
|
||||
Dim dt As New DataTable
|
||||
|
||||
If Not checkConnectionTImas("") Then
|
||||
Return Nothing
|
||||
End If
|
||||
|
||||
Dim responseJson As String = rest.FullRequestNoBody("GET", "/rest/web-api/employees/" & mitarbeiterID)
|
||||
If (rest.LastMethodSuccess <> True) Then
|
||||
Debug.WriteLine(rest.LastErrorText)
|
||||
Return Nothing
|
||||
End If
|
||||
|
||||
If (rest.ResponseStatusCode <> 200) Then
|
||||
Debug.WriteLine(rest.ResponseHeader)
|
||||
MsgBox(rest.ResponseStatusCode & " " & rest.ResponseStatusText)
|
||||
Return Nothing
|
||||
End If
|
||||
|
||||
Debug.WriteLine(responseJson)
|
||||
|
||||
|
||||
Dim json As New Chilkat.JsonObject
|
||||
Dim success = json.Load(responseJson)
|
||||
If (success <> True) Then
|
||||
Debug.WriteLine(json.LastErrorText)
|
||||
End If
|
||||
|
||||
Dim customFields As Chilkat.JsonArray = json.ArrayOf("customFields")
|
||||
If (json.LastMethodSuccess = False) Then
|
||||
Debug.WriteLine("customFields member not found.")
|
||||
Else
|
||||
|
||||
|
||||
Dim dt As New DataTable
|
||||
dt.Columns.Add("value", GetType(String))
|
||||
dt.Columns.Add("name", GetType(String))
|
||||
dt.Columns.Add("type", GetType(String))
|
||||
@@ -491,15 +531,12 @@ Public Class cTimasAPI
|
||||
dt.Rows.Add(R)
|
||||
j = j + 1
|
||||
End While
|
||||
If datatableTimas IsNot Nothing Then datatableTimas = dt
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
Debug.WriteLine(json)
|
||||
|
||||
Return emp
|
||||
Return dt
|
||||
|
||||
Catch ex As WebException
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
|
||||
Reference in New Issue
Block a user