Hi,
You should do like this...
Step1: Create your Table with include this columns (
Selected Seats,Selected Flag,Booked Flag ).
Step2: When a user select a seat(s) and then click a button, then update Selected Seats and Selected Flag columns
For ex: Selected Seats -->1,2,3 Selected Flag --> True
Step3: When ever user click a button at the time check it out the table Selected Seats are there and Flag also True (or) not.
For ex: Other user select a seat -->2. if the seat is available in Selected Seats column means just shown a message through that user else insert into the table based on the Route.No,Time and (Bus)Type.
Step4: If user cancel a ticket before booking, set a particular time in your table Booked Flag column is not fill means just open a ticket again.
Step5: If the ticket booked means just true (or) fill the Booked Flag column in your table.
Use optimistic Concurrency operation..Refer this link..
http://msdn.microsoft.com/en-us/library/aa0416cz.aspx
Try this way.... I hope its useful to you...
Cheers :)
Thanks,
T.Saravanan
Vanchi050585, if this helps please login to Mark As Answer. | Alert Moderator