New to C#; have been a VB.NET/VBA developer for years. Am currently working on an application for our off-site workers. I have a main switchboard form with a drop-down of project numbers. The user then has the ability to open a variety of form-based tools, to include a Budgets form. On change of the drop-down, I store a Program-scoped class variable, cJob which has multiple properties (customer, location, etc). On open of the Budgets form:
Form frm = new FieldBudgets.frmBudgets().Show();
I have a private static instance of cJob called meJob (new cJob). When going back to the switchboard, the user, without closing that instance of the Budgets for, can open additional instances of the same Budget form with different project numbers selected.
Here is my problem (sorry it took so long to get here): A Refresh button can update the data on the Budgets form, but the new meJob information from the last instance get carried to the other instance. How can I keep these separate? I thought the new meJob would stick with the individual instances.
As an aside, I do have a less than glamorous "solution" that involves a hidden textbox and reloading the new meJob on Refresh. If that is the best solution I get, so be it...
MJ