BIG CLEANUP

This commit is contained in:
Jonathan Jenne
2022-02-15 16:28:43 +01:00
parent 8d42a486ed
commit 1b7675a1b4
29 changed files with 1117 additions and 2113 deletions

View File

@@ -17,10 +17,10 @@ Public Class frmIndex
#Region "+++++ Variablen ++++++"
Public vPathFile As String
Private MULTIFILES As Integer
Private akttxtbox As TextBox
Private ReadOnly akttxtbox As TextBox
Dim DT_INDEXEMAN As DataTable
Public FormLoaded As Boolean = False
Private Shared _Instance As frmIndex = Nothing
Private Shared ReadOnly _Instance As frmIndex = Nothing
Dim DropType As String
Private Shared WDDirect As Boolean = False
@@ -46,7 +46,7 @@ Public Class frmIndex
Private Property DocTypes As New List(Of DocType)
Private _Logger As Logger
Private ReadOnly _Logger As Logger
#End Region
@@ -292,7 +292,10 @@ Public Class frmIndex
Dim oErgebnis
'Welcher Provider?
If vProvider.ToLower = "oracle" Then
oErgebnis = ClassDatabase.OracleExecute_Scalar(SQLCommand, oConnectionString)
'oErgebnis = ClassDatabase.OracleExecute_Scalar(SQLCommand, oConnectionString)
LOGGER.Warn("Oracle Database Queries are not supported")
Else 'im Moment nur SQL-Server
oErgebnis = DATABASE_ECM.GetScalarValueWithConnection(SQLCommand, oConnectionString)
End If
@@ -680,7 +683,7 @@ Public Class frmIndex
NewFileString = _neuername
Else
Do While File.Exists(_neuername)
version = version + 1
version += 1
_neuername = Stammname.Replace(extension, "") & VERSION_DELIMITER & version & extension
NewFileString = _neuername
Loop
@@ -755,13 +758,13 @@ Public Class frmIndex
End If
End If
_Logger.Debug($"Manueller Indexvalue [{idxvalue.ToString}]...NOW THE INDEXING...")
_Logger.Debug($"Manueller Indexvalue [{idxvalue}]...NOW THE INDEXING...")
Count += 1
' den Typ des Zielindexes auslesen
Dim oIndexType As Integer = WINDREAM.GetIndexType(indexname)
_Logger.Debug($"oIndexType [{oIndexType.ToString}]...")
_Logger.Debug($"oIndexType [{oIndexType}]...")
If oIndexType < WINDREAM.WMObjectVariableValueTypeVector Then
_Logger.Debug($"Indexing oIndexType < WINDREAM.WMObjectVariableValueTypeVector...")
indexierung_erfolgreich = WINDREAM.SetFileIndex(CURRENT_NEWFILENAME, indexname, idxvalue, CURR_DOKART_OBJECTTYPE)
@@ -863,7 +866,7 @@ Public Class frmIndex
End Function
Private Function WriteIndex2File(pIndexName As String, pIndexValue As String)
Try
_Logger.Info($"Indexing with Name {pIndexName} and Value: {pIndexValue.ToString}")
_Logger.Info($"Indexing with Name {pIndexName} and Value: {pIndexValue}")
Return WINDREAM.SetFileIndex(CURRENT_NEWFILENAME, pIndexName, pIndexValue, CURR_DOKART_OBJECTTYPE)
Catch ex As Exception
ShowErrorMessage(ex, "WriteIndex2File")
@@ -1381,7 +1384,7 @@ Public Class frmIndex
Dim Stammname As String = _NewFilename
Dim neuername As String = _NewFilename
Do While File.Exists(neuername)
version = version + 1
version += 1
neuername = Stammname.Replace(extension, "") & _versionTz & version & extension
CURRENT_NEWFILENAME = neuername
Loop
@@ -1440,7 +1443,7 @@ Public Class frmIndex
Else
MsgBox($"Please Index file completely{vbNewLine}(Abort 1 of Indexdialog)", MsgBoxStyle.Information)
End If
CancelAttempts = CancelAttempts + 1
CancelAttempts += 1
e.Cancel = True
Case 1
Dim result As MsgBoxResult
@@ -1768,7 +1771,7 @@ Public Class frmIndex
Dim oNewDestination = Path.Combine(WINDREAM.ClientBasePath, oNormalized)
If Directory.Exists(oDestination) = False Then
Dim oMessage = ""
Dim oMessage As String
If USER_LANGUAGE = "de-DE" Then
oMessage = $"Der Pfad für das ausgewählte Profil ist nicht erreichbar:{vbNewLine}[{oNewDestination}].{vbNewLine}{vbNewLine}Bitte wählen Sie ein anderes Profil."
@@ -2648,7 +2651,7 @@ Public Class frmIndex
Else
MsgBox("Please Index file completely" & vbNewLine & "(Abort 1 of Indexdialog)", MsgBoxStyle.Information)
End If
CancelAttempts = CancelAttempts + 1
CancelAttempts += 1
Case 1
Dim result As MsgBoxResult
If USER_LANGUAGE = LANG_DE Then
@@ -2750,7 +2753,7 @@ Public Class frmIndex
If WORK_FILE() = True Then
'Und nun die folgenden
Dim DTFiles2Work As DataTable = DATABASE_ECM.GetDatatable("SELECT * FROM TBGI_FILES_USER WHERE WORKED = 0 AND GUID <> " & CURRENT_WORKFILE_GUID & " AND UPPER(USER@WORK) = UPPER('" & Environment.UserName & "')")
If Not DTFiles2Work Is Nothing Then
If DTFiles2Work IsNot Nothing Then
Dim err = False
For Each filerow As DataRow In DTFiles2Work.Rows
CURRENT_WORKFILE_GUID = filerow.Item("GUID")