Beispiel #1
0
 // create room instance 
 private void createRoom()
 {
     for (int i = 0; i < executiveInfor.MaxRoom; i++)
     {
         RoomExecutive room = new RoomExecutive("E" + (i + 1).ToString("000"));
         ExecutiveList.Add(room);
     }
     for (int i = 0; i < deluxeInfor.MaxRoom; i++)
     {
         RoomDeluxe room = new RoomDeluxe("D" + (i + 1).ToString("000"));
         DeluxeList.Add(room);
     }
     for (int i = 0; i < ordinaryInfor.MaxRoom; i++)
     {
         RoomOrdinary room = new RoomOrdinary("O" + (i + 1).ToString("000"));
         OrdinaryList.Add(room);
     }
 }
Beispiel #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);

        }