MS
This commit is contained in:
@@ -46,32 +46,31 @@ Public Class frmWD_IndexFile
|
||||
sw.Done()
|
||||
sw = New SW("CheckFileExists")
|
||||
Dim existsonlyasMaster = False
|
||||
If clsWD_GET.WDFile_exists(CURRENT_NEWFILENAME.Substring(2), clsDatabase.DB_PROXY_INITIALIZED, ClassProxy.MyLinkedServer, True) = True Then
|
||||
sw.Done()
|
||||
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
|
||||
If clsWD_GET.WDFile_exists(CURRENT_NEWFILENAME.Substring(2), clsDatabase.DB_PROXY_INITIALIZED, ClassProxy.MyLinkedServer) = True Then
|
||||
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
|
||||
If existsonlyasMaster = True Then
|
||||
CURRENT_NEWFILENAME = ClassHelper.Versionierung_Datei(CURRENT_NEWFILENAME)
|
||||
ClassHelper.InsertEssential_Log(CURRENT_RECORD_ID, "RECORD-ID", "NEW FILENAME: " & CURRENT_NEWFILENAME)
|
||||
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
|
||||
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
|
||||
CURRENT_NEWFILENAME = ClassHelper.Versionierung_Datei(CURRENT_NEWFILENAME)
|
||||
End If
|
||||
Else
|
||||
If clsWD_GET.WDFile_exists(CURRENT_NEWFILENAME.Substring(2), clsDatabase.DB_PROXY_INITIALIZED, ClassProxy.MyLinkedServer, True) = True Then
|
||||
ClassHelper.InsertEssential_Log(CURRENT_RECORD_ID, "RECORD-ID", "FILE ALREADY EXISTED WITH NON-USER RIGHTS: " & CURRENT_NEWFILENAME)
|
||||
CURRENT_NEWFILENAME = ClassHelper.Versionierung_Datei(CURRENT_NEWFILENAME)
|
||||
existsonlyasMaster = True
|
||||
Dim msg = "Eine Datei mit identischem Namen existiert bereits!" & vbNewLine & "Sie besitzen allerdings nicht die Rechte diese Datei zu bearbeiten." & vbNewLine & "Aus diesem Grund wird Ihre Datei versioniert!"
|
||||
If USER_LANGUAGE <> "de-DE" Then
|
||||
msg = "There is already a file with the same name!" & vbNewLine & "But You do not own the rights to work it." & vbNewLine & "Therefore Your file will be versioned!"
|
||||
End If
|
||||
MsgBox(msg, MsgBoxStyle.Information)
|
||||
End If
|
||||
|
||||
End If
|
||||
sw.Done()
|
||||
'#################################################################
|
||||
|
||||
Reference in New Issue
Block a user