Click here to Skip to main content
15,885,244 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I am creating some online web application . now what i need is , basically i am confused what to use in place of selecting seats i.e which control i need to use as SEAT.Here am creating One table below

SQL
Id          RouteId     A1    A2    A3    A5    A6    A7    A8    A9    A10   A11   A12   A13   A14   A15   A16   A17   A18   A19   A20   S1    S2    S3    S4    S5    S6    S7    S8    S9    S10   S11   S12   S13   S14   S15   S16   S17   S18   S19   S20   A4
----------- ----------- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
5           10          0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0                       
6           11          0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     


how to bind the column names in c#

What I have tried:

I tried using gridview .But i cant book the seat
Posted
Updated 5-Jan-17 1:39am
v2
Comments
F-ES Sitecore 5-Jan-17 6:40am    
You need to redesign your table, that design is only going to cause you problems. Have a "Flight" table with a flight ID and the flight name as well as other data like departure dates etc. Then have a Flight_Seats table with a FlightSeatID, FlightID (which relates to the row in the Flight table), and SeatName, so for flight 1 will will be like

1, 1, A1
2, 1, A2
3, 1, A3
etc

You can query that table to find all possible seats for that flight, and in that table you can also store a flag that says if the seat is booked, or any other data you need to store about the seat.

Once your data is right you can look again at how you display it, you might want to get familiar with repeaters as they give the most flexible options, forget about GridViews
Member 12857356 5-Jan-17 6:46am    
Will checck let yu know
Member 12857356 5-Jan-17 6:59am    
How it is Possible in realtime?

If we have the admin

we have to enter the details of the flight like name,Flight Departure,Flight Fare, and seating capacity

Then the admin clik ok all the detials will save in database .

In this case how insert the seat value A1 A2 like that

1 solution

This might help

Ticket Booking[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900