case 4676
This commit is contained in:
@@ -843,6 +843,11 @@ namespace Sockeye.DataList
|
||||
sValue = sValue.Replace(nfi.CurrencyGroupSeparator, "");
|
||||
sValue = sValue.Replace(nfi.CurrencyDecimalSeparator, ".");
|
||||
}
|
||||
//case 4676
|
||||
// Decimal, Currency (after the existing separator normalisation)
|
||||
if (!decimal.TryParse(sValue, NumberStyles.Number, CultureInfo.InvariantCulture, out var d))
|
||||
throw new ArgumentException($"Invalid numeric filter value [{sValue}]");
|
||||
sValue = d.ToString(CultureInfo.InvariantCulture);
|
||||
}
|
||||
break;
|
||||
case UiFieldDataType.Integer:
|
||||
@@ -852,6 +857,12 @@ namespace Sockeye.DataList
|
||||
sValue = sValue.Replace(nfi.NumberGroupSeparator, "");
|
||||
sValue = sValue.Replace(nfi.NumberDecimalSeparator, ".");
|
||||
}
|
||||
|
||||
//casse 4676
|
||||
// Integer, InternalId, Enum, MemorySize, Roles
|
||||
if (!long.TryParse(sValue, NumberStyles.Integer, CultureInfo.InvariantCulture, out var l))
|
||||
throw new ArgumentException($"Invalid numeric filter value [{sValue}]");
|
||||
sValue = l.ToString(CultureInfo.InvariantCulture);
|
||||
}
|
||||
break;
|
||||
case UiFieldDataType.InternalId:
|
||||
@@ -1152,7 +1163,7 @@ namespace Sockeye.DataList
|
||||
///
|
||||
public static string TagFilterToSqlCriteriaHelper(string SqlColumnNameToFilter, List<string> sValue, bool bAny)
|
||||
{
|
||||
if(sValue.Count==0) return string.Empty;
|
||||
if (sValue.Count == 0) return string.Empty;
|
||||
//if it's an OR (any) query then need to build individual terms, if it's not then it's just an all or AND query and can pass through as is
|
||||
if (sValue.Count > 0 && bAny == true)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user