DataTable dt = try.Query(" select Rooms.RoomId, Rooms.RoomType From Rooms INNER JOIN Reservations ON ( Rooms.RoomId = Reservations.RoomId ) AND GETDATE() BETWEEN Reservations.CheckInDate AND Reservations.CheckOutDate ORDER BY Rooms.RoomType");
if (dt.Rows.Count > 0)
{
LblMessage.Text = " No Room Available";
}
else
{
DataTable dt1 = try.Query( "Select Rooms.RoomType, Rooms.PricePerNight From Rooms INNER JOIN Reservations ON (Rooms.RoomId != Reservations.Roomid) ORDER BY Rooms.Roomtype");
if (dt1.Rows.Count > 0)
{
GridResult.DataSource = dt1;
GridResult.DataBind();
}
else
{
LblMessage.Text = "No Rooms Availble";
}
当我搜索时,我没有得到任何可用的房间“没有可用的房间”将会出现,我有这么多房间可用table Rooms rooms.roomid 它们显示那些在预订中找不到但在网格视图中的房间表中的项目的结果..仅此而已
谢谢请帮帮我