public ActionResult GuardarReservacion(Reservation pReservation) { bool valor; try { pReservation.Action = "Reservado"; pReservation.State = true; ReservationBL _reservationBL = new ReservationBL(); if (_reservationBL.Create(pReservation) != null) { valor = true; } else { valor = false; } return(Json(valor, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { return(View("Error", new HandleErrorInfo(ex, "Home", "Index"))); } }
public ActionResult GuardarReservacion(Reservation pReservation) { if (pReservation.ReservationID < 0) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } else { return(View(_reservacion.Create(pReservation))); } }