MS GridControlConnID
This commit is contained in:
parent
e81183a698
commit
0f7749c810
@ -57,7 +57,7 @@ Public Class frmValidator
|
|||||||
Private DTCONTROLS As DataTable
|
Private DTCONTROLS As DataTable
|
||||||
Private DTGRID_COLUMNS_WITH_SQL As DataTable
|
Private DTGRID_COLUMNS_WITH_SQL As DataTable
|
||||||
Private DTGRID_COLUMNS As DataTable
|
Private DTGRID_COLUMNS As DataTable
|
||||||
Private DTGRID_COLUMNS_TEXTBOX As DataTable
|
Private DTGRID_SQL_DEFINITION As DataTable
|
||||||
|
|
||||||
Public FormLoaded As Boolean = False
|
Public FormLoaded As Boolean = False
|
||||||
Private ItemWorked As Boolean = False
|
Private ItemWorked As Boolean = False
|
||||||
@ -637,13 +637,13 @@ Public Class frmValidator
|
|||||||
pnldesigner.Controls.Clear()
|
pnldesigner.Controls.Clear()
|
||||||
Dim oSQL = $"SELECT [dbo].[FNPM_LANGUAGE_CONTROL_TEXT] (NAME,'{USER_LANGUAGE}',CTRL_TYPE,CTRL_TEXT) CTRL_CAPTION_LANG, * FROM TBPM_PROFILE_CONTROLS WHERE PROFIL_ID = {CURRENT_ProfilGUID} ORDER BY Y_LOC, X_LOC"
|
Dim oSQL = $"SELECT [dbo].[FNPM_LANGUAGE_CONTROL_TEXT] (NAME,'{USER_LANGUAGE}',CTRL_TYPE,CTRL_TEXT) CTRL_CAPTION_LANG, * FROM TBPM_PROFILE_CONTROLS WHERE PROFIL_ID = {CURRENT_ProfilGUID} ORDER BY Y_LOC, X_LOC"
|
||||||
DTCONTROLS = ClassDatabase.Return_Datatable(oSQL)
|
DTCONTROLS = ClassDatabase.Return_Datatable(oSQL)
|
||||||
oSQL = $"SELECT T1.GUID As CONTROL_ID, T1.PROFIL_ID, T.SQL_COMMAND, T.SPALTENNAME from TBPM_CONTROL_TABLE T, TBPM_PROFILE_CONTROLS T1 WHERE T.CONTROL_ID = T1.GUID AND T1.PROFIL_ID = {CURRENT_ProfilGUID} AND LEN(T.SQL_COMMAND) > 0 AND T.LOAD_AFT_LOAD_CONTROL = 0 ORDER BY T.SEQUENCE"
|
oSQL = $"SELECT T1.GUID As CONTROL_ID, T1.PROFIL_ID, T.CONNECTION_ID, T.SQL_COMMAND, T.SPALTENNAME from TBPM_CONTROL_TABLE T, TBPM_PROFILE_CONTROLS T1 WHERE T.CONTROL_ID = T1.GUID AND T1.PROFIL_ID = {CURRENT_ProfilGUID} AND LEN(T.SQL_COMMAND) > 0 AND T.LOAD_AFT_LOAD_CONTROL = 0 ORDER BY T.SEQUENCE"
|
||||||
DTGRID_COLUMNS_WITH_SQL = ClassDatabase.Return_Datatable(oSQL)
|
DTGRID_COLUMNS_WITH_SQL = ClassDatabase.Return_Datatable(oSQL)
|
||||||
oSQL = $"SELECT T.* from TBPM_CONTROL_TABLE T, TBPM_PROFILE_CONTROLS T1 WHERE T.CONTROL_ID = T1.GUID AND T1.PROFIL_ID = {CURRENT_ProfilGUID} ORDER BY T.SEQUENCE"
|
oSQL = $"SELECT T.* from TBPM_CONTROL_TABLE T, TBPM_PROFILE_CONTROLS T1 WHERE T.CONTROL_ID = T1.GUID AND T1.PROFIL_ID = {CURRENT_ProfilGUID} ORDER BY T.SEQUENCE"
|
||||||
DTGRID_COLUMNS = ClassDatabase.Return_Datatable(oSQL)
|
DTGRID_COLUMNS = ClassDatabase.Return_Datatable(oSQL)
|
||||||
|
|
||||||
oSQL = $"SELECT T1.GUID As CONTROL_ID, T1.PROFIL_ID, T.SQL_COMMAND, T.SPALTENNAME from TBPM_CONTROL_TABLE T, TBPM_PROFILE_CONTROLS T1 WHERE T.CONTROL_ID = T1.GUID AND T1.PROFIL_ID = {CURRENT_ProfilGUID} AND LEN(T.SQL_COMMAND) > 0 AND T.LOAD_AFT_LOAD_CONTROL = 1 ORDER BY T.SEQUENCE"
|
oSQL = $"SELECT T1.GUID As CONTROL_ID, T1.PROFIL_ID, T.CONNECTION_ID, T.SQL_COMMAND, T.SPALTENNAME from TBPM_CONTROL_TABLE T, TBPM_PROFILE_CONTROLS T1 WHERE T.CONTROL_ID = T1.GUID AND T1.PROFIL_ID = {CURRENT_ProfilGUID} AND LEN(T.SQL_COMMAND) > 0 AND T.LOAD_AFT_LOAD_CONTROL = 1 ORDER BY T.SEQUENCE"
|
||||||
DTGRID_COLUMNS_TEXTBOX = ClassDatabase.Return_Datatable(oSQL)
|
DTGRID_SQL_DEFINITION = ClassDatabase.Return_Datatable(oSQL)
|
||||||
|
|
||||||
Dim oCount As Integer = 0
|
Dim oCount As Integer = 0
|
||||||
|
|
||||||
@ -1221,7 +1221,9 @@ Public Class frmValidator
|
|||||||
End If
|
End If
|
||||||
Case "Override_Direct".ToUpper
|
Case "Override_Direct".ToUpper
|
||||||
Override = True
|
Override = True
|
||||||
Finish_WFStep()
|
Finish_WFStep(False)
|
||||||
|
Case "Override incFinal".ToUpper
|
||||||
|
Finish_WFStep(False)
|
||||||
Case Else
|
Case Else
|
||||||
MsgBox($"No configured action provided for onCustomButtonClick [{oAction}]", MsgBoxStyle.Exclamation, ADDITIONAL_TITLE)
|
MsgBox($"No configured action provided for onCustomButtonClick [{oAction}]", MsgBoxStyle.Exclamation, ADDITIONAL_TITLE)
|
||||||
LOGGER.Warn($"No configured action provided for onCustomButtonClick [{oAction}]")
|
LOGGER.Warn($"No configured action provided for onCustomButtonClick [{oAction}]")
|
||||||
@ -1562,6 +1564,7 @@ Public Class frmValidator
|
|||||||
If oSQLColumnDatatable.Rows.Count > 0 Then
|
If oSQLColumnDatatable.Rows.Count > 0 Then
|
||||||
For Each oRow As DataRow In oSQLColumnDatatable.Rows
|
For Each oRow As DataRow In oSQLColumnDatatable.Rows
|
||||||
Dim oDEPENDING_GUID = DTGRID_COLUMNS_WITH_SQL.Rows(0).Item("CONTROL_ID")
|
Dim oDEPENDING_GUID = DTGRID_COLUMNS_WITH_SQL.Rows(0).Item("CONTROL_ID")
|
||||||
|
Dim oCONNID = DTGRID_COLUMNS_WITH_SQL.Rows(0).Item("CONNECTION_ID")
|
||||||
Dim oDEPENDING_COLUMN = DTGRID_COLUMNS_WITH_SQL.Rows(0).Item("SPALTENNAME")
|
Dim oDEPENDING_COLUMN = DTGRID_COLUMNS_WITH_SQL.Rows(0).Item("SPALTENNAME")
|
||||||
Dim oSqlCommand = DTGRID_COLUMNS_WITH_SQL.Rows(0).Item("SQL_COMMAND")
|
Dim oSqlCommand = DTGRID_COLUMNS_WITH_SQL.Rows(0).Item("SQL_COMMAND")
|
||||||
If _dependingColumn_in_action = True Then
|
If _dependingColumn_in_action = True Then
|
||||||
@ -1571,14 +1574,19 @@ Public Class frmValidator
|
|||||||
|
|
||||||
_dependingColumn_in_action = True
|
_dependingColumn_in_action = True
|
||||||
Try
|
Try
|
||||||
Dim oDTDEPENDING_RESULT As DataTable = ClassDatabase.Return_Datatable(oSqlCommand)
|
|
||||||
For Each oControl As Control In pnldesigner.Controls
|
Dim oDTDEPENDING_RESULT As DataTable = ClassDatabase.Return_Datatable_ConId(oSqlCommand, oCONNID)
|
||||||
If DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).Guid = oDEPENDING_GUID Then
|
If Not IsNothing(oDTDEPENDING_RESULT) Then
|
||||||
ClassControlCreator.GridTables.Add(oDEPENDING_COLUMN, oDTDEPENDING_RESULT)
|
LOGGER.Debug($"Trying to fill the DropDown (DC) for GridColumnGuid [{oDEPENDING_GUID}]..RowCount: [{oDTDEPENDING_RESULT.Rows.Count}] ")
|
||||||
_dependingColumn_in_action = False
|
For Each oControl As Control In pnldesigner.Controls
|
||||||
Exit For
|
If DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).Guid = oDEPENDING_GUID Then
|
||||||
End If
|
ClassControlCreator.GridTables.Add(oDEPENDING_COLUMN, oDTDEPENDING_RESULT)
|
||||||
Next
|
_dependingColumn_in_action = False
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
LOGGER.Error(ex)
|
LOGGER.Error(ex)
|
||||||
_dependingColumn_in_action = False
|
_dependingColumn_in_action = False
|
||||||
@ -1907,13 +1915,13 @@ Public Class frmValidator
|
|||||||
' oResult = "\\dd-gan.local.digitaldata.works\DD-DFSR01\UserObjects\UserFiles\schreiberm\Desktop\AANG-3302-swbn.pdf"
|
' oResult = "\\dd-gan.local.digitaldata.works\DD-DFSR01\UserObjects\UserFiles\schreiberm\Desktop\AANG-3302-swbn.pdf"
|
||||||
'Else
|
'Else
|
||||||
LOGGER.Debug($"GetWMDocPathWindows returned false - trying with standard again...")
|
LOGGER.Debug($"GetWMDocPathWindows returned false - trying with standard again...")
|
||||||
oSQL = $"SELECT [dbo].[FNPM_GET_FILEPATH] ({CURRENT_DOC_GUID},1)"
|
oSQL = $"SELECT [dbo].[FNPM_GET_FILEPATH] ({CURRENT_DOC_GUID},1)"
|
||||||
oResult = ClassDatabase.Execute_Scalar(oSQL, CONNECTION_STRING)
|
oResult = ClassDatabase.Execute_Scalar(oSQL, CONNECTION_STRING)
|
||||||
LOGGER.Debug($"Checking file 1[{oResult}] exists?...")
|
LOGGER.Debug($"Checking file 1[{oResult}] exists?...")
|
||||||
If File.Exists(oResult) = False Then
|
If File.Exists(oResult) = False Then
|
||||||
LOGGER.Warn($"File {oResult} not existing!")
|
LOGGER.Warn($"File {oResult} not existing!")
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
'End If
|
'End If
|
||||||
End If
|
End If
|
||||||
WMDocPathWindows = oResult
|
WMDocPathWindows = oResult
|
||||||
@ -2990,32 +2998,35 @@ Public Class frmValidator
|
|||||||
' set_foreground()
|
' set_foreground()
|
||||||
If first_control Is Nothing = False Then first_control.Focus()
|
If first_control Is Nothing = False Then first_control.Focus()
|
||||||
Try
|
Try
|
||||||
For Each oRow As DataRow In DTGRID_COLUMNS_TEXTBOX.Rows
|
For Each oRow As DataRow In DTGRID_SQL_DEFINITION.Rows
|
||||||
|
|
||||||
Dim oDEPENDING_GUID = oRow.Item("CONTROL_ID")
|
Dim oDEPENDING_GUID = oRow.Item("CONTROL_ID")
|
||||||
Dim oDEPENDING_COLUMN = oRow.Item("SPALTENNAME")
|
Dim oDEPENDING_COLUMN = oRow.Item("SPALTENNAME")
|
||||||
Dim oSqlCommand = oRow.Item("SQL_COMMAND")
|
Dim oSqlCommand = oRow.Item("SQL_COMMAND")
|
||||||
|
Dim oCONNID = oRow.Item("CONNECTION_ID")
|
||||||
oSqlCommand = clsPatterns.ReplaceAllValues(oSqlCommand, pnldesigner, CURRENT_WMFILE, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_LANGUAGE, USER_EMAIL, USER_ID, CURRENT_CLICKED_PROFILE_ID)
|
oSqlCommand = clsPatterns.ReplaceAllValues(oSqlCommand, pnldesigner, CURRENT_WMFILE, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_LANGUAGE, USER_EMAIL, USER_ID, CURRENT_CLICKED_PROFILE_ID)
|
||||||
|
|
||||||
|
|
||||||
Try
|
Try
|
||||||
Dim oDTDEPENDING_RESULT As DataTable = ClassDatabase.Return_Datatable(oSqlCommand)
|
Dim oDTRESULT_FOR_COLUMN As DataTable = ClassDatabase.Return_Datatable_ConId(oSqlCommand, oCONNID)
|
||||||
If Not IsNothing(oDTDEPENDING_RESULT) Then
|
If Not IsNothing(oDTRESULT_FOR_COLUMN) Then
|
||||||
|
LOGGER.Debug($"Trying to create a DropDown(FI) for GridColumnGuid [{oDEPENDING_GUID}]..RowCount: [{oDTRESULT_FOR_COLUMN.Rows.Count}] ")
|
||||||
For Each oControl As Control In pnldesigner.Controls
|
For Each oControl As Control In pnldesigner.Controls
|
||||||
If DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).Guid = oDEPENDING_GUID Then
|
If DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).Guid = oDEPENDING_GUID Then
|
||||||
ClassControlCreator.GridTables.Add(oDEPENDING_COLUMN, oDTDEPENDING_RESULT)
|
ClassControlCreator.GridTables.Add(oDEPENDING_COLUMN, oDTRESULT_FOR_COLUMN)
|
||||||
|
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
Else
|
||||||
|
LOGGER.Warn($"oDTRESULT_FOR_COLUMN is nothing!")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
LOGGER.Warn($"Unexpected error in creating dropdown for oDEPENDING_GUID {oDEPENDING_GUID} an Column {oDEPENDING_COLUMN} " & ex.Message)
|
LOGGER.Warn($"Unexpected error in creating dropdown(FI) for oDEPENDING_GUID {oDEPENDING_GUID} an Column {oDEPENDING_COLUMN} " & ex.Message)
|
||||||
|
|
||||||
End Try
|
End Try
|
||||||
Next
|
Next
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
LOGGER.Warn($"Unexpected error in creating dropdown for Grid: " & ex.Message)
|
LOGGER.Warn($"Unexpected error in creating dropdown(FI) for Grid: " & ex.Message)
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
|
|
||||||
@ -3186,7 +3197,7 @@ Public Class frmValidator
|
|||||||
Return False
|
Return False
|
||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
Sub Finish_WFStep()
|
Sub Finish_WFStep(Optional includeFI As Boolean = True)
|
||||||
btnSave.Enabled = False
|
btnSave.Enabled = False
|
||||||
LOGGER.Debug("Abschluss für Dok: " & CURRENT_DOC_PATH & " gestartet")
|
LOGGER.Debug("Abschluss für Dok: " & CURRENT_DOC_PATH & " gestartet")
|
||||||
ItemWorked = True
|
ItemWorked = True
|
||||||
@ -3201,119 +3212,122 @@ Public Class frmValidator
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'lblerror.Visible = False
|
If includeFI = True Then
|
||||||
Try
|
Try
|
||||||
TBPM_PROFILE_FINAL_INDEXINGTableAdapter.Fill(FinalIndexDataSet.TBPM_PROFILE_FINAL_INDEXING, CURRENT_ProfilName)
|
TBPM_PROFILE_FINAL_INDEXINGTableAdapter.Fill(FinalIndexDataSet.TBPM_PROFILE_FINAL_INDEXING, CURRENT_ProfilName)
|
||||||
Dim oDTFinalIndexes As DataTable = FinalIndexDataSet.TBPM_PROFILE_FINAL_INDEXING
|
Dim oDTFinalIndexes As DataTable = FinalIndexDataSet.TBPM_PROFILE_FINAL_INDEXING
|
||||||
If oDTFinalIndexes?.Rows.Count > 0 Then
|
If oDTFinalIndexes?.Rows.Count > 0 Then
|
||||||
'Jetzt finale Indexe setzen
|
'Jetzt finale Indexe setzen
|
||||||
LOGGER.Debug("FINAL INDEXING STARTING...")
|
LOGGER.Debug("FINAL INDEXING STARTING...")
|
||||||
For Each oFinalIndexRow As DataRow In oDTFinalIndexes.Rows
|
For Each oFinalIndexRow As DataRow In oDTFinalIndexes.Rows
|
||||||
Dim oValue As String = oFinalIndexRow.Item("VALUE").ToString
|
Dim oValue As String = oFinalIndexRow.Item("VALUE").ToString
|
||||||
Dim oIndexType = 0
|
Dim oIndexType = 0
|
||||||
If IDB_ACTIVE = False Then
|
|
||||||
oIndexType = WINDREAM.GetTypeOfIndex(oFinalIndexRow.Item("INDEXNAME"))
|
|
||||||
End If
|
|
||||||
If oValue.ToUpper = "SQL-Command".ToUpper Then '###### Indexierung mit variablen SQL ###
|
|
||||||
LOGGER.Debug("Indexing wih dynamic sql...")
|
|
||||||
Dim oSQLCommand = oFinalIndexRow.Item("SQL_COMMAND")
|
|
||||||
|
|
||||||
oSQLCommand = clsPatterns.ReplaceAllValues(oSQLCommand, pnldesigner, CURRENT_WMFILE, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_LANGUAGE, USER_EMAIL, USER_ID, CURRENT_CLICKED_PROFILE_ID)
|
|
||||||
If IsNothing(oSQLCommand) Then
|
|
||||||
errormessage = "Error while replacing Values in final indexing - Check the log"
|
|
||||||
My.Settings.Save()
|
|
||||||
frmError.ShowDialog()
|
|
||||||
oErrorOcurred = True
|
|
||||||
ItemWorked = False
|
|
||||||
End If
|
|
||||||
If Not IsNothing(oSQLCommand) Then
|
|
||||||
Dim oResultfromSQL = ClassDatabase.Execute_Scalar(oSQLCommand, CONNECTION_STRING, True)
|
|
||||||
|
|
||||||
If Not IsNothing(oResultfromSQL) Then
|
|
||||||
LOGGER.Debug($"oResultfromSQL is [{oResultfromSQL.ToString}]")
|
|
||||||
oValue = oResultfromSQL
|
|
||||||
Else
|
|
||||||
LOGGER.Info("ATTENTION: DYNAMIC VALUE IS NOTHING!")
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
Else
|
|
||||||
If oValue.StartsWith("v") Then
|
|
||||||
Select Case oFinalIndexRow.Item("VALUE").ToString
|
|
||||||
Case "vDate"
|
|
||||||
oValue = Now.ToShortDateString
|
|
||||||
Case "vUserName"
|
|
||||||
oValue = USER_USERNAME
|
|
||||||
Case Else
|
|
||||||
oValue = oFinalIndexRow.Item("VALUE")
|
|
||||||
End Select
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
If oErrorOcurred Then
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
Dim oResult() As String
|
|
||||||
ReDim Preserve oResult(0)
|
|
||||||
oResult(0) = oValue
|
|
||||||
|
|
||||||
LOGGER.Debug($"oIndexType {oIndexType.ToString}")
|
|
||||||
If oIndexType > 4000 And oIndexType < 5000 Then
|
|
||||||
'If dr.Item("INDEXNAME").ToString.StartsWith("[%VKT") Then
|
|
||||||
' Dim PM_String = Return_PM_VEKTOR(value, dr.Item("INDEXNAME"))
|
|
||||||
'Hier muss nun separat as Vektorfeld indexiert werden
|
|
||||||
If WMIndexVectofield(oValue, oFinalIndexRow.Item("INDEXNAME"), oFinalIndexRow.Item("PREVENT_DUPLICATES"), oFinalIndexRow.Item("ALLOW_NEW_VALUES")) = False Then
|
|
||||||
LOGGER.Debug("Final Vektorindex '" & oFinalIndexRow.Item("INDEXNAME").ToString & "' has beens et suxxessfully!")
|
|
||||||
Else
|
|
||||||
errormessage = "Error in final indexing:" & vbNewLine & idxerr_message
|
|
||||||
My.Settings.Save()
|
|
||||||
frmError.ShowDialog()
|
|
||||||
oErrorOcurred = True
|
|
||||||
ItemWorked = False
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
LOGGER.Debug("Now the final indexing...")
|
|
||||||
Dim oFIResult As Boolean = False
|
|
||||||
If IDB_ACTIVE = False Then
|
If IDB_ACTIVE = False Then
|
||||||
If Indexiere_File(CURRENT_WMFILE, oFinalIndexRow.Item("INDEXNAME"), oResult) = True Then
|
oIndexType = WINDREAM.GetTypeOfIndex(oFinalIndexRow.Item("INDEXNAME"))
|
||||||
oFIResult = True
|
End If
|
||||||
LOGGER.Debug("FINALER INDEX '" & oFinalIndexRow.Item("INDEXNAME") & "' WURDE ERFOLGREICH GESETZT")
|
If oValue.ToUpper = "SQL-Command".ToUpper Then '###### Indexierung mit variablen SQL ###
|
||||||
|
LOGGER.Debug("Indexing wih dynamic sql...")
|
||||||
|
Dim oSQLCommand = oFinalIndexRow.Item("SQL_COMMAND")
|
||||||
|
|
||||||
'Nun das Logging
|
oSQLCommand = clsPatterns.ReplaceAllValues(oSQLCommand, pnldesigner, CURRENT_WMFILE, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_LANGUAGE, USER_EMAIL, USER_ID, CURRENT_CLICKED_PROFILE_ID)
|
||||||
If PROFIL_LOGINDEX <> "" Then
|
If IsNothing(oSQLCommand) Then
|
||||||
Dim logstr = Return_LOGString(oValue, "DDFINALINDEX", oFinalIndexRow.Item("INDEXNAME"))
|
errormessage = "Error while replacing Values in final indexing - Check the log"
|
||||||
WMIndexVectofield(logstr, PROFIL_LOGINDEX)
|
My.Settings.Save()
|
||||||
|
frmError.ShowDialog()
|
||||||
|
oErrorOcurred = True
|
||||||
|
ItemWorked = False
|
||||||
|
End If
|
||||||
|
If Not IsNothing(oSQLCommand) Then
|
||||||
|
Dim oResultfromSQL = ClassDatabase.Execute_Scalar(oSQLCommand, CONNECTION_STRING, True)
|
||||||
|
|
||||||
|
If Not IsNothing(oResultfromSQL) Then
|
||||||
|
LOGGER.Debug($"oResultfromSQL is [{oResultfromSQL.ToString}]")
|
||||||
|
oValue = oResultfromSQL
|
||||||
|
Else
|
||||||
|
LOGGER.Info("ATTENTION: DYNAMIC VALUE IS NOTHING!")
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
If IDBData.SetVariableValue(oFinalIndexRow.Item("INDEXNAME"), oValue) = True Then
|
If oValue.StartsWith("v") Then
|
||||||
oFIResult = True
|
Select Case oFinalIndexRow.Item("VALUE").ToString
|
||||||
LOGGER.Debug("Final index IDB '" & oFinalIndexRow.Item("INDEXNAME") & "' was updated.")
|
Case "vDate"
|
||||||
|
oValue = Now.ToShortDateString
|
||||||
|
Case "vUserName"
|
||||||
|
oValue = USER_USERNAME
|
||||||
|
Case Else
|
||||||
|
oValue = oFinalIndexRow.Item("VALUE")
|
||||||
|
End Select
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
If oFIResult = False Then
|
If oErrorOcurred Then
|
||||||
errormessage = "Error in final indexing:" & vbNewLine & idxerr_message
|
Exit For
|
||||||
My.Settings.Save()
|
|
||||||
frmError.ShowDialog()
|
|
||||||
oErrorOcurred = True
|
|
||||||
ItemWorked = False
|
|
||||||
End If
|
End If
|
||||||
|
Dim oResult() As String
|
||||||
|
ReDim Preserve oResult(0)
|
||||||
|
oResult(0) = oValue
|
||||||
|
|
||||||
End If
|
LOGGER.Debug($"oIndexType {oIndexType.ToString}")
|
||||||
If oErrorOcurred = True Then
|
If oIndexType > 4000 And oIndexType < 5000 Then
|
||||||
ItemWorked = False
|
'If dr.Item("INDEXNAME").ToString.StartsWith("[%VKT") Then
|
||||||
Exit For
|
' Dim PM_String = Return_PM_VEKTOR(value, dr.Item("INDEXNAME"))
|
||||||
End If
|
'Hier muss nun separat as Vektorfeld indexiert werden
|
||||||
Next
|
If WMIndexVectofield(oValue, oFinalIndexRow.Item("INDEXNAME"), oFinalIndexRow.Item("PREVENT_DUPLICATES"), oFinalIndexRow.Item("ALLOW_NEW_VALUES")) = False Then
|
||||||
End If
|
LOGGER.Debug("Final Vektorindex '" & oFinalIndexRow.Item("INDEXNAME").ToString & "' has beens et suxxessfully!")
|
||||||
|
Else
|
||||||
|
errormessage = "Error in final indexing:" & vbNewLine & idxerr_message
|
||||||
|
My.Settings.Save()
|
||||||
|
frmError.ShowDialog()
|
||||||
|
oErrorOcurred = True
|
||||||
|
ItemWorked = False
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
LOGGER.Debug("Now the final indexing...")
|
||||||
|
Dim oFIResult As Boolean = False
|
||||||
|
If IDB_ACTIVE = False Then
|
||||||
|
If Indexiere_File(CURRENT_WMFILE, oFinalIndexRow.Item("INDEXNAME"), oResult) = True Then
|
||||||
|
oFIResult = True
|
||||||
|
LOGGER.Debug("FINALER INDEX '" & oFinalIndexRow.Item("INDEXNAME") & "' WURDE ERFOLGREICH GESETZT")
|
||||||
|
|
||||||
|
'Nun das Logging
|
||||||
|
If PROFIL_LOGINDEX <> "" Then
|
||||||
|
Dim logstr = Return_LOGString(oValue, "DDFINALINDEX", oFinalIndexRow.Item("INDEXNAME"))
|
||||||
|
WMIndexVectofield(logstr, PROFIL_LOGINDEX)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If IDBData.SetVariableValue(oFinalIndexRow.Item("INDEXNAME"), oValue) = True Then
|
||||||
|
oFIResult = True
|
||||||
|
LOGGER.Debug("Final index IDB '" & oFinalIndexRow.Item("INDEXNAME") & "' was updated.")
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
If oFIResult = False Then
|
||||||
|
errormessage = "Error in final indexing:" & vbNewLine & idxerr_message
|
||||||
|
My.Settings.Save()
|
||||||
|
frmError.ShowDialog()
|
||||||
|
oErrorOcurred = True
|
||||||
|
ItemWorked = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
If oErrorOcurred = True Then
|
||||||
|
ItemWorked = False
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
LOGGER.Warn($"Error in finalIndexing: {ex.Message}")
|
||||||
|
oErrorOcurred = True
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
|
Try
|
||||||
''Wenn kein Fehler nach der finalen Indexierung gesetzt wurde
|
''Wenn kein Fehler nach der finalen Indexierung gesetzt wurde
|
||||||
If Override = True And Override_SQLCommand <> "" Then
|
If Override = True And Override_SQLCommand <> "" Then
|
||||||
ClassDatabase.Execute_non_Query(Override_SQLCommand)
|
ClassDatabase.Execute_non_Query(Override_SQLCommand)
|
||||||
End If
|
End If
|
||||||
If oErrorOcurred = False Then
|
If oErrorOcurred = False Then
|
||||||
|
|
||||||
'TBPM_PROFILE_FILESTableAdapter.CmdSETWORK(False, "", Document_ID)
|
|
||||||
''Das Dokument
|
|
||||||
'TBPM_PROFILE_FILESTableAdapter.CmdSetEdit(Document_ID)
|
|
||||||
Dim WORK_HISTORY_ENTRY = Nothing
|
Dim WORK_HISTORY_ENTRY = Nothing
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user