Exemplo n.º 1
0
        internal List <IBooking> CreateBookings(List <IAvaliableRoom> selectedRoomList, DateTime start, DateTime end, string reservetime, string contractid, string reservationid)
        {
            List <IBooking> bookinglist = new List <IBooking>();

            foreach (IAvaliableRoom room in selectedRoomList)
            {
                IRoomPrice roomprice = dbCon.GetRoomPrice(room.RType);
                for (int i = 1; i <= room.ChosenNum; i++)
                {
                    var booking = new Booking();
                    dbCon.UpdateClock();
                    bookinglist.Add(dbCon.CreateBooking(booking.ID, start, end, reservetime, contractid, room.RType, roomprice.Price, reservationid));
                }
            }
            LCon.Log_Booked(dbCon.GetCustomer(contractid), bookinglist);
            return(bookinglist);
        }
Exemplo n.º 2
0
        internal IBooking CreateBooking(string BookingID, DateTime start, DateTime end, string reservetime, string contractid, RoomType roomtype, double thisprice, string reservationid)
        {
            IBooking booking = dbCon.CreateBooking(BookingID, start, end, reservetime, contractid, roomtype, thisprice, reservationid);

            return(booking);
        }