Пример #1
0
        public IHttpActionResult AddReservation(Reservation reservation)
        {
            if (reservation.DateReservedFrom.Equals(DateTime.MinValue) || reservation.DateReservedTo.Equals(DateTime.MinValue) || reservation.UserMembershipId == " " || reservation.BookISBN == 0)
            {
                return(BadRequest("Insufficient input"));
            }

            string message = reservationManagement.AddReservation(reservation.DateReservedFrom,
                                                                  reservation.DateReservedTo, reservation.UserMembershipId, reservation.BookISBN);

            return(Ok(message));
        }
Пример #2
0
 protected void btnReserve_Click(object sender, EventArgs e)
 {
     _reservationManager.AddReservation(GetGuestInfoInForm(ddlPersonCount.SelectedIndex + 1), Session["userID"].ToString(), Convert.ToInt32(ddlPersonCount.SelectedValue), GetType(), _reservationManager.CalculateTotalPrice(Convert.ToInt32(ddlPersonCount.SelectedValue), check_inCal.SelectedDate, check_outCal.SelectedDate), _roomManager.GetRoomID(ddlRooms.SelectedValue), check_inCal.SelectedDate, check_outCal.SelectedDate);
 }
Пример #3
0
 public bool AddReservationController(Reservation reservation)
 {
     //Controlleri ekliycez!!!
     return(reservationManagement.AddReservation(reservation));
 }