EDMI: Fix DoctypeId Parameter
This commit is contained in:
@@ -19,10 +19,10 @@ Namespace Methods.GlobalIndexer.ImportFile
|
||||
Public Property ProfileId As Integer
|
||||
|
||||
''' <summary>
|
||||
''' The Document Type of the file, ex. IncomingInvoice
|
||||
''' The Document Type, ex. 1
|
||||
''' </summary>
|
||||
<DataMember>
|
||||
Public Property IDBDoctypeId As String
|
||||
Public Property IDBDoctypeId As Long
|
||||
|
||||
''' <summary>
|
||||
''' The kind of object to be created, ex. DOC
|
||||
|
||||
@@ -22,7 +22,7 @@ Namespace Methods.IDB.ImportFile
|
||||
''' The Document Type of the file, ex. IncomingInvoice
|
||||
''' </summary>
|
||||
<DataMember>
|
||||
Public Property IDBDoctypeId As String
|
||||
Public Property IDBDoctypeId As Long
|
||||
|
||||
''' <summary>
|
||||
''' The kind of object to be created, ex. DOC
|
||||
|
||||
@@ -18,12 +18,12 @@ Namespace Methods.IDB.NewFile
|
||||
Transaction = Connection.BeginTransaction()
|
||||
End Sub
|
||||
|
||||
Public Function Run(pData As NewFile.NewFileRequest) As NewFile.NewFileResponse
|
||||
Public Function Run(pData As NewFileRequest) As NewFileResponse
|
||||
Dim oFilePath As String = Nothing
|
||||
|
||||
Dim oExistingObjectId = Helpers.TestFileChecksumExists(pData.File.FileChecksum)
|
||||
If oExistingObjectId > 0 Then
|
||||
Return New NewFile.NewFileResponse(oExistingObjectId)
|
||||
Return New NewFileResponse(oExistingObjectId)
|
||||
End If
|
||||
|
||||
Try
|
||||
@@ -134,7 +134,8 @@ Namespace Methods.IDB.NewFile
|
||||
' Finally, commit the transaction
|
||||
Transaction?.Commit()
|
||||
|
||||
Return New NewFile.NewFileResponse(oObjectId)
|
||||
Return New NewFileResponse(oObjectId)
|
||||
|
||||
Catch ex As Exception
|
||||
Logger.Warn("Error occurred while creating file!")
|
||||
Logger.Error(ex)
|
||||
@@ -152,7 +153,7 @@ Namespace Methods.IDB.NewFile
|
||||
Logger.Info("Rolling back transaction.")
|
||||
Transaction?.Rollback()
|
||||
|
||||
Return New NewFile.NewFileResponse(ex)
|
||||
Return New NewFileResponse(ex)
|
||||
|
||||
End Try
|
||||
End Function
|
||||
|
||||
@@ -15,7 +15,7 @@ Namespace Methods.IDB.NewFile
|
||||
Public Property StoreName As String
|
||||
|
||||
''' <summary>
|
||||
''' The business entity of the file, ex DEFAULT
|
||||
''' The Document Id of the file, ex. 1
|
||||
''' </summary>
|
||||
<DataMember>
|
||||
Public Property IDBDoctypeId As Long
|
||||
|
||||
@@ -72,18 +72,18 @@ Namespace Methods.IDB.UpdateFile
|
||||
Dim oObjectTable = DatabaseIDB.GetDatatable($"Select * FROM VWIDB_OBJECT WHERE IDB_OBJ_ID = {pData.ObjectId}")
|
||||
Dim oObjectRow As DataRow = oObjectTable.Rows.Item(0)
|
||||
Dim oKind As String = oObjectRow.Item("KIND_NAME")
|
||||
Dim oBusinessEntity As String = oObjectRow.Item("BE_NAME")
|
||||
Dim oDocumentTypeId As String = oObjectRow.Item("Doctype_ID")
|
||||
Dim oStore As String = oObjectRow.Item("STORE_NAME")
|
||||
|
||||
Logger.Debug("Getting information for ObjectId [{0}]", pData.ObjectId)
|
||||
Logger.Debug("DocumentType: [{0}]", oDocumentTypeId)
|
||||
Logger.Debug("Kind: [{0}]", oKind)
|
||||
Logger.Debug("BE: [{0}]", oBusinessEntity)
|
||||
Logger.Debug("Store: [{0}]", oStore)
|
||||
|
||||
Dim oNewFileMethod As New NewFile.NewFileMethod(LogConfig, DatabaseIDB, DatabaseECM, GlobalState)
|
||||
Dim oNewFileRequest As New NewFile.NewFileRequest With {
|
||||
.File = pData.File,
|
||||
.IDBDoctypeId = oBusinessEntity,
|
||||
.IDBDoctypeId = oDocumentTypeId,
|
||||
.KindType = oKind,
|
||||
.StoreName = oStore,
|
||||
.User = pData.User
|
||||
|
||||
Reference in New Issue
Block a user