Ejemplo n.º 1
0
        public IHttpActionResult AllReservations()
        {
            try
            {
                BLReservations reservations     = new BLReservations();
                var            reservation_list = reservations.All();

                ReservationsVM obj = new ReservationsVM();

                return(Ok(obj.CreateList(reservation_list)));
            }

            catch (Exception ex)
            {
                return(InternalServerError(ex));
            }
        }
Ejemplo n.º 2
0
        public IHttpActionResult ReservationDetail(string start_date, string end_date, string username)
        {
            try
            {
                BLReservations reservations     = new BLReservations();
                var            reservation_list = reservations.GetDetail(start_date, end_date, username);

                ReservationsVM obj = new ReservationsVM();

                return(Ok(obj.CreateList(reservation_list)));
            }

            catch (Exception ex)
            {
                return(InternalServerError(ex));
            }
        }