DocSearchModul

This commit is contained in:
Digital Data - Marlon Schreiber
2019-05-08 17:20:20 +02:00
parent 3f5236ad65
commit cff2ec012c
43 changed files with 4012 additions and 1221 deletions

View File

@@ -35,7 +35,7 @@ Public Class frmMassValidator
'_windreamPM.Create_Session()
LOGGER.Debug("windream initialized frmMassValidator", False)
LOGGER.Debug("windream initialized frmMassValidator")
Catch ex As Exception
LOGGER.Error(ex)
@@ -54,7 +54,7 @@ Public Class frmMassValidator
End If
Try
DT_PROFILE_CONTROLS = ClassDatabase.Return_Datatable("SELECT * FROM TBPM_PROFILE_CONTROLS WHERE CTRL_TYPE <> 'TABLE' AND SQL_UEBERPRUEFUNG NOT LIKE '%WMI%' AND PROFIL_ID = " & CURRENT_ProfilGUID)
LOGGER.Debug(" >> Profile Data geladen", False)
LOGGER.Debug("Profile Data geladen")
Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Error LOADING profile-data:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Attention:")
@@ -97,10 +97,10 @@ Public Class frmMassValidator
Next
If LOG_ERRORS_ONLY = False Then
LOGGER.Info(" >> Profildaten gespeichert", False)
LOGGER.Info(" >> WD_Search: " & WM_SEARCH, False)
LOGGER.Info(" >> finalProfile: " & FINAL_PROFILE, False)
LOGGER.Info(" >> Move2Folder: " & MOVE2Folder, False)
LOGGER.Info(" >> Profildaten gespeichert")
LOGGER.Info(" >> WD_Search: " & WM_SEARCH)
LOGGER.Info(" >> finalProfile: " & FINAL_PROFILE)
LOGGER.Info(" >> Move2Folder: " & MOVE2Folder)
End If
@@ -135,7 +135,7 @@ Public Class frmMassValidator
Select Case dr.Item("CTRL_TYPE").ToString.ToUpper
Case "TXT"
LOGGER.Debug(" >> Versuch TXT zu laden", False)
LOGGER.Debug("Versuch TXT zu laden")
Dim txt As TextBox = ClassControlCreator.CreateExistingTextbox(dr, False)
AddHandler txt.GotFocus, AddressOf OnTextBoxFocus
@@ -144,10 +144,10 @@ Public Class frmMassValidator
ctrl = txt
Case "LBL"
LOGGER.Debug(" >> Versuch LBL zu laden", False)
LOGGER.Debug("Versuch LBL zu laden")
ctrl = ClassControlCreator.CreateExistingLabel(dr, False)
Case "CMB"
LOGGER.Debug(" >> Versuch CMB zu laden", False)
LOGGER.Debug("Versuch CMB zu laden")
Dim cmb = ClassControlCreator.CreateExistingCombobox(dr, False)
@@ -162,7 +162,7 @@ Public Class frmMassValidator
If CURR_CON_ID > 0 Then
Dim commandsql = CURR_SELECT_CONTROL
If commandsql <> "" Then
LOGGER.Debug(" >> ConID > 0 And commandsql <> ''", False)
LOGGER.Debug("ConID > 0 And commandsql <> ''")
Dim connectionString As String
Dim ConRow As DataRow() = ClassControlCreator.GET_CONNECTION_INFO(CURR_CON_ID)
@@ -180,7 +180,7 @@ Public Class frmMassValidator
Else
connectionString = "Data Source=" & row("SERVER") & ";Initial Catalog= " & row("DATENBANK") & ";User Id=" & row("USERNAME") & ";Password=" & row("PASSWORD") & ";"
End If
LOGGER.Debug(" >> ConnString Sql-Server: " & connectionString)
LOGGER.Debug("ConnString Sql-Server: " & connectionString)
Case "oracle"
CURR_SQL_PROVIDER = "oracle"
Dim conn As New OracleConnectionStringBuilder
@@ -199,7 +199,7 @@ Public Class frmMassValidator
connectionString = connstr
Case Else
LOGGER.Info("ConnectionString-Type not integrated", False)
LOGGER.Info("ConnectionString-Type not integrated")
MsgBox("ConnectionString-Type not integrated", MsgBoxStyle.Critical)
Exit Sub
End Select
@@ -243,11 +243,11 @@ Public Class frmMassValidator
End Try
End If
Else
LOGGER.Debug(" >> Else Row 571", False)
LOGGER.Debug("Else Row 571")
End If
Else
If CURR_CHOICE_LIST <> "" Then
LOGGER.Debug(" >> In add_ComboBox - AListe: " & CURR_CHOICE_LIST, False)
LOGGER.Debug("In add_ComboBox - AListe: " & CURR_CHOICE_LIST)
Dim liste = WINDREAM.GetValuesfromAuswahlliste(CURR_CHOICE_LIST)
If liste IsNot Nothing Then
cmb.Items.Add("")
@@ -277,21 +277,21 @@ Public Class frmMassValidator
ctrl = cmb
Case "DTP"
LOGGER.Debug(" >> Versuch DTP zu laden", False)
LOGGER.Debug("Versuch DTP zu laden")
ctrl = ClassControlCreator.CreateExistingDatepicker(dr, False)
Case "DGV"
LOGGER.Debug(" >> Versuch DGV zu laden", False)
LOGGER.Debug("Versuch DGV zu laden")
Dim dgv = ClassControlCreator.CreateExistingDataGridView(dr, False)
AddHandler dgv.RowValidating, AddressOf onDGVRowValidating
ctrl = dgv
Case "CHK"
LOGGER.Debug(" >> Versuch Checkbox zu laden", False)
LOGGER.Debug("Versuch Checkbox zu laden")
ctrl = ClassControlCreator.CreateExisingCheckbox(dr, False)
'Case "TABLE"
' If LogErrorsOnly = False Then LOGGER.Info(" >> Versuch Tabelle zu laden", False)
' If LogErrorsOnly = False Then LOGGER.Info(" >> Versuch Tabelle zu laden")
' For Each c As DataColumn In DT_PROFILE_CONTROLS.Columns
' '... = c.ColumnName
@@ -301,10 +301,10 @@ Public Class frmMassValidator
' Where r.CONTROL_ID = dr.Item("GUID")
' Select r).ToList()
' ctrl = ClassControlCreator.CreateExistingTable(dr, columns, False)
' ctrl = ClassControlCreator.CreateExistingTable(dr, columns)
Case "LINE"
LOGGER.Debug(" >> Versuch Linie zu laden", False)
LOGGER.Debug("Versuch Linie zu laden")
ctrl = ClassControlCreator.CreateExistingLine(dr, False)
End Select
@@ -320,15 +320,15 @@ Public Class frmMassValidator
LoadSimpleData(ctrl, dr.Item("GUID"))
Next
LOGGER.Debug(" >> Controls geladen", False)
LOGGER.Info("", False)
LOGGER.Debug("Controls geladen")
LOGGER.Info("")
CTRLS_Loaded = True
FillIndexValues()
'Catch ex As Exception
' If LogErrorsOnly = False Then MsgBox("Error Load_Controls: " & ex.Message, MsgBoxStyle.Critical, "Attention error:")
' ' allgFunk.Insert_LogEntry(CURRENT_ProfilGUID, "Error Load_Controls: " & ex.Message, Environment.UserName)
' LOGGER.Info("Unvorhergesehener Fehler bei Load_Controls:" & ex.Message)
' LOGGER.Info("", False)
' LOGGER.Info("")
'End Try
@@ -357,7 +357,7 @@ Public Class frmMassValidator
Dim defaultValue As String = NotNull(controlRow.Item("DEFAULT_VALUE"), String.Empty)
indexname = idxname
Dim LoadIDX As Boolean = controlRow.Item("LOAD_IDX_VALUE")
LOGGER.Debug(" >> INDEX: " & idxname & " - CONTROLNAME: " & inctrl.Name & " - LOAD IDXVALUES: " & LoadIDX.ToString, False)
LOGGER.Debug("INDEX: " & idxname & " - CONTROLNAME: " & inctrl.Name & " - LOAD IDXVALUES: " & LoadIDX.ToString)
Dim wertWD
Select Case Type
Case "System.Windows.Forms.TextBox"
@@ -371,7 +371,7 @@ Public Class frmMassValidator
If LoadIDX = False Or idxname = "DD PM-ONLY FOR DISPLAY" Then
' Wenn kein Index exisitiert, defaultValue laden
inctrl.Text = defaultValue
LOGGER.Debug(" >> Indexwert soll nicht geladen werden.", False)
LOGGER.Debug("Indexwert soll nicht geladen werden.")
Exit Select
End If
@@ -389,8 +389,8 @@ Public Class frmMassValidator
My.Settings.Save()
frmError.ShowDialog()
LOGGER.Info(">> Unexpected error in FillIndexValues TextBox(MI): " & ex.Message, True)
LOGGER.Info(">> Controltype: " & controltype, False)
LOGGER.Info(">> Indexname windream: " & indexname, False)
LOGGER.Info(">> Controltype: " & controltype)
LOGGER.Info(">> Indexname windream: " & indexname)
Exit Sub
End Try
@@ -408,7 +408,7 @@ Public Class frmMassValidator
Else
cmb.Text = defaultValue
End If
LOGGER.Debug(" >> Indexwert soll nicht geladen werden.", False)
LOGGER.Debug("Indexwert soll nicht geladen werden.")
Exit Select
End If
wertWD = GetWM_Value_Multiple_Docs(idxname)
@@ -432,7 +432,7 @@ Public Class frmMassValidator
End If
If idxname Is Nothing = False Then
If LoadIDX = False Then
LOGGER.Debug(" >> Indexwert soll nicht geladen werden.", False)
LOGGER.Debug("Indexwert soll nicht geladen werden.")
Exit Select
End If
@@ -505,7 +505,7 @@ Public Class frmMassValidator
Dim chk As CheckBox = inctrl
If LoadIDX = False Then
LOGGER.Debug(" >> Indexwert soll nicht geladen werden.", False)
LOGGER.Debug("Indexwert soll nicht geladen werden.")
If defaultValue <> String.Empty Then
Dim result
@@ -519,7 +519,7 @@ Public Class frmMassValidator
wertWD = GetWM_Value_Multiple_Docs(idxname)
If wertWD Is Nothing Then
LOGGER.Info(">> Zurückgegebener Wert des Wertes für Checkbox mit Indexname '" & indexname & "' ist nothing. Check defaultvalue", False)
LOGGER.Info(">> Zurückgegebener Wert des Wertes für Checkbox mit Indexname '" & indexname & "' ist nothing. Check defaultvalue")
chk.Checked = False
Else
If wertWD.ToString = "" Then
@@ -535,11 +535,11 @@ Public Class frmMassValidator
Else
Dim _value
If wertWD.ToString = "System.Object[]" Then
LOGGER.Debug(" >> CheckBoxValue with VektorField: " & idxname, False)
LOGGER.Debug("CheckBoxValue with VektorField: " & idxname)
If wertWD.length = 1 Then
_value = wertWD(0)
Else '
LOGGER.Info(" >> Vectorfield " & idxname & "' contains more then one value - First value will be used", False)
LOGGER.Info(" >> Vectorfield " & idxname & "' contains more then one value - First value will be used")
_value = wertWD(0)
End If
Else
@@ -576,8 +576,8 @@ Public Class frmMassValidator
My.Settings.Save()
frmError.ShowDialog()
LOGGER.Info(">> Unexpected Error in FillIndexValues(MIs: " & ex.Message, True)
LOGGER.Info(">> Controltype: " & controltype, False)
LOGGER.Info(">> Indexname windream: " & indexname, False)
LOGGER.Info(">> Controltype: " & controltype)
LOGGER.Info(">> Indexname windream: " & indexname)
End Try
@@ -606,11 +606,11 @@ Public Class frmMassValidator
tempIndexValue = WMDOC.GetVariableValue(idxname)
If IsNothing(tempIndexValue) Then tempIndexValue = ""
If tempIndexValue.ToString = "System.Object[]" Then
LOGGER.Debug(" >> TextBox with VektorField: " & idxname, False)
LOGGER.Debug("TextBox with VektorField: " & idxname)
If tempIndexValue.Length = 1 Then
tempIndexValue = tempIndexValue(0)
Else '
LOGGER.Info(" >> Vectorfield " & idxname & "' contains more then one value - First value will be used", False)
LOGGER.Info(" >> Vectorfield " & idxname & "' contains more then one value - First value will be used")
tempIndexValue = tempIndexValue(0)
End If
End If
@@ -758,7 +758,7 @@ Public Class frmMassValidator
pnldesigner.Controls(displayboxname).Text = resultDT.Rows(0).Item(0).ToString
Else
pnldesigner.Controls(displayboxname).Text = "RESULT = resultDT.Rows.Count <> 1"
LOGGER.Info(">> Datatable-SQL: " & sqlCommand, False)
LOGGER.Info(">> Datatable-SQL: " & sqlCommand)
End If
End If
End If
@@ -970,7 +970,7 @@ Public Class frmMassValidator
' alle Vorkommen innerhalbd er Namenkonvention durchlaufen
For Each element As System.Text.RegularExpressions.Match In elemente
Try
LOGGER.Debug(" >> element in RegeX WORK_HISTORY_ENTRY: " & element.Value, False)
LOGGER.Debug("element in RegeX WORK_HISTORY_ENTRY: " & element.Value)
Dim CTRL_ID = element.Value.Substring(2, element.Value.Length - 3)
CTRL_ID = CTRL_ID.Replace("CTRLID", "")
Dim value_from_control
@@ -1138,9 +1138,9 @@ Public Class frmMassValidator
Dim ctrl = dr.Item("NAME")
'Nur wenn der Name der Zeile entspricht und der Index READ_ONLY FALSE ist
If dr.Item("NAME") = inctrl.Name And (_READ_ONLY = False Or dr.Item("SQL_UEBERPRUEFUNG") <> "") And _IDXName <> "DD PM-ONLY FOR DISPLAY" Then
LOGGER.Debug(" >> Indexierung für Control (" & CONTROL_ID & ") '" & ctrl & "' gestartet. Indexname '" & _IDXName & "'", False)
LOGGER.Debug("Indexierung für Control (" & CONTROL_ID & ") '" & ctrl & "' gestartet. Indexname '" & _IDXName & "'")
If _IDXName = "" Then
LOGGER.Info(" >> Indexname is unexpected empty.", False)
LOGGER.Info(" >> Indexname is unexpected empty.")
Continue For
End If
Dim Type As String = inctrl.GetType.ToString
@@ -1267,7 +1267,7 @@ Public Class frmMassValidator
End If
Else
LOGGER.Debug(" >> DateValue is 01.01.0001 00:00:00", False)
LOGGER.Debug("DateValue is 01.01.0001 00:00:00")
End If
Case "System.Windows.Forms.CheckBox"
Dim chk As CheckBox = inctrl
@@ -1425,7 +1425,7 @@ Public Class frmMassValidator
'Das Array der Idnexwerte überprüfen
If idxvalue Is Nothing = False Then
If idxvalue.Length() > 1 Then
LOGGER.Debug(" >> Indexing Index '" & idxxname & "' with Arrayvalue", False)
LOGGER.Debug("Indexing Index '" & idxxname & "' with Arrayvalue")
Dim anzahl As Integer = 0
For Each indexvalue As String In idxvalue
ReDim Preserve arrValue(anzahl)
@@ -1433,7 +1433,7 @@ Public Class frmMassValidator
anzahl += 1
Next
Else
LOGGER.Debug(" >> Indexing Index '" & idxxname & "' with value '" & idxvalue(0) & "'", False)
LOGGER.Debug("Indexing Index '" & idxxname & "' with value '" & idxvalue(0) & "'")
ReDim Preserve arrValue(0)
arrValue(0) = idxvalue(0).ToString
End If
@@ -1521,7 +1521,7 @@ Public Class frmMassValidator
'Das Array der Idnexwerte überprüfen
If idxvalue Is Nothing = False Then
If idxvalue.Length() > 1 Then
LOGGER.Debug(" >> Indexing Index '" & idxxname & "' with Arrayvalue", False)
LOGGER.Debug("Indexing Index '" & idxxname & "' with Arrayvalue")
Dim anzahl As Integer = 0
For Each indexvalue As String In idxvalue
ReDim Preserve arrValue(anzahl)
@@ -1529,7 +1529,7 @@ Public Class frmMassValidator
anzahl += 1
Next
Else
LOGGER.Debug(" >> Indexing Index '" & idxxname & "' with value '" & idxvalue(0) & "'", False)
LOGGER.Debug("Indexing Index '" & idxxname & "' with value '" & idxvalue(0) & "'")
ReDim Preserve arrValue(0)
arrValue(0) = idxvalue(0).ToString
End If