Information générale
Catégorie:
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
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement