Version 2.3.7.5, merge

Merge branch 'Bereinigung_LoadProfil'
This commit is contained in:
Jonathan Jenne
2022-06-27 12:41:41 +02:00
5 changed files with 275 additions and 320 deletions

View File

@@ -511,8 +511,8 @@ Public Class frmValidator
End Try
End Sub
Sub Reset_CurrentReferences()
CURRENT_DOC_ID = 0
CURRENT_DOC_GUID = 0
LOGGER.Info("Attention: Reset_CurrentReferences....")
If Not IsNothing(DT_AdditionalSearches_Resultset_Docs) Then
DT_AdditionalSearches_Resultset_Docs.Clear()
End If
@@ -2342,28 +2342,40 @@ Public Class frmValidator
Try
LOGGER.Debug("Get_Next_GUID...")
Dim oNewGUID As Integer
LOGGER.Debug("Old Document_Path: " & OLD_Document_Path)
Dim oBIT As Integer = 0
If PROFIL_sortbynewest = True Then
oBIT = 1
End If
Dim oSQL = $"EXEC PRPM_GET_NEXT_DOC_INFO {CURRENT_ProfilGUID},{CURRENT_DOC_ID},{USER_ID}"
'Dim oSQL = $"SELECT * from [dbo].[FNPM_GET_NEXT_DOC_INFO] ({CURRENT_ProfilGUID},{oBIT},{CURRENT_DOC_GUID},'{USER_USERNAME}')"
Dim oDT As DataTable = DatabaseFallback.GetDatatableECM(oSQL)
CURRENT_DOC_ID = 0
CURRENT_DOC_GUID = 0
If oDT.Rows.Count > 0 Then
oNewGUID = oDT.Rows(0).Item(0)
CURRENT_DOC_ID = oDT.Rows(0).Item(1)
Try
oNewGUID = oDT.Rows(0).Item(0)
Catch ex As Exception
LOGGER.Warn($">> Attention: in GetNextGUID - Could not get the next GUID - SQL [{oSQL}]")
LOGGER.Warn($"ERRORMESSAGE [{ex.Message}]")
End Try
Try
CURRENT_DOC_ID = oDT.Rows(0).Item(1)
LOGGER.Debug($"Get_Next_GUID: CURRENT_DOC_ID [{CURRENT_DOC_ID}]...")
Catch ex As Exception
LOGGER.Warn($">> Attention: in GetNextGUID - Could not get the next DocID - SQL [{oSQL}]")
LOGGER.Warn($"ERRORMESSAGE [{ex.Message}]")
End Try
Try
Amount_Docs2Validate = oDT.Rows(0).Item(2)
LOGGER.Debug($"Get_Next_GUID: Amount_Docs2Validate [{Amount_Docs2Validate}]...")
Catch ex As Exception
Amount_Docs2Validate = 0
LOGGER.Warn("Amount_Docs2Validate Error: " & ex.Message)
End Try
Else
LOGGER.Info(" >> Attention: in GetNextGUID - Could not get a GUID(1)")
LOGGER.Info($">> Attention: GetNextGUID - Could not get the next GUID - SQL [{oSQL}]")
oNewGUID = 0
Return oNewGUID
End If
@@ -2550,7 +2562,12 @@ Public Class frmValidator
If USER_LANGUAGE <> "de-DE" Then
omsg = $"Remaining documents: {omsg}"
End If
bsiInformation.Caption = omsg
If Amount_Docs2Validate > 0 Then
bsiInformation.Caption = omsg
Else
bsiInformation.Caption = "Could not get the amount of remaining docs!"
End If
bsiDocID.Caption = "Document-ID: " & CURRENT_DOC_ID & " - GUID: " & CURRENT_DOC_GUID
LOGGER.Debug("AllDocInfo created...")
@@ -5531,13 +5548,11 @@ Public Class frmValidator
End Sub
Sub Datei_ueberspringen()
Try
LOGGER.Debug("Dokument überspringen")
LOGGER.Debug("Skipping document....(Datei_ueberspringen)")
'Das Dokument freigeben
Free_File()
Dim oSQL = $"EXECUTE PRPM_FILES_NOT_INDEXED '{USER_USERNAME}',{CURRENT_ProfilGUID},'{WMDocPathWindows}',{CURRENT_DOC_GUID}"
DatabaseFallback.ExecuteNonQueryECM(oSQL)
LOGGER.Debug($"Skipped DocGUID {CURRENT_DOC_GUID}")
Load_Next_Document(False)
Catch ex As Exception