jj 09.06 2
This commit is contained in:
parent
70bf274971
commit
0beed4541d
@ -983,13 +983,22 @@ Public Class ClassControlBuilder
|
||||
Private Sub Textbox_Currency_Handler(sender As Object, e As EventArgs)
|
||||
Dim control As TextBox = DirectCast(sender, TextBox)
|
||||
Dim value As Decimal
|
||||
If Decimal.TryParse(control.Text.Trim(), value) Then
|
||||
'control.Text = value.ToString("c")
|
||||
'control.SelectionStart = control.SelectionStart + 1
|
||||
control.Text = FormatCurrency(control.Text)
|
||||
'value = FormatNumber(value, -1, TriState.UseDefault, TriState.UseDefault, TriState.True)
|
||||
'control.Text = value.ToString("n")
|
||||
Dim currencyRegex = New System.Text.RegularExpressions.Regex("[0-9,\.]*")
|
||||
Dim match = currencyRegex.Match(control.Text)
|
||||
|
||||
If Not match.Success Then
|
||||
hier currency prüfen
|
||||
End If
|
||||
|
||||
|
||||
|
||||
'If Decimal.TryParse(control.Text.Trim(), value) Then
|
||||
' 'control.Text = value.ToString("c")
|
||||
' 'control.SelectionStart = control.SelectionStart + 1
|
||||
' 'control.Text = FormatCurrency(control.Text)
|
||||
' 'value = FormatNumber(value, -1, TriState.UseDefault, TriState.UseDefault, TriState.True)
|
||||
' 'control.Text = value.ToString("n")
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
Private Sub TextBox_Decimal_Handler(sender As Object, e As EventArgs)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user