ms suchen

This commit is contained in:
2022-05-18 11:42:01 +02:00
parent 63736e83d3
commit 36e645ed84
4 changed files with 1005 additions and 1478 deletions

View File

@@ -103,6 +103,7 @@ Public Class frmValidator
Private Property OperationMode As OperationMode
Private ReadOnly Environment As Environment
Private AdditionalDocResultsExist As Boolean = False
Private AdditionalDataResultsExist As Boolean = False
Public Sub New(pEnvironment As Environment)
@@ -563,18 +564,17 @@ Public Class frmValidator
End If
End Function
Public Sub Load_Additional_Searches()
Public Sub Load_Additional_Searches(Preload As Boolean)
Try
AdditionalDocResultsExist = Test_Additional_Doc_Searches_Exist()
Dim oDataResultsExist = Test_Additional_Data_Searches_Exist()
AdditionalDataResultsExist = Test_Additional_Data_Searches_Exist()
'If Test_Additional_Searches_Exist() Then
If oDataResultsExist = True Or AdditionalDocResultsExist = True Then
If AdditionalDataResultsExist = True Or AdditionalDocResultsExist = True Then
Try
Dim oPnl1Collapsed As Boolean = True
Dim oPnl2Collapsed As Boolean = True
If oDataResultsExist = True Then
If AdditionalDataResultsExist = True Then
oPnl1Collapsed = False
Else
oPnl1Collapsed = True
@@ -584,27 +584,30 @@ Public Class frmValidator
Dim oCommand As String
Attmnt_bbtnitm_LoadonClick.Visibility = BarItemVisibility.Always
Attmt_bbtnitmShow.Visibility = BarItemVisibility.Always
If AdditionalDocResultsExist Then
If Preload = False Then
If AdditionalDocResultsExist Then
_frmValidatorSearch.TabPreload(oPnl1Collapsed, oPnl2Collapsed, BASEDATA_DT_PROFILE_SEARCHES_SQL.Rows.Count, DT_FILTERED_PROFILE_SEARCHES_DOC.Rows.Count,
BASEDATA_DT_PROFILE_SEARCHES_SQL, DT_FILTERED_PROFILE_SEARCHES_DOC)
_frmValidatorSearch._DTDocSearches = DT_FILTERED_PROFILE_SEARCHES_DOC
oConID = DT_FILTERED_PROFILE_SEARCHES_DOC.Rows(0).Item("CONN_ID")
oCommand = DT_FILTERED_PROFILE_SEARCHES_DOC.Rows(0).Item("SQL_COMMAND")
oCommand = clsPatterns.ReplaceAllValues(oCommand, PanelValidatorControl, True)
_frmValidatorSearch.RefreshTabDoc(oConID, oCommand, 0, DT_FILTERED_PROFILE_SEARCHES_DOC.Rows(0).Item("TAB_TITLE"))
_frmValidatorSearch.TabPreload(oPnl1Collapsed, oPnl2Collapsed, BASEDATA_DT_PROFILE_SEARCHES_SQL.Rows.Count, DT_FILTERED_PROFILE_SEARCHES_DOC.Rows.Count,
BASEDATA_DT_PROFILE_SEARCHES_SQL, DT_FILTERED_PROFILE_SEARCHES_DOC)
_frmValidatorSearch._DTDocSearches = DT_FILTERED_PROFILE_SEARCHES_DOC
oConID = DT_FILTERED_PROFILE_SEARCHES_DOC.Rows(0).Item("CONN_ID")
oCommand = DT_FILTERED_PROFILE_SEARCHES_DOC.Rows(0).Item("SQL_COMMAND")
oCommand = clsPatterns.ReplaceAllValues(oCommand, PanelValidatorControl, True)
_frmValidatorSearch.RefreshTabDoc(oConID, oCommand, 0, DT_FILTERED_PROFILE_SEARCHES_DOC.Rows(0).Item("TAB_TITLE"))
End If
If AdditionalDataResultsExist Then
_frmValidatorSearch._DTSQLSearches = BASEDATA_DT_PROFILE_SEARCHES_SQL
oConID = BASEDATA_DT_PROFILE_SEARCHES_SQL.Rows(0).Item("CONN_ID")
oCommand = BASEDATA_DT_PROFILE_SEARCHES_SQL.Rows(0).Item("SQL_COMMAND")
oCommand = clsPatterns.ReplaceAllValues(oCommand, PanelValidatorControl, True)
_frmValidatorSearch.Refresh_Load_GridSQL(oConID, oCommand, 0, BASEDATA_DT_PROFILE_SEARCHES_SQL.Rows(0).Item("TAB_TITLE"))
End If
End If
If oDataResultsExist Then
_frmValidatorSearch._DTSQLSearches = BASEDATA_DT_PROFILE_SEARCHES_SQL
oConID = BASEDATA_DT_PROFILE_SEARCHES_SQL.Rows(0).Item("CONN_ID")
oCommand = BASEDATA_DT_PROFILE_SEARCHES_SQL.Rows(0).Item("SQL_COMMAND")
oCommand = clsPatterns.ReplaceAllValues(oCommand, PanelValidatorControl, True)
_frmValidatorSearch.Refresh_Load_GridSQL(oConID, oCommand, 0, BASEDATA_DT_PROFILE_SEARCHES_SQL.Rows(0).Item("TAB_TITLE"))
End If
Catch ex As Exception
LOGGER.Error(ex)
End Try
@@ -612,11 +615,12 @@ Public Class frmValidator
bbtniRefreshSearches.Visibility = BarItemVisibility.Always
RibbonPageCustAttmt.Visible = True
Else
LOGGER.Debug("AdditionlSearhes result = false!")
bbtniRefreshSearches.Visibility = BarItemVisibility.Never
Attmnt_bbtnitm_LoadonClick.Visibility = BarItemVisibility.Never
Attmt_bbtnitmShow.Visibility = BarItemVisibility.Never
RibbonPageCustAttmt.Visible = False
LOGGER.Debug("Not loading AdditionalSearches 1...!")
End If
'Else
@@ -2569,18 +2573,6 @@ Public Class frmValidator
LOGGER.Debug("Indexmask loaded")
'Nun im Vektoprindex loggen das das Profil geladen wurde
'If PROFIL_VEKTORINDEX <> "" Then
' Dim Profilstring = "DD-PM" & PMDelimiter & "Profil: '" & PROFIL_NAME & "'" & PMDelimiter & USER_NAME & PMDelimiter & Now.ToString
' If Indexiere_VektorfeldPM(Profilstring, PROFIL_VEKTORINDEX) = False Then
' If LogErrorsOnly = False Then LOGGER.Info(" >> Profilname erfolgreich in Vektorfeld PM geschrieben")
' 'Else
' ' errormessage = "Fehler beim finalen Indexieren:" & vbNewLine & idxerr_message
' ' My.Settings.Save()
' ' frmError.ShowDialog()
' ' _error = True
' End If
'End If
'Nun loggen das das Profil geladen wurde
If PROFIL_LOGINDEX <> "" Then
Dim oLogString = $"PMProfile loaded: [{CURRENT_ProfilGUID}-{CURRENT_ProfilName}]{PMDelimiter}{USER_USERNAME}{PMDelimiter}{Now.ToString}"
@@ -3686,11 +3678,11 @@ Public Class frmValidator
Attmt_bbtnitmShow.Visibility = BarItemVisibility.Never
Attmnt_bbtnitm_LoadonClick.Visibility = BarItemVisibility.Never
End If
Load_Additional_Searches()
Load_Additional_Searches(True)
' If Searches should be loaded automatically, not only on click
If CONFIG.Config.ADDITIONAL_SEARCHES_LOAD_ONCLICK = False Then
_frmValidatorSearch?.Show()
If CONFIG.Config.ADDITIONAL_SEARCHES_LOAD_ONCLICK = False And (AdditionalDocResultsExist = True Or AdditionalDataResultsExist = True) Then
' _frmValidatorSearch?.Show()
Click_Additional_Searches()
End If
Else
MsgBox("Für dieses Profil wurde noch keine Eingabemaske definiert!" & vbNewLine & "Informieren Sie Ihren PM-Administrator!" & vbNewLine & "Das Fenster wird geschlossen!", MsgBoxStyle.Exclamation, "Achtung:")
@@ -4244,7 +4236,9 @@ Public Class frmValidator
Else
LOGGER.Debug("Validation of document ended successfully!")
Dim oPROCSQL = $"EXEC PRPM_CHECK_NEXT_WF {CURRENT_DOC_GUID}"
DatabaseFallback.ExecuteNonQueryECM(oPROCSQL)
If DatabaseFallback.ExecuteNonQueryECM(oPROCSQL) = False Then
LOGGER.Warn($"Attention: Error executing proc {oPROCSQL}")
End If
End If
If CURRENT_JUMP_DOC_GUID <> 0 Then
@@ -5555,7 +5549,7 @@ Public Class frmValidator
Catch ex As Exception
LOGGER.Error(ex)
End Try
Load_Additional_Searches()
Load_Additional_Searches(False)
End Sub
Private Sub bbtniRefresh_ItemClick(sender As Object, e As ItemClickEventArgs) Handles bbtniRefresh.ItemClick
Reload_Controls("")