This commit is contained in:
SchreiberM
2017-01-20 10:16:04 +01:00
parent 3d78578381
commit 0d59a9613a
30 changed files with 7513 additions and 6350 deletions

View File

@@ -457,12 +457,22 @@ Public Class ClassImport_Windream
If LogErrorsOnly = False Then ClassLogger.Add(" >> Es konnte zugegriffen werden -> DATEI IST BEREITS VORHANDEN", False)
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?"
msg = "There 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)
Try
If ClassWindream.Delete_WDFile(_NewFileString.Substring(2) & extension) = True Then
WMObject = ClassWindream.oSession.GetNewWMObjectFS(WINDREAMLib.WMEntity.WMEntityDocument, _NewFileString.Substring(2) & extension, 31)
Else
Return False
End If
Catch ex As Exception
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error in Creating WindreamObject:", ex.Message)
Return False
End Try
Else
Do While FILE_EXISTS_IN_WD = True
If LogErrorsOnly = False Then ClassLogger.Add(" >> Attention File '" & _neuername & extension & "' is existing!", False)
@@ -471,14 +481,9 @@ Public Class ClassImport_Windream
FILE_EXISTS_IN_WD = ClassWindream.oSession.WMObjectExists(WINDREAMLib.WMEntity.WMEntityDocument, _NewFileString.Substring(2) & extension, 0, 0)
version = version + 1
Loop
WMObject = ClassWindream.oSession.GetNewWMObjectFS(WINDREAMLib.WMEntity.WMEntityDocument, _NewFileString.Substring(2) & extension, 31)
End If
Try
WMObject = ClassWindream.oSession.GetNewWMObjectFS(WINDREAMLib.WMEntity.WMEntityDocument, _NewFileString.Substring(2) & extension, 31)
Catch ex As Exception
ClassLogger.Add("Could not create the windremObject(File) COPY '" & _NewFileString.Substring(2) & extension & "': " & ex.Message, True)
Return False
End Try
If LogErrorsOnly = False Then ClassLogger.Add(" >> WMObject created after versioning", False)
End If
ClassWindream.STREAM_OBJECT = Nothing