This commit is contained in:
2020-06-03 12:40:17 +02:00
parent 8cb37ee2a4
commit fcf3ad53a4
4 changed files with 197 additions and 210 deletions

View File

@@ -4607,6 +4607,8 @@ Public Class frmValidator
Catch ex As Exception
LOGGER.Warn($"Unexpected error in delete_active_File DocumentViewerValidator.Done: {ex.Message}")
End Try
Thread.Sleep(500)
Application.DoEvents()
'Aus der Tabelle löschen
Dim oDelete = $"DELETE FROM TBPM_PROFILE_FILES WHERE (GUID = {CURRENT_DOC_GUID})"
If ClassDatabase.Execute_non_Query(oDelete) = True Then
@@ -4635,10 +4637,24 @@ Public Class frmValidator
If CURRENT_WMFILE.aLocked Then
' unlock the windream object
CURRENT_WMFILE.unlock()
LOGGER.Debug("## Delete_WMFile WMFile unlocked! ##")
End If
CURRENT_WMFILE.Delete()
LOGGER.Info(">> Manuelles Löschen: Datei " & CURRENT_WMFILE.aName & " erfolgreich gelöscht")
Return True
Try
CURRENT_WMFILE.Delete()
LOGGER.Info("Manual deleting of file [" & CURRENT_WMFILE.aName & "] successfull!")
Return True
Catch ex As Exception
LOGGER.Warn($"Could not delete via windream-function - ERROR: [{ex.Message}] {vbNewLine} Trying system.io...")
Try
File.Delete(WMDocPathWindows)
LOGGER.Info("Deleting of file via system.io [" & WMDocPathWindows & "] successfull!")
Return True
Catch ex1 As Exception
LOGGER.Warn($"Could not delete via System.IO - ERROR: [{ex1.Message}] {vbNewLine} Trying system.io...")
Return False
End Try
End Try
Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Das windream-Objekt konnte nicht gelöscht werden!" & vbNewLine & vbNewLine & "Fehlermeldung:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
@@ -4870,4 +4886,6 @@ Public Class frmValidator
Dim Filename As String = String.Format($"DevExpressValidatorGridControl_{pProfilID}-{pControlID}.xml")
Return System.IO.Path.Combine(Application.UserAppDataPath(), Filename)
End Function
End Class