Question Theater booking system

skip21

Member
Joined
Oct 21, 2012
Messages
6
Programming Experience
1-3
Hi, I hope i'm posting in the right place here. I have to create a booking system for a theatre. Most if is is relatively easy stuff - adding peoples details, making sure things aren't double booked, sales etc. The one part I have little idea on is how to create is a visual representaitno fo which seats are available on a day. I have to create a version of the picture below which would indicate whether a seat is booked or not. Can anyone give me some ideas about how this might be achieved? Is there a tool I can modify or use, or maybe create a huge amount of buttons or labels and work with them in a control array etc? I really am lacking ideas.
Any help or suggestions will be extremely greatfully received.

Skip

theatre.jpg
 
There are various ways that it could be done but one way would be to use a TableLayoutPanel to create the grid and place a Label in each cell to represent the seats.
 
Hi,

To add to jmcilhinney's comment another consideration is how you read and write the booking allocations in your data source.

Once you have created your layout I would suggest that each control is named as per each unique seat allocation in your seating plan. Once a booking is made to a specific seat then you can save the name of the control which represents the seat booking in your data source.

When reading from your data source to see which seats have already been allocated you can then use the control name to interact with your seating layout using the following:-

VB.NET:
Dim TB As TextBox = DirectCast(Me.Controls("TextBox1"), TextBox)
TB.Text = "Booked"
Here the literal "TextBox1" represents a control name in string format that has been read from your data source. You can then interact with the controls in your seating plan and do what ever you need.

Cheers,

Ian
 
Back
Top