This commit is contained in:
SchreiberM
2016-11-30 10:19:28 +01:00
parent c2f8ddd1c3
commit 0f374eecb2
37 changed files with 20587 additions and 10843 deletions

View File

@@ -455,14 +455,24 @@ Public Class ClassImport_Windream
Else
' wenn auf die Datei zugeriffen werden konnte ist sie bereits vorhanden -> Datum anhängen
If LogErrorsOnly = False Then ClassLogger.Add(" >> Es konnte zugegriffen werden -> DATEI IST BEREITS VORHANDEN", False)
Do While FILE_EXISTS_IN_WD = True
If LogErrorsOnly = False Then ClassLogger.Add(" >> Attention File '" & _neuername & extension & "' is existing!", False)
_neuername = Stammname & VERSION_DELIMITER & version
_NewFileString = _neuername
FILE_EXISTS_IN_WD = ClassWindream.oSession.WMObjectExists(WINDREAMLib.WMEntity.WMEntityDocument, _NewFileString.Substring(2) & extension, 0, 0)
version = version + 1
Loop
Dim msg = "Eine Datei mit identischem Namen existiert bereits! Wollen Sie die bestehende Datei ersetzen?"
If USER_LANGUAGE <> "de-DE" Then
msg = "Ther is already a file with the same name! Would You like to replace the file?"
End If
Dim result As MsgBoxResult
result = MessageBox.Show(msg, "File alredy exists:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If result = MsgBoxResult.Yes Then
WMObject = ClassWindream.oSession.GetNewWMObjectFS(WINDREAMLib.WMEntity.WMEntityDocument, _NewFileString.Substring(2) & extension, 31)
Else
Do While FILE_EXISTS_IN_WD = True
If LogErrorsOnly = False Then ClassLogger.Add(" >> Attention File '" & _neuername & extension & "' is existing!", False)
_neuername = Stammname & VERSION_DELIMITER & version
_NewFileString = _neuername
FILE_EXISTS_IN_WD = ClassWindream.oSession.WMObjectExists(WINDREAMLib.WMEntity.WMEntityDocument, _NewFileString.Substring(2) & extension, 0, 0)
version = version + 1
Loop
End If
Try
WMObject = ClassWindream.oSession.GetNewWMObjectFS(WINDREAMLib.WMEntity.WMEntityDocument, _NewFileString.Substring(2) & extension, 31)
Catch ex As Exception