public List <TableTypes.Room> FindReservervableRooms(DateManagement reserveDates) { string query = "select * from Room where Room_Id not in (select Room_Id from Booking" + " where '" + reserveDates.enteranceDate.ToString("yyyy-MM-dd HH:mm:ss.fff") + "'<Checkin_Date and '" + reserveDates.checkoutDate.ToString("yyyy-MM-dd HH:mm:ss.fff") + "'> Booking_Date )"; return(runRoomQuery(query)); }
public void enterReservationIntoBookingTable(UserTypes.Customer customer, int roomNumber, TableTypes.Hotel hotel, TableTypes.Payment payment, DateManagement reserveDates) { string query = "insert into Booking (Customer_Id , Room_Id , Hotel_Id , Payment_Id , Booking_Date , Checkin_Date , No_Of_Nights)" + "VALUEs (" + customer.Custome_Id + "," + roomNumber + "," + hotel.Hotel_Id + "," + payment.PaymentID + "," + "'" + reserveDates.enteranceDate + "'" + "," + "'" + reserveDates.enteranceDate + "'" + "," + reserveDates.ReservationDuration + ")"; runHotelQuery(query); //dummy value }