This commit is contained in:
Digital Data - Marlon Schreiber
2017-10-24 12:31:15 +02:00
parent c3f04c75f6
commit 41a79aca5c
3 changed files with 45 additions and 26 deletions

View File

@@ -45,26 +45,35 @@ Public Class frmWD_IndexFile
End If
sw.Done()
sw = New SW("CheckFileExists")
If clsWD_GET.WDFile_exists(CURRENT_NEWFILENAME.Substring(2), clsDatabase.DB_PROXY_INITIALIZED, ClassProxy.MyLinkedServer) = True Then
Dim existsonlyasMaster = False
If clsWD_GET.WDFile_exists(CURRENT_NEWFILENAME.Substring(2), clsDatabase.DB_PROXY_INITIALIZED, ClassProxy.MyLinkedServer, True) = True Then
sw.Done()
Dim msg = "Eine Datei mit identischem Namen existiert bereits! Wollen Sie die bestehende Datei ersetzen?"
If USER_LANGUAGE <> "de-DE" Then
msg = "There is already a file with the same name! Would You like to replace the file?"
If clsWD_GET.WDFile_exists(CURRENT_NEWFILENAME.Substring(2), clsDatabase.DB_PROXY_INITIALIZED, ClassProxy.MyLinkedServer) = True Then
ClassHelper.InsertEssential_Log(CURRENT_RECORD_ID, "RECORD-ID", "FILE ALREADY EXISTED WITH NON-USER RIGHTS: " & CURRENT_NEWFILENAME)
existsonlyasMaster = True
End If
Dim result As MsgBoxResult
result = MessageBox.Show(msg, "File alredy exists:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If result = MsgBoxResult.Yes Then
If clsWD_SET.Delete_WDFile(CURRENT_NEWFILENAME.Substring(2)) = False Then
Return False
End If
Else
If existsonlyasMaster = True Then
CURRENT_NEWFILENAME = ClassHelper.Versionierung_Datei(CURRENT_NEWFILENAME)
End If
Else
sw.Done()
End If
ClassHelper.InsertEssential_Log(CURRENT_RECORD_ID, "RECORD-ID", "NEW FILENAME: " & CURRENT_NEWFILENAME)
Else
Dim msg = "Eine Datei mit identischem Namen existiert bereits! Wollen Sie die bestehende Datei ersetzen?"
If USER_LANGUAGE <> "de-DE" Then
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
If clsWD_SET.Delete_WDFile(CURRENT_NEWFILENAME.Substring(2)) = False Then
Return False
End If
Else
CURRENT_NEWFILENAME = ClassHelper.Versionierung_Datei(CURRENT_NEWFILENAME)
End If
End If
End If
sw.Done()
'#################################################################
'Stream File to windream
'#################################################################