Common/DocumentResultList: Catch errors better
This commit is contained in:
@@ -210,12 +210,6 @@ Public Class frmDocumentResultList
|
||||
DocumentViewer1.CloseDocument()
|
||||
|
||||
oDocumentInfo = _documentloader.Load(oObjectId, oFullPath)
|
||||
Dim oFileName = $"{oObjectId}.{oDocumentInfo.Extension}"
|
||||
|
||||
DocumentViewer1.LoadFile(oFileName, New MemoryStream(oDocumentInfo.Contents))
|
||||
|
||||
' Save reference to current
|
||||
_CurrentDocument = oDocumentInfo
|
||||
|
||||
' Check DocumentInfo
|
||||
If IsNothing(oDocumentInfo) Then
|
||||
@@ -223,6 +217,13 @@ Public Class frmDocumentResultList
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim oFileName = $"{oObjectId}.{oDocumentInfo.Extension}"
|
||||
|
||||
DocumentViewer1.LoadFile(oFileName, New MemoryStream(oDocumentInfo.Contents))
|
||||
|
||||
' Save reference to current
|
||||
_CurrentDocument = oDocumentInfo
|
||||
|
||||
If oDocumentInfo.AccessRight = Rights.AccessRight.VIEW_ONLY Then
|
||||
DocumentViewer1.SetViewOnly(True)
|
||||
RibbonPageGroup_Export.Visible = False
|
||||
|
||||
Reference in New Issue
Block a user