Use Logger Module
This commit is contained in:
@@ -35,11 +35,12 @@ Public Class frmMassValidator
|
||||
'_windreamPM.Create_Session()
|
||||
|
||||
|
||||
If LOG_ERRORS_ONLY = False Then ClassLogger.Add("windream initialized frmMassValidator", False)
|
||||
LOGGER.Debug("windream initialized frmMassValidator", False)
|
||||
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
MsgBox("Error Init_windream:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Attention:")
|
||||
ClassLogger.Add(">> Fehler in Init_windream: " & ex.Message, True)
|
||||
LOGGER.Info(">> Fehler in Init_windream: " & ex.Message, True)
|
||||
Exit Sub
|
||||
End Try
|
||||
|
||||
@@ -53,10 +54,11 @@ 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)
|
||||
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Profile Data geladen", False)
|
||||
LOGGER.Debug(" >> Profile Data geladen", False)
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
MsgBox("Error LOADING profile-data:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Attention:")
|
||||
ClassLogger.Add(">> Fehler in LOADING profile-data: " & ex.Message, True)
|
||||
LOGGER.Info(">> Fehler in LOADING profile-data: " & ex.Message, True)
|
||||
Me.Close()
|
||||
End Try
|
||||
|
||||
@@ -64,7 +66,7 @@ Public Class frmMassValidator
|
||||
Delimiter = CURRENT_DT_CONFIG.Rows(0).Item("VEKTOR_DELIMITER")
|
||||
|
||||
If CURRENT_DT_PROFILE.Rows.Count = 0 Then
|
||||
ClassLogger.Add(">> Profildaten konnten nicht geladen werden - Übergebenes Profil: : " & CURRENT_ProfilName, True)
|
||||
LOGGER.Info(">> Profildaten konnten nicht geladen werden - Übergebenes Profil: : " & CURRENT_ProfilName, True)
|
||||
MsgBox("Achtung: Profildaten konnten nicht übergeben oder geladen werden.", MsgBoxStyle.Critical, "Achtung:")
|
||||
Me.Close()
|
||||
End If
|
||||
@@ -95,10 +97,10 @@ Public Class frmMassValidator
|
||||
|
||||
Next
|
||||
If LOG_ERRORS_ONLY = False Then
|
||||
ClassLogger.Add(" >> Profildaten gespeichert", False)
|
||||
ClassLogger.Add(" >> WD_Search: " & WM_SEARCH, False)
|
||||
ClassLogger.Add(" >> finalProfile: " & FINAL_PROFILE, False)
|
||||
ClassLogger.Add(" >> Move2Folder: " & MOVE2Folder, False)
|
||||
LOGGER.Info(" >> Profildaten gespeichert", False)
|
||||
LOGGER.Info(" >> WD_Search: " & WM_SEARCH, False)
|
||||
LOGGER.Info(" >> finalProfile: " & FINAL_PROFILE, False)
|
||||
LOGGER.Info(" >> Move2Folder: " & MOVE2Folder, False)
|
||||
|
||||
End If
|
||||
|
||||
@@ -110,7 +112,7 @@ Public Class frmMassValidator
|
||||
|
||||
'Catch ex As Exception
|
||||
' MsgBox("Error SAVING Profile-Data:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Attention:")
|
||||
' ClassLogger.Add(">> Fehler in SAVING Profile-Data: " & ex.Message, True)
|
||||
' LOGGER.Info(">> Fehler in SAVING Profile-Data: " & ex.Message, True)
|
||||
'End Try
|
||||
'Me.lblerror.Visible = False
|
||||
|
||||
@@ -118,100 +120,100 @@ Public Class frmMassValidator
|
||||
btnSave.Text = String.Format("Finish all documents (#{0})", CURRENT_DT_MASS_CHANGE_DOCS.Rows.Count.ToString)
|
||||
Else
|
||||
btnSave.Text = String.Format("Alle Dokumente (#{0}) abschliessen.", CURRENT_DT_MASS_CHANGE_DOCS.Rows.Count.ToString)
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Sub Load_Controls()
|
||||
' Try
|
||||
pnldesigner.Controls.Clear()
|
||||
'Dim dt As DataTable = DD_DMSLiteDataSet.VWPM_CONTROL_INDEX
|
||||
'Dim dt As DataTable = DD_DMSLiteDataSet.VWPM_CONTROL_INDEX
|
||||
|
||||
|
||||
|
||||
For Each dr As DataRow In DT_PROFILE_CONTROLS.Rows
|
||||
Dim ctrl As Control
|
||||
For Each dr As DataRow In DT_PROFILE_CONTROLS.Rows
|
||||
Dim ctrl As Control
|
||||
|
||||
Select Case dr.Item("CTRL_TYPE").ToString.ToUpper
|
||||
Case "TXT"
|
||||
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Versuch TXT zu laden", False)
|
||||
Dim txt As TextBox = ClassControlCreator.CreateExistingTextbox(dr, False)
|
||||
Select Case dr.Item("CTRL_TYPE").ToString.ToUpper
|
||||
Case "TXT"
|
||||
LOGGER.Debug(" >> Versuch TXT zu laden", False)
|
||||
Dim txt As TextBox = ClassControlCreator.CreateExistingTextbox(dr, False)
|
||||
|
||||
AddHandler txt.GotFocus, AddressOf OnTextBoxFocus
|
||||
AddHandler txt.LostFocus, AddressOf OnTextBoxLostFocus
|
||||
AddHandler txt.KeyUp, AddressOf OnTextBoxKeyUp
|
||||
AddHandler txt.GotFocus, AddressOf OnTextBoxFocus
|
||||
AddHandler txt.LostFocus, AddressOf OnTextBoxLostFocus
|
||||
AddHandler txt.KeyUp, AddressOf OnTextBoxKeyUp
|
||||
|
||||
ctrl = txt
|
||||
Case "LBL"
|
||||
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Versuch LBL zu laden", False)
|
||||
ctrl = ClassControlCreator.CreateExistingLabel(dr, False)
|
||||
Case "CMB"
|
||||
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Versuch CMB zu laden", False)
|
||||
ctrl = txt
|
||||
Case "LBL"
|
||||
LOGGER.Debug(" >> Versuch LBL zu laden", False)
|
||||
ctrl = ClassControlCreator.CreateExistingLabel(dr, False)
|
||||
Case "CMB"
|
||||
LOGGER.Debug(" >> Versuch CMB zu laden", False)
|
||||
|
||||
Dim cmb = ClassControlCreator.CreateExistingCombobox(dr, False)
|
||||
Dim cmb = ClassControlCreator.CreateExistingCombobox(dr, False)
|
||||
|
||||
AddHandler cmb.SelectedValueChanged, AddressOf OnCmbselectedIndex
|
||||
AddHandler cmb.SelectedValueChanged, AddressOf OnCmbselectedIndex
|
||||
#Region "CONTROL LIST"
|
||||
If ClassControlCreator.GET_CONTROL_PROPERTIES(DT_PROFILE_CONTROLS, cmb.Name) = 0 Then
|
||||
MsgBox("Unexpected Error in getting control-properties (CMB load) - Check the log and inform Your sysadmin!", MsgBoxStyle.Critical)
|
||||
Exit Sub
|
||||
End If
|
||||
Dim CURR_SQL_PROVIDER As String
|
||||
If CURRENT_CONTROL_ID > 0 Then
|
||||
If CURR_CON_ID > 0 Then
|
||||
Dim commandsql = CURR_SELECT_CONTROL
|
||||
If commandsql <> "" Then
|
||||
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> ConID > 0 And commandsql <> ''", False)
|
||||
Dim connectionString As String
|
||||
If ClassControlCreator.GET_CONTROL_PROPERTIES(DT_PROFILE_CONTROLS, cmb.Name) = 0 Then
|
||||
MsgBox("Unexpected Error in getting control-properties (CMB load) - Check the log and inform Your sysadmin!", MsgBoxStyle.Critical)
|
||||
Exit Sub
|
||||
End If
|
||||
Dim CURR_SQL_PROVIDER As String
|
||||
If CURRENT_CONTROL_ID > 0 Then
|
||||
If CURR_CON_ID > 0 Then
|
||||
Dim commandsql = CURR_SELECT_CONTROL
|
||||
If commandsql <> "" Then
|
||||
LOGGER.Debug(" >> ConID > 0 And commandsql <> ''", False)
|
||||
Dim connectionString As String
|
||||
|
||||
Dim ConRow As DataRow() = ClassControlCreator.GET_CONNECTION_INFO(CURR_CON_ID)
|
||||
If ConRow Is Nothing Then
|
||||
MsgBox("Unexpected Error in getting Coninfo (CMB load) - Check the log and inform Your sysadmin!", MsgBoxStyle.Critical)
|
||||
Exit Sub
|
||||
End If
|
||||
Dim ConRow As DataRow() = ClassControlCreator.GET_CONNECTION_INFO(CURR_CON_ID)
|
||||
If ConRow Is Nothing Then
|
||||
MsgBox("Unexpected Error in getting Coninfo (CMB load) - Check the log and inform Your sysadmin!", MsgBoxStyle.Critical)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
For Each row As DataRow In ConRow
|
||||
Select Case row("SQL_PROVIDER").ToString.ToLower
|
||||
Case "ms-sql"
|
||||
CURR_SQL_PROVIDER = "ms-sql"
|
||||
If row("USERNAME") = "WINAUTH" Then
|
||||
connectionString = "Data Source=" & row("SERVER") & ";Initial Catalog=" & row("DATENBANK") & ";Trusted_Connection=True;"
|
||||
Else
|
||||
connectionString = "Data Source=" & row("SERVER") & ";Initial Catalog= " & row("DATENBANK") & ";User Id=" & row("USERNAME") & ";Password=" & row("PASSWORD") & ";"
|
||||
End If
|
||||
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> ConnString Sql-Server: " & connectionString)
|
||||
Case "oracle"
|
||||
CURR_SQL_PROVIDER = "oracle"
|
||||
Dim conn As New OracleConnectionStringBuilder
|
||||
Dim connstr As String
|
||||
If row("SERVER") <> "" And row("DATENBANK").GetType.ToString <> "system.dbnull" Then
|
||||
connstr = "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=" & row("SERVER") & ")(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=" &
|
||||
For Each row As DataRow In ConRow
|
||||
Select Case row("SQL_PROVIDER").ToString.ToLower
|
||||
Case "ms-sql"
|
||||
CURR_SQL_PROVIDER = "ms-sql"
|
||||
If row("USERNAME") = "WINAUTH" Then
|
||||
connectionString = "Data Source=" & row("SERVER") & ";Initial Catalog=" & row("DATENBANK") & ";Trusted_Connection=True;"
|
||||
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)
|
||||
Case "oracle"
|
||||
CURR_SQL_PROVIDER = "oracle"
|
||||
Dim conn As New OracleConnectionStringBuilder
|
||||
Dim connstr As String
|
||||
If row("SERVER") <> "" And row("DATENBANK").GetType.ToString <> "system.dbnull" Then
|
||||
connstr = "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=" & row("SERVER") & ")(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=" &
|
||||
row("DATENBANK") & ")));User Id=" & row("USERNAME") & ";Password=" & row("PASSWORD") & ";"
|
||||
Else
|
||||
conn.DataSource = row("SERVER")
|
||||
conn.UserID = row("USERNAME")
|
||||
conn.Password = row("PASSWORD")
|
||||
conn.PersistSecurityInfo = True
|
||||
conn.ConnectionTimeout = 120
|
||||
connstr = conn.ConnectionString
|
||||
End If
|
||||
Else
|
||||
conn.DataSource = row("SERVER")
|
||||
conn.UserID = row("USERNAME")
|
||||
conn.Password = row("PASSWORD")
|
||||
conn.PersistSecurityInfo = True
|
||||
conn.ConnectionTimeout = 120
|
||||
connstr = conn.ConnectionString
|
||||
End If
|
||||
|
||||
connectionString = connstr
|
||||
Case Else
|
||||
ClassLogger.Add("ConnectionString-Type not integrated", False)
|
||||
MsgBox("ConnectionString-Type not integrated", MsgBoxStyle.Critical)
|
||||
Exit Sub
|
||||
End Select
|
||||
connectionString = connstr
|
||||
Case Else
|
||||
LOGGER.Info("ConnectionString-Type not integrated", False)
|
||||
MsgBox("ConnectionString-Type not integrated", MsgBoxStyle.Critical)
|
||||
Exit Sub
|
||||
End Select
|
||||
|
||||
|
||||
Next
|
||||
Next
|
||||
|
||||
If connectionString Is Nothing = False And CURR_SQL_PROVIDER = "ms-sql" Then
|
||||
Try
|
||||
Dim sqlCnn As SqlClient.SqlConnection
|
||||
Dim sqlCmd As SqlClient.SqlCommand
|
||||
Dim adapter As New SqlClient.SqlDataAdapter
|
||||
Dim NewDataset As New DataSet
|
||||
Dim i As Integer
|
||||
If connectionString Is Nothing = False And CURR_SQL_PROVIDER = "ms-sql" Then
|
||||
Try
|
||||
Dim sqlCnn As SqlClient.SqlConnection
|
||||
Dim sqlCmd As SqlClient.SqlCommand
|
||||
Dim adapter As New SqlClient.SqlDataAdapter
|
||||
Dim NewDataset As New DataSet
|
||||
Dim i As Integer
|
||||
|
||||
|
||||
'sql = ClassPatterns.ReplaceAllValues(sql, pnldesigner, aktivesDokument)
|
||||
@@ -234,61 +236,62 @@ Public Class frmMassValidator
|
||||
sqlCnn.Close()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add("Unexpected Error in running depending sql-command: " & ex.Message)
|
||||
LOGGER.Error(ex)
|
||||
LOGGER.Info("Unexpected Error in running depending sql-command: " & ex.Message)
|
||||
Clipboard.SetText("Error: " & ex.Message & vbNewLine & "SQL: " & CURR_SELECT_CONTROL)
|
||||
MsgBox(ex.Message, MsgBoxStyle.Critical, "Unexpected Error in running depending sql-command:")
|
||||
End Try
|
||||
End If
|
||||
Else
|
||||
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Else Row 571", False)
|
||||
End If
|
||||
Else
|
||||
If CURR_CHOICE_LIST <> "" Then
|
||||
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> In add_ComboBox - AListe: " & CURR_CHOICE_LIST, False)
|
||||
LOGGER.Debug(" >> Else Row 571", False)
|
||||
End If
|
||||
Else
|
||||
If CURR_CHOICE_LIST <> "" Then
|
||||
LOGGER.Debug(" >> In add_ComboBox - AListe: " & CURR_CHOICE_LIST, False)
|
||||
Dim liste = WINDREAM.GetValuesfromAuswahlliste(CURR_CHOICE_LIST)
|
||||
If liste IsNot Nothing Then
|
||||
cmb.Items.Add("")
|
||||
For Each index As String In liste
|
||||
cmb.Items.Add(index)
|
||||
Next
|
||||
cmb.SelectedIndex = -1
|
||||
Else
|
||||
MsgBox("Resultliste windream is nothing!", MsgBoxStyle.Exclamation, CURR_CHOICE_LIST)
|
||||
End If
|
||||
cmb.Items.Add("")
|
||||
For Each index As String In liste
|
||||
cmb.Items.Add(index)
|
||||
Next
|
||||
cmb.SelectedIndex = -1
|
||||
Else
|
||||
MsgBox("Resultliste windream is nothing!", MsgBoxStyle.Exclamation, CURR_CHOICE_LIST)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
#End Region
|
||||
|
||||
Dim maxWith As Integer = cmb.Width
|
||||
Using g As Graphics = Me.CreateGraphics
|
||||
For Each oItem As Object In cmb.Items 'Für alle Einträge...
|
||||
Dim g1 As Graphics = cmb.CreateGraphics
|
||||
If g1.MeasureString(Text, cmb.Font).Width + 30 > maxWith Then
|
||||
maxWith = g1.MeasureString(Text, cmb.Font).Width + 30
|
||||
End If
|
||||
g1.Dispose()
|
||||
Next oItem
|
||||
End Using
|
||||
cmb.DropDownWidth = maxWith
|
||||
Dim maxWith As Integer = cmb.Width
|
||||
Using g As Graphics = Me.CreateGraphics
|
||||
For Each oItem As Object In cmb.Items 'Für alle Einträge...
|
||||
Dim g1 As Graphics = cmb.CreateGraphics
|
||||
If g1.MeasureString(Text, cmb.Font).Width + 30 > maxWith Then
|
||||
maxWith = g1.MeasureString(Text, cmb.Font).Width + 30
|
||||
End If
|
||||
g1.Dispose()
|
||||
Next oItem
|
||||
End Using
|
||||
cmb.DropDownWidth = maxWith
|
||||
|
||||
ctrl = cmb
|
||||
Case "DTP"
|
||||
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Versuch DTP zu laden", False)
|
||||
ctrl = ClassControlCreator.CreateExistingDatepicker(dr, False)
|
||||
Case "DGV"
|
||||
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Versuch DGV zu laden", False)
|
||||
Dim dgv = ClassControlCreator.CreateExistingDataGridView(dr, False)
|
||||
ctrl = cmb
|
||||
Case "DTP"
|
||||
LOGGER.Debug(" >> Versuch DTP zu laden", False)
|
||||
ctrl = ClassControlCreator.CreateExistingDatepicker(dr, False)
|
||||
Case "DGV"
|
||||
LOGGER.Debug(" >> Versuch DGV zu laden", False)
|
||||
Dim dgv = ClassControlCreator.CreateExistingDataGridView(dr, False)
|
||||
|
||||
AddHandler dgv.RowValidating, AddressOf onDGVRowValidating
|
||||
AddHandler dgv.RowValidating, AddressOf onDGVRowValidating
|
||||
|
||||
ctrl = dgv
|
||||
Case "CHK"
|
||||
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Versuch Checkbox zu laden", False)
|
||||
ctrl = dgv
|
||||
Case "CHK"
|
||||
LOGGER.Debug(" >> Versuch Checkbox zu laden", False)
|
||||
|
||||
ctrl = ClassControlCreator.CreateExisingCheckbox(dr, False)
|
||||
ctrl = ClassControlCreator.CreateExisingCheckbox(dr, False)
|
||||
'Case "TABLE"
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add(" >> Versuch Tabelle zu laden", False)
|
||||
' If LogErrorsOnly = False Then LOGGER.Info(" >> Versuch Tabelle zu laden", False)
|
||||
|
||||
' For Each c As DataColumn In DT_PROFILE_CONTROLS.Columns
|
||||
' '... = c.ColumnName
|
||||
@@ -300,32 +303,32 @@ Public Class frmMassValidator
|
||||
|
||||
' ctrl = ClassControlCreator.CreateExistingTable(dr, columns, False)
|
||||
|
||||
Case "LINE"
|
||||
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Versuch Linie zu laden", False)
|
||||
Case "LINE"
|
||||
LOGGER.Debug(" >> Versuch Linie zu laden", False)
|
||||
|
||||
ctrl = ClassControlCreator.CreateExistingLine(dr, False)
|
||||
End Select
|
||||
ctrl = ClassControlCreator.CreateExistingLine(dr, False)
|
||||
End Select
|
||||
|
||||
If TypeOf ctrl IsNot Label Then
|
||||
' If first_control Is Nothing Then
|
||||
'first_control = ctrl
|
||||
'End If
|
||||
'last_control = ctrl
|
||||
End If
|
||||
If TypeOf ctrl IsNot Label Then
|
||||
' If first_control Is Nothing Then
|
||||
'first_control = ctrl
|
||||
'End If
|
||||
'last_control = ctrl
|
||||
End If
|
||||
|
||||
pnldesigner.Controls.Add(ctrl)
|
||||
pnldesigner.Controls.Add(ctrl)
|
||||
|
||||
LoadSimpleData(ctrl, dr.Item("GUID"))
|
||||
Next
|
||||
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Controls geladen", False)
|
||||
ClassLogger.Add("", False)
|
||||
CTRLS_Loaded = True
|
||||
FillIndexValues()
|
||||
LoadSimpleData(ctrl, dr.Item("GUID"))
|
||||
Next
|
||||
LOGGER.Debug(" >> Controls geladen", False)
|
||||
LOGGER.Info("", False)
|
||||
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)
|
||||
' ClassLogger.Add("Unvorhergesehener Fehler bei Load_Controls:" & ex.Message)
|
||||
' ClassLogger.Add("", False)
|
||||
' LOGGER.Info("Unvorhergesehener Fehler bei Load_Controls:" & ex.Message)
|
||||
' LOGGER.Info("", False)
|
||||
|
||||
'End Try
|
||||
|
||||
@@ -354,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")
|
||||
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> INDEX: " & idxname & " - CONTROLNAME: " & inctrl.Name & " - LOAD IDXVALUES: " & LoadIDX.ToString, False)
|
||||
LOGGER.Debug(" >> INDEX: " & idxname & " - CONTROLNAME: " & inctrl.Name & " - LOAD IDXVALUES: " & LoadIDX.ToString, False)
|
||||
Dim wertWD
|
||||
Select Case Type
|
||||
Case "System.Windows.Forms.TextBox"
|
||||
@@ -368,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
|
||||
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Indexwert soll nicht geladen werden.", False)
|
||||
LOGGER.Debug(" >> Indexwert soll nicht geladen werden.", False)
|
||||
Exit Select
|
||||
End If
|
||||
|
||||
@@ -381,12 +384,13 @@ Public Class frmMassValidator
|
||||
|
||||
End If
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
errormessage = "Unexpected error in FillIndexValues TextBox(MI):" & vbNewLine & ex.Message & vbNewLine & "Check Logfile"
|
||||
My.Settings.Save()
|
||||
frmError.ShowDialog()
|
||||
ClassLogger.Add(">> Unexpected error in FillIndexValues TextBox(MI): " & ex.Message, True)
|
||||
ClassLogger.Add(">> Controltype: " & controltype, False)
|
||||
ClassLogger.Add(">> Indexname windream: " & indexname, False)
|
||||
LOGGER.Info(">> Unexpected error in FillIndexValues TextBox(MI): " & ex.Message, True)
|
||||
LOGGER.Info(">> Controltype: " & controltype, False)
|
||||
LOGGER.Info(">> Indexname windream: " & indexname, False)
|
||||
Exit Sub
|
||||
End Try
|
||||
|
||||
@@ -404,7 +408,7 @@ Public Class frmMassValidator
|
||||
Else
|
||||
cmb.Text = defaultValue
|
||||
End If
|
||||
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Indexwert soll nicht geladen werden.", False)
|
||||
LOGGER.Debug(" >> Indexwert soll nicht geladen werden.", False)
|
||||
Exit Select
|
||||
End If
|
||||
wertWD = GetWM_Value_Multiple_Docs(idxname)
|
||||
@@ -428,7 +432,7 @@ Public Class frmMassValidator
|
||||
End If
|
||||
If idxname Is Nothing = False Then
|
||||
If LoadIDX = False Then
|
||||
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Indexwert soll nicht geladen werden.", False)
|
||||
LOGGER.Debug(" >> Indexwert soll nicht geladen werden.", False)
|
||||
Exit Select
|
||||
End If
|
||||
|
||||
@@ -501,7 +505,7 @@ Public Class frmMassValidator
|
||||
Dim chk As CheckBox = inctrl
|
||||
|
||||
If LoadIDX = False Then
|
||||
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Indexwert soll nicht geladen werden.", False)
|
||||
LOGGER.Debug(" >> Indexwert soll nicht geladen werden.", False)
|
||||
|
||||
If defaultValue <> String.Empty Then
|
||||
Dim result
|
||||
@@ -515,7 +519,7 @@ Public Class frmMassValidator
|
||||
wertWD = GetWM_Value_Multiple_Docs(idxname)
|
||||
|
||||
If wertWD Is Nothing Then
|
||||
ClassLogger.Add(">> 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", False)
|
||||
chk.Checked = False
|
||||
Else
|
||||
If wertWD.ToString = "" Then
|
||||
@@ -531,11 +535,11 @@ Public Class frmMassValidator
|
||||
Else
|
||||
Dim _value
|
||||
If wertWD.ToString = "System.Object[]" Then
|
||||
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> CheckBoxValue with VektorField: " & idxname, False)
|
||||
LOGGER.Debug(" >> CheckBoxValue with VektorField: " & idxname, False)
|
||||
If wertWD.length = 1 Then
|
||||
_value = wertWD(0)
|
||||
Else '
|
||||
ClassLogger.Add(" >> 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", False)
|
||||
_value = wertWD(0)
|
||||
End If
|
||||
Else
|
||||
@@ -549,7 +553,8 @@ Public Class frmMassValidator
|
||||
chk.Checked = False
|
||||
End Select
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add(">> Unvorhergesehener Fehler bei CBool(wertWD) - CheckBox: " & ex.Message & vbNewLine & "Wert WD: " & wertWD.ToString, True)
|
||||
LOGGER.Error(ex)
|
||||
LOGGER.Info(">> Unvorhergesehener Fehler bei CBool(wertWD) - CheckBox: " & ex.Message & vbNewLine & "Wert WD: " & wertWD.ToString, True)
|
||||
chk.Checked = False
|
||||
End Try
|
||||
End If
|
||||
@@ -566,12 +571,13 @@ Public Class frmMassValidator
|
||||
End Select
|
||||
Next
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
errormessage = "Unexpected Error in FillIndexValues(MI):" & vbNewLine & ex.Message & vbNewLine & "Check Logfile"
|
||||
My.Settings.Save()
|
||||
frmError.ShowDialog()
|
||||
ClassLogger.Add(">> Unexpected Error in FillIndexValues(MIs: " & ex.Message, True)
|
||||
ClassLogger.Add(">> Controltype: " & controltype, False)
|
||||
ClassLogger.Add(">> Indexname windream: " & indexname, False)
|
||||
LOGGER.Info(">> Unexpected Error in FillIndexValues(MIs: " & ex.Message, True)
|
||||
LOGGER.Info(">> Controltype: " & controltype, False)
|
||||
LOGGER.Info(">> Indexname windream: " & indexname, False)
|
||||
|
||||
|
||||
End Try
|
||||
@@ -588,7 +594,8 @@ Public Class frmMassValidator
|
||||
Try
|
||||
WMDOC = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, docrow.Item("FULL_PATH"))
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add("error while creating WMObject in (textCheckIndex): " & ex.Message)
|
||||
LOGGER.Error(ex)
|
||||
LOGGER.Info("error while creating WMObject in (textCheckIndex): " & ex.Message)
|
||||
Exit For
|
||||
End Try
|
||||
If Not IsNothing(WMDOC) Then
|
||||
@@ -599,11 +606,11 @@ Public Class frmMassValidator
|
||||
tempIndexValue = WMDOC.GetVariableValue(idxname)
|
||||
If IsNothing(tempIndexValue) Then tempIndexValue = ""
|
||||
If tempIndexValue.ToString = "System.Object[]" Then
|
||||
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> TextBox with VektorField: " & idxname, False)
|
||||
LOGGER.Debug(" >> TextBox with VektorField: " & idxname, False)
|
||||
If tempIndexValue.Length = 1 Then
|
||||
tempIndexValue = tempIndexValue(0)
|
||||
Else '
|
||||
ClassLogger.Add(" >> 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", False)
|
||||
tempIndexValue = tempIndexValue(0)
|
||||
End If
|
||||
End If
|
||||
@@ -625,7 +632,8 @@ Public Class frmMassValidator
|
||||
Next
|
||||
Return valueAllOver
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add("Unexpected error in GetWM_Value_Multiple_Docs: " & ex.Message, True)
|
||||
LOGGER.Error(ex)
|
||||
LOGGER.Info("Unexpected error in GetWM_Value_Multiple_Docs: " & ex.Message, True)
|
||||
Return "Unexp. error in GetWM_Value_Multiple_Docs"
|
||||
End Try
|
||||
End Function
|
||||
@@ -665,8 +673,9 @@ Public Class frmMassValidator
|
||||
If value Is Nothing Then value = ""
|
||||
Return value
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
MsgBox("Unexpected Error in ReturnVektor_IndexValue(MV): " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
ClassLogger.Add("Unexpected Error in ReturnVektor_IndexValue(MV): " & ex.Message)
|
||||
LOGGER.Info("Unexpected Error in ReturnVektor_IndexValue(MV): " & ex.Message)
|
||||
Return ""
|
||||
End Try
|
||||
|
||||
@@ -703,22 +712,23 @@ Public Class frmMassValidator
|
||||
For Each ROW As DataRow In CURR_DT_DEPENDING_CONTROLS.Rows
|
||||
'Try
|
||||
Dim displayboxname = ROW.Item(Name).ToString
|
||||
If Not IsDBNull(ROW.Item(1)) And Not IsDBNull(ROW.Item(2)) Then
|
||||
Dim sql_Statement = ROW.Item(2)
|
||||
If Not IsDBNull(ROW.Item(1)) And Not IsDBNull(ROW.Item(2)) Then
|
||||
Dim sql_Statement = ROW.Item(2)
|
||||
sql_Statement = clsPatterns.ReplaceAllValues(sql_Statement, pnldesigner, WMObject, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_EMAIL)
|
||||
|
||||
_dependingControl_in_action = True
|
||||
Depending_Control_Set_Result(displayboxname, sql_Statement, ROW.Item(1))
|
||||
_dependingControl_in_action = False
|
||||
End If
|
||||
Depending_Control_Set_Result(displayboxname, sql_Statement, ROW.Item(1))
|
||||
_dependingControl_in_action = False
|
||||
End If
|
||||
'Catch ex As Exception
|
||||
' ClassLogger.Add("Unexpected Error in displaying SQL-result for control: " & ROW.Item(0).ToString & " - ERROR: " & ex.Message)
|
||||
' LOGGER.Info("Unexpected Error in displaying SQL-result for control: " & ROW.Item(0).ToString & " - ERROR: " & ex.Message)
|
||||
'End Try
|
||||
|
||||
Next
|
||||
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add("Unexpected Error in Eventhandler OnTextBoxKeyUp - ERROR: " & ex.Message)
|
||||
LOGGER.Error(ex)
|
||||
LOGGER.Info("Unexpected Error in Eventhandler OnTextBoxKeyUp - ERROR: " & ex.Message)
|
||||
End Try
|
||||
|
||||
End If
|
||||
@@ -728,9 +738,9 @@ Public Class frmMassValidator
|
||||
Private Sub Depending_Control_Set_Result(displayboxname As String, sqlCommand As String, sqlConnection As String)
|
||||
'Try
|
||||
Dim resultDT As DataTable = ClassDatabase.Return_Datatable_CS(sqlCommand, sqlConnection)
|
||||
If Not IsNothing(resultDT) Then
|
||||
'Ist das Control ein Control was mehrfachwerte enthalten kann
|
||||
If displayboxname.StartsWith(ClassControlCreator.PREFIX_COMBOBOX) Or displayboxname.StartsWith(ClassControlCreator.PREFIX_DATAGRIDVIEW) Or displayboxname.StartsWith(ClassControlCreator.PREFIX_TABLE) Then
|
||||
If Not IsNothing(resultDT) Then
|
||||
'Ist das Control ein Control was mehrfachwerte enthalten kann
|
||||
If displayboxname.StartsWith(ClassControlCreator.PREFIX_COMBOBOX) Or displayboxname.StartsWith(ClassControlCreator.PREFIX_DATAGRIDVIEW) Or displayboxname.StartsWith(ClassControlCreator.PREFIX_TABLE) Then
|
||||
If displayboxname.StartsWith(ClassControlCreator.PREFIX_COMBOBOX) Then
|
||||
Dim cmbpanel As ComboBox = pnldesigner.Controls(displayboxname)
|
||||
If IsNothing(cmbpanel) Then
|
||||
@@ -743,17 +753,17 @@ Public Class frmMassValidator
|
||||
ElseIf displayboxname.StartsWith(ClassControlCreator.PREFIX_DATAGRIDVIEW) Or displayboxname.StartsWith(ClassControlCreator.PREFIX_TABLE) Then
|
||||
'not implemented
|
||||
End If
|
||||
Else
|
||||
Else
|
||||
If resultDT.Rows.Count = 1 Then
|
||||
pnldesigner.Controls(displayboxname).Text = resultDT.Rows(0).Item(0).ToString
|
||||
Else
|
||||
pnldesigner.Controls(displayboxname).Text = "RESULT = resultDT.Rows.Count <> 1"
|
||||
ClassLogger.Add(">> Datatable-SQL: " & sqlCommand, False)
|
||||
LOGGER.Info(">> Datatable-SQL: " & sqlCommand, False)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
'Catch ex As Exception
|
||||
' ClassLogger.Add("Unexpected Ersror in Depending_Control_Set_Result - ERROR: " & ex.Message)
|
||||
' LOGGER.Info("Unexpected Ersror in Depending_Control_Set_Result - ERROR: " & ex.Message)
|
||||
' MsgBox("Unexpected error in Depending_Control_Set_Result: " & ex.Message, MsgBoxStyle.Critical)
|
||||
'End Try
|
||||
End Sub
|
||||
@@ -762,14 +772,14 @@ Public Class frmMassValidator
|
||||
If cmb.SelectedIndex <> -1 And CTRLS_Loaded = True And FORM_Shown = True Then
|
||||
' Try
|
||||
If ClassControlCreator.GET_CONTROL_PROPERTIES(DT_PROFILE_CONTROLS, cmb.Name) = 0 Then
|
||||
MsgBox("Unexpected Error in getting control-properties CMB - Check the log and inform Your sysadmin!", MsgBoxStyle.Critical)
|
||||
Exit Sub
|
||||
End If
|
||||
MsgBox("Unexpected Error in getting control-properties CMB - Check the log and inform Your sysadmin!", MsgBoxStyle.Critical)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If ClassControlCreator.GET_DEPENDING_CONTROLS(DT_PROFILE_CONTROLS, cmb.Name) = False Then
|
||||
MsgBox("Unexpected Error in getting dependent controls CMB- Check the log and inform Your sysadmin!", MsgBoxStyle.Critical)
|
||||
Exit Sub
|
||||
End If
|
||||
If ClassControlCreator.GET_DEPENDING_CONTROLS(DT_PROFILE_CONTROLS, cmb.Name) = False Then
|
||||
MsgBox("Unexpected Error in getting dependent controls CMB- Check the log and inform Your sysadmin!", MsgBoxStyle.Critical)
|
||||
Exit Sub
|
||||
End If
|
||||
If _dependingControl_in_action = True Or CURR_DT_DEPENDING_CONTROLS Is Nothing Then
|
||||
Exit Sub
|
||||
End If
|
||||
@@ -777,24 +787,24 @@ Public Class frmMassValidator
|
||||
For Each ROW As DataRow In CURR_DT_DEPENDING_CONTROLS.Rows
|
||||
'Try
|
||||
Dim displayboxname = ROW.Item("NAME").ToString
|
||||
If Not IsDBNull(ROW.Item("CONNECTION_ID")) And Not IsDBNull(ROW.Item("SQL_UEBERPRUEFUNG")) Then
|
||||
Dim sql_Statement = ROW.Item("SQL_UEBERPRUEFUNG")
|
||||
If Not IsDBNull(ROW.Item("CONNECTION_ID")) And Not IsDBNull(ROW.Item("SQL_UEBERPRUEFUNG")) Then
|
||||
Dim sql_Statement = ROW.Item("SQL_UEBERPRUEFUNG")
|
||||
|
||||
sql_Statement = clsPatterns.ReplaceAllValues(sql_Statement, pnldesigner, WMObject, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_EMAIL)
|
||||
|
||||
|
||||
_dependingControl_in_action = True
|
||||
Depending_Control_Set_Result(displayboxname, sql_Statement, ROW.Item(1))
|
||||
_dependingControl_in_action = False
|
||||
Depending_Control_Set_Result(displayboxname, sql_Statement, ROW.Item(1))
|
||||
_dependingControl_in_action = False
|
||||
|
||||
End If
|
||||
End If
|
||||
'Catch ex As Exception
|
||||
' ClassLogger.Add("Unexpected Error in displaying SQL-result for control: " & ROW.Item(0).ToString & " - ERROR: " & ex.Message)
|
||||
' LOGGER.Info("Unexpected Error in displaying SQL-result for control: " & ROW.Item(0).ToString & " - ERROR: " & ex.Message)
|
||||
'End Try
|
||||
Next
|
||||
|
||||
'Catch ex As Exception
|
||||
' ClassLogger.Add("Unexpected Error in Eventhandler OnCmbselectedIndex - ERROR: " & ex.Message)
|
||||
' LOGGER.Info("Unexpected Error in Eventhandler OnCmbselectedIndex - ERROR: " & ex.Message)
|
||||
'End Try
|
||||
|
||||
SendKeys.Send("{TAB}")
|
||||
@@ -846,7 +856,8 @@ Public Class frmMassValidator
|
||||
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add("Unexpected Error in Display SQL result for control: " & ROW.Item(0).ToString & " - ERROR: " & ex.Message)
|
||||
LOGGER.Error(ex)
|
||||
LOGGER.Info("Unexpected Error in Display SQL result for control: " & ROW.Item(0).ToString & " - ERROR: " & ex.Message)
|
||||
End Try
|
||||
|
||||
Next
|
||||
@@ -854,7 +865,8 @@ Public Class frmMassValidator
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add("Unexpected Error in Eventhandler Variable SQL Result - ERROR: " & ex.Message)
|
||||
LOGGER.Error(ex)
|
||||
LOGGER.Info("Unexpected Error in Eventhandler Variable SQL Result - ERROR: " & ex.Message)
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
@@ -924,7 +936,8 @@ Public Class frmMassValidator
|
||||
Try
|
||||
WMDOC = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, docrow.Item("FULL_PATH"))
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add("error while creating WMObject in (IndexVKTMultipleFiles): " & ex.Message)
|
||||
LOGGER.Error(ex)
|
||||
LOGGER.Info("error while creating WMObject in (IndexVKTMultipleFiles): " & ex.Message)
|
||||
Exit For
|
||||
End Try
|
||||
If Not IsNothing(WMDOC) Then
|
||||
@@ -943,6 +956,7 @@ Public Class frmMassValidator
|
||||
WORK_HISTORY_ENTRY = Nothing
|
||||
End If
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
WORK_HISTORY_ENTRY = Nothing
|
||||
End Try
|
||||
If Not IsNothing(WORK_HISTORY_ENTRY) Then
|
||||
@@ -956,7 +970,7 @@ Public Class frmMassValidator
|
||||
' alle Vorkommen innerhalbd er Namenkonvention durchlaufen
|
||||
For Each element As System.Text.RegularExpressions.Match In elemente
|
||||
Try
|
||||
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> element in RegeX WORK_HISTORY_ENTRY: " & element.Value, False)
|
||||
LOGGER.Debug(" >> element in RegeX WORK_HISTORY_ENTRY: " & element.Value, False)
|
||||
Dim CTRL_ID = element.Value.Substring(2, element.Value.Length - 3)
|
||||
CTRL_ID = CTRL_ID.Replace("CTRLID", "")
|
||||
Dim value_from_control
|
||||
@@ -972,6 +986,7 @@ Public Class frmMassValidator
|
||||
Try
|
||||
value_from_control = inctrl.Text
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
value_from_control = String.Empty
|
||||
End Try
|
||||
|
||||
@@ -980,6 +995,7 @@ Public Class frmMassValidator
|
||||
Try
|
||||
value_from_control = cmb.Text
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
value_from_control = String.Empty
|
||||
End Try
|
||||
Case "System.Windows.Forms.DateTimePicker"
|
||||
@@ -987,6 +1003,7 @@ Public Class frmMassValidator
|
||||
Try
|
||||
value_from_control = dtp.Value.ToString
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
value_from_control = String.Empty
|
||||
End Try
|
||||
|
||||
@@ -995,6 +1012,7 @@ Public Class frmMassValidator
|
||||
Try
|
||||
value_from_control = chk.Checked
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
value_from_control = String.Empty
|
||||
End Try
|
||||
End Select
|
||||
@@ -1005,7 +1023,8 @@ Public Class frmMassValidator
|
||||
WORK_HISTORY_ENTRY = WORK_HISTORY_ENTRY.ToString.Replace(element.Value, value_from_control)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add("Unexpected Error in Checking control values for WORK_HISTORY_ENTRY - ERROR: " & ex.Message)
|
||||
LOGGER.Error(ex)
|
||||
LOGGER.Info("Unexpected Error in Checking control values for WORK_HISTORY_ENTRY - ERROR: " & ex.Message)
|
||||
End Try
|
||||
Next
|
||||
If WORK_HISTORY_ENTRY.ToString.Contains("@DATE") Then
|
||||
@@ -1086,7 +1105,7 @@ Public Class frmMassValidator
|
||||
' errormessage = "Unvorhergesehener Fehler bei Abschluss:" & ex.Message
|
||||
' My.Settings.Save()
|
||||
' frmError.ShowDialog()
|
||||
' ClassLogger.Add(">> Unvorhergesehener Fehler bei Abschluss: " & ex.Message, True)
|
||||
' LOGGER.Info(">> Unvorhergesehener Fehler bei Abschluss: " & ex.Message, True)
|
||||
'End Try
|
||||
Else
|
||||
'lblerror.Visible = True
|
||||
@@ -1119,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
|
||||
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Indexierung für Control (" & CONTROL_ID & ") '" & ctrl & "' gestartet. Indexname '" & _IDXName & "'", False)
|
||||
LOGGER.Debug(" >> Indexierung für Control (" & CONTROL_ID & ") '" & ctrl & "' gestartet. Indexname '" & _IDXName & "'", False)
|
||||
If _IDXName = "" Then
|
||||
ClassLogger.Add(" >> Indexname is unexpected empty.", False)
|
||||
LOGGER.Info(" >> Indexname is unexpected empty.", False)
|
||||
Continue For
|
||||
End If
|
||||
Dim Type As String = inctrl.GetType.ToString
|
||||
@@ -1166,10 +1185,11 @@ Public Class frmMassValidator
|
||||
|
||||
End If
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
Dim st As New StackTrace(True)
|
||||
st = New StackTrace(ex, True)
|
||||
MsgBox("Unvorhergesehener Fehler in Check_UpdateIndexe TextBox: " & vbNewLine & ex.Message & vbNewLine & "Line: " & st.GetFrame(0).GetFileLineNumber().ToString, MsgBoxStyle.Critical, "Error:")
|
||||
ClassLogger.Add("Unvorhergesehener Fehler in Check_UpdateIndexe:" & ex.Message & " - Line: " & st.GetFrame(0).GetFileLineNumber().ToString, True)
|
||||
LOGGER.Info("Unvorhergesehener Fehler in Check_UpdateIndexe:" & ex.Message & " - Line: " & st.GetFrame(0).GetFileLineNumber().ToString, True)
|
||||
Return True
|
||||
End Try
|
||||
|
||||
@@ -1247,7 +1267,7 @@ Public Class frmMassValidator
|
||||
End If
|
||||
|
||||
Else
|
||||
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> DateValue is 01.01.0001 00:00:00", False)
|
||||
LOGGER.Debug(" >> DateValue is 01.01.0001 00:00:00", False)
|
||||
End If
|
||||
Case "System.Windows.Forms.CheckBox"
|
||||
Dim chk As CheckBox = inctrl
|
||||
@@ -1364,7 +1384,7 @@ Public Class frmMassValidator
|
||||
' Dim st As New StackTrace(True)
|
||||
' st = New StackTrace(ex, True)
|
||||
' MsgBox("Unvorhergesehener Fehler in Check_UpdateIndexe: " & vbNewLine & ex.Message & vbNewLine & "Line: " & st.GetFrame(0).GetFileLineNumber().ToString, MsgBoxStyle.Critical, "Error:")
|
||||
' ClassLogger.Add("Unvorhergesehener Fehler in Check_UpdateIndexe:" & ex.Message & " - Line: " & st.GetFrame(0).GetFileLineNumber().ToString, True)
|
||||
' LOGGER.Info("Unvorhergesehener Fehler in Check_UpdateIndexe:" & ex.Message & " - Line: " & st.GetFrame(0).GetFileLineNumber().ToString, True)
|
||||
' Return True
|
||||
'End Try
|
||||
|
||||
@@ -1387,7 +1407,8 @@ Public Class frmMassValidator
|
||||
Try
|
||||
WMDOC = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, docrow.Item("FULL_PATH"))
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add("error while creating WMObject in (IndexMultipleFiles): " & ex.Message)
|
||||
LOGGER.Error(ex)
|
||||
LOGGER.Info("error while creating WMObject in (IndexMultipleFiles): " & ex.Message)
|
||||
_allfine = False
|
||||
Exit For
|
||||
|
||||
@@ -1404,7 +1425,7 @@ Public Class frmMassValidator
|
||||
'Das Array der Idnexwerte überprüfen
|
||||
If idxvalue Is Nothing = False Then
|
||||
If idxvalue.Length() > 1 Then
|
||||
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Indexing Index '" & idxxname & "' with Arrayvalue", False)
|
||||
LOGGER.Debug(" >> Indexing Index '" & idxxname & "' with Arrayvalue", False)
|
||||
Dim anzahl As Integer = 0
|
||||
For Each indexvalue As String In idxvalue
|
||||
ReDim Preserve arrValue(anzahl)
|
||||
@@ -1412,7 +1433,7 @@ Public Class frmMassValidator
|
||||
anzahl += 1
|
||||
Next
|
||||
Else
|
||||
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Indexing Index '" & idxxname & "' with value '" & idxvalue(0) & "'", False)
|
||||
LOGGER.Debug(" >> Indexing Index '" & idxxname & "' with value '" & idxvalue(0) & "'", False)
|
||||
ReDim Preserve arrValue(0)
|
||||
arrValue(0) = idxvalue(0).ToString
|
||||
End If
|
||||
@@ -1427,7 +1448,8 @@ Public Class frmMassValidator
|
||||
|
||||
Return _allfine
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add("Unexpected error in IndexMultipleFiles: " & ex.Message.ToString, True)
|
||||
LOGGER.Error(ex)
|
||||
LOGGER.Info("Unexpected error in IndexMultipleFiles: " & ex.Message.ToString, True)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
@@ -1439,7 +1461,8 @@ Public Class frmMassValidator
|
||||
Try
|
||||
WMDOC = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, docrow.Item("FULL_PATH"))
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add("error while creating WMObject in (IndexVKTMultipleFiles): " & ex.Message)
|
||||
LOGGER.Error(ex)
|
||||
LOGGER.Info("error while creating WMObject in (IndexVKTMultipleFiles): " & ex.Message)
|
||||
_allfine = False
|
||||
missing = True
|
||||
Exit For
|
||||
@@ -1498,7 +1521,7 @@ Public Class frmMassValidator
|
||||
'Das Array der Idnexwerte überprüfen
|
||||
If idxvalue Is Nothing = False Then
|
||||
If idxvalue.Length() > 1 Then
|
||||
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Indexing Index '" & idxxname & "' with Arrayvalue", False)
|
||||
LOGGER.Debug(" >> Indexing Index '" & idxxname & "' with Arrayvalue", False)
|
||||
Dim anzahl As Integer = 0
|
||||
For Each indexvalue As String In idxvalue
|
||||
ReDim Preserve arrValue(anzahl)
|
||||
@@ -1506,7 +1529,7 @@ Public Class frmMassValidator
|
||||
anzahl += 1
|
||||
Next
|
||||
Else
|
||||
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Indexing Index '" & idxxname & "' with value '" & idxvalue(0) & "'", False)
|
||||
LOGGER.Debug(" >> Indexing Index '" & idxxname & "' with value '" & idxvalue(0) & "'", False)
|
||||
ReDim Preserve arrValue(0)
|
||||
arrValue(0) = idxvalue(0).ToString
|
||||
End If
|
||||
@@ -1516,7 +1539,8 @@ Public Class frmMassValidator
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add("Unexpected Error in IndexSinglefile: " & ex.Message.ToString, True)
|
||||
LOGGER.Error(ex)
|
||||
LOGGER.Info("Unexpected Error in IndexSinglefile: " & ex.Message.ToString, True)
|
||||
Return Err()
|
||||
End Try
|
||||
End Function
|
||||
@@ -1526,7 +1550,8 @@ Public Class frmMassValidator
|
||||
Dim Bezeichner As String = VKTBezeichner.Replace("[%VKT", "")
|
||||
PM_String = "DD-PM" & Delimiter & Bezeichner & Delimiter & input & Delimiter & Environment.UserName & Delimiter & Now.ToString
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add(">> Fehler in Return_PM_VEKTOR: " & ex.Message, True)
|
||||
LOGGER.Error(ex)
|
||||
LOGGER.Info(">> Fehler in Return_PM_VEKTOR: " & ex.Message, True)
|
||||
PM_String = "DD-PM ERROR: " & ex.Message
|
||||
End Try
|
||||
Return PM_String
|
||||
@@ -1542,7 +1567,8 @@ Public Class frmMassValidator
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add(">> Fehler in Return_LOGString: " & ex.Message, True)
|
||||
LOGGER.Error(ex)
|
||||
LOGGER.Info(">> Fehler in Return_LOGString: " & ex.Message, True)
|
||||
PM_String = "DD-PM ERROR: " & ex.Message
|
||||
End Try
|
||||
Return PM_String
|
||||
|
||||
Reference in New Issue
Block a user