Ejemplo n.º 1
0
 // make DailyReserve instance
 private DailyReserve makeDailyReserve(string _date, ArrayList _roomList)
 {
     DailyReserve dailyReserve = new DailyReserve(
         DateTime.Parse(_date),
         _roomList
        );
     return dailyReserve;
 }
Ejemplo n.º 2
0
        // -----------------------------------------------------------------------------------------------------
        // insertTestData
        public void insertTestData()
        {
            // customer data
            customer = new Customer("kay shoji", "102, Snadricam Road 12, Aucland , New Zealand", "021111111", "111111111111111", "*****@*****.**");
            customerList.Add(customer);

            // customer information
            RoomExecutive room1 = new RoomExecutive("E001");
            RoomDeluxe room2 = new RoomDeluxe("D001");
            RoomOrdinary room3 = new RoomOrdinary("O001");
            RoomExecutive room4 = new RoomExecutive("E002");
            RoomDeluxe room5 = new RoomDeluxe("D002");
            RoomOrdinary room6 = new RoomOrdinary("O002");
            RoomExecutive room7 = new RoomExecutive("E003");
            Reserve reserve1 = makeReserve("01/06/2015", "02/06/2015", room1);
            Reserve reserve2 = makeReserve("12/04/2015", "13/04/2015", room2);
            Reserve reserve3 = makeReserve("05/03/2015", "06/03/2015", room3);
            Reserve reserve4 = makeReserve("02/03/2015", "04/03/2015", room1);
            ReserveList.Add(reserve1);
            StayList.Add(reserve2);
            HistoryList.Add(reserve3);
            HistoryList.Add(reserve4);

            // room reserve per day
            ArrayList dailyReserveRoomList1 = new ArrayList();
            dailyReserveRoomList1.Add(room1);
            dailyReserveRoomList1.Add(room2);
            dailyReserveRoomList1.Add(room4);
            dailyReserve = makeDailyReserve("01/05/2015", dailyReserveRoomList1);
            DailyReserveList.Add(dailyReserve);

            ArrayList dailyReserveRoomList2 = new ArrayList();
            dailyReserveRoomList2.Add(room7);
            dailyReserve = makeDailyReserve("02/05/2015", dailyReserveRoomList2);
            DailyReserveList.Add(dailyReserve);

        }