public IHttpActionResult DeleteBooking([FromUri] int id)
        {
            BookingManager rm = new BookingManager();

            rm.DeleteBooking(id);
            return(Ok());
        }
Example #2
0
        public ActionResult <Booking> Delete(int id)
        {
            Booking deletedBooking = _bookingManager.DeleteBooking(id);

            if (deletedBooking == null)
            {
                return(NotFound("No such booking, id: " + id));
            }
            return(Ok(deletedBooking));
        }
        public ActionResult Cancel(int id = 0)
        {
            if (id == 0)
            {
                return(RedirectToAction("Index"));
            }

            BookingManager.DeleteBooking(id);

            return(RedirectToAction("MyBooking", "Cancel"));
        }
 public Booking Delete(int id)
 {
     return(manager.DeleteBooking(id));
 }
 public ActionResult DeleteBooking(long bookingId)
 {
     BookingManager.DeleteBooking(bookingId);
     return(RedirectToAction("AdminBookings"));
 }