EDMI: Update Service and Client to accept IDBDoctypeId instead of Business entity

This commit is contained in:
Jonathan Jenne
2022-03-09 14:08:51 +01:00
parent 8d4f327d96
commit 9e448641a0
12 changed files with 47 additions and 47 deletions

View File

@@ -113,10 +113,10 @@ Namespace IDB
End Try
End Function
Public Function NewObjectIdWithTransaction(pKindType As String, pBusinessEntity As String, pWho As String, pConnection As SqlConnection, pTransaction As SqlTransaction) As Long
Public Function NewObjectIdWithTransaction(pKindType As String, pIDBDoctypeId As Long, pWho As String, pConnection As SqlConnection, pTransaction As SqlTransaction) As Long
Try
Dim oNewObjectIdSQL = $"DECLARE @NEW_IDB_OBJ_ID BIGINT
EXEC PRIDB_NEW_OBJECT '{pKindType}','{pWho}','{pBusinessEntity}',0, @IDB_OBJ_ID = @NEW_IDB_OBJ_ID OUTPUT;
EXEC PRIDB_NEW_OBJECT '{pKindType}','{pWho}',{pIDBDoctypeId},0, @IDB_OBJ_ID = @NEW_IDB_OBJ_ID OUTPUT;
SELECT @NEW_IDB_OBJ_ID"
Dim oObjectId As Long = Database.GetScalarValueWithConnectionObject(oNewObjectIdSQL,
pConnection,

View File

@@ -64,7 +64,7 @@ Namespace Methods.GlobalIndexer.ImportFile
Dim oNewFile As New NewFile.NewFileMethod(LogConfig, DatabaseIDB, DatabaseECM, GlobalState)
Dim oResponse = oNewFile.Run(New NewFile.NewFileRequest With {
.File = pData.File,
.BusinessEntity = pData.BusinessEntity,
.IDBDoctypeId = pData.IDBDoctypeId,
.KindType = pData.KindType,
.StoreName = pData.StoreName,
.User = User

View File

@@ -19,10 +19,10 @@ Namespace Methods.GlobalIndexer.ImportFile
Public Property ProfileId As Integer
''' <summary>
''' The business entity of the file, ex DEFAULT
''' The Document Type of the file, ex. IncomingInvoice
''' </summary>
<DataMember>
Public Property BusinessEntity As String
Public Property IDBDoctypeId As String
''' <summary>
''' The kind of object to be created, ex. DOC

View File

@@ -28,7 +28,7 @@ Namespace Methods.IDB.NewFile
Try
Dim oObjectId = Helpers.NewObjectIdWithTransaction(pData.KindType, pData.BusinessEntity, pData.User.UserName, Connection, Transaction)
Dim oObjectId = Helpers.NewObjectIdWithTransaction(pData.KindType, pData.IDBDoctypeId, pData.User.UserName, Connection, Transaction)
If oObjectId = 0 Then
LogAndThrow("Could not create new ObjectId!")
End If

View File

@@ -18,7 +18,7 @@ Namespace Methods.IDB.NewFile
''' The business entity of the file, ex DEFAULT
''' </summary>
<DataMember>
Public Property BusinessEntity As String
Public Property IDBDoctypeId As Long
''' <summary>
''' The kind of object to be created, ex. DOC

View File

@@ -83,7 +83,7 @@ Namespace Methods.IDB.UpdateFile
Dim oNewFileMethod As New NewFile.NewFileMethod(LogConfig, DatabaseIDB, DatabaseECM, GlobalState)
Dim oNewFileRequest As New NewFile.NewFileRequest With {
.File = pData.File,
.BusinessEntity = oBusinessEntity,
.IDBDoctypeId = oBusinessEntity,
.KindType = oKind,
.StoreName = oStore,
.User = pData.User