Browse Source

..

Branch_JinYang
xusc 10 months ago
parent
commit
821878f64d
  1. 11
      src/aspnet-core/ICS.Common/Extension/LinqExpressionExt.cs

11
src/aspnet-core/ICS.Common/Extension/LinqExpressionExt.cs

@ -88,18 +88,11 @@ namespace ICS.Common.Extension
constant = Expression.Constant(filterCondition.ColumnValue); constant = Expression.Constant(filterCondition.ColumnValue);
break; break;
case ConfigColumnDataType.type_int: case ConfigColumnDataType.type_int:
if (currentProp.PropertyType == typeof(int))
{
constant = Expression.Constant(filterCondition.ColumnValue.ToInt());
}
else
{
constant = Expression.Constant(filterCondition.ColumnValue.ToIntWithNull());
}
constant = Expression.Constant(filterCondition.ColumnValue.ToInt(), currentProp.PropertyType);
break; break;
case ConfigColumnDataType.type_decimal: case ConfigColumnDataType.type_decimal:
constant = Expression.Constant(filterCondition.ColumnValue.ToDecimal());
constant = Expression.Constant(filterCondition.ColumnValue.ToDecimal(), currentProp.PropertyType);
break; break;
case ConfigColumnDataType.type_datetime: case ConfigColumnDataType.type_datetime:
constant = Expression.Constant(filterCondition.ColumnValue.ToDate(), currentProp.PropertyType); constant = Expression.Constant(filterCondition.ColumnValue.ToDate(), currentProp.PropertyType);

Loading…
Cancel
Save