Zooflow: use displayname
This commit is contained in:
@@ -32,6 +32,7 @@ Namespace DocumentResultList
|
||||
Public Property TempPath As String = Nothing
|
||||
Public Property FileHash As String = Nothing
|
||||
Public Property DocumentType As String = Nothing
|
||||
Public Property DisplayFileName As String = Nothing
|
||||
|
||||
Public Sub New(pPrimaryKey As Long)
|
||||
Id = pPrimaryKey
|
||||
|
||||
@@ -56,15 +56,17 @@ Namespace DocumentResultList
|
||||
Dim oDocumentInfo As DocumentInfo = Client.GetDocumentInfo(User.UserId, pObjectId)
|
||||
Dim oFileInfo As New FileInfo(oDocumentInfo.FullPath)
|
||||
|
||||
' Load Doctype Attribute
|
||||
' Load System Attributes
|
||||
Dim oDoctype As VariableValue = Client.GetVariableValue(pObjectId, Attributes.ATTRIBUTE_DOCTYPE)
|
||||
Dim oDisplayFileName As VariableValue = Client.GetVariableValue(pObjectId, Attributes.ATTRIBUTE_DISPLAY_FILENAME)
|
||||
|
||||
Dim oResultDocumentInfo As New Document(pObjectId) With {
|
||||
.Contents = Load_FromDisk(oDocumentInfo.FullPath),
|
||||
.AccessRight = oDocumentInfo.AccessRight,
|
||||
.FullPath = oDocumentInfo.FullPath,
|
||||
.Extension = oFileInfo.Extension.Substring(1),
|
||||
.DocumentType = oDoctype.Value
|
||||
.DocumentType = oDoctype.Value,
|
||||
.DisplayFileName = oDisplayFileName.Value
|
||||
}
|
||||
|
||||
Return oResultDocumentInfo
|
||||
@@ -81,8 +83,9 @@ Namespace DocumentResultList
|
||||
Return Nothing
|
||||
End If
|
||||
|
||||
' Load Doctype Attribute
|
||||
' Load System Attributes
|
||||
Dim oDoctype As VariableValue = Client.GetVariableValue(pObjectId, Attributes.ATTRIBUTE_DOCTYPE)
|
||||
Dim oDisplayFileName As VariableValue = Client.GetVariableValue(pObjectId, Attributes.ATTRIBUTE_DISPLAY_FILENAME)
|
||||
|
||||
Dim oResultDocumentInfo As New Document(pObjectId) With {
|
||||
.Contents = oFileObject._FileContents,
|
||||
@@ -90,7 +93,8 @@ Namespace DocumentResultList
|
||||
.AccessRight = Rights.AccessRight.FULL,
|
||||
.FileHash = oFileObject._FileHash,
|
||||
.FullPath = Nothing,
|
||||
.DocumentType = oDoctype.Value
|
||||
.DocumentType = oDoctype.Value,
|
||||
.DisplayFileName = oDisplayFileName.Value
|
||||
}
|
||||
|
||||
Return oResultDocumentInfo
|
||||
|
||||
@@ -315,6 +315,7 @@ Public Class frmDocumentResultList
|
||||
|
||||
Private Async Function Watcher_UpdateFile(pFile As DocumentResultList.Watcher.OpenFile, pCreateNewVersion As Boolean) As Task
|
||||
Dim oFileInfo As New FileInfo(pFile.FilePath)
|
||||
Dim oDisplayName As String = pFile.Document.DisplayFileName
|
||||
Dim oObjectId = Await _IDBClient.UpdateFileAsync(pFile.Document.Id, pFile.FilePath, New Options.UpdateFileOptions With {
|
||||
.CreateNewFileVersion = pCreateNewVersion,
|
||||
.Language = Environment.User.Language,
|
||||
@@ -322,16 +323,17 @@ Public Class frmDocumentResultList
|
||||
})
|
||||
|
||||
If IsNothing(oObjectId) Then
|
||||
MsgBox($"Beim Speichern der Datei '{oFileInfo.Name}' Fehler ist ein Fehler aufgetreten!", MsgBoxStyle.Critical, Text)
|
||||
MsgBox($"Beim Speichern der Datei '{oDisplayName}' Fehler ist ein Fehler aufgetreten!", MsgBoxStyle.Critical, Text)
|
||||
Else
|
||||
MsgBox($"Die Datei '{oFileInfo.Name}' wurde erfolgreich gespeichert!", MsgBoxStyle.Information, Text)
|
||||
MsgBox($"Die Datei '{oDisplayName}' wurde erfolgreich gespeichert!", MsgBoxStyle.Information, Text)
|
||||
RaiseEvent NeedsRefresh(Me, Params.ProfileGuid)
|
||||
End If
|
||||
End Function
|
||||
|
||||
Private Async Function Watcher_Ask(pFile As DocumentResultList.Watcher.OpenFile) As Task
|
||||
Dim oFileInfo = New FileInfo(pFile.FilePath)
|
||||
Dim oMessage = $"Die Datei '{oFileInfo.Name}' wurde außerhalb des Systems verändert. Wollen Sie diese Änderung als neue Version in das System übernehmen oder überschreiben?"
|
||||
Dim oDisplayName = pFile.Document.DisplayFileName
|
||||
Dim oMessage = $"Die Datei '{oDisplayName}' wurde außerhalb des Systems verändert. Wollen Sie diese Änderung als neue Version in das System übernehmen oder überschreiben?"
|
||||
|
||||
Dim oMessageBox As New MsgBoxEx(oMessage, "Datei verändert", MessageBoxIcon.Question)
|
||||
oMessageBox.SetButtons("Überschreiben", "Neue Version", "Abbrechen")
|
||||
|
||||
Reference in New Issue
Block a user