|
@ -18,7 +18,10 @@ namespace BBWY.Client.Converters |
|
|
if (string.IsNullOrEmpty(strValue)) |
|
|
if (string.IsNullOrEmpty(strValue)) |
|
|
return null; |
|
|
return null; |
|
|
decimal result; |
|
|
decimal result; |
|
|
if (strValue.IndexOf('.') == strValue.Length - 1 || !decimal.TryParse(strValue, out result)) |
|
|
var dotIndex = strValue.IndexOf('.'); |
|
|
|
|
|
if (dotIndex == strValue.Length - 1 || |
|
|
|
|
|
(dotIndex != -1 && strValue.EndsWith("0")) || |
|
|
|
|
|
!decimal.TryParse(strValue, out result)) |
|
|
return DependencyProperty.UnsetValue; |
|
|
return DependencyProperty.UnsetValue; |
|
|
return result; |
|
|
return result; |
|
|
} |
|
|
} |
|
|