Fix error logs in SetControlValues_FromControl

This commit is contained in:
Jonathan Jenne 2021-10-12 10:55:46 +02:00
parent c82eaf614a
commit cbf4d6f892

View File

@ -1490,36 +1490,33 @@ Public Class frmValidator
Try Try
oTextOption = oResultRow.Item("TextOption") oTextOption = oResultRow.Item("TextOption")
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex) LOGGER.Debug("Column [TextOption] not found. Using Default of [Replace]")
oTextOption = "Replace" oTextOption = "Replace"
End Try End Try
Select Case oControl.GetType() Select Case oControl.GetType()
Case GetType(TextBox) Case GetType(TextBox)
Try If oTextOption = "Replace" Then
If oTextOption = "Replace" Then oControl.Text = oCaption
oControl.Text = oCaption Else
Else oControl.Text &= oCaption
oControl.Text &= oCaption
End If End If
Catch ex As Exception
LOGGER.Error(ex)
End Try
Dim oColor Dim oBackColor
Try Try
oColor = Color.FromName(oResultRow.Item("BackgroundColor")) oBackColor = Color.FromName(oResultRow.Item("BackgroundColor"))
oControl.BackColor = oColor oControl.BackColor = oBackColor
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex) LOGGER.Debug("Column [BackgroundColor] not found. Using Default of [White]")
oControl.BackColor = Color.White oControl.BackColor = Color.White
End Try End Try
Dim oForeColor As Color
Try Try
oColor = Color.FromName(oResultRow.Item("FontColor")) oForeColor = Color.FromName(oResultRow.Item("FontColor"))
oControl.ForeColor = oColor oControl.ForeColor = oForeColor
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex) LOGGER.Debug("Column [FontColor] not found. Using Default of [Black]")
oControl.ForeColor = Color.Black oControl.ForeColor = Color.Black
End Try End Try