MS Globix Verwaltung Integration

This commit is contained in:
2021-03-31 14:25:08 +02:00
parent 781a6ae55b
commit 445554295d
20 changed files with 859 additions and 30 deletions

View File

@@ -8,8 +8,18 @@ Public Class frmtest
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
My.Settings.Save()
Dim oString As String
oString = _Client.NewFileStoreObject(txtIDB_OBJ_ID.Text, txtFilestoreType.Text, txtDate.Text)
Dim oextension = ""
Dim oKeepExtension As Boolean = False
If CheckBoxKeepExtension.Checked Then
If txtFile2Import.Text <> String.Empty Then
oextension = Path.GetExtension(txtFile2Import.Text)
oKeepExtension = True
End If
End If
oString = _Client.NewFileStoreObject(txtIDB_OBJ_ID.Text, txtFilestoreType.Text, txtDate.Text, oextension, oKeepExtension)
txtIDBFOPath.Text = oString
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
@@ -24,7 +34,7 @@ Public Class frmtest
Using oStream As New FileStream(txtFile2Import.Text, FileMode.Open, FileAccess.Read)
Dim oContents(oStream.Length) As Byte
oStream.Read(oContents, 0, oStream.Length)
oStream.Read(oContents, 0, System.Convert.ToInt32(oStream.Length))
oResult = Await _Client.ImportIDBFOAsync(oContents, My.Application.User.UserName, txtIDB_OBJ_ID.Text, 1, txtIDBFOPath.Text)
End Using
@@ -42,12 +52,14 @@ Public Class frmtest
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
Try
Using oInputStream As New FileStream(txtIDBFOPath.Text, FileMode.Open)
Dim oextension = Path.GetExtension(txtFile2Import.Text)
Dim oContents(oInputStream.Length) As Byte
oInputStream.Read(oContents, 0, oInputStream.Length)
' convert string to stream
Using oMemoryStream As New MemoryStream(oContents)
Using oFileStream As New FileStream("d:\file.pdf", FileMode.Create, FileAccess.Write)
Using oFileStream As New FileStream($"E:\file.{oextension}", FileMode.Create, FileAccess.Write)
oMemoryStream.WriteTo(oFileStream)
End Using
End Using