我现在用的是AR303000屏幕来搜索客户。 如果我添加多个过滤器只应用第一滤波器。 此外,结果集不包括GeneralInfoMainAddress线。 这可能就是为什么过滤器不工作。
AR303000Content AR303000 = context.AR303000GetSchema(); context.AR303000Clear();
List<Command> cmds = new List<Command>();
cmds.Add(AR303000.CustomerSummary.ServiceCommands.EveryCustomerID);
cmds.Add(AR303000.CustomerSummary.CustomerID);
cmds.Add(AR303000.CustomerSummary.CustomerName);
cmds.Add(AR303000.GeneralInfoMainAddress.AddressLine1);
cmds.Add(AR303000.GeneralInfoMainAddress.City);
cmds.Add(AR303000.GeneralInfoMainAddress.State);
cmds.Add(AR303000.GeneralInfoMainAddress.PostalCode);
List<Filter> filters = new List<Filter>();
filters.Add(new Filter()
{
Field = new Field()
{
FieldName = AR303000.CustomerSummary.CustomerName.FieldName,
ObjectName = AR303000.CustomerSummary.CustomerName.ObjectName
},
Condition = FilterCondition.Contain,
Value = "DOE, JOHN",
Operator = FilterOperator.And
});
filters.Add(new Filter()
{
Field = new Field()
{
FieldName = AR303000.GeneralInfoMainAddress.AddressLine1.FieldName,
ObjectName = AR303000.GeneralInfoMainAddress.AddressLine1.ObjectName
},
Condition = FilterCondition.Contain,
Value = "255",
Operator = FilterOperator.And
});
var AR303000Export = context.AR303000Export(cmds.ToArray(), filters.ToArray(), 0, false, false);
return AR303000Export[0][0];