API Einstellungen, Überstundenauszahlung, Sammelrechnungsdruck, etc
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Net
|
||||
Imports System.Reflection
|
||||
Imports System.ServiceModel.Configuration
|
||||
Imports System.ServiceModel.Security
|
||||
Imports System.Threading
|
||||
Imports System.Web.Routing
|
||||
@@ -610,18 +611,29 @@ Public Class cATEZ_NCTS_IN
|
||||
'Shared API_STRING As String = "https://dev-tds.singlewindow.io"
|
||||
'PROD
|
||||
Shared API_STRING As String = "https://transcom.singlewindow.io"
|
||||
Shared API As New DataTable
|
||||
Shared token As String = ""
|
||||
Shared refresh_token As String = ""
|
||||
Public dataTable As New DataTable()
|
||||
Shared jsonData As New Chilkat.JsonObject
|
||||
Public Shared sessionID As Integer = -1
|
||||
Dim SQl As SQL
|
||||
Shared apiSettingsloaded As Boolean = False
|
||||
|
||||
Sub New(program As String)
|
||||
API = SQL.loadDgvBySql("SELECT top(1) * FROM tblAPIEinstellungen WHERE api_program='" & program & "' and api_productive ='" & IIf(VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM, "0", "1") & "'", "ADMIN")
|
||||
If API.Rows.Count = 0 Then
|
||||
MsgBox("keine gültigen API-Einstellungen für " & program & " gefunden!")
|
||||
Else
|
||||
apiSettingsloaded = True
|
||||
API_STRING = API.Rows(0).Item("api_url")
|
||||
End If
|
||||
API_STRING = API.Rows(0).Item("api_url")
|
||||
End Sub
|
||||
|
||||
Shared Function SendRequestAuthentificationToken(ByVal myuri As String, ByVal contentType As String, ByVal method As String, ByRef Itoken As String) As String
|
||||
Try
|
||||
|
||||
|
||||
|
||||
Dim session = New cATEZ_NCTS_Sessions()
|
||||
|
||||
If Not IsDBNull(session.token) AndAlso session.token IsNot Nothing Then
|
||||
@@ -631,6 +643,8 @@ Public Class cATEZ_NCTS_IN
|
||||
Return "200"
|
||||
End If
|
||||
|
||||
If apiSettingsloaded = False Then Return "400"
|
||||
|
||||
VERAG_PROG_ALLGEMEIN.cChilkat_Helper.UnlockCilkat()
|
||||
|
||||
Dim rest As New Chilkat.Rest
|
||||
@@ -650,8 +664,8 @@ Public Class cATEZ_NCTS_IN
|
||||
|
||||
|
||||
Dim json As New Chilkat.JsonObject
|
||||
json.UpdateString("password", "V3r4gAtez2023!")
|
||||
json.UpdateString("username", "atez-integration@verag.ag")
|
||||
json.UpdateString("password", API.Rows(0).Item("api_password"))
|
||||
json.UpdateString("username", API.Rows(0).Item("api_user"))
|
||||
|
||||
|
||||
rest.AddHeader("Content-Type", contentType)
|
||||
|
||||
Reference in New Issue
Block a user