general clean up, add file contents to getdocumentbyx methods

This commit is contained in:
Jonathan Jenne
2019-04-10 16:15:00 +02:00
parent dee5d33bb9
commit 696a8ddbf6
12 changed files with 196 additions and 44 deletions

View File

@@ -254,7 +254,13 @@ Public Class EDMService
oRow.Item("ORIGINAL_FILENAME")
)
Return New DocumentResult(oDocument)
TestFileExists(oDocument.ContainerId)
Dim oContainerPath = GetContainerPath(oDocument.ContainerId)
Dim oContainer As FileContainer = FileContainer.Load(LogConfig, AppConfig.ContainerPassword, oContainerPath)
Dim oContents As Byte() = oContainer.GetFile().Contents
Return New DocumentResult(oDocument, oContents)
Catch ex As Exception
Return New DocumentResult(ex.Message)
End Try
@@ -276,7 +282,13 @@ Public Class EDMService
oRow.Item("ORIGINAL_FILENAME")
)
Return New DocumentResult(oDocument)
TestFileExists(oDocument.ContainerId)
Dim oContainerPath = GetContainerPath(oDocument.ContainerId)
Dim oContainer As FileContainer = FileContainer.Load(LogConfig, AppConfig.ContainerPassword, oContainerPath)
Dim oContents As Byte() = oContainer.GetFile().Contents
Return New DocumentResult(oDocument, oContents)
Catch ex As Exception
Return New DocumentResult(ex.Message)
End Try

View File

@@ -38,6 +38,8 @@ Interface IEDMService
<OperationContract>
Function DeleteFile(DocObject As DocumentObject) As Boolean
#End Region
#Region "Utils"

View File

@@ -3,7 +3,7 @@
<Serializable>
<DataContract>
<KnownType(GetType(DBNull))>
Public Class BaseResult
Public MustInherit Class BaseResult
<DataMember>
Public Property OK As Boolean
<DataMember>