public override void CustomizeTypesInfo(DevExpress.ExpressApp.DC.ITypesInfo typesInfo) { base.CustomizeTypesInfo(typesInfo); var classInfo = XpandModuleBase.Dictiorary.GetClassInfo(typeof(Customer)); if (classInfo.FindMember("SumOfOrderTotals")==null) { var attributes = new Attribute[] {new VisibleInListViewAttribute(false),new VisibleInLookupListViewAttribute(false), new VisibleInDetailViewAttribute(false),new PersistentAliasAttribute("Orders.Sum(Total)")}; classInfo.CreateCalculabeMember("SumOfOrderTotals", typeof(float), attributes); typesInfo.RefreshInfo(typeof(Customer)); } }
public override void CustomizeTypesInfo(DevExpress.ExpressApp.DC.ITypesInfo typesInfo) { base.CustomizeTypesInfo(typesInfo); var classInfo = XpandModuleBase.Dictiorary.GetClassInfo(typeof(Customer)); if (classInfo.FindMember("OrderLinesFromCode") == null) { var attributes = new Attribute[] {new VisibleInListViewAttribute(false),new VisibleInLookupListViewAttribute(false), new VisibleInDetailViewAttribute(false)}; classInfo.CreateCollection("OrderLinesFromCode", typeof(OrderLine), "Order.Customer.Oid='@This.Oid'",attributes); typesInfo.RefreshInfo(typeof(Customer)); } }