V 2.4.9.4 WISAG Buttons, Reject-Attribute als Ausnahme in CheckUpdateIndexe, FilterActive Hinweis, Logging anpassen
This commit is contained in:
@@ -36,10 +36,8 @@ Public Class ClassFormat
|
||||
''' <param name="pType"></param>
|
||||
''' <returns></returns>
|
||||
Public Shared Function GetConvertedValue(pValue As Object, pType As String) As Object
|
||||
Dim oConvertedValue = pValue
|
||||
Dim oCultureInfo As CultureInfo
|
||||
|
||||
|
||||
Dim oConvertedValue
|
||||
LOGGER.Debug($"GetConvertedValue: {pType}")
|
||||
|
||||
Select Case pType
|
||||
Case ClassControlCreator.CONTROL_TYPE_DOUBLE
|
||||
@@ -48,14 +46,29 @@ Public Class ClassFormat
|
||||
End If
|
||||
|
||||
Case ClassControlCreator.CONTROL_TYPE_CURRENCY
|
||||
If Double.TryParse(pValue, NumberStyles.Currency, CultureInfo.InvariantCulture, oConvertedValue) Then
|
||||
Return oConvertedValue
|
||||
End If
|
||||
Try
|
||||
LOGGER.Debug($"GetConvertedValue: Converting {pValue.ToString} to Currency ")
|
||||
If Double.TryParse(pValue, NumberStyles.Currency, CultureInfo.InvariantCulture, oConvertedValue) Then
|
||||
Return oConvertedValue
|
||||
End If
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
End Try
|
||||
|
||||
|
||||
Case ClassControlCreator.CONTROL_TYPE_INTEGER
|
||||
If Integer.TryParse(pValue, NumberStyles.Integer, CultureInfo.InvariantCulture, oConvertedValue) Then
|
||||
Return oConvertedValue
|
||||
End If
|
||||
Case Else
|
||||
LOGGER.Debug($"GetConvertedValue - Case ELSE - pType is {pType}")
|
||||
Try
|
||||
oConvertedValue = pValue.ToString
|
||||
Catch ex As Exception
|
||||
LOGGER.Warn($"Error in GetConvertedValue: pType is {pType} - converting value to String")
|
||||
oConvertedValue = ""
|
||||
End Try
|
||||
|
||||
End Select
|
||||
|
||||
Return oConvertedValue
|
||||
|
||||
Reference in New Issue
Block a user