Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help! Need to create an array for cinema seating project?

Status
Not open for further replies.

kiwiCoder

Technical User
Aug 2, 2001
45
NZ
I'm creating a program for school that represents a cinema booking system. I don't know where to start for the seat selection. There are to be 6 cinemas, each having 120 seats.I nedd to be able to select a type i.e Adult or child & then as I click a seat it will change color and update a database with relevant seat info, seat number, cost etc. What is the best solution for representing each seat and linking it to the database which has lists of seats for each cinema ranging A1-20 through F1-20.I just don't know where to start. I only want to use 1 form t orepresent all 6 cinemas. Any help would be greatly appreciated.
 
At the first glance at your problem I would start as follows:

1. Make a new Project with a starting form.
2. Populate a Listbox on it to the select the right cinema number (from 1 to 6).
3. On the click event of this Listbox, draw a control array of 120 buttons (or as many as needed in the selected cinema). Write a subroutine (in a separate module) to manage this (determine how many rows you can display on your screen etc.)
4. keep the number of seats in ache cinema in a database so you know how many seats you should display for the selected cinema.
5. make another table in the same database for every cinema with the status of each seat at that moment (column for "Child/Adult", another column for "price", another column for "reserved" etc.)
6. put a status bar at the bottom of your form, and display all this data as soon as any seat has been clicked
7. change font color of a selected seat as soon as it is reserved
8. save all change in the database

Hope this helps.
Let me know at
vincent.mairiaux@yucom.be



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top