MS FlowSearch EDMIService ObjectAdd

This commit is contained in:
2021-03-11 09:37:24 +01:00
parent 9346eb9534
commit c681bfb674
18 changed files with 484 additions and 55 deletions

View File

@@ -5,6 +5,9 @@
<section name="DigitalData.GUIs.ZooFlow.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<section name="DevExpress.LookAndFeel.Design.AppSettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="DigitalData.GUIs.ZooFlow.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
</configSections>
<connectionStrings>
<add name="DigitalData.GUIs.ZooFlow.Settings.IDBConnectionStringDEFAULT"
@@ -110,4 +113,11 @@
<!--<add name="EventLog" type="System.Diagnostics.EventLogTraceListener" initializeData="APPLICATION_NAME"/> -->
</sharedListeners>
</system.diagnostics>
<userSettings>
<DigitalData.GUIs.ZooFlow.Settings>
<setting name="IDBOBJID" serializeAs="String">
<value>17255</value>
</setting>
</DigitalData.GUIs.ZooFlow.Settings>
</userSettings>
</configuration>

View File

@@ -14,7 +14,7 @@ Option Explicit On
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.4.0.0"), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.8.1.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Partial Friend NotInheritable Class Settings
Inherits Global.System.Configuration.ApplicationSettingsBase
@@ -94,6 +94,18 @@ Partial Friend NotInheritable Class Settings
Return CType(Me("DD_ECM_TESTConnectionString"),String)
End Get
End Property
<Global.System.Configuration.UserScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.DefaultSettingValueAttribute("17255")> _
Public Property IDBOBJID() As String
Get
Return CType(Me("IDBOBJID"),String)
End Get
Set
Me("IDBOBJID") = value
End Set
End Property
End Class
Namespace My

View File

@@ -28,5 +28,8 @@
&lt;/SerializableConnectionString&gt;</DesignTimeValue>
<Value Profile="(Default)">Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM_TEST;Persist Security Info=True;User ID=sa;Password=dd</Value>
</Setting>
<Setting Name="IDBOBJID" Type="System.String" Scope="User">
<Value Profile="(Default)">17255</Value>
</Setting>
</Settings>
</SettingsFile>

View File

@@ -456,6 +456,7 @@ Partial Class frmFlowSearch
Me.Controls.Add(Me.RibbonStatusBar1)
Me.Controls.Add(Me.RibbonControl1)
Me.IconOptions.Image = Global.DigitalData.GUIs.ZooFlow.My.Resources.Resources.Flow
Me.KeyPreview = True
Me.Name = "frmFlowSearch"
Me.Ribbon = Me.RibbonControl1
Me.StatusBar = Me.RibbonStatusBar1

View File

@@ -75,20 +75,7 @@ Public Class frmFlowSearch
End Sub
Private Sub txtSearch_TextChanged(sender As Object, e As EventArgs) Handles txtSearchTerm.TextChanged
Try
If txtSearchTerm.Text = String.Empty Then
Reset_Form()
Exit Sub
End If
lblFoundResult.Visible = False
Start_FlowSearch()
Catch ex As Exception
lblFoundResult.Text = "Unexpected error in FlowSearch - Check Your log"
lblFoundResult.Visible = True
Logger.Error(ex)
End Try
End Sub
Sub Reset_Form()
TileControlMatch.Groups.Clear()
@@ -146,9 +133,11 @@ Public Class frmFlowSearch
oNewTable = oNewTable.DefaultView.ToTable
'#### CREATE THE GROUPS FOR EACH ATTRIBUTE ####
Dim oCountGroup As Int16 = 0
For Each oGroupRow As DataRow In oNewTable.Rows
oCountGroup += 1
Dim oGroup As New TileGroup
oGroup.Text = $"{oGroupRow.Item(0).ToString} ({oGroupRow.Item(1).ToString} {Language_Term_Object})"
oGroup.Text = $"[{oCountGroup}] {oGroupRow.Item(0).ToString} ({oGroupRow.Item(1).ToString} {Language_Term_Object})"
oGroup.Tag = oGroupRow.Item(0)
oGroup.Visible = True
For Each oitemRow As DataRow In oResultsfromSearchDT.Rows
@@ -259,7 +248,7 @@ Public Class frmFlowSearch
End Function
Private Function GetResultString(CountObjects As Integer, CountAttribute As Integer, SearchContent As String) As String
Dim oResultString = $"wurden {CountObjects} Objekte" ' IIf(CountAttribute = 1, $"wurden {CountObjects} Objekte", $"wurden {CountObjects} Objekte in {CountAttribute} Attributen")
Dim oProfileString = IIf(CountAttribute = 1, "einem Attribut", $"{CountAttribute} Attributen")
Dim oProfileString = IIf(CountAttribute = 1, "[einem] Attribut", $"[{CountAttribute}] Attributen")
Dim oBase = "Es {0} in {1} für Ihre Suche nach '{2}' gefunden:"
Return String.Format(oBase, oResultString, oProfileString, SearchContent)
@@ -538,5 +527,22 @@ Public Class frmFlowSearch
Start_FlowSearch()
End Sub
Private Sub txtSearchTerm_KeyUp(sender As Object, e As KeyEventArgs) Handles txtSearchTerm.KeyUp
If e.KeyCode = Keys.Return Then
Try
If txtSearchTerm.Text = String.Empty Then
Reset_Form()
Exit Sub
End If
lblFoundResult.Visible = False
Start_FlowSearch()
Catch ex As Exception
lblFoundResult.Text = "Unexpected error in FlowSearch - Check Your log"
lblFoundResult.Visible = True
Logger.Error(ex)
End Try
End If
End Sub
End Class

