As mentioned in a previous post, I am currently learning C#, and for my first (well second if you include hello world and some messing about) real project, I'm going to create a basic EPOS system and then expand upon it..
My intention is to have all pricing, Cashier details, sales transactions, etc.. stored within a MySQL Database (I can move from PHP to C#, but I can't bring myself to moving away from MySQL!)
What I would like to check is the following:
I have 2 forms(at present)
- A login screen (where the user enters their PIN number)
- The main Sales screen.
When the user logs in, I am going to authenticate them against the details held within my database, and if successful, then I will load the main sales screen.
I need to somehow transfer information around between forms, so what I have done is created a new class file called variableStore.cs
in here, I am going to be storing the userID, userName (so I can have "Currently Logged in: John Doe" on each form status bar.
But I will also be using the same file for transferring "transaction total", etc.. around between forms.
Is this the correct (ok, not correct, but is this how you would do it?) way of doing things?