幽梦紫曦

XAF条件查询

电脑版发表于:2020/12/16 14:29
IObjectSpace ios = Application.CreateObjectSpace();
GroupOperator group = new GroupOperator();
CriteriaOperator criteria = CriteriaOperator.Parse("UserName=?", "张三");
CriteriaOperator criteria1 = CriteriaOperator.Parse("UserID=?", 2);
group.Operands.Add(criteria);
group.Operands.Add(criteria1);
CollectionSource datas = new CollectionSource(ios, typeof(Userinfo));
datas.Criteria["default"] = group;
foreach (Userinfo item in datas.List)
{
    string name= item.UserName;
}

关于TNBLOG
TNBLOG,技术分享
ICP备案 :渝ICP备18016597号-1
App store Android
精彩评论
{{item.replyName}}
{{item.content}}
{{item.time}}
{{subpj.replyName}}
@{{subpj.beReplyName}}{{subpj.content}}
{{subpj.time}}
猜你喜欢