AAS, BenachrichtungenLayout, unboundSnd

This commit is contained in:
2024-11-02 22:19:30 +01:00
parent 82cd82243a
commit 6494cc6829
16 changed files with 427 additions and 162 deletions

View File

@@ -10,6 +10,8 @@ Imports System.Drawing.Drawing2D
Imports SDL
Imports Microsoft.Office.Interop
Imports Spire.Pdf.Texts
Imports System.Net
Imports System.Text
'Imports UID
@@ -4803,9 +4805,40 @@ Public Class frmHauptfenster
End Sub
Private Sub Button1_Click_1(sender As Object, e As EventArgs) Handles Button1.Click
saveLukowaPDFsFromTherefore()
Dim resp = GetDataFromSharePoint("https://dpdhl.sharepoint.com/sites/FRTTR-Verag", "TruckList", "al@verag.ag", "Muellerskuh1!")
MsgBox(resp)
'saveLukowaPDFsFromTherefore()
End Sub
Public Function GetDataFromSharePoint(siteUrl As String, listName As String, username As String, password As String) As String
' SharePoint-URL und Liste konfigurieren
Dim requestUrl As String = siteUrl & "/_api/web/lists/getbytitle('" & listName & "')/items"
' Authentifizierung: Benutzername und Passwort als Basis64
Dim credentials As String = Convert.ToBase64String(Encoding.ASCII.GetBytes(username & ":" & password))
' HTTP-Anfrage vorbereiten
Dim request As HttpWebRequest = CType(WebRequest.Create(requestUrl), HttpWebRequest)
request.Method = "GET"
request.Accept = "application/json;odata=verbose"
request.Headers("Authorization") = "Basic " & credentials
Try
' Antwort von SharePoint erhalten
Using response As HttpWebResponse = CType(request.GetResponse(), HttpWebResponse)
Using reader As New StreamReader(response.GetResponseStream())
Dim jsonResponse As String = reader.ReadToEnd()
Return jsonResponse
End Using
End Using
Catch ex As WebException
' Fehlerbehandlung
Return "Fehler: " & ex.Message
End Try
End Function
End Class
Public Class AvisoStatusFunctions