Information générale
Catégorie:
The Mere Mortals .NET Framework
Ok, the business object's FillDataSet() method does set the business object's DataSet property. Pardon my confusion for a while.
I have a Contract business object. In a (parent) Client page I have
1) a (child) Contracts edit-DataGrid, and
2) a (child) Events edit-DataGrid that includes a DropDownList of the Contracts for that client.
I used different methods in my Contract business object
1m) GetContractsByClientID(intClientID) for the DataGrid of Contracts
2m) GetContractNamesByClientID(intClientID) for the DropDownList
I found out that I had to call 1m AFTER 2m, or the Contract object used in the Contract DataGrid has the wrong DataSet.
But... Should I just have created another Contract object instance?
I just need the data, you know, for a DropDownList. Is there a database-independent way of using the appropriate mmDataAccessXXX FillDataSet() to return an arbitrary DataSet from a business object method so that it doesn't set the DataSet of the business object? Or is this wrong-headed OOP thinking?
Additionally, I imagine that the business object should return the DataSet, not the DropDownList, keeping the interface separate.
These are small OO issues, but I hope that someone can help me think a little clearer about them before I get into larger projects.
Thanks!
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