// GET: Admin/AdminBooking_Ticket/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Booking_Ticket booking_Ticket = _BookingTicketRepo.SelectById(id);

            if (booking_Ticket == null)
            {
                return(HttpNotFound());
            }
            return(View(booking_Ticket));
        }
Esempio n. 2
0
        //Cancel Booking
        public ActionResult Cancel(int BookingId)
        {
            Booking_Ticket booking = new Booking_Ticket();

            booking = _booking.SelectById(BookingId);
            booking.ReservationModId = 3;
            _booking.Update(booking);
            _booking.Save();
            // SeatDetailByFlight seat = new SeatDetailByFlight();
            //seat = _seatby.SelectById(seatId);
            // seat.SeatStatus = true;
            //_seatby.Update(seat);
            //_seatby.Save();
            return(RedirectToAction("Payment"));
        }
 public ActionResult Create([Bind(Include = "Booking_TicketId,UserId,FlightId,PriceId,DiscountId,DiscountBySeatClassId,DiscountBySkymiles,DiscountByEarly,SeatDetailByFlightId,ReservationModId")] Booking_Ticket booking_Ticket)
 {
     if (ModelState.IsValid)
     {
         return(View(booking_Ticket));
     }
     try
     {
         _BookingTicketRepo.Insert(booking_Ticket);
         _BookingTicketRepo.Save();
     }
     catch (Exception)
     {
         // todo
     }
     return(RedirectToAction("Index"));
 }