MS
This commit is contained in:
@@ -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
|
||||
'#################################################################
|
||||
|
||||
Reference in New Issue
Block a user