Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Multiple datasets per business object
Message
De
09/03/2006 11:24:09
Jason Mesches
Ocean Systems Engineering Corporation
Carlsbad, Californie, États-Unis
 
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01102649
Message ID:
01102786
Vues:
15
Hello Matt,

While the idea is to use just one dataset per business object, the framework handles multiple datatables within that dataset. What we've done is use one stored procedure to populate multiple datatables with lookup data and then a separate datatable -- again, in the same dataaset -- for updatable information.

Hope that helps,
---J

>I have many web pages that show summary data and detailed database for the same entity on one page. Because of this I have 2 methods on my business object. I have tried to call both methods, but from what I see in the code, the business object can only handle 1 dataset at a time, so the first dataset is overwritten by the second.
>
>I thought I might subclass mmBusinessObject to handle more than one dataset, but there would be too much code for me to overload.
>
>Then I thought I could just create 2 instances of the same business object in my web page so they each could store 1 dataset. But at design time, the BindingSource builder looks at class names and not instances of a class. So I can't assign 1 instance to some controls and the other instance to other controls.
>
>I'm sure the question will be why "Why not create 2 classes". That is what I have resorted to so far. But my class library is growing very fast and I have multiple classes that query the table just so I can show the data a little differently on the same page. That doesn't sit right with me.
>
>Any suggestions?
>
>Matt
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform