Exemplo n.º 1
0
        public static void YNChoice(List <string> choicedSeat, Schedules sch, string map, Reservation res)
        {
            ScheduleBL    schedule = new ScheduleBL();
            ReservationBL reser    = new ReservationBL();

            Console.Write($"\n                      ^: Bạn muốn đặt vé không   (Y/N) : ");
            char tiep = ' ';

            do
            {
                tiep = Tieptuc(tiep);
                switch (tiep)
                {
                case 'Y':
                    reser.InsertIntoReservation(res);
                    schedule.BuySeats(sch, map);
                    InformationTickets(res, 0);
                    break;

                case 'y':
                    reser.InsertIntoReservation(res);
                    schedule.BuySeats(sch, map);
                    InformationTickets(res, 0);
                    break;

                case 'N':
                    ComeBackMenu(sch, 0);
                    break;

                case 'n':
                    ComeBackMenu(sch, 0);
                    break;
                }
            } while (tiep != 'Y' && tiep != 'N' && tiep != 'y' && tiep != 'n');
        }
Exemplo n.º 2
0
        public void TestInsertIntoReservationFail()
        {
            ReservationBL re    = new ReservationBL();
            Reservation   reser = new Reservation(0, 0, 0, "A5 A6 A7 A8", 123456, 10000.00, DateTime.Now);

            Assert.False(re.InsertIntoReservation(reser));
        }
Exemplo n.º 3
0
        public void TestInsertIntoReservationFail1()
        {
            ReservationBL re    = new ReservationBL();
            Reservation   reser = new Reservation(2, 1, 2, null, 123456, 10000.00, DateTime.Now);

            Assert.False(re.InsertIntoReservation(reser));
        }
Exemplo n.º 4
0
        public void TestInsertIntoReservation()
        {
            ReservationBL re    = new ReservationBL();
            Reservation   reser = new Reservation(2, 1, 2, "A5 A6 A7 A8", 123456, 10000.00, DateTime.Now);

            Assert.True(re.InsertIntoReservation(reser));
        }