protected void Page_Load(object sender, EventArgs e) { string id = Request.QueryString["id"]; if (string.IsNullOrEmpty(id)) { Response.Redirect("Index.aspx"); } else { BookingDAO.DeleteBooking(id); Response.Redirect("Profile.aspx"); } }
public IActionResult DeleteBooking(Booking booking) { BookingDAO.DeleteBooking(booking.BookingId); return(View("Index", BookingDAO.GetBookings(CurUser.UserId))); }