Merge branch 'master' of http://172.24.11.74:90/scm/git/RecordOrganizer
This commit is contained in:
commit
dedebfae30
@ -107,6 +107,7 @@ Public Class ClassDatabase
|
||||
SQLcommand.CommandTimeout = 180
|
||||
Dim adapter1 As SqlClient.SqlDataAdapter = New SqlClient.SqlDataAdapter(SQLcommand)
|
||||
Dim dt As DataTable = New DataTable()
|
||||
|
||||
adapter1.Fill(dt)
|
||||
SQLconnect.Close()
|
||||
|
||||
@ -115,8 +116,12 @@ Public Class ClassDatabase
|
||||
Return dt
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in Return_Datatable: " & ex.Message & vbNewLine & vbNewLine & Select_anweisung, MsgBoxStyle.Critical)
|
||||
ClassHelper.InsertEssential_Log(CURRENT_RECORD_ID, "RECORD-ID", ex.Message & " - SQL: " & Select_anweisung
|
||||
ClassLogger.Add("Error in Return_Datatable: " & ex.Message, True)
|
||||
ClassLogger.Add(">> SQL: " & Select_anweisung, False)
|
||||
If (ex.Message.Contains("Ungültiger Objektname") Or ex.Message.Contains("Invalid Object Name")) And DD_LIB_Standards.clsDatabase.DB_PROXY_INITIALIZED Then
|
||||
MsgBox("A database-object could not be found but synchronization of Proxyserver might be in action! So please try again in a few seconds/minutes!", MsgBoxStyle.Exclamation)
|
||||
End If
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
@ -248,6 +253,7 @@ Public Class ClassDatabase
|
||||
'End If
|
||||
ClassLogger.Add("Error in Execute_non_Query: " & ex.Message)
|
||||
ClassLogger.Add("SQL: " & ExecuteCMD)
|
||||
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
@ -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
|
||||
'#################################################################
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user