Ejemplo n.º 1
0
        public bool CreateBooking(DateTime startDate, DateTime endDate, int memberID, string selectedRooms)
        {
            bookingDB.CreateBooking(startDate, endDate, memberID);
            int bookingID = bookingDB.GetLastBookingID();
            int roomID = 0;
            string rate = "";
            string[] rooms = selectedRooms.Split(',');
            int roomCount = rooms.Count();
            for (int i = 0; i < roomCount - 1; i++)
            {
                roomID = Convert.ToInt32(rooms[i]);
                bookingDB.SetUnavailable(startDate, endDate, roomID, bookingID);
                rate += bookingDB.GetRate(roomID).ToString() + "#";
            }

            InvoiceDBAccess invoiceDB = new InvoiceDBAccess();
            invoiceDB.CreateInvoice(bookingID, selectedRooms, rate);
            return true;
        }
Ejemplo n.º 2
0
 public InvoiceHandler()
 {
     invoiceDB = new InvoiceDBAccess();
 }