Click here to Skip to main content
15,896,487 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I had a seats table contain (SeatsId,SeatName,SeatStatus) .... created in Microsoft SQL Server with stored procedures (Select,Update,Delete,Insert)
I create booking page in ASP.NET and i can list the seats using entity data source.....

but the Problem is:

how to list the not booked seats in the drop down list or how to add validate to drop down list to check SeatStatus . .......

for example if SeatStatus.value == booked not display this related filed

or maybe i can add Where Expression to the entity data source like:

it.[SeatStatus] == notbooked 



Thanks
Posted
Comments
[no name] 24-Aug-13 10:10am    
"maybe i can add Where Expression", well that seems like a pretty good idea to me. Why don't you try it and see what happens?

1 solution

yup its work thanks a million :

XML
<asp:EntityDataSource ID="EntityDataSource4" runat="server" AutoGenerateWhereClause="True" ConnectionString="name=ARS_DBEntities2" DefaultContainerName="ARS_DBEntities2" EntitySetName="Seats" Select="it.[SeatId], it.[SeatName], it.[SeatStatus]" Where="">
<SelectParameters>
<asp:ControlParameter ControlID="DropDownList1" DbType="Int16" Name="flighId" PropertyName="SelectedValue" />
</SelectParameters>
<WhereParameters>
<asp:ControlParameter ControlID="DropDownList1" DbType="Int16" Name="FlightId" PropertyName="SelectedValue" />
<asp:FormParameter DefaultValue="notbooked" FormField="it.[SeatStatus]" Name="SeatStatus" />
</WhereParameters>
</asp:EntityDataSource>
 
Share this answer
 
v2

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