36 lines
1.2 KiB
VB.net
36 lines
1.2 KiB
VB.net
|
|
Imports DigitalData.Modules.Logging
|
|
Imports DigitalData.Modules.EDMI.API
|
|
Imports System.IO
|
|
|
|
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)
|
|
txtIDBFOPath.Text = oString
|
|
End Sub
|
|
|
|
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
|
|
Dim oString As String
|
|
oString = _Client.NewIDB_OBJ_ID("DOC", My.Application.User.UserName, "")
|
|
txtIDB_OBJ_ID.Text = oString
|
|
End Sub
|
|
|
|
Private Async Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
|
|
Dim oResult As Boolean
|
|
Dim oStream As New FileStream(TextBox1.Text, FileMode.Open)
|
|
Dim oContents(oStream.Length) As Byte
|
|
Dim oBytesRead = Await oStream.ReadAsync(oContents, 0, oStream.Length)
|
|
|
|
|
|
|
|
oResult = Await _Client.ImportIDBFOAsync(oContents, My.Application.User.UserName, txtIDB_OBJ_ID.Text, 1, txtIDBFOPath.Text)
|
|
If oResult = False Then
|
|
MsgBox("Oh no error", MsgBoxStyle.Critical)
|
|
Else
|
|
MsgBox("#Nailedit")
|
|
|
|
End If
|
|
End Sub
|
|
End Class |