View File

@@ -1002,6 +1002,8 @@ Public Class frmFlowForm
End Sub
Private Sub TestToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles TestToolStripMenuItem.Click
frmtest.Show()
End Sub
End Class

View File

@@ -22,83 +22,142 @@ Partial Class frmtest
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.txtIDBOBJID = New System.Windows.Forms.TextBox()
Me.Label1 = New System.Windows.Forms.Label()
Me.txtFilestoreType = New System.Windows.Forms.TextBox()
Me.Button1 = New System.Windows.Forms.Button()
Me.txtResult = New System.Windows.Forms.TextBox()
Me.txtIDBFOPath = New System.Windows.Forms.TextBox()
Me.txtDate = New System.Windows.Forms.TextBox()
Me.Label2 = New System.Windows.Forms.Label()
Me.Label3 = New System.Windows.Forms.Label()
Me.Button2 = New System.Windows.Forms.Button()
Me.txtIDB_OBJ_ID = New System.Windows.Forms.TextBox()
Me.Button3 = New System.Windows.Forms.Button()
Me.TextBox1 = New System.Windows.Forms.TextBox()
Me.Label1 = New System.Windows.Forms.Label()
Me.SuspendLayout()
'
'txtIDBOBJID
'
Me.txtIDBOBJID.Location = New System.Drawing.Point(27, 29)
Me.txtIDBOBJID.Name = "txtIDBOBJID"
Me.txtIDBOBJID.Size = New System.Drawing.Size(100, 20)
Me.txtIDBOBJID.TabIndex = 0
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Location = New System.Drawing.Point(24, 13)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(61, 13)
Me.Label1.TabIndex = 1
Me.Label1.Text = "IDB ObJ ID"
'
'txtFilestoreType
'
Me.txtFilestoreType.Location = New System.Drawing.Point(157, 29)
Me.txtFilestoreType.Location = New System.Drawing.Point(16, 62)
Me.txtFilestoreType.Name = "txtFilestoreType"
Me.txtFilestoreType.Size = New System.Drawing.Size(100, 20)
Me.txtFilestoreType.TabIndex = 2
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(293, 25)
Me.Button1.Location = New System.Drawing.Point(152, 58)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(75, 23)
Me.Button1.Size = New System.Drawing.Size(137, 23)
Me.Button1.TabIndex = 3
Me.Button1.Text = "getFileName"
Me.Button1.Text = "2. GetFileName"
Me.Button1.UseVisualStyleBackColor = True
'
'txtResult
'txtIDBFOPath
'
Me.txtResult.Location = New System.Drawing.Point(293, 54)
Me.txtResult.Name = "txtResult"
Me.txtResult.ReadOnly = True
Me.txtResult.Size = New System.Drawing.Size(495, 20)
Me.txtResult.TabIndex = 4
Me.txtIDBFOPath.Location = New System.Drawing.Point(152, 87)
Me.txtIDBFOPath.Name = "txtIDBFOPath"
Me.txtIDBFOPath.ReadOnly = True
Me.txtIDBFOPath.Size = New System.Drawing.Size(495, 20)
Me.txtIDBFOPath.TabIndex = 4
'
'txtDate
'
Me.txtDate.Location = New System.Drawing.Point(157, 55)
Me.txtDate.Location = New System.Drawing.Point(16, 101)
Me.txtDate.Name = "txtDate"
Me.txtDate.Size = New System.Drawing.Size(100, 20)
Me.txtDate.TabIndex = 5
'
'Label2
'
Me.Label2.AutoSize = True
Me.Label2.Location = New System.Drawing.Point(16, 43)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(72, 13)
Me.Label2.TabIndex = 6
Me.Label2.Text = "FileStoreType"
'
'Label3
'
Me.Label3.AutoSize = True
Me.Label3.Location = New System.Drawing.Point(16, 85)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(30, 13)
Me.Label3.TabIndex = 7
Me.Label3.Text = "Date"
'
'Button2
'
Me.Button2.Location = New System.Drawing.Point(12, 12)
Me.Button2.Name = "Button2"
Me.Button2.Size = New System.Drawing.Size(277, 23)
Me.Button2.TabIndex = 8
Me.Button2.Text = "1. Get IDB_OBJ_ID"
Me.Button2.UseVisualStyleBackColor = True
'
'txtIDB_OBJ_ID
'
Me.txtIDB_OBJ_ID.DataBindings.Add(New System.Windows.Forms.Binding("Text", Global.DigitalData.GUIs.ZooFlow.Settings.Default, "IDBOBJID", True, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged))
Me.txtIDB_OBJ_ID.Location = New System.Drawing.Point(295, 12)
Me.txtIDB_OBJ_ID.Name = "txtIDB_OBJ_ID"
Me.txtIDB_OBJ_ID.Size = New System.Drawing.Size(100, 20)
Me.txtIDB_OBJ_ID.TabIndex = 9
Me.txtIDB_OBJ_ID.Text = Global.DigitalData.GUIs.ZooFlow.Settings.Default.IDBOBJID
'
'Button3
'
Me.Button3.Location = New System.Drawing.Point(16, 188)
Me.Button3.Name = "Button3"
Me.Button3.Size = New System.Drawing.Size(175, 23)
Me.Button3.TabIndex = 10
Me.Button3.Text = "3. Import/StreamFile"
Me.Button3.UseVisualStyleBackColor = True
'
'TextBox1
'
Me.TextBox1.Location = New System.Drawing.Point(16, 162)
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.Size = New System.Drawing.Size(631, 20)
Me.TextBox1.TabIndex = 11
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Location = New System.Drawing.Point(16, 143)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(58, 13)
Me.Label1.TabIndex = 12
Me.Label1.Text = "File2Import"
'
'frmtest
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(800, 450)
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.TextBox1)
Me.Controls.Add(Me.Button3)
Me.Controls.Add(Me.txtIDB_OBJ_ID)
Me.Controls.Add(Me.Button2)
Me.Controls.Add(Me.Label3)
Me.Controls.Add(Me.Label2)
Me.Controls.Add(Me.txtDate)
Me.Controls.Add(Me.txtResult)
Me.Controls.Add(Me.txtIDBFOPath)
Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.txtFilestoreType)
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.txtIDBOBJID)
Me.Name = "frmtest"
Me.Text = "frmtest"
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents txtIDBOBJID As TextBox
Friend WithEvents Label1 As Label
Friend WithEvents txtFilestoreType As TextBox
Friend WithEvents Button1 As Button
Friend WithEvents txtResult As TextBox
Friend WithEvents txtIDBFOPath As TextBox
Friend WithEvents txtDate As TextBox
Friend WithEvents Label2 As Label
Friend WithEvents Label3 As Label
Friend WithEvents Button2 As Button
Friend WithEvents txtIDB_OBJ_ID As TextBox
Friend WithEvents Button3 As Button
Friend WithEvents TextBox1 As TextBox
Friend WithEvents Label1 As Label
End Class

View File

@@ -1,10 +1,36 @@
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(txtIDBOBJID.Text, txtFilestoreType.Text, txtDate.Text)
txtResult.Text = oString
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