What's the best way to create a BO that establishes a parent/child relationship...for example Sales Order Header and Details? I have defined a single BO that will instantiate the 2 datasets. Each dataset accepts a parameter (Customer ID and Sales Order, respectively).
In my form I have 2 grids defined, one for each dataset, and I want to show the details for a sales order based on whichever row is selected in the header grid. I know I need to use the SelectedIndexChanged method to refresh the child grid, but I don't know how to send the Order number to the child's GetDataSet method.
private void Orders_SelectedIndexChanged(object sender, System.EventArgs e)
{
string cSono = ????;
this.oDetails = (SalesOrderDetails)this.RegisterBizObj(new SalesOrderDetails());
this.oDetails.GetSalesOrderDetails(cSono);
this.BindControl(this.DetailGrid);
}
Am I on the right track or is there a better way?
TIA