Merge branch 'master' of https://verag.visualstudio.com/SDL/_git/SDL
This commit is contained in:
@@ -1859,7 +1859,6 @@ Public Class cAvisoDAL
|
||||
Dim tmpid = AvisoDAL.SpeichernAviso(av)
|
||||
AvisoDAL.addAenderung(tmpid, "automatisch auf 'LKW nicht eingetroffen' gestellt", "automatisch auf 'LKW nicht eingetroffen' gestellt am " & Format(Now, "dd.MM.yyyy HH:mm") & ", da bereits länger als 10 Tage offen")
|
||||
|
||||
'TODO - Benachrichtigung für zuständigen Mitarbeiter einbauen
|
||||
VERAG_PROG_ALLGEMEIN.cAvisoBenachrichtigungen.INSERT_BENACHRICHTIGUNG(av.AvisoID, -1, 3, "B", av.LetzterMitarbeiterId, "automatisch auf 'LKW nicht eingetroffen gesetzt", 0,, "automatisch auf 'LKW nicht eingetroffen' gestellt am " & Format(Now, "dd.MM.yyyy HH:mm") & ", da bereits länger als 10 Tage offen")
|
||||
|
||||
Check_Nicht_eingetroffen += 1
|
||||
|
||||
@@ -1,7 +1,40 @@
|
||||
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Reflection
|
||||
Imports System.Reflection
|
||||
|
||||
Public Class cTextkonserve_LIST
|
||||
|
||||
Public LIST As New List(Of cTextkonserve)
|
||||
Dim SQL As New SQL
|
||||
|
||||
|
||||
Sub New(txt_kategorie As String, txt_sprache As String, txt_FIRMA As String)
|
||||
|
||||
LOAD_LIST(txt_kategorie, txt_sprache, txt_FIRMA)
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub LOAD_LIST(txt_kategorie As String, txt_sprache As String, txt_FIRMA As String)
|
||||
Try
|
||||
|
||||
LIST.Clear()
|
||||
Dim sqlSprache As String = ""
|
||||
If txt_sprache <> "" Then sqlSprache = " And txt_sprache = '" & txt_sprache & "'"
|
||||
|
||||
|
||||
For Each r In SQL.loadDgvBySql("Select txt_Id FROM [tblTextkonserve] WHERE txt_kategorie='" & txt_kategorie & "' AND txt_FIRMA = '" & txt_FIRMA & "' and txt_dynMailvorlage = 1" & sqlSprache & " ORDER BY txt_kategorie asc", "FMZOLL").Rows
|
||||
LIST.Add(New VERAG_PROG_ALLGEMEIN.cTextkonserve(r("txt_Id")))
|
||||
Next
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
Public Class cTextkonserve
|
||||
Property txt_Id As Integer
|
||||
Property txt_kategorie As String
|
||||
@@ -10,7 +43,10 @@ Public Class cTextkonserve
|
||||
Property txt_text As String
|
||||
Property txt_betreff As String
|
||||
Property txt_FIRMA As String
|
||||
Property txt_firmaSig As Integer = 1
|
||||
Property txt_firmaSig As Integer
|
||||
Property txt_dynMailvorlage As Boolean
|
||||
Property txt_letzteAenderungUser As String
|
||||
Property txt_letzteAenderung As DateTime
|
||||
|
||||
|
||||
Public hasEntry As Boolean = False
|
||||
@@ -38,7 +74,6 @@ Public Class cTextkonserve
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Public Function getParameterList() As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
|
||||
Dim list As New List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("txt_Id", txt_Id, , True, True))
|
||||
@@ -49,6 +84,9 @@ Public Class cTextkonserve
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("txt_betreff", txt_betreff))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("txt_FIRMA", txt_FIRMA))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("txt_firmaSig", txt_firmaSig))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("txt_dynMailvorlage", txt_dynMailvorlage))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("txt_letzteAenderungUser", txt_letzteAenderungUser))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("txt_letzteAenderung", txt_letzteAenderung))
|
||||
|
||||
Return list
|
||||
End Function
|
||||
@@ -125,6 +163,7 @@ Public Class cTextkonserve
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
Public Function getUpdateCmd() As String
|
||||
Try
|
||||
Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
|
||||
|
||||
@@ -10,7 +10,7 @@ Imports VERAG_PROG_ALLGEMEIN.cCreditSafeAPI
|
||||
Public Class frmMitarbeitersuche
|
||||
Dim mit_id As Integer = -1
|
||||
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||||
Dim timas As New cTimasAPI
|
||||
Dim timas As New cTimasAPI("timas")
|
||||
Dim requestDone As Boolean = False
|
||||
Dim MA As cMitarbeiter = Nothing
|
||||
|
||||
@@ -323,7 +323,7 @@ Public Class frmMitarbeitersuche
|
||||
|
||||
|
||||
If VERAG_PROG_ALLGEMEIN.cAllgemein.MITARBEITER.mit_timasId IsNot Nothing Then
|
||||
Dim timas As New cTimasAPI
|
||||
Dim timas As New cTimasAPI("timas")
|
||||
|
||||
If art = "post" Then
|
||||
'postgang ausstempen, dann beginn post, + 1h ende post
|
||||
|
||||
@@ -22,7 +22,6 @@ Partial Class frmUeberstundenauszahlen
|
||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()>
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmUeberstundenauszahlen))
|
||||
Me.dtpMonat = New System.Windows.Forms.DateTimePicker()
|
||||
Me.lblMonat = New System.Windows.Forms.Label()
|
||||
@@ -79,7 +78,8 @@ Partial Class frmUeberstundenauszahlen
|
||||
Me.lblWarning = New System.Windows.Forms.Label()
|
||||
Me.Label5 = New System.Windows.Forms.Label()
|
||||
Me.PictureBox5 = New System.Windows.Forms.PictureBox()
|
||||
Me.dgvUeberstunden = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
|
||||
Me.LinkLabel1 = New System.Windows.Forms.LinkLabel()
|
||||
Me.dgvUeberstunden = New VERAG_PROG_ALLGEMEIN.MyDatagridview()
|
||||
CType(Me.picDel, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.Panel1.SuspendLayout()
|
||||
CType(Me.picShow, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
@@ -188,7 +188,7 @@ Partial Class frmUeberstundenauszahlen
|
||||
'Button1
|
||||
'
|
||||
Me.Button1.DialogResult = System.Windows.Forms.DialogResult.OK
|
||||
Me.Button1.Location = New System.Drawing.Point(464, 170)
|
||||
Me.Button1.Location = New System.Drawing.Point(521, 212)
|
||||
Me.Button1.Name = "Button1"
|
||||
Me.Button1.Size = New System.Drawing.Size(87, 30)
|
||||
Me.Button1.TabIndex = 12
|
||||
@@ -631,6 +631,17 @@ Partial Class frmUeberstundenauszahlen
|
||||
Me.PictureBox5.TabIndex = 130
|
||||
Me.PictureBox5.TabStop = False
|
||||
'
|
||||
'LinkLabel1
|
||||
'
|
||||
Me.LinkLabel1.AutoSize = True
|
||||
Me.LinkLabel1.Location = New System.Drawing.Point(473, 47)
|
||||
Me.LinkLabel1.Name = "LinkLabel1"
|
||||
Me.LinkLabel1.Size = New System.Drawing.Size(161, 13)
|
||||
Me.LinkLabel1.TabIndex = 131
|
||||
Me.LinkLabel1.TabStop = True
|
||||
Me.LinkLabel1.Text = "zu unterschreibende Dokumente"
|
||||
Me.LinkLabel1.Visible = False
|
||||
'
|
||||
'dgvUeberstunden
|
||||
'
|
||||
Me.dgvUeberstunden.AKTUALISIERUNGS_INTERVALL = -1
|
||||
@@ -650,6 +661,7 @@ Partial Class frmUeberstundenauszahlen
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(646, 337)
|
||||
Me.Controls.Add(Me.LinkLabel1)
|
||||
Me.Controls.Add(Me.PictureBox5)
|
||||
Me.Controls.Add(Me.Label5)
|
||||
Me.Controls.Add(Me.lblWarning)
|
||||
@@ -735,4 +747,5 @@ Partial Class frmUeberstundenauszahlen
|
||||
Friend WithEvents txtBruttoSum As Windows.Forms.TextBox
|
||||
Friend WithEvents Label12 As Windows.Forms.Label
|
||||
Friend WithEvents PictureBox5 As Windows.Forms.PictureBox
|
||||
Friend WithEvents LinkLabel1 As Windows.Forms.LinkLabel
|
||||
End Class
|
||||
|
||||
@@ -9,7 +9,7 @@ Public Class frmUeberstundenauszahlen
|
||||
Dim refresh As Boolean = False
|
||||
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||||
Dim MA As cMitarbeiter = Nothing
|
||||
Dim timas As cTimasAPI = New cTimasAPI
|
||||
Dim timas As cTimasAPI = New cTimasAPI("timas")
|
||||
Dim dt As New DataTable
|
||||
Dim customFields As New DataTable
|
||||
Dim timeaccountdt As New DataTable
|
||||
@@ -39,6 +39,13 @@ Public Class frmUeberstundenauszahlen
|
||||
customFields = timas.getEmployeecustomFields(MA.mit_timasId)
|
||||
timas.getTimeaccountList(dt)
|
||||
|
||||
Select Case MA.mit_firma
|
||||
Case "VERAG", "FRONTOFFICE", "IMEX", "ALL" : LinkLabel1.Visible = True
|
||||
Case Else : LinkLabel1.Visible = False
|
||||
|
||||
End Select
|
||||
|
||||
|
||||
Dim dv = New DataView(dt)
|
||||
dv.RowFilter = "accountid = 65 Or accountid = 69 Or accountid = 70 Or accountid = 72 Or accountid = 73 Or accountid = 1209 Or accountid = 1235 Or accountid = 1550 Or accountid = 1551 Or accountid = 1553"
|
||||
timeaccountdt = dv.ToTable
|
||||
@@ -482,6 +489,11 @@ Public Class frmUeberstundenauszahlen
|
||||
Process.Start(webAddress)
|
||||
End Sub
|
||||
|
||||
Private Sub LinkLabel1_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked
|
||||
Dim webAddress As String = "https://wiki.verag.ag/de/software/zeiterfassung_admin/zeiterfassung_admin#dokumente"
|
||||
Process.Start(webAddress)
|
||||
End Sub
|
||||
|
||||
Private Sub txtAusz_hhmm_KeyPress(sender As Object, e As KeyPressEventArgs)
|
||||
Select Case Asc(e.KeyChar)
|
||||
Case 48 To 57, 8, 44, 46, 58
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -1,35 +1,38 @@
|
||||
Imports System.Diagnostics.Eventing.Reader
|
||||
Imports System.IO
|
||||
|
||||
Imports System.Net
|
||||
Imports System.Text
|
||||
Imports System.Threading
|
||||
Imports System.Web.UI.WebControls
|
||||
Imports System.Windows.Forms
|
||||
Imports Chilkat
|
||||
Imports iTextSharp.text.pdf
|
||||
Imports Microsoft.Office.Interop.Outlook
|
||||
Imports Newtonsoft.Json
|
||||
Imports Spire.Pdf.Lists
|
||||
Imports Spire.Pdf.OPC
|
||||
Imports VERAG_PROG_ALLGEMEIN.IDEV_Intrastat
|
||||
Imports VERAG_PROG_ALLGEMEIN.TESTJSON
|
||||
|
||||
|
||||
Public Class cCreditSafeAPI
|
||||
|
||||
'Test
|
||||
'Shared API_STRING As String = "https://connect.sandbox.creditsafe.com"
|
||||
'PROD
|
||||
Shared API_STRING As String = "https://connect.creditsafe.com"
|
||||
Shared API_STRING As String
|
||||
Shared API As New DataTable
|
||||
Shared token As String = ""
|
||||
Public dataTable As New DataTable()
|
||||
Public dataTablecs As New DataTable()
|
||||
Shared SQL As New 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")
|
||||
dataTablecs = API
|
||||
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
|
||||
|
||||
End Sub
|
||||
|
||||
Shared Function SendRequestAuthentificationToken(myuri As String, user As CreditSafeUser, contentType As String, method As String) As String
|
||||
Shared Function SendRequestAuthentificationToken(myuri As String, contentType As String, method As String, Optional csUser As CreditSafeUser = Nothing) As String
|
||||
Try
|
||||
VERAG_PROG_ALLGEMEIN.cChilkat_Helper.UnlockCilkat()
|
||||
|
||||
If apiSettingsloaded = False Then Return "400"
|
||||
|
||||
Dim rest As New Chilkat.Rest
|
||||
Dim success As Boolean
|
||||
|
||||
@@ -45,10 +48,15 @@ Public Class cCreditSafeAPI
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Dim json As New Chilkat.JsonObject
|
||||
json.UpdateString("username", user.username)
|
||||
json.UpdateString("password", user.password)
|
||||
If csUser IsNot Nothing Then
|
||||
json.UpdateString("username", csUser.username)
|
||||
json.UpdateString("password", csUser.password)
|
||||
Else
|
||||
json.UpdateString("username", API.Rows(0).Item("api_user"))
|
||||
json.UpdateString("password", API.Rows(0).Item("api_password"))
|
||||
End If
|
||||
|
||||
|
||||
rest.AddHeader("Content-Type", contentType)
|
||||
|
||||
@@ -176,11 +184,15 @@ Public Class cCreditSafeAPI
|
||||
End Function
|
||||
|
||||
|
||||
Shared Function authenticate(username As String, passwort As String) As String
|
||||
Shared Function authenticate(Optional username As String = "", Optional password As String = "") As String
|
||||
|
||||
Dim myUri As String = API_STRING & "/v1/authenticate"
|
||||
Dim csUser = New CreditSafeUser(username, passwort)
|
||||
Dim response = SendRequestAuthentificationToken(myUri, csUser, "application/json", "POST")
|
||||
Dim csUser
|
||||
If username <> "" AndAlso password <> "" Then
|
||||
csUser = New CreditSafeUser(username, password)
|
||||
End If
|
||||
|
||||
Dim response = SendRequestAuthentificationToken(myUri, "application/json", "POST", csUser)
|
||||
|
||||
Return response
|
||||
|
||||
@@ -506,6 +518,44 @@ Public Class cCreditSafeAPI
|
||||
|
||||
End Function
|
||||
|
||||
Public Function getSubscriptionCountries() As String
|
||||
|
||||
VERAG_PROG_ALLGEMEIN.cChilkat_Helper.UnlockCilkat()
|
||||
|
||||
If apiSettingsloaded = False Then Return "400"
|
||||
|
||||
Dim rest As New Chilkat.Rest
|
||||
Dim success As Boolean
|
||||
|
||||
rest.AddHeader("Authorization", "Bearer <YOUR_JWT_HERE>")
|
||||
|
||||
Dim sbResponseBody As New Chilkat.StringBuilder
|
||||
success = rest.FullRequestNoBodySb("GET", "/v1/access", sbResponseBody)
|
||||
If (success <> True) Then
|
||||
Return rest.LastErrorText
|
||||
End If
|
||||
|
||||
Dim respStatusCode As Integer = rest.ResponseStatusCode
|
||||
Debug.WriteLine("response status code = " & respStatusCode)
|
||||
If (respStatusCode >= 400) Then
|
||||
Debug.WriteLine("Response Status Code = " & respStatusCode)
|
||||
Debug.WriteLine("Response Header:")
|
||||
Debug.WriteLine(rest.ResponseHeader)
|
||||
Debug.WriteLine("Response Body:")
|
||||
Debug.WriteLine(sbResponseBody.GetAsString())
|
||||
Return respStatusCode & " " & sbResponseBody.GetAsString()
|
||||
End If
|
||||
|
||||
|
||||
Dim jsonResponse As New Chilkat.JsonObject
|
||||
jsonResponse.LoadSb(sbResponseBody)
|
||||
|
||||
jsonResponse.EmitCompact = False
|
||||
Debug.WriteLine(jsonResponse.Emit())
|
||||
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
Shared Sub setSearchParam(ByRef rest As Chilkat.Rest, ByRef company As Company)
|
||||
|
||||
|
||||
@@ -352,15 +352,30 @@ End Class
|
||||
Public Class cDigicustAPI
|
||||
|
||||
'PROD
|
||||
Shared API_STRING As String = "https://api.digicust.com"
|
||||
Shared API_STRING As String
|
||||
Shared token As String = ""
|
||||
Shared api As New DataTable
|
||||
Shared refresh_token As String = ""
|
||||
Public dataTable As New DataTable()
|
||||
Dim sql As New 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 _token As String) As String
|
||||
|
||||
Try
|
||||
|
||||
Dim session = New cDigicustSessions()
|
||||
|
||||
If Not IsDBNull(session.token) AndAlso session.token IsNot Nothing Then
|
||||
@@ -371,6 +386,8 @@ Public Class cDigicustAPI
|
||||
|
||||
VERAG_PROG_ALLGEMEIN.cChilkat_Helper.UnlockCilkat()
|
||||
|
||||
If apiSettingsloaded = False Then Return "400"
|
||||
|
||||
Dim rest As New Chilkat.Rest
|
||||
Dim success As Boolean
|
||||
Dim bTls As Boolean = True
|
||||
@@ -385,8 +402,9 @@ Public Class cDigicustAPI
|
||||
End If
|
||||
|
||||
Dim json As New Chilkat.JsonObject
|
||||
success = json.UpdateString("username", "edv@verag.ag")
|
||||
success = json.UpdateString("password", "hbG&%RhpE6kjV@r")
|
||||
|
||||
success = json.UpdateString("username", api.Rows(0).Item("user"))
|
||||
success = json.UpdateString("password", api.Rows(0).Item("password"))
|
||||
|
||||
rest.AddHeader("Content-Type", contentType)
|
||||
|
||||
|
||||
@@ -4,22 +4,35 @@ Imports System.Runtime.Remoting
|
||||
Imports System.Text
|
||||
Imports System.Threading
|
||||
Imports System.Windows.Forms
|
||||
Imports DocumentFormat.OpenXml.Wordprocessing
|
||||
Imports Microsoft.Office.Interop.Outlook
|
||||
|
||||
Public Class cTimasAPI
|
||||
|
||||
Dim API_STRING = "https://zeit.verag.ag"
|
||||
Public API_STRING
|
||||
Dim API As New DataTable
|
||||
Dim rest As New Chilkat.Rest
|
||||
Dim SQL As New SQL
|
||||
Dim apiSettingsloaded As Boolean = False
|
||||
|
||||
|
||||
Sub New()
|
||||
Sub New(program As String)
|
||||
VERAG_PROG_ALLGEMEIN.cChilkat_Helper.UnlockCilkat()
|
||||
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
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Public Function checkConnectionTImas(ByRef failureText As String) As Boolean
|
||||
Try
|
||||
Dim success As Boolean
|
||||
If apiSettingsloaded = False Then Return False
|
||||
|
||||
rest.VerboseLogging = True
|
||||
Dim bTls As Boolean = True
|
||||
@@ -33,7 +46,7 @@ Public Class cTimasAPI
|
||||
Return False
|
||||
End If
|
||||
|
||||
success = rest.SetAuthBasic("admin", "BmWr501956")
|
||||
success = rest.SetAuthBasic(API.Rows(0).Item("api_user"), API.Rows(0).Item("api_password"))
|
||||
|
||||
If (success <> True) Then
|
||||
Debug.WriteLine("BAFailReason: " & rest.ConnectFailReason)
|
||||
|
||||
Reference in New Issue
Block a user