Fix GetStringValue formatting float and other values incorrectly
This commit is contained in:
parent
431a22c955
commit
d4995b4d93
@ -1,12 +1,16 @@
|
|||||||
# CHANGELOG
|
# CHANGELOG
|
||||||
|
|
||||||
## 2.5.0.0
|
## 2.4.7.0
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|
||||||
- Modernisierung von verschiedenen Elementen (Validator, Startseite)
|
- Modernisierung von verschiedenen Elementen (Validator, Startseite)
|
||||||
- Format Strings für Textboxen (Währung, Fließkommazahlen, Datum & Uhrzeit)
|
- Format Strings für Textboxen (Währung, Fließkommazahlen, Datum & Uhrzeit)
|
||||||
|
- Tabellen Filter im Hauptfenster speichern
|
||||||
|
|
||||||
### Bugfixes
|
### Bugfixes
|
||||||
|
|
||||||
- Anzeige-/Indexierungsfehler bei Mehrzeiligen Textboxen
|
- Anzeige-/Indexierungsfehler bei Mehrzeiligen Textboxen
|
||||||
|
- Formatierungsfehler bei Fließkomma-Indexen
|
||||||
|
- Fehlerhafte Verkettung von Werten bei abhängigen Controls
|
||||||
|
|
||||||
|
|||||||
@ -58,22 +58,28 @@ Public Class ClassFormat
|
|||||||
Return oConvertedValue
|
Return oConvertedValue
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Converts values to their respective data type and then back to string
|
||||||
|
''' according to the current culture
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="pValue"></param>
|
||||||
|
''' <returns></returns>
|
||||||
Public Shared Function GetStringValue(pValue As Object) As String
|
Public Shared Function GetStringValue(pValue As Object) As String
|
||||||
Select Case pValue.GetType
|
Select Case pValue.GetType
|
||||||
Case GetType(Single)
|
Case GetType(Single)
|
||||||
Return DirectCast(pValue, Single).ToString(CultureInfo.InvariantCulture)
|
Return DirectCast(pValue, Single).ToString(CultureInfo.CurrentCulture)
|
||||||
|
|
||||||
Case GetType(Double)
|
Case GetType(Double)
|
||||||
Return DirectCast(pValue, Double).ToString(CultureInfo.InvariantCulture)
|
Return DirectCast(pValue, Double).ToString(CultureInfo.CurrentCulture)
|
||||||
|
|
||||||
Case GetType(Decimal)
|
Case GetType(Decimal)
|
||||||
Return DirectCast(pValue, Decimal).ToString(CultureInfo.InvariantCulture)
|
Return DirectCast(pValue, Decimal).ToString(CultureInfo.CurrentCulture)
|
||||||
|
|
||||||
Case GetType(Date)
|
Case GetType(Date)
|
||||||
Return DirectCast(pValue, Date).ToString(CultureInfo.InvariantCulture)
|
Return DirectCast(pValue, Date).ToString(CultureInfo.CurrentCulture)
|
||||||
|
|
||||||
Case GetType(DateTime)
|
Case GetType(DateTime)
|
||||||
Return DirectCast(pValue, DateTime).ToString(CultureInfo.InvariantCulture)
|
Return DirectCast(pValue, DateTime).ToString(CultureInfo.CurrentCulture)
|
||||||
|
|
||||||
Case Else
|
Case Else
|
||||||
Return pValue.ToString
|
Return pValue.ToString
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user