我正在使用 Condition 表达式,但我无法向FilterExpression
. 任何人都可以帮忙吗?我在这里发布了我的源代码。
带有过滤器的条件表达式:
// Filter1
FilterExpression filter1 = new FilterExpression();
filter1.FilterOperator = LogicalOperator.And;
filter1.Conditions.Add(new ConditionExpression("A_LogicalName", ConditionOperator.Equal, id1));
filter1.Conditions.Add(new ConditionExpression("B_LogicalName", ConditionOperator.Equal, id2));
query.Criteria.Filters.Add(filter1);
// 过滤器2
FilterExpression filter2 = new FilterExpression();
filter2.FilterOperator = LogicalOperator.And;
filter2.Conditions.Add(new ConditionExpression("B_LogicalName", ConditionOperator.Equal, id3));
filter2.Conditions.Add(new ConditionExpression("C_LogicalName", ConditionOperator.Equal, id4));
q_ShoppingCartItemQuantityCheck.Criteria.Filters.Add(filter2);