EDMI: Method NewFileAsync Improvements

This commit is contained in:
Jonathan Jenne
2021-06-28 16:40:21 +02:00
parent 5d296873be
commit 36b86ed9d1
10 changed files with 198 additions and 203 deletions

View File

@@ -1194,6 +1194,8 @@ Public Class frmGlobix_Index
NI_TITLE = "Error Globix-Import"
NI_MESSAGE = "The import was not successful - Check LogFile"
End If
MsgBox(NI_MESSAGE, MsgBoxStyle.Critical, NI_TITLE)
End If
'False oder True zurückgeben

View File

@@ -36,7 +36,7 @@ Public Class frmtest
Using oMemoryStream As New MemoryStream
oStream.CopyTo(oMemoryStream)
Dim oContents As Byte() = oMemoryStream.ToArray()
oResult = Await My.Application.Service.Client.ImportFileObjectAsync(oContents, My.Application.User.UserName, txtIDB_OBJ_ID.Text, 1, txtIDBFOPath.Text)
oResult = Await My.Application.Service.Client.ImportFileObjectAsync(oContents, My.Application.User.UserName, txtIDB_OBJ_ID.Text, "WORK", txtIDBFOPath.Text)
End Using
End Using
@@ -103,26 +103,25 @@ Public Class frmtest
txtFile2Import.Text = OpenFileDialog1.FileName
Using oStream As New FileStream(txtFile2Import.Text, FileMode.Open, FileAccess.Read)
Using oMemoryStream As New MemoryStream
oStream.CopyTo(oMemoryStream)
Dim oContents As Byte() = oMemoryStream.ToArray()
oResult = Await My.Application.Service.Client.ImportFileAsync(
txtFile2Import.Text,
Environment.UserName,
Date.Now,
"WORK",
1,
"DEFAULT",
New Client.ImportFileOptions With {
.KeepExtension = True
}
)
MsgBox($"File saved to: [{oResult}]")
'oResult = Await My.Application.Service.Client.ImportFileObjectAsync(oContents, My.Application.User.UserName, txtIDB_OBJ_ID.Text, 1, txtIDBFOPath.Text)
End Using
End Using
oResult = Await My.Application.Service.Client.NewFileAsync(
txtFile2Import.Text,
Environment.UserName,
Date.Now,
"WORK",
"DEFAULT",
New Client.ImportFileOptions With {
.KeepExtension = True
}
)
MsgBox($"File saved to: [{oResult}]")
'oResult = Await My.Application.Service.Client.ImportFileObjectAsync(oContents, My.Application.User.UserName, txtIDB_OBJ_ID.Text, 1, txtIDBFOPath.Text)
End Sub
Private Sub frmtest_Load(sender As Object, e As EventArgs) Handles MyBase.Load
End Sub
End Class