Ejemplo n.º 1
0
        // Adds a room to the database.
        internal IRoom CreateRoom(string roomNum, RoomType rType)
        {
            var room = new Room();

            dbCon.UpdateClock();
            return(dbCon.CreateRoom(room.ID, roomNum, rType, RoomStatus.Idle));
        }
Ejemplo n.º 2
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);
        }
Ejemplo n.º 3
0
 public void SetClock()
 {
     dbCon.UpdateClock();
 }