See the How to: Calculate a Property Value Based on Values from a Detail Collection help topic for more information.
See Also:
XPO Best Practices
How to display details collections with descendant classes filtered by object type in a DetailView
| Compare Features and Pricing |
Buy a New Product Subscription |
Renew an Existing Subscription |
| Search the KB | My Questions | Code Examples |
| Documentation | Demos | Training | Webinars |
See the How to: Calculate a Property Value Based on Values from a Detail Collection help topic for more information.
See Also:
XPO Best Practices
How to display details collections with descendant classes filtered by object type in a DetailView
Not using XAF web, just to let you know that there are warnings in 12.2.5:
Warning 1 Could not resolve this reference. Could not locate the assembly "DevExpress.Web.ASPxEditors.v12.2". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. WinWebSolution.Web
Warning 2 Could not resolve this reference. Could not locate the assembly "DevExpress.Web.ASPxGridView.v12.2". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. WinWebSolution.Web
Warning 3 The referenced component 'DevExpress.Web.ASPxEditors.v12.2' could not be found. WinWebSolution.Web
Warning 4 The referenced component 'DevExpress.Web.ASPxGridView.v12.2' could not be found. WinWebSolution.Web
using System;
using DevExpress.Xpo;
using DevExpress.Persistent.BaseImpl;
namespace WinWebSolution.Module {
public class Order : BaseObject {
public Order(Session session) : base(session) { }
private string fDescription;
public string Description {
get { return fDescription; }
set { SetPropertyValue("Description", ref fDescription, value); }
}
private decimal fTotal;
public decimal Total {
get { return fTotal; }
set {
SetPropertyValue("Total", ref fTotal, value);
if(!IsLoading && !IsSaving && Product != null) {
Product.UpdateOrdersTotal(true);
Product.UpdateMaximumOrder(true);
}
}
}
private Product fProduct;
[Association("Product-Orders")]
public Product Product {
get { return fProduct; }
set {
Product oldProduct = fProduct;
SetPropertyValue("Product", ref fProduct, value);
if (!IsLoading && !IsSaving && oldProduct != fProduct) {
oldProduct = oldProduct ?? fProduct;
oldProduct.UpdateOrdersCount(true);
oldProduct.UpdateOrdersTotal(true);
oldProduct.UpdateMaximumOrder(true);
}
}
}
}
}
To start a chat you should create a support ticket