Print Page | Close Window

Best way to store/access "global" variables?

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce Classic
Forum Discription: For .NET 2.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=907
Printed Date: 16-Apr-2024 at 5:08am


Topic: Best way to store/access "global" variables?
Posted By: HFloyd
Subject: Best way to store/access "global" variables?
Date Posted: 08-Aug-2008 at 1:44pm
Hi,

First, an explanation of the app functionality...

In my application, one of the Modules is tracking data related to putting on a yearly auction. Some of the tasks that need to be managed:
- Adding info about items donated or otherwise acquired for the auction (BO: ItemDonation)
- Sorting out all the various items into Auction Lots (BO: AuctionLot)
- Selling tickets (and other stuff related) to the auction (related BOs: Event, Product, FinancialTransaction)
- etc...

There is another BO I have called "AuctionYear" which is linked to all of these other BOs, which keeps all this data separated by auction. (Since they do an auction every year)

This allows the various BOs to access info about the AuctionYear they are associated with (ItemDonation.AuctionYear.Year), as well as allow the return of collections of entities for a given AuctionYear (AuctionYear.AuctionLots)

Generally, when the user is working on the auction, she only wants to see and deal with a single year at a time (aka this current year). So, somewhere in my app ui, I will need to have a quick combo box or something that allows the user to choose the AuctionYear they want to be working with. This would be used to filter the various BOs the user sees in the interface and should be passed in as a parameter for the "Create" methods.

So, my question is this:

How is the best way to handle this so that:
a) The currently active "AuctionYear" value is easy to see and change by the user
b) The AuctionYear value is easy to grab from anywhere in the application for filtering/data updating purposes.

Thanks for any insights!

Heather




Print Page | Close Window