Last post Jan 28, 2011 12:27 PM by chinnisandeep
Jan 28, 2011 01:49 AM|alicia89|LINK
Hi, I'm currently assign to do a project regarding a cinema system. I'm facing the cinema's seating problem.
1. after the staff had chosen the seat from the seating plan, how do i check whether that particular seat/seat number, for that particular movie, at that particular time and date is already taken?
2. after receiving input such as: date, time, movie and the number of tickets, how can i check whether the number of seat chosen by the staff is equal to input (number of tickets) in 2 different web form?? *if it is in the same web form, i can just refer
to the text field of the input, but what if the seating plan is in another web form??? how do i compare the values???*
This is the problems that i faced currently.. it will be great if i can get some idea on how to solve this problem =D
Thanks in advanced for any advise provided ^^
Jan 28, 2011 07:29 AM|Mikesdotnetting|LINK
I would have a Performances table, which would have details of the screenings - date, time, movie, etc. I would also have a BookedSeats table, which would link a seat to a performance if it was booked. Then I'd just check to see if a seat was in that table
to decide whether it was available or not.
Jan 28, 2011 12:27 PM|chinnisandeep|LINK
1) You should not check after the staff has chosen the seats. When you load the form which has the seating plan, you should disable the seats which have already been sold. This you can do by, going to the database and getting the details of all the seats
that have been sold already.
2) If the number of seats required and the seat selection are in two different forms, the number has to be persisted to the seat selection form. As the staff updates the seat selection you should compare the seats required and seats selected. Once the number
is equal, seat selection should be disabled and a finalize selection button should be enable. When the number is not equal, the finalize selection should be disabled.
If you are going to deal with concurrency in seat selection, when the staff selection each seat a check needs to be made to a database table which keeps track of all the seats which are still not sold, but are unavailable as they are in the process of being
sold. You could define the process of being sold as either when the staff selects a seat or when the finalize selections button is clicked.