This commit is contained in:
Jonathan Jenne 2021-03-11 11:22:57 +01:00
commit 2ef98e4a06
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

View File

@ -290,4 +290,32 @@ Public Class Client
Throw ex
End Try
End Function
Public Function NewIDB_OBJ_ID(pKindType As String, pWho As String, pBusinessEntity As String) As Long
Try
Dim oResponse = _channel.New_IDB_OBJECT(pKindType, pWho, pBusinessEntity)
Return oResponse
Catch ex As Exception
_logger.Error(ex)
Throw ex
End Try
End Function
Public Async Function ImportIDBFOAsync(pContent As Byte(), pWho As String, pIDB_OBJ_ID As Long, pObjectStoreID As Short, pIDBFOPath As String) As Task(Of Boolean)
Try
Dim oData As New DocumentImportIDBFORequest() With {
.Contents = pContent,
.pWho = pWho,
.pIDBFilePath = pIDBFOPath,
.pIDB_OBJ_ID = pIDB_OBJ_ID,
.pObjectStoreID = pObjectStoreID
}
Dim oResponse = Await _channel.ImportNewIDBFOAsync(oData)
Return oResponse.Result
Catch ex As Exception
_logger.Error(ex)
Throw ex
End Try
End Function
End Class

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is automatically generated by Visual Studio .Net. It is
used to store generic object data source configuration information.
Renaming the file extension or editing the content of this file may
cause the file to be unrecognizable by the program.
-->
<GenericObjectDataSource DisplayName="DocumentImportIDBFOResponse" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
<TypeInfo>DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentImportIDBFOResponse, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo>
</GenericObjectDataSource>

View File

@ -160,6 +160,24 @@
<wsdl:message name="IEDMIService_New_FileStore_Object_UnexpectedErrorFaultFault_FaultMessage">
<wsdl:part xmlns:q17="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Exceptions" name="detail" element="q17:UnexpectedErrorFault" />
</wsdl:message>
<wsdl:message name="IEDMIService_New_IDB_OBJECT_InputMessage">
<wsdl:part name="parameters" element="tns:New_IDB_OBJECT" />
</wsdl:message>
<wsdl:message name="IEDMIService_New_IDB_OBJECT_OutputMessage">
<wsdl:part name="parameters" element="tns:New_IDB_OBJECTResponse" />
</wsdl:message>
<wsdl:message name="IEDMIService_New_IDB_OBJECT_UnexpectedErrorFaultFault_FaultMessage">
<wsdl:part xmlns:q18="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Exceptions" name="detail" element="q18:UnexpectedErrorFault" />
</wsdl:message>
<wsdl:message name="DocumentImportIDBFORequest">
<wsdl:part name="parameters" element="tns:DocumentImportIDBFORequest" />
</wsdl:message>
<wsdl:message name="DocumentImportIDBFOResponse">
<wsdl:part name="parameters" element="tns:DocumentImportIDBFOResponse" />
</wsdl:message>
<wsdl:message name="IEDMIService_ImportNewIDBFO_UnexpectedErrorFaultFault_FaultMessage">
<wsdl:part xmlns:q19="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Exceptions" name="detail" element="q19:UnexpectedErrorFault" />
</wsdl:message>
<wsdl:portType name="IEDMIService">
<wsdl:operation name="Heartbeat">
<wsdl:input wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/Heartbeat" message="tns:IEDMIService_Heartbeat_InputMessage" />
@ -242,5 +260,15 @@
<wsdl:output wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/New_FileStore_ObjectResponse" message="tns:IEDMIService_New_FileStore_Object_OutputMessage" />
<wsdl:fault wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/New_FileStore_ObjectUnexpectedErrorFaultFault" name="UnexpectedErrorFaultFault" message="tns:IEDMIService_New_FileStore_Object_UnexpectedErrorFaultFault_FaultMessage" />
</wsdl:operation>
<wsdl:operation name="New_IDB_OBJECT">
<wsdl:input wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/New_IDB_OBJECT" message="tns:IEDMIService_New_IDB_OBJECT_InputMessage" />
<wsdl:output wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/New_IDB_OBJECTResponse" message="tns:IEDMIService_New_IDB_OBJECT_OutputMessage" />
<wsdl:fault wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/New_IDB_OBJECTUnexpectedErrorFaultFault" name="UnexpectedErrorFaultFault" message="tns:IEDMIService_New_IDB_OBJECT_UnexpectedErrorFaultFault_FaultMessage" />
</wsdl:operation>
<wsdl:operation name="ImportNewIDBFO">
<wsdl:input wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/ImportNewIDBFO" name="DocumentImportIDBFORequest" message="tns:DocumentImportIDBFORequest" />
<wsdl:output wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/ImportNewIDBFOResponse" name="DocumentImportIDBFOResponse" message="tns:DocumentImportIDBFOResponse" />
<wsdl:fault wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/ImportNewIDBFOUnexpectedErrorFaultFault" name="UnexpectedErrorFaultFault" message="tns:IEDMIService_ImportNewIDBFO_UnexpectedErrorFaultFault_FaultMessage" />
</wsdl:operation>
</wsdl:portType>
</wsdl:definitions>

View File

@ -242,4 +242,38 @@
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="New_IDB_OBJECT">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="KindType" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="pWho" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="pBusinessEntity" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="New_IDB_OBJECTResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="New_IDB_OBJECTResult" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="DocumentImportIDBFORequest">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="Contents" nillable="true" type="xs:base64Binary" />
<xs:element minOccurs="0" name="pIDBFilePath" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="pIDB_OBJ_ID" type="xs:long" />
<xs:element minOccurs="0" name="pObjectStoreID" type="xs:int" />
<xs:element minOccurs="0" name="pWho" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="DocumentImportIDBFOResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="Result" type="xs:boolean" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

View File

@ -454,6 +454,25 @@ Namespace EDMIServiceReference
<System.ServiceModel.OperationContractAttribute(Action:="http://DigitalData.Services.EDMIService/IEDMIService/New_FileStore_Object", ReplyAction:="http://DigitalData.Services.EDMIService/IEDMIService/New_FileStore_ObjectResponse"& _
"")> _
Function New_FileStore_ObjectAsync(ByVal IDB_OBJ_ID As Long, ByVal pStoreType As String, ByVal pDate As String) As System.Threading.Tasks.Task(Of String)
<System.ServiceModel.OperationContractAttribute(Action:="http://DigitalData.Services.EDMIService/IEDMIService/New_IDB_OBJECT", ReplyAction:="http://DigitalData.Services.EDMIService/IEDMIService/New_IDB_OBJECTResponse"), _
System.ServiceModel.FaultContractAttribute(GetType(EDMIServiceReference.UnexpectedErrorFault), Action:="http://DigitalData.Services.EDMIService/IEDMIService/New_IDB_OBJECTUnexpectedErro"& _
"rFaultFault", Name:="UnexpectedErrorFault", [Namespace]:="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Exceptio"& _
"ns")> _
Function New_IDB_OBJECT(ByVal KindType As String, ByVal pWho As String, ByVal pBusinessEntity As String) As String
<System.ServiceModel.OperationContractAttribute(Action:="http://DigitalData.Services.EDMIService/IEDMIService/New_IDB_OBJECT", ReplyAction:="http://DigitalData.Services.EDMIService/IEDMIService/New_IDB_OBJECTResponse")> _
Function New_IDB_OBJECTAsync(ByVal KindType As String, ByVal pWho As String, ByVal pBusinessEntity As String) As System.Threading.Tasks.Task(Of String)
'CODEGEN: Der Nachrichtenvertrag wird generiert, da der Wrappername (DocumentImportIDBFORequest) von Nachricht "DocumentImportIDBFORequest" nicht mit dem Standardwert (ImportNewIDBFO) übereinstimmt.
<System.ServiceModel.OperationContractAttribute(Action:="http://DigitalData.Services.EDMIService/IEDMIService/ImportNewIDBFO", ReplyAction:="http://DigitalData.Services.EDMIService/IEDMIService/ImportNewIDBFOResponse"), _
System.ServiceModel.FaultContractAttribute(GetType(EDMIServiceReference.UnexpectedErrorFault), Action:="http://DigitalData.Services.EDMIService/IEDMIService/ImportNewIDBFOUnexpectedErro"& _
"rFaultFault", Name:="UnexpectedErrorFault", [Namespace]:="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Exceptio"& _
"ns")> _
Function ImportNewIDBFO(ByVal request As EDMIServiceReference.DocumentImportIDBFORequest) As EDMIServiceReference.DocumentImportIDBFOResponse
<System.ServiceModel.OperationContractAttribute(Action:="http://DigitalData.Services.EDMIService/IEDMIService/ImportNewIDBFO", ReplyAction:="http://DigitalData.Services.EDMIService/IEDMIService/ImportNewIDBFOResponse")> _
Function ImportNewIDBFOAsync(ByVal request As EDMIServiceReference.DocumentImportIDBFORequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentImportIDBFOResponse)
End Interface
<System.Diagnostics.DebuggerStepThroughAttribute(), _
@ -626,6 +645,60 @@ Namespace EDMIServiceReference
End Sub
End Class
<System.Diagnostics.DebuggerStepThroughAttribute(), _
System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0"), _
System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced), _
System.ServiceModel.MessageContractAttribute(WrapperName:="DocumentImportIDBFORequest", WrapperNamespace:="http://DigitalData.Services.EDMIService", IsWrapped:=true)> _
Partial Public Class DocumentImportIDBFORequest
<System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="http://DigitalData.Services.EDMIService", Order:=0)> _
Public Contents() As Byte
<System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="http://DigitalData.Services.EDMIService", Order:=1)> _
Public pIDBFilePath As String
<System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="http://DigitalData.Services.EDMIService", Order:=2)> _
Public pIDB_OBJ_ID As Long
<System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="http://DigitalData.Services.EDMIService", Order:=3)> _
Public pObjectStoreID As Integer
<System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="http://DigitalData.Services.EDMIService", Order:=4)> _
Public pWho As String
Public Sub New()
MyBase.New
End Sub
Public Sub New(ByVal Contents() As Byte, ByVal pIDBFilePath As String, ByVal pIDB_OBJ_ID As Long, ByVal pObjectStoreID As Integer, ByVal pWho As String)
MyBase.New
Me.Contents = Contents
Me.pIDBFilePath = pIDBFilePath
Me.pIDB_OBJ_ID = pIDB_OBJ_ID
Me.pObjectStoreID = pObjectStoreID
Me.pWho = pWho
End Sub
End Class
<System.Diagnostics.DebuggerStepThroughAttribute(), _
System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0"), _
System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced), _
System.ServiceModel.MessageContractAttribute(WrapperName:="DocumentImportIDBFOResponse", WrapperNamespace:="http://DigitalData.Services.EDMIService", IsWrapped:=true)> _
Partial Public Class DocumentImportIDBFOResponse
<System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="http://DigitalData.Services.EDMIService", Order:=0)> _
Public Result As Boolean
Public Sub New()
MyBase.New
End Sub
Public Sub New(ByVal Result As Boolean)
MyBase.New
Me.Result = Result
End Sub
End Class
<System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")> _
Public Interface IEDMIServiceChannel
Inherits EDMIServiceReference.IEDMIService, System.ServiceModel.IClientChannel
@ -846,5 +919,44 @@ Namespace EDMIServiceReference
Public Function New_FileStore_ObjectAsync(ByVal IDB_OBJ_ID As Long, ByVal pStoreType As String, ByVal pDate As String) As System.Threading.Tasks.Task(Of String) Implements EDMIServiceReference.IEDMIService.New_FileStore_ObjectAsync
Return MyBase.Channel.New_FileStore_ObjectAsync(IDB_OBJ_ID, pStoreType, pDate)
End Function
Public Function New_IDB_OBJECT(ByVal KindType As String, ByVal pWho As String, ByVal pBusinessEntity As String) As String Implements EDMIServiceReference.IEDMIService.New_IDB_OBJECT
Return MyBase.Channel.New_IDB_OBJECT(KindType, pWho, pBusinessEntity)
End Function
Public Function New_IDB_OBJECTAsync(ByVal KindType As String, ByVal pWho As String, ByVal pBusinessEntity As String) As System.Threading.Tasks.Task(Of String) Implements EDMIServiceReference.IEDMIService.New_IDB_OBJECTAsync
Return MyBase.Channel.New_IDB_OBJECTAsync(KindType, pWho, pBusinessEntity)
End Function
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)> _
Function EDMIServiceReference_IEDMIService_ImportNewIDBFO(ByVal request As EDMIServiceReference.DocumentImportIDBFORequest) As EDMIServiceReference.DocumentImportIDBFOResponse Implements EDMIServiceReference.IEDMIService.ImportNewIDBFO
Return MyBase.Channel.ImportNewIDBFO(request)
End Function
Public Function ImportNewIDBFO(ByVal Contents() As Byte, ByVal pIDBFilePath As String, ByVal pIDB_OBJ_ID As Long, ByVal pObjectStoreID As Integer, ByVal pWho As String) As Boolean
Dim inValue As EDMIServiceReference.DocumentImportIDBFORequest = New EDMIServiceReference.DocumentImportIDBFORequest()
inValue.Contents = Contents
inValue.pIDBFilePath = pIDBFilePath
inValue.pIDB_OBJ_ID = pIDB_OBJ_ID
inValue.pObjectStoreID = pObjectStoreID
inValue.pWho = pWho
Dim retVal As EDMIServiceReference.DocumentImportIDBFOResponse = CType(Me,EDMIServiceReference.IEDMIService).ImportNewIDBFO(inValue)
Return retVal.Result
End Function
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)> _
Function EDMIServiceReference_IEDMIService_ImportNewIDBFOAsync(ByVal request As EDMIServiceReference.DocumentImportIDBFORequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentImportIDBFOResponse) Implements EDMIServiceReference.IEDMIService.ImportNewIDBFOAsync
Return MyBase.Channel.ImportNewIDBFOAsync(request)
End Function
Public Function ImportNewIDBFOAsync(ByVal Contents() As Byte, ByVal pIDBFilePath As String, ByVal pIDB_OBJ_ID As Long, ByVal pObjectStoreID As Integer, ByVal pWho As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentImportIDBFOResponse)
Dim inValue As EDMIServiceReference.DocumentImportIDBFORequest = New EDMIServiceReference.DocumentImportIDBFORequest()
inValue.Contents = Contents
inValue.pIDBFilePath = pIDBFilePath
inValue.pIDB_OBJ_ID = pIDB_OBJ_ID
inValue.pObjectStoreID = pObjectStoreID
inValue.pWho = pWho
Return CType(Me,EDMIServiceReference.IEDMIService).ImportNewIDBFOAsync(inValue)
End Function
End Class
End Namespace

View File

@ -237,6 +237,30 @@
<soap12:fault use="literal" name="UnexpectedErrorFaultFault" namespace="" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="New_IDB_OBJECT">
<soap12:operation soapAction="http://DigitalData.Services.EDMIService/IEDMIService/New_IDB_OBJECT" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
<wsdl:fault name="UnexpectedErrorFaultFault">
<soap12:fault use="literal" name="UnexpectedErrorFaultFault" namespace="" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="ImportNewIDBFO">
<soap12:operation soapAction="http://DigitalData.Services.EDMIService/IEDMIService/ImportNewIDBFO" style="document" />
<wsdl:input name="DocumentImportIDBFORequest">
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output name="DocumentImportIDBFOResponse">
<soap12:body use="literal" />
</wsdl:output>
<wsdl:fault name="UnexpectedErrorFaultFault">
<soap12:fault use="literal" name="UnexpectedErrorFaultFault" namespace="" />
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="EDMIService">
<wsdl:port name="NetTcpBinding_IEDMIService" binding="tns:NetTcpBinding_IEDMIService">

View File

@ -106,6 +106,9 @@
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentImportIDBFOResponse.datasource">
<DependentUpon>Reference.svcmap</DependentUpon>
</None>
<None Include="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentImportResponse.datasource">
<DependentUpon>Reference.svcmap</DependentUpon>
</None>

View File

@ -551,6 +551,49 @@ Public Class EDMIService
Return ""
End Try
End Function
Public Function NewIDB_Object(pKindType As String, pWho As String, pBusinessEntity As String) As String Implements IEDMIService.New_IDB_OBJECT
Try
Dim oSQL As String = $"DECLARE @NEW_IDB_OBJ_ID BIGINT
EXEC PRIDB_NEW_OBJECT '{pKindType}','{pWho}','{pBusinessEntity}',0, @IDB_OBJ_ID = @NEW_IDB_OBJ_ID OUTPUT;
SELECT @NEW_IDB_OBJ_ID"
Dim oObjectId = MSSQL_IDB.GetScalarValue(oSQL)
Return oObjectId
Catch ex As Exception
_Logger.Error(ex)
Return 0
End Try
End Function
Public Function ImportFileIDBFO(Data As DocumentImportIDBFORequest) As DocumentImportIDBFOResponse Implements IEDMIService.ImportNewIDBFO
Dim oObjectStore = GlobalState.ObjectStores.First()
Dim EDMIPath = New EDMI.File.Path(LogConfig, oObjectStore.Path)
Try
_Logger.Info("ImportFile: Saving file to path [{0}]", Data.pIDBFilePath)
Using oStream = New FileStream(Data.pIDBFilePath, FileMode.CreateNew)
oStream.Write(Data.Contents, 0, Data.Contents.Length)
oStream.Flush(True)
oStream.Close()
End Using
' insert into db
Dim oSQL As String = $"EXEC PRIDB_NEW_IDBFO '{Data.pIDBFilePath},'{Data.pWho}','{Data.pIDB_OBJ_ID}',{Data.pObjectStoreID}"
Dim oResult As Boolean = MSSQL_IDB.ExecuteNonQuery(oSQL)
Return New DocumentImportIDBFOResponse() With {.Result = oResult}
Catch ex As FaultException
_Logger.Error(ex)
Throw ex
Catch ex As Exception
_Logger.Error(ex)
Dim oDetails As New UnexpectedErrorFault(ex)
Throw New FaultException(Of UnexpectedErrorFault)(oDetails, oDetails.ErrorMessage)
End Try
End Function
Private Function GetDigitalDataFileObject(IDB_OBJ_ID As Long) As String
Return $"{IDB_OBJ_ID}.ddfo"
End Function

View File

@ -26,6 +26,27 @@ Namespace Messages
Public ObjectId As Long
End Class
#End Region
#Region "DocumentImportIDBFO"
<MessageContract>
Public Class DocumentImportIDBFORequest
<MessageBodyMember>
Public Contents() As Byte
<MessageBodyMember>
Public pWho As String
<MessageBodyMember>
Public pIDBFilePath As String
<MessageBodyMember>
Public pIDB_OBJ_ID As Long
<MessageBodyMember>
Public pObjectStoreID As Integer
End Class
<MessageContract>
Public Class DocumentImportIDBFOResponse
<MessageBodyMember>
Public Result As Boolean
End Class
#End Region
#Region "DocumentStream"
<MessageContract>

View File

@ -82,6 +82,13 @@ Interface IEDMIService
<OperationContract>
<FaultContract(GetType(UnexpectedErrorFault))>
Function New_FileStore_Object(IDB_OBJ_ID As Long, pStoreType As String, pDate As String) As String
<OperationContract>
<FaultContract(GetType(UnexpectedErrorFault))>
Function New_IDB_OBJECT(KindType As String, pWho As String, pBusinessEntity As String) As String
<OperationContract>
<FaultContract(GetType(UnexpectedErrorFault))>
Function ImportNewIDBFO(Data As DocumentImportIDBFORequest) As DocumentImportIDBFOResponse
#End Region
End Interface