幽梦紫曦

XAF配置主从关系

电脑版发表于:2020/11/9 11:39
1.建立主表可读可写属性并使用Association特性进行关联
  [Association("采购订单明细")]
  [XafDisplayName("采购订单")]
  public PurchaseOrder PurchaseOrder
  {
     get { return _purchaseOrder;}
     set {SetPropertyValue(nameof(PurchaseOrder), ref _purchaseOrder, value);}
  }
2.建立从表
  [DevExpress.Xpo.Aggregated]//聚合型
  [Association("采购订单明细")]
  [XafDisplayName("采购订单")]
  public XPCollection<OrderDetails> OrderDetails
  {
     get { GetCollection<OrderDetails>("OrderDetails");}
  }


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