Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GetDataSet and FillDataSet
Message
De
22/12/2003 23:45:06
 
 
À
22/12/2003 22:56:38
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
00861487
Message ID:
00861491
Vues:
19
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
Fil
Voir

Click here to load this message in the networking platform