public ActionResult Book() { int seatId = Int32.Parse(Request.Form["SeatId"]); int seanceId = Int32.Parse(Request.Form["SeanceId"]); int ticketId = Int32.Parse(Request.Form["Ticket"]); if (repository.IsSeatFree(seanceId, seatId)) { WYKUP_BILET b = new WYKUP_BILET(); b.FK_IdMiejsca = seatId; b.FK_IdSeansu = seanceId; b.FK_IdBiletu = ticketId; b = repository.AddBooking(b); repository.Save(); b = repository.GetFullBookingById(b.IdRezerwacji); return(View("BookingSummary", b)); } else { return(View("BookingProblem")); } }
public ActionResult DeleteBooking(int id) { WYKUP_BILET b = repository.GetBookingById(id); return(View(b)); }