Merge branch 'master' of http://git.dd:3000/AppStd/EnvelopeGenerator
This commit is contained in:
@@ -128,14 +128,22 @@ Public MustInherit Class BaseController
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function DeleteDocumentsFromDisk(pEnvelope As Envelope) As Boolean
|
Public Function DeleteDocumentsFromDisk(pEnvelope As Envelope) As Boolean
|
||||||
Return pEnvelope.Documents.
|
If Not IsNothing(pEnvelope.Documents) Then
|
||||||
Select(Function(d) DeleteDocumentFromDisk(d)).
|
Return pEnvelope.Documents.
|
||||||
All(Function(r) r = True)
|
Select(Function(d) DeleteDocumentFromDisk(d)).
|
||||||
|
All(Function(r) r = True)
|
||||||
|
Else
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function DeleteDocumentFromDisk(pDocument As EnvelopeDocument) As Boolean
|
Public Function DeleteDocumentFromDisk(pDocument As EnvelopeDocument) As Boolean
|
||||||
Try
|
Try
|
||||||
IO.File.Delete(pDocument.Filepath)
|
If IO.File.Exists(pDocument.Filepath) Then
|
||||||
|
IO.File.Delete(pDocument.Filepath)
|
||||||
|
End If
|
||||||
|
|
||||||
Return True
|
Return True
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Logger.Error(ex)
|
Logger.Error(ex)
|
||||||
|
|||||||
@@ -369,11 +369,11 @@ Partial Public Class frmEnvelopeEditor
|
|||||||
End If
|
End If
|
||||||
System.IO.File.Move(pSourcePath, pDestinationPath)
|
System.IO.File.Move(pSourcePath, pDestinationPath)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MsgBox(ex.Message, MsgBoxStyle.Critical, "Unexpected error in FileMove")
|
MsgBox(ex.Message, MsgBoxStyle.Critical, "Unexpected error in MoveFileWithNetUse")
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
Else
|
Else
|
||||||
MsgBox("Fehler beim Verbinden mit dem Netzwerkziel.", MsgBoxStyle.Critical)
|
MsgBox("Error while connecting to network: " & pDestinationPath, MsgBoxStyle.Critical, "Unexpected error in MoveFileWithNetUse")
|
||||||
End If
|
End If
|
||||||
End Using
|
End Using
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
Reference in New Issue
Block a user