Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help with generic
Message
From
19/07/2007 15:44:49
 
 
To
18/07/2007 10:49:12
Victor Acosta
Independent Programmer.
San José, Costa Rica
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 2.0
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01241343
Message ID:
01242118
Views:
19
I vote for having a common Interface that each of these objects must implement.

~~Bonnie



>I can not create a Conditional as a CASE, IF or similar because, YES, I have 600 different objects, each table of my system represents a new object.
>
>So I will have something like this:
>
>Webpage1
>RegionCollection myregioncollection = new RegionCollection().Load();
>. . . //more code
>Webpage2
>EmployeeCollection myregioncollection = new employeCollection().Load();
>
>Other webpage to N
>AuthorCollection myregioncollection = new AuthorCollection().Load();
>
>
>So, you could have as many objects as you pages you need to perform CRUD operations.
>
>
>Now to make life easier, I am creating a web control that allows to navigate through the data (move first, move last, delete, new, etc).
>
>
>I need to recover the object from the session in the web control:
>
>
>Xtype myLOCALcollection;
>myLOCALcollection = (Xtype) Session["coleccion"];
>
>
>Here you can see my trouble, I don’t know at compile time, what is the type of the local collection, say, the current collection.
>
>In few words, I need to create the type Xtype at run-time and BASED on the type of the object that is saved into the session var.
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform