How to build Relation between Business Object in .frx model
public class Category
{
private string FName;
private string FDescription;
private List<Product> FProducts;
private Product FProduct;
public string Name
{
get { return FName; }
}
public string Description
{
get { return FDescription; }
}
public List<Product> Products
{
get { return FProducts; }
}
public Category(string name, string description)
{
FName = name;
FDescription = description;
FProducts = new List<Product>();
}
}
public class Product
{
private string FName;
private decimal FUnitPrice;
public string Name
{
get { return FName; }
}
public decimal UnitPrice
{
get { return FUnitPrice; }
}
public Product(string name, decimal unitPrice)
{
FName = name;
FUnitPrice = unitPrice;
}
}
Just like the two class in example code. We got a "Category category" object for example. In .frx model, how to build relation between category and category.Products?
The method in FRNetUsermanual doesn't work.
{
private string FName;
private string FDescription;
private List<Product> FProducts;
private Product FProduct;
public string Name
{
get { return FName; }
}
public string Description
{
get { return FDescription; }
}
public List<Product> Products
{
get { return FProducts; }
}
public Category(string name, string description)
{
FName = name;
FDescription = description;
FProducts = new List<Product>();
}
}
public class Product
{
private string FName;
private decimal FUnitPrice;
public string Name
{
get { return FName; }
}
public decimal UnitPrice
{
get { return FUnitPrice; }
}
public Product(string name, decimal unitPrice)
{
FName = name;
FUnitPrice = unitPrice;
}
}
Just like the two class in example code. We got a "Category category" object for example. In .frx model, how to build relation between category and category.Products?
The method in FRNetUsermanual doesn't work.
Comments
You don't need to create relations between business objects. The relation editor works with table datasources only. Just put two data bands (master-detail), connect the master to Category, the detail to Category.Products.