Exemplo n.º 1
0
        /// <summary>
        /// 记录订单 booking 中旅客列表 customers 的 CheckIn 事件
        /// </summary>
        internal void Log_CheckIn(List <ICustomer> customers, IBooking booking)
        {
            string temp = null;

            foreach (ICustomer cus in customers)
            {
                temp += (cus.Name + " ");
            }
            dbCon.CreateLog(temp + " checked in room: " + dbCon.GetRoom(booking.RoomID).RoomNum);
        }
Exemplo n.º 2
0
        //internal bool DeleteBooking(ICustomer cus, string bookingID)
        //{
        //    return dbCon.DeleteBooking(bookingID);
        //}

        internal void CheckInCustomer(ICustomer cus)
        {
            dbCon.UpdateCustomer(cus);

            foreach (IBooking book in GetActiveBookings(cus.ID))
            {
                IRoom room = dbCon.GetRoom(book.RoomID);
                room.RStatus = RoomStatus.Occupied;
                dbCon.UpdateRoom(room);
            }
        }
Exemplo n.º 3
0
 // Returns a IRoom from id.
 internal IRoom GetRoom(string id)
 {
     return(dbCon.GetRoom(id));
 }