Fix Additional search ui, fix fallback sql for data searches
This commit is contained in:
parent
89dd39b081
commit
03152a6d5f
@ -599,7 +599,9 @@ Public Class frmMain
|
|||||||
|
|
||||||
If IDB_ACTIVE = True Then
|
If IDB_ACTIVE = True Then
|
||||||
Try
|
Try
|
||||||
GridViewWFItems.Columns.Item("CONV_YN").Visible = False
|
If GridViewWFItems.Columns.Item("CONV_YN") IsNot Nothing Then
|
||||||
|
GridViewWFItems.Columns.Item("CONV_YN").Visible = False
|
||||||
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
LOGGER.Info("ResetLayout - Check wether Column CONV_YN is part of select/view..now checking CONVERSATION")
|
LOGGER.Info("ResetLayout - Check wether Column CONV_YN is part of select/view..now checking CONVERSATION")
|
||||||
End Try
|
End Try
|
||||||
@ -1847,7 +1849,10 @@ Public Class frmMain
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Try
|
Try
|
||||||
GridViewWFItems.Columns.Item("CONV_YN").Visible = False
|
If GridViewWFItems.Columns.Item("CONV_YN") IsNot Nothing Then
|
||||||
|
GridViewWFItems.Columns.Item("CONV_YN").Visible = False
|
||||||
|
|
||||||
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
LOGGER.Info("LoadGridOverview - Check wether Column CONV_YN is part of select/view")
|
LOGGER.Info("LoadGridOverview - Check wether Column CONV_YN is part of select/view")
|
||||||
End Try
|
End Try
|
||||||
@ -2130,7 +2135,7 @@ Public Class frmMain
|
|||||||
BASEDATA_DT_PROFILE_SEARCHES_DOC = BASEDATA_DT_PROFILES_SEARCHES_DOC.Clone()
|
BASEDATA_DT_PROFILE_SEARCHES_DOC = BASEDATA_DT_PROFILES_SEARCHES_DOC.Clone()
|
||||||
End If
|
End If
|
||||||
If pMode = "bwBasicData" Then bwBasicData.ReportProgress(50)
|
If pMode = "bwBasicData" Then bwBasicData.ReportProgress(50)
|
||||||
oSQL = "select * from TBPM_PROFILE_SEARCH where TYPE = 'DOC' AND ACTIVE = 1 ORDER BY PROFILE_ID,TAB_INDEX"
|
oSQL = "select * from TBPM_PROFILE_SEARCH where TYPE = 'SQL' AND ACTIVE = 1 ORDER BY PROFILE_ID,TAB_INDEX"
|
||||||
'BASEDATA_DT_PROFILES_SEARCHES_SQL = DataASorDB.GetDatatable("DD_ECM", oSQL, "TBPM_PROFILE_SEARCH", "TYPE = 'SQL'", "PROFILE_ID,TAB_INDEX")
|
'BASEDATA_DT_PROFILES_SEARCHES_SQL = DataASorDB.GetDatatable("DD_ECM", oSQL, "TBPM_PROFILE_SEARCH", "TYPE = 'SQL'", "PROFILE_ID,TAB_INDEX")
|
||||||
BASEDATA_DT_PROFILES_SEARCHES_SQL = DatabaseFallback.GetDatatable("TBPM_PROFILE_SEARCH", New GetDatatableOptions(oSQL, DatabaseType.ECM) With {
|
BASEDATA_DT_PROFILES_SEARCHES_SQL = DatabaseFallback.GetDatatable("TBPM_PROFILE_SEARCH", New GetDatatableOptions(oSQL, DatabaseType.ECM) With {
|
||||||
.FilterExpression = "TYPE = 'SQL'",
|
.FilterExpression = "TYPE = 'SQL'",
|
||||||
|
|||||||
@ -475,112 +475,135 @@ Public Class frmValidator
|
|||||||
LOGGER.Error(ex)
|
LOGGER.Error(ex)
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Public Function Test_Additional_Data_Searches_Exist() As Boolean
|
||||||
|
If BASEDATA_DT_PROFILE_SEARCHES_SQL.Rows.Count > 0 Then
|
||||||
|
Dim oDataResultCommand As String
|
||||||
|
Dim oDatatableDataResult As DataTable = Nothing
|
||||||
|
|
||||||
|
If BASEDATA_DT_PROFILE_SEARCHES_SQL.Rows.Count > 0 Then
|
||||||
|
'Check whether DocData is there
|
||||||
|
Dim oConID = BASEDATA_DT_PROFILE_SEARCHES_SQL.Rows(0).Item("CONN_ID")
|
||||||
|
oDataResultCommand = BASEDATA_DT_PROFILE_SEARCHES_SQL.Rows(0).Item("SQL_COMMAND")
|
||||||
|
oDataResultCommand = clsPatterns.ReplaceAllValues(oDataResultCommand, PanelValidatorControl, True)
|
||||||
|
'oDatatableDataResult = ClassDatabase.Return_Datatable_ConId(oDataResultCommand, oConID, "Load_Additional_Searches1")
|
||||||
|
oDatatableDataResult = DatabaseFallback.GetDatatable(New GetDatatableOptions(oDataResultCommand, DatabaseType.ECM) With {
|
||||||
|
.ConnectionId = oConID
|
||||||
|
})
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim oDataResultsExist As Boolean = False
|
||||||
|
|
||||||
|
If BASEDATA_DT_PROFILE_SEARCHES_SQL.Rows.Count > 0 Then
|
||||||
|
If Not IsNothing(oDatatableDataResult) Then
|
||||||
|
If oDatatableDataResult.Rows.Count > 0 Then
|
||||||
|
oDataResultsExist = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return oDataResultsExist
|
||||||
|
Else
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
Public Function Test_Additional_Doc_Searches_Exist() As Boolean
|
||||||
|
If BASEDATA_DT_PROFILE_SEARCHES_DOC.Rows.Count > 0 Then
|
||||||
|
Dim oDocResultCommand As String
|
||||||
|
Dim oDatatableDocResult As DataTable = Nothing
|
||||||
|
|
||||||
|
If BASEDATA_DT_PROFILE_SEARCHES_DOC.Rows.Count > 0 Then
|
||||||
|
'Check whether DocData is there
|
||||||
|
Dim oConID = BASEDATA_DT_PROFILE_SEARCHES_DOC.Rows(0).Item("CONN_ID")
|
||||||
|
oDocResultCommand = BASEDATA_DT_PROFILE_SEARCHES_DOC.Rows(0).Item("SQL_COMMAND")
|
||||||
|
oDocResultCommand = clsPatterns.ReplaceAllValues(oDocResultCommand, PanelValidatorControl, True)
|
||||||
|
'oDatatableDocResult = ClassDatabase.Return_Datatable_ConId(oDocResultCommand, oConID, "Load_Additional_Searches2")
|
||||||
|
oDatatableDocResult = DatabaseFallback.GetDatatable(New GetDatatableOptions(oDocResultCommand, DatabaseType.ECM) With {
|
||||||
|
.ConnectionId = oConID
|
||||||
|
})
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim oDocResultsExist As Boolean = False
|
||||||
|
|
||||||
|
If BASEDATA_DT_PROFILE_SEARCHES_DOC.Rows.Count > 0 Then
|
||||||
|
If Not IsNothing(oDatatableDocResult) Then
|
||||||
|
If oDatatableDocResult.Rows.Count > 0 Then
|
||||||
|
oDocResultsExist = True
|
||||||
|
DT_AdditionalSearches_Resultset_Docs = oDatatableDocResult
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return oDocResultsExist
|
||||||
|
Else
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
|
||||||
Public Sub Load_Additional_Searches()
|
Public Sub Load_Additional_Searches()
|
||||||
Try
|
Try
|
||||||
If BASEDATA_DT_PROFILE_SEARCHES_SQL.Rows.Count > 0 Or BASEDATA_DT_PROFILE_SEARCHES_DOC.Rows.Count > 0 Then
|
Dim oDocResultsExist = Test_Additional_Doc_Searches_Exist()
|
||||||
Dim oDocResultCommand As String
|
Dim oDataResultsExist = Test_Additional_Data_Searches_Exist()
|
||||||
Dim oDatatableDocResult As DataTable
|
|
||||||
Dim oDataResultCommand As String
|
|
||||||
Dim oDatatableDataResult As DataTable
|
|
||||||
If BASEDATA_DT_PROFILE_SEARCHES_SQL.Rows.Count > 0 Then
|
|
||||||
'Check whether DocData is there
|
|
||||||
Dim oConID = BASEDATA_DT_PROFILE_SEARCHES_SQL.Rows(0).Item("CONN_ID")
|
|
||||||
oDataResultCommand = BASEDATA_DT_PROFILE_SEARCHES_SQL.Rows(0).Item("SQL_COMMAND")
|
|
||||||
oDataResultCommand = clsPatterns.ReplaceAllValues(oDataResultCommand, PanelValidatorControl, True)
|
|
||||||
'oDatatableDataResult = ClassDatabase.Return_Datatable_ConId(oDataResultCommand, oConID, "Load_Additional_Searches1")
|
|
||||||
oDatatableDataResult = DatabaseFallback.GetDatatable(New GetDatatableOptions(oDataResultCommand, DatabaseType.ECM) With {
|
|
||||||
.ConnectionId = oConID
|
|
||||||
})
|
|
||||||
End If
|
|
||||||
If BASEDATA_DT_PROFILE_SEARCHES_DOC.Rows.Count > 0 Then
|
|
||||||
'Check whether DocData is there
|
|
||||||
Dim oConID = BASEDATA_DT_PROFILE_SEARCHES_DOC.Rows(0).Item("CONN_ID")
|
|
||||||
oDocResultCommand = BASEDATA_DT_PROFILE_SEARCHES_DOC.Rows(0).Item("SQL_COMMAND")
|
|
||||||
oDocResultCommand = clsPatterns.ReplaceAllValues(oDocResultCommand, PanelValidatorControl, True)
|
|
||||||
'oDatatableDocResult = ClassDatabase.Return_Datatable_ConId(oDocResultCommand, oConID, "Load_Additional_Searches2")
|
|
||||||
oDatatableDocResult = DatabaseFallback.GetDatatable(New GetDatatableOptions(oDocResultCommand, DatabaseType.ECM) With {
|
|
||||||
.ConnectionId = oConID
|
|
||||||
})
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim oDataResultsExist As Boolean = False
|
'If Test_Additional_Searches_Exist() Then
|
||||||
Dim oDocResultsExist As Boolean = False
|
If oDataResultsExist = True Or oDocResultsExist = True Then
|
||||||
|
'If RibbonPageCustItm1 <> "" Then
|
||||||
|
' BarButtonItemAttmt.Caption = RibbonPageCustItm1
|
||||||
|
' BarButtonItemAttmt.Visibility = BarItemVisibility.Always
|
||||||
|
' Dim toggleLink As BarToggleSwitchItem = TryCast(ToggleSwitchItemLoadonClick, BarToggleSwitchItem)
|
||||||
|
' toggleLink.Checked = CONFIG.Config.ADDITIONAL_SEARCHES_LOAD_ONCLICK
|
||||||
|
' ToggleSwitchItemLoadonClick.Visibility = BarItemVisibility.Always
|
||||||
|
'End If
|
||||||
|
Try
|
||||||
|
'If CONFIG.Config.ADDITIONAL_SEARCHES_LOAD_ONCLICK = False Then
|
||||||
|
'_frmValidatorSearch.Show()
|
||||||
|
'End If
|
||||||
|
|
||||||
If BASEDATA_DT_PROFILE_SEARCHES_SQL.Rows.Count > 0 Then
|
Dim oPnl1Collapsed As Boolean = True
|
||||||
If Not IsNothing(oDatatableDataResult) Then
|
Dim oPnl2Collapsed As Boolean = True
|
||||||
If oDatatableDataResult.Rows.Count > 0 Then
|
If oDataResultsExist = True Then
|
||||||
oDataResultsExist = True
|
oPnl1Collapsed = False
|
||||||
End If
|
Else
|
||||||
|
oPnl1Collapsed = True
|
||||||
End If
|
End If
|
||||||
|
If oDocResultsExist = True Then
|
||||||
End If
|
oPnl2Collapsed = False
|
||||||
If BASEDATA_DT_PROFILE_SEARCHES_DOC.Rows.Count > 0 Then
|
Else
|
||||||
If Not IsNothing(oDatatableDocResult) Then
|
oPnl2Collapsed = True
|
||||||
If oDatatableDocResult.Rows.Count > 0 Then
|
|
||||||
oDocResultsExist = True
|
|
||||||
DT_AdditionalSearches_Resultset_Docs = oDatatableDocResult
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
End If
|
_frmValidatorSearch.TabPreload(oPnl1Collapsed, oPnl2Collapsed, BASEDATA_DT_PROFILE_SEARCHES_SQL.Rows.Count, BASEDATA_DT_PROFILE_SEARCHES_DOC.Rows.Count,
|
||||||
|
BASEDATA_DT_PROFILE_SEARCHES_SQL, BASEDATA_DT_PROFILE_SEARCHES_DOC)
|
||||||
|
If oDataResultsExist Then
|
||||||
|
_frmValidatorSearch._DTSQLSearches = BASEDATA_DT_PROFILE_SEARCHES_SQL
|
||||||
|
Dim oConID = BASEDATA_DT_PROFILE_SEARCHES_SQL.Rows(0).Item("CONN_ID")
|
||||||
|
Dim 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"))
|
||||||
|
|
||||||
If oDataResultsExist = True Or oDocResultsExist = True Then
|
|
||||||
bbtniRefreshSearches.Visibility = BarItemVisibility.Always
|
|
||||||
|
|
||||||
If RibbonPageCustItm1 <> "" Then
|
|
||||||
BarButtonItemAttmt.Caption = RibbonPageCustItm1
|
|
||||||
BarButtonItemAttmt.Visibility = BarItemVisibility.Always
|
|
||||||
Dim toggleLink As BarToggleSwitchItem = TryCast(ToggleSwitchItemLoadonClick, BarToggleSwitchItem)
|
|
||||||
toggleLink.Checked = CONFIG.Config.ADDITIONAL_SEARCHES_LOAD_ONCLICK
|
|
||||||
ToggleSwitchItemLoadonClick.Visibility = BarItemVisibility.Always
|
|
||||||
End If
|
End If
|
||||||
Try
|
If oDocResultsExist Then
|
||||||
If CONFIG.Config.ADDITIONAL_SEARCHES_LOAD_ONCLICK = False Then
|
_frmValidatorSearch._DTDocSearches = BASEDATA_DT_PROFILE_SEARCHES_DOC
|
||||||
_frmValidatorSearch.Show()
|
Dim oConID = BASEDATA_DT_PROFILE_SEARCHES_DOC.Rows(0).Item("CONN_ID")
|
||||||
End If
|
Dim oCommand = BASEDATA_DT_PROFILE_SEARCHES_DOC.Rows(0).Item("SQL_COMMAND")
|
||||||
|
oCommand = clsPatterns.ReplaceAllValues(oCommand, PanelValidatorControl, True)
|
||||||
|
|
||||||
Dim oPnl1Collapsed As Boolean = True
|
_frmValidatorSearch.RefreshTabDoc(oConID, oCommand, 0, BASEDATA_DT_PROFILE_SEARCHES_DOC.Rows(0).Item("TAB_TITLE"))
|
||||||
Dim oPnl2Collapsed As Boolean = True
|
End If
|
||||||
If oDataResultsExist = True Then
|
Catch ex As Exception
|
||||||
oPnl1Collapsed = False
|
LOGGER.Error(ex)
|
||||||
Else
|
End Try
|
||||||
oPnl1Collapsed = True
|
|
||||||
End If
|
|
||||||
If oDocResultsExist = True Then
|
|
||||||
oPnl2Collapsed = False
|
|
||||||
Else
|
|
||||||
oPnl2Collapsed = True
|
|
||||||
End If
|
|
||||||
_frmValidatorSearch.TabPreload(oPnl1Collapsed, oPnl2Collapsed, BASEDATA_DT_PROFILE_SEARCHES_SQL.Rows.Count, BASEDATA_DT_PROFILE_SEARCHES_DOC.Rows.Count,
|
|
||||||
BASEDATA_DT_PROFILE_SEARCHES_SQL, BASEDATA_DT_PROFILE_SEARCHES_DOC)
|
|
||||||
If oDataResultsExist Then
|
|
||||||
_frmValidatorSearch._DTSQLSearches = BASEDATA_DT_PROFILE_SEARCHES_SQL
|
|
||||||
Dim oConID = BASEDATA_DT_PROFILE_SEARCHES_SQL.Rows(0).Item("CONN_ID")
|
|
||||||
Dim 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"))
|
bbtniRefreshSearches.Visibility = BarItemVisibility.Always
|
||||||
End If
|
|
||||||
If oDocResultsExist Then
|
|
||||||
_frmValidatorSearch._DTDocSearches = BASEDATA_DT_PROFILE_SEARCHES_DOC
|
|
||||||
Dim oConID = BASEDATA_DT_PROFILE_SEARCHES_DOC.Rows(0).Item("CONN_ID")
|
|
||||||
Dim oCommand = BASEDATA_DT_PROFILE_SEARCHES_DOC.Rows(0).Item("SQL_COMMAND")
|
|
||||||
oCommand = clsPatterns.ReplaceAllValues(oCommand, PanelValidatorControl, True)
|
|
||||||
|
|
||||||
_frmValidatorSearch.RefreshTabDoc(oConID, oCommand, 0, BASEDATA_DT_PROFILE_SEARCHES_DOC.Rows(0).Item("TAB_TITLE"))
|
|
||||||
End If
|
|
||||||
Catch ex As Exception
|
|
||||||
LOGGER.Error(ex)
|
|
||||||
End Try
|
|
||||||
Else
|
|
||||||
LOGGER.Debug("Not loading AdditionalSearches 1...!")
|
|
||||||
bbtniRefreshSearches.Visibility = BarItemVisibility.Never
|
|
||||||
End If
|
|
||||||
Else
|
Else
|
||||||
LOGGER.Debug("Not loading AdditionalSearches 2...!")
|
|
||||||
bbtniRefreshSearches.Visibility = BarItemVisibility.Never
|
bbtniRefreshSearches.Visibility = BarItemVisibility.Never
|
||||||
|
LOGGER.Debug("Not loading AdditionalSearches 1...!")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'Else
|
||||||
|
' LOGGER.Debug("Not loading AdditionalSearches 2...!")
|
||||||
|
' bbtniRefreshSearches.Visibility = BarItemVisibility.Never
|
||||||
|
'End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MsgBox(ex.Message, MsgBoxStyle.Critical, ADDITIONAL_TITLE)
|
MsgBox(ex.Message, MsgBoxStyle.Critical, ADDITIONAL_TITLE)
|
||||||
End Try
|
End Try
|
||||||
@ -3602,11 +3625,27 @@ Public Class frmValidator
|
|||||||
RibbonPageGroup2.Visible = False
|
RibbonPageGroup2.Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'Flag setzen das Indexe geladen sind
|
'Flag setzen das Indexe geladen sind
|
||||||
_Indexe_Loaded = True
|
_Indexe_Loaded = True
|
||||||
Load_Additional_Searches()
|
|
||||||
|
' Should the custom Ribbon group be displayed at all?
|
||||||
|
' Will be hidden later if not search results are found
|
||||||
|
If RibbonPageCustItm1 <> "" Then
|
||||||
|
BarButtonItemAttmt.Caption = RibbonPageCustItm1
|
||||||
|
BarButtonItemAttmt.Visibility = BarItemVisibility.Always
|
||||||
|
Dim toggleLink As BarToggleSwitchItem = TryCast(ToggleSwitchItemLoadonClick, BarToggleSwitchItem)
|
||||||
|
toggleLink.Checked = CONFIG.Config.ADDITIONAL_SEARCHES_LOAD_ONCLICK
|
||||||
|
ToggleSwitchItemLoadonClick.Visibility = BarItemVisibility.Always
|
||||||
|
Else
|
||||||
|
BarButtonItemAttmt.Visibility = BarItemVisibility.Never
|
||||||
|
ToggleSwitchItemLoadonClick.Visibility = BarItemVisibility.Never
|
||||||
|
End If
|
||||||
|
|
||||||
|
' If Searches should be loaded automatically, not only on click
|
||||||
|
If CONFIG.Config.ADDITIONAL_SEARCHES_LOAD_ONCLICK = False Then
|
||||||
|
_frmValidatorSearch?.Show()
|
||||||
|
Load_Additional_Searches()
|
||||||
|
End If
|
||||||
Else
|
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:")
|
MsgBox("Für dieses Profil wurde noch keine Eingabemaske definiert!" & vbNewLine & "Informieren Sie Ihren PM-Administrator!" & vbNewLine & "Das Fenster wird geschlossen!", MsgBoxStyle.Exclamation, "Achtung:")
|
||||||
Me.Close()
|
Me.Close()
|
||||||
@ -5472,6 +5511,7 @@ Public Class frmValidator
|
|||||||
Try
|
Try
|
||||||
_frmValidatorSearch?.Close()
|
_frmValidatorSearch?.Close()
|
||||||
_frmValidatorSearch = New frmValidatorSearch
|
_frmValidatorSearch = New frmValidatorSearch
|
||||||
|
_frmValidatorSearch.Show()
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
LOGGER.Error(ex)
|
LOGGER.Error(ex)
|
||||||
End Try
|
End Try
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user