public IActionResult Checkout(PurchaseFlowVM vm, string ChosenSeatsAsString) //Now the ticket types and counts are known { // Need to get prices from DB and set them on our view model vm.RegularTicketPrice = this.ShowTimeDAO.GetShowingPrice(vm.ShowTimeID); vm.CurrentUser = authProvider.GetCurrentUser(); return(View(vm)); }
public IActionResult Tickets(PurchaseFlowVM vm) { vm.ClosedSeats = this.ResDAO.GetReservedSeatsForShowing(vm.ShowTimeID, vm.MovieDate); //get the ticket price for view vm.RegularTicketPrice = this.ShowTimeDAO.GetShowingPrice(vm.ShowTimeID); return(View(vm)); //known: closedSeats, showTimeID, movieDate }
public IActionResult Seats(PurchaseFlowVM vm) //must pass in showTimeID and movieDate { vm.ClosedSeats = this.ResDAO.GetReservedSeatsForShowing(vm.ShowTimeID, vm.MovieDate); ////get the FilmName //vm.FilmName = this.ShowTimeDAO.GetFilmName(vm.ShowTimeID); //vm.RegularTicketPrice = this.ShowTimeDAO.GetShowingPrice(vm.ShowTimeID); return(View(vm)); //known: closedSeats, showTimeID, movieDate, RegularSeats, KidSeats, SeniorSeats }
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")); }