public IActionResult Checkout(PurchaseFlowVM vm)
        {
            string confirmationNum = "";

            TempData["showtimeId"] = vm.ShowTimeID;
            TempData["Total"]      = vm.Total;
            TempData["Kid"]        = vm.KidsSeats;
            TempData["Adult"]      = vm.RegularSeats;
            TempData["Senior"]     = vm.SeniorSeats;
            //if (vm.CurrentUser.Address == null)
            //{
            //    vm.CurrentUser = authProvider.GetCurrentUser();
            //    //userDAO.UpdateUser(vm.CurrentUser, vm.CurrentUser.FirstName, vm.CurrentUser.LastName, vm.CurrentUser.City, vm.CurrentUser.State, vm.CurrentUser.Zip, vm.CurrentUser.Address, vm.CurrentUser.Email)
            //}
            //else
            //{
            vm.CurrentUser = authProvider.GetCurrentUser();
            //}
            confirmationNum = ResDAO.CreateNewReservation(vm.ShowTimeID, vm.ChosenSeats, vm.CurrentUser.Id, vm.MovieDate, vm.KidsSeats, vm.RegularSeats, vm.SeniorSeats);

            TempData["confNum"] = confirmationNum;
            return(RedirectToAction("Confirmation", "Purchase"));
        }
Beispiel #2
0
        public void ReserveSiteMenu()
        {
            Console.WriteLine();
            int siteNumber = CLIHelper.GetInteger("What site should be reserved? (enter 0 to cancel)? ");

            if (siteIdList.Contains(siteNumber) == false)
            {
                Console.WriteLine();
                Console.WriteLine("Please select a valid site.");
                ReserveSiteMenu();
            }

            string ReservationName = CLIHelper.GetString("What name should the reservation be made under? ");


            int reservationId = reservationDAO.CreateNewReservation(ReservationName, newReservation.From_Date, newReservation.To_Date, siteNumber);


            Console.WriteLine($"\nThe reservation has been made and the confirmation id is {reservationId}");
            Console.ReadLine();
            Console.Clear();
            PrintMenu();
        }