本文介绍了Bookig在ASP.NET中的席位的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个席位表包含(SeatsId,SeatName,SeatStatus) ....在 Microsoft SQL Server 中创建存储过程(选择,更新,删除,插入)

我在ASP.NET中创建预订页面,我可以使用实体数据列出座位来源 .....



问题是:



如何列出下拉列表中未预订的座位或如何添加验证下拉列表以检查 SeatStatus 。 .......



例如如果SeatStatus.value ==预订不显示此相关文件



也许我可以将Where Expression添加到实体数据源,例如:



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

推荐答案

<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>


这篇关于Bookig在ASP.NET中的席位的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-16 19:14