/// <summary> /// 取消单个booking /// </summary> internal void CancelBooking(string BookingID) { IBooking book = dbCon.GetBooking(BookingID); book.BStatus = BookStatus.Canceled; dbCon.UpdateBooking(book); //如果reservation中只有一个booking,当booking取消时,reservation也取消 string reservationID = book.ReservationID; List <IBooking> books = dbCon.GetBookings(reservationID); if (books.Count() == 1) { CancelReservation(reservationID); } }
public IBooking GetBooking(string bookingID) { return(dbCon.GetBooking(bookingID)); }