예제 #1
0
        /// <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);
            }
        }
예제 #2
0
 public IBooking GetBooking(string bookingID)
 {
     return(dbCon.GetBooking(bookingID));
 }