May I point out that it's bad practise to keep the data in RAM?
PS: It's also bad practise to hard code the 60 seats into the program. It would be easy enough to use application settings to hold this info without hard coding it.
adam_k
Practically a Posting Shark
803 posts since Jun 2011
Reputation Points: 256
Solved Threads: 149
Original poster said: "As all entries will be held in RAM, when the GUI is opened, all m_nameList array entries will be empty. As the user uses the program, they can highlight a row in the lstReservations list and then use the GUI textboxes to enter the customer's name which will then be populated into the respective array entry."
This assumes that the PC will never shut down, by accident, by hardware malfunction or lack of electricity. Keeping the data in RAM, without saving and presenting the user a clean array to start reserving from scratch - by design - IS bad practise.
Your suggestion lolafuertes is improving this, but still the XML file should be saved every x minutes or after a seat has changed.
About hard coding the seats numbers: It is always a good idea to avoid using data in your code. Programs should act on data and not contain them.
If in 5 years time the cinema expands, the programmer will receive a call to rebuild the program with 70 seats this time.
If the code for this program exists, the programmer will only need to find a way to make it compatible with whatever we will be using by then - try converting a VB 5 to .NET - or find the appropriate environment to change the code and compile as VB .Net Framework x.
Same applies if original poster tries to sell this program to another cinema.
I've been supporting a program for a while now. I find the way it was written brilliant and without limitations. That is because the programmer created everything dynamic and configurable. All queries to the database where written in a table in the database and the connection string to the registry.
I've changed about 80% of the existing queries and created a few of my own, without a problem and without giving the creator a call.
adam_k
Practically a Posting Shark
803 posts since Jun 2011
Reputation Points: 256
Solved Threads: 149