Zooflow: WIP Client

This commit is contained in:
Jonathan Jenne 2021-07-19 16:41:26 +02:00
parent 464dc1d4ad
commit 0a19afdcd1
2 changed files with 55 additions and 5 deletions

View File

@ -40,6 +40,9 @@ Partial Class frmtest
Me.TextBox1 = New System.Windows.Forms.TextBox()
Me.Label1 = New System.Windows.Forms.Label()
Me.GroupBox1 = New System.Windows.Forms.GroupBox()
Me.ListBox1 = New System.Windows.Forms.ListBox()
Me.Button1 = New System.Windows.Forms.Button()
Me.txtAttributeName = New System.Windows.Forms.TextBox()
Me.GroupBox1.SuspendLayout()
Me.SuspendLayout()
'
@ -199,11 +202,38 @@ Partial Class frmtest
Me.GroupBox1.TabStop = False
Me.GroupBox1.Text = "Import Options"
'
'ListBox1
'
Me.ListBox1.FormattingEnabled = True
Me.ListBox1.Location = New System.Drawing.Point(653, 118)
Me.ListBox1.Name = "ListBox1"
Me.ListBox1.Size = New System.Drawing.Size(200, 329)
Me.ListBox1.TabIndex = 23
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(205, 142)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(187, 23)
Me.Button1.TabIndex = 17
Me.Button1.Text = "GetAttribute"
Me.Button1.UseVisualStyleBackColor = True
'
'txtAttributeName
'
Me.txtAttributeName.Location = New System.Drawing.Point(398, 144)
Me.txtAttributeName.Name = "txtAttributeName"
Me.txtAttributeName.Size = New System.Drawing.Size(165, 20)
Me.txtAttributeName.TabIndex = 24
Me.txtAttributeName.Text = "InvoiceNr"
'
'frmtest
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(865, 450)
Me.Controls.Add(Me.txtAttributeName)
Me.Controls.Add(Me.ListBox1)
Me.Controls.Add(Me.GroupBox1)
Me.Controls.Add(Me.TextBox1)
Me.Controls.Add(Me.DateTimePicker1)
@ -211,6 +241,7 @@ Partial Class frmtest
Me.Controls.Add(Me.Label5)
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.Label4)
Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.Button8)
Me.Controls.Add(Me.Button6)
Me.Controls.Add(Me.Button7)
@ -246,4 +277,7 @@ Partial Class frmtest
Friend WithEvents TextBox1 As TextBox
Friend WithEvents Label1 As Label
Friend WithEvents GroupBox1 As GroupBox
Friend WithEvents ListBox1 As ListBox
Friend WithEvents Button1 As Button
Friend WithEvents txtAttributeName As TextBox
End Class

View File

@ -3,6 +3,7 @@ Imports DigitalData.Modules.Logging
Imports DigitalData.Modules.EDMI.API
Imports System.IO
Imports System.Text
Imports DigitalData.Modules.EDMI.API.Client
Public Class frmtest
'Private Sub Button1_Click(sender As Object, e As EventArgs)
@ -97,12 +98,12 @@ Public Class frmtest
Private Async Sub Button8_Click(sender As Object, e As EventArgs) Handles Button8.Click
Dim oResult As Long = Await My.Application.Service.Client.NewFileAsync(
txtFile2Import.Text,
Environment.UserName,
DateTimePicker1.Value,
cmbObjectStoreType.Text,
"WORK",
"DEFAULT",
New Client.NewFileOptions With {
.KeepExtension = CheckBoxKeepExtension.Checked
New NewFileOptions With {
.KeepExtension = CheckBoxKeepExtension.Checked,
.Username = Environment.UserName,
.DateImported = DateTimePicker1.Value
}
)
@ -113,4 +114,19 @@ Public Class frmtest
Private Sub frmtest_Load(sender As Object, e As EventArgs) Handles MyBase.Load
cmbObjectStoreType.SelectedIndex = 0
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Try
Dim oValue = My.Application.Service.Client.GetVariableValue(txtIDB_OBJ_ID.Text, txtAttributeName.Text)
If oValue.Type Is Nothing Then
ListBox1.Items.Add("Value is nothing")
Else
ListBox1.Items.Add(oValue.Value)
End If
Catch ex As Exception
MsgBox(ex.ToString)
End Try
End Sub
End Class