From 0a19afdcd1f5e2aa42393a8603d48e3777e569e3 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Mon, 19 Jul 2021 16:41:26 +0200 Subject: [PATCH] Zooflow: WIP Client --- GUIs.ZooFlow/frmtest.Designer.vb | 34 ++++++++++++++++++++++++++++++++ GUIs.ZooFlow/frmtest.vb | 26 +++++++++++++++++++----- 2 files changed, 55 insertions(+), 5 deletions(-) diff --git a/GUIs.ZooFlow/frmtest.Designer.vb b/GUIs.ZooFlow/frmtest.Designer.vb index 442f0551..ecf67b08 100644 --- a/GUIs.ZooFlow/frmtest.Designer.vb +++ b/GUIs.ZooFlow/frmtest.Designer.vb @@ -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 diff --git a/GUIs.ZooFlow/frmtest.vb b/GUIs.ZooFlow/frmtest.vb index 7fc6a5d5..22fa53f5 100644 --- a/GUIs.ZooFlow/frmtest.vb +++ b/GUIs.ZooFlow/frmtest.vb @@ -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 \ No newline at end of file