asp.net c# how to use online ticket reservation

Posted by Vanchi050585 under Regular Expressions on 2/23/2011 | Points: 10 | Views : 19418 | Status : [Member] | Replies : 2
hi all,

I am developing a online ticket reservation site. i have one doubt in that.
that is,

at the same time 2 or more peoples book the same tickets , then who will be the getting the tickets and what about the others. how to solve the problem. any techniques is there.

i am new for this. please anyone tell the solution for this.

Thanks

Thanks
tvn



Responses

Posted by: T.saravanan on: 2/23/2011 [Member] [MVP] Silver | Points: 25

Up
0
Down
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

Posted by: Naimishforu on: 2/23/2011 [Member] [MVP] Bronze | Points: 25

Up
0
Down
You may lock perticular module or function which books the ticket so that other can't access it same time.

Thanks,
Naimish
http://dotnetinterview.zxq.net/
http://naimishpandya.blogspot.in/

Vanchi050585, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response