diff --git a/GUIs.Common/DocumentResultList/Document.vb b/GUIs.Common/DocumentResultList/Document.vb
index aacc6dfa..1ef3c4d0 100644
--- a/GUIs.Common/DocumentResultList/Document.vb
+++ b/GUIs.Common/DocumentResultList/Document.vb
@@ -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
diff --git a/GUIs.Common/DocumentResultList/Loader.vb b/GUIs.Common/DocumentResultList/Loader.vb
index 52185407..cd1b4e52 100644
--- a/GUIs.Common/DocumentResultList/Loader.vb
+++ b/GUIs.Common/DocumentResultList/Loader.vb
@@ -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
diff --git a/GUIs.Common/frmDocumentResultList.vb b/GUIs.Common/frmDocumentResultList.vb
index b4b341c4..d9f588c4 100644
--- a/GUIs.Common/frmDocumentResultList.vb
+++ b/GUIs.Common/frmDocumentResultList.vb
@@ -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")
diff --git a/Modules.Base/Base/IDB/Attributes.vb b/Modules.Base/Base/IDB/Attributes.vb
index a6b62527..bf7bd740 100644
--- a/Modules.Base/Base/IDB/Attributes.vb
+++ b/Modules.Base/Base/IDB/Attributes.vb
@@ -1,6 +1,15 @@
Namespace IDB
Public Class Attributes
Public Const ATTRIBUTE_DOCTYPE = "Doctype"
+ Public Const ATTRIBUTE_DYNAMIC_FOLDER = "Dynamic Folder"
+
+ Public Const ATTRIBUTE_ORIGIN_FILENAME = "OriginFileName"
+ Public Const ATTRIBUTE_ORIGIN_CHANGED = "OriginChangedDatetime"
+ Public Const ATTRIBUTE_ORIGIN_CREATED = "OriginCreationDatetime"
+
+ Public Const ATTRIBUTE_DISPLAY_FILENAME = "DisplayFileName"
+ Public Const ATTRIBUTE_DISPLAY_FILENAME1 = "DisplayFileName1"
+
End Class
End Namespace
\ No newline at end of file
diff --git a/Service.EDMIService/EDMIService.vbproj b/Service.EDMIService/EDMIService.vbproj
index 00656f80..aae3abe5 100644
--- a/Service.EDMIService/EDMIService.vbproj
+++ b/Service.EDMIService/EDMIService.vbproj
@@ -242,6 +242,10 @@
+
+ {6ea0c51f-c2b1-4462-8198-3de0b32b74f8}
+ Base
+
{44982F9B-6116-44E2-85D0-F39650B1EF99}
Config
diff --git a/Service.EDMIService/Methods/GlobalIndexer/ImportFile/ImportFileMethod.vb b/Service.EDMIService/Methods/GlobalIndexer/ImportFile/ImportFileMethod.vb
index b3ea349a..ae764150 100644
--- a/Service.EDMIService/Methods/GlobalIndexer/ImportFile/ImportFileMethod.vb
+++ b/Service.EDMIService/Methods/GlobalIndexer/ImportFile/ImportFileMethod.vb
@@ -6,6 +6,7 @@ Imports DigitalData.Modules.Language
Imports DigitalData.Services.EDMIService.Methods.Database
Imports DigitalData.Services.EDMIService.Methods.IDB
Imports DigitalData.Modules.ZooFlow.State
+Imports DigitalData.Modules.Base.IDB
Namespace Methods.GlobalIndexer.ImportFile
Public Class ImportFileMethod
@@ -86,9 +87,10 @@ Namespace Methods.GlobalIndexer.ImportFile
Logger.Info("Collecting Attributes for ObjectId [{0}]", oResponse.ObjectId)
Dim oFinalAttributes As New Dictionary(Of String, List(Of String)) From {
- {"DisplayFileName", New List(Of String) From {oDisplayFilename}},
- {"Dynamic Folder", New List(Of String) From {oDynamicFilePath}}
+ {Attributes.ATTRIBUTE_DISPLAY_FILENAME, New List(Of String) From {oDisplayFilename}},
+ {Attributes.ATTRIBUTE_DYNAMIC_FOLDER, New List(Of String) From {oDynamicFilePath}}
}
+
oFinalAttributes = oFinalAttributes.
Concat(Helpers.UserAttributesToDictionary(oUserAttributes)).
Concat(Helpers.UserAttributesToDictionary(oAutoAttributes)).
diff --git a/Service.EDMIService/Methods/IDB/NewFile/NewFileMethod.vb b/Service.EDMIService/Methods/IDB/NewFile/NewFileMethod.vb
index 49251aaf..43a37ab1 100644
--- a/Service.EDMIService/Methods/IDB/NewFile/NewFileMethod.vb
+++ b/Service.EDMIService/Methods/IDB/NewFile/NewFileMethod.vb
@@ -1,4 +1,5 @@
Imports System.Data.SqlClient
+Imports DigitalData.Modules.Base.IDB
Imports DigitalData.Modules.Database
Imports DigitalData.Modules.Database.MSSQLServer.TransactionMode
Imports DigitalData.Modules.Logging
@@ -105,9 +106,9 @@ Namespace Methods.IDB.NewFile
'---------------------------------------------------------------------------
Dim oSystemAttributes As New Dictionary(Of String, Object) From {
- {"OriginFileName", pData.File.FileName},
- {"OriginCreationDatetime", pData.File.FileCreatedAt},
- {"OriginChangedDatetime", pData.File.FileChangedAt}
+ {Attributes.ATTRIBUTE_ORIGIN_FILENAME, pData.File.FileName},
+ {Attributes.ATTRIBUTE_ORIGIN_CREATED, pData.File.FileCreatedAt},
+ {Attributes.ATTRIBUTE_ORIGIN_CHANGED, pData.File.FileChangedAt}
}
For Each oAttribute As KeyValuePair(Of String, Object) In oSystemAttributes