EDMI: Move Object Status changes into Service

This commit is contained in:
Jonathan Jenne
2022-03-29 14:27:31 +02:00
parent 615666f040
commit abff7fa745
6 changed files with 31 additions and 22 deletions

View File

@@ -63,12 +63,6 @@ Public Class ctrlObjectPropertyDialog
.Language = Environment.User.Language,
.Username = Environment.User.UserName
})
Logger.Info("Updating Object State for Object [{0}]", ObjectId)
Await Client.SetObjectStateAsync(ObjectId, FileStore.OBJECT_STATE_METADATA_CHANGED, New Options.SetObjectStateOptions With {
.Language = Environment.User.Language,
.Username = Environment.User.UserName
})
Next
ErrorHandler.ShowInfoMessage($"{Changes.Count} Änderungen gespeichert!")
@@ -92,6 +86,10 @@ Public Class ctrlObjectPropertyDialog
End Function
Public Async Function LoadObject(pObjectId As Long, pEntityId As Long) As Task(Of Boolean)
If pObjectId = 0 Then
Return True
End If
IsLoading = True
Dim oLoadingHandle = SplashScreenManager.ShowOverlayForm(Me)

View File

@@ -223,11 +223,6 @@ Public Class frmObjectPropertyDialog
.Language = Environment.User.Language,
.Username = Environment.User.UserName
})
Logger.Info("Updating Object State for Object [{0}]", ObjectId)
Await Client.SetObjectStateAsync(ObjectId, IDB.FileStore.OBJECT_STATE_METADATA_CHANGED, New Options.SetObjectStateOptions With {
.Language = Environment.User.Language,
.Username = Environment.User.UserName
})
Next
ErrorHandler.ShowInfoMessage($"{Changes.Count} Änderungen gespeichert!")

View File

@@ -288,7 +288,6 @@ Public Class frmDocumentResultList
Public Async Sub Watcher_FileChanged(sender As Object, e As DocumentResultList.Watcher.FileChangedArgs) Handles Watcher.FileChanged
Try
Dim oDoctype As GlobalStateDoctype = Nothing
If e.File.Document.DocumentType IsNot Nothing Then
@@ -330,18 +329,10 @@ Public Class frmDocumentResultList
Private Async Function Watcher_OverwriteFile(pFile As DocumentResultList.Watcher.OpenFile) As Task
Await Watcher_UpdateFile(pFile, pCreateNewVersion:=False)
Await Client.SetObjectStateAsync(pFile.Document.Id, OBJECT_STATE_FILE_CHANGED, New Options.SetObjectStateOptions With {
.Language = Environment.User.Language,
.Username = Environment.User.UserName
})
End Function
Private Async Function Watcher_VersionFile(pFile As DocumentResultList.Watcher.OpenFile) As Task
Await Watcher_UpdateFile(pFile, pCreateNewVersion:=True)
Await Client.SetObjectStateAsync(pFile.Document.Id, OBJECT_STATE_FILE_VERSIONED, New Options.SetObjectStateOptions With {
.Language = Environment.User.Language,
.Username = Environment.User.UserName
})
End Function
Private Async Function Watcher_UpdateFile(pFile As DocumentResultList.Watcher.OpenFile, pCreateNewVersion As Boolean) As Task