EDMI: Method NewFileAsync Improvements
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user