private Expression CreateFilterExpression() { Expression right = Second?.Apply(Column.Expression.Body); Expression left = First?.Apply(Column.Expression.Body); if (left != null && right != null) { switch (Operator) { case "And": return(Expression.AndAlso(left, right)); case "Or": return(Expression.OrElse(left, right)); } } return(left ?? right); }
private Expression CreateFilterExpression() { Expression left = First?.Apply(Column.Expression.Body); Expression right = Second?.Apply(Column.Expression.Body); if (IsMulti == true && left != null && right != null) { if ("and".Equals(Operator, StringComparison.OrdinalIgnoreCase)) { return(Expression.AndAlso(left, right)); } if ("or".Equals(Operator, StringComparison.OrdinalIgnoreCase)) { return(Expression.OrElse(left, right)); } } return(left ?? right); }
private Expression?BuildFilterExpression() { Expression?left = First?.Apply(Column.Expression.Body); if (Type == GridFilterType.Double && left != null) { Expression?right = Second?.Apply(Column.Expression.Body); if (right != null && "and".Equals(Operator, StringComparison.OrdinalIgnoreCase)) { return(Expression.AndAlso(left, right)); } if (right != null && "or".Equals(Operator, StringComparison.OrdinalIgnoreCase)) { return(Expression.OrElse(left, right)); } } return(left); }