General information
Category:
The Mere Mortals .NET Framework
As an additional tidbit, a symptom is that in
mmBusinessObject.SetCurrentDataSet(DataSet ds, string tableName, bool setRequiredFields, raiseEvents, int rowNumber)
ds has been initialized, but there are no tables in the dataset. If I skip over
this._currentDataSet = ds;
I don't get an error, and everything fills as expected. I haven't tracked down why it's not filling yet.
oSalesDocument.GetEmptyDataSet(); // Contains Invoices, InvoicesItems...
this.oInvoice = (Invoices)RegisterPrimaryBizObj(new Invoices());
oSalesDocument.SetInvoices(oInvoice); // Sets oSalesDocument.Invoices = oInvoices
this.oInvoicesItem = (InvoicesItems)RegisterBizObj(new InvoicesItems());
oSalesDocument.SetInvoicesItems(oInvoicesItem); // Sets oSalesDocument.InvoicesItems = oInvoicesItems, sets child relationship
SalesDocuments Biz Obj
public void SetInvoicesItems(InvoicesItems oII)
{
this.oInvoicesItem = oII;
ParentObj.RegisterChildBizObj(BizObj);
BizObj.AutoDeleteOnParentDeleted = true;
BizObj.AutoNewOnParentAdded = false;
BizObj.AutoEmptyOnParentAdded = true;
oII.SetForeignParentKeyField = "InvoiceFK";
}
oInvoice.NewRow() is what loads the data and causes the error
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only