This commit is contained in:
SchreiberM 2022-03-14 17:43:06 +01:00
parent 68d0e558f0
commit 1bbcf13f09
4 changed files with 9 additions and 7 deletions

View File

@ -1281,5 +1281,7 @@ Public Class frmFlowForm
ShowErrorMessage(ex) ShowErrorMessage(ex)
End Try End Try
End Sub End Sub
End Class End Class

View File

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

View File

@ -28,7 +28,7 @@ Namespace Methods.IDB.NewFile
Try Try
Dim oObjectId = Helpers.NewObjectIdWithTransaction(pData.KindType, pData.IDBDoctypeId, pData.User.UserName, Connection, Transaction) Dim oObjectId = Helpers.NewObjectIdWithTransaction(pData.KindType, pData.User.UserName, Connection, Transaction)
If oObjectId = 0 Then If oObjectId = 0 Then
LogAndThrow("Could not create new ObjectId!") LogAndThrow("Could not create new ObjectId!")
End If End If
@ -85,7 +85,6 @@ Namespace Methods.IDB.NewFile
'--------------------------------------------------------------------------- '---------------------------------------------------------------------------
Logger.Info("Creating IDB FileObject for ObjectId [{0}].", oObjectId) Logger.Info("Creating IDB FileObject for ObjectId [{0}].", oObjectId)
' Insert into DB ' Insert into DB
Dim oSQL As String = $"EXEC PRIDB_NEW_IDBFO Dim oSQL As String = $"EXEC PRIDB_NEW_IDBFO
'{oFinalPath}', '{oFinalPath}',
@ -95,7 +94,8 @@ Namespace Methods.IDB.NewFile
'{pData.File.FileChecksum}' , '{pData.File.FileChecksum}' ,
'{pData.User.UserName}', '{pData.User.UserName}',
'{oObjectId}', '{oObjectId}',
{oStore.Id}" {oStore.Id},
{pData.IDBDoctypeId}"
Dim oResult As Boolean = DatabaseIDB.ExecuteNonQueryWithConnectionObject(oSQL, Connection, ExternalTransaction, Transaction) Dim oResult As Boolean = DatabaseIDB.ExecuteNonQueryWithConnectionObject(oSQL, Connection, ExternalTransaction, Transaction)

View File

@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben: ' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.4.1.0")> <Assembly: AssemblyVersion("2.4.2.0")>
<Assembly: AssemblyFileVersion("2.4.1.0")> <Assembly: AssemblyFileVersion("2.4.2.0")>