Esempio n. 1
0
        //POST: api/Reservation
        public void Post([FromBody] JObject value)
        {
            DateTime startdate    = (DateTime)value.GetValue("reservation_startdate");
            DateTime enddate      = (DateTime)value.GetValue("reservation_enddate");
            bool     floating     = (bool)value.GetValue("reservation_floating");
            bool     confirmation = (bool)value.GetValue("reservation_confirmation");
            bool     paid         = (bool)value.GetValue("reservation_paid");
            DateTime date         = (DateTime)value.GetValue("reservation_date");
            int      nbAdulte     = (int)value.GetValue("reservation_nbAdulte");
            int      nbEnfant     = (int)value.GetValue("reservation_nbEnfant");
            bool     electricity  = (bool)value.GetValue("reservation_electricity");
            bool     car          = (bool)value.GetValue("reservation_car");

            ReservationDAO.add(new Reservation(startdate, enddate, floating, confirmation, paid, date, nbAdulte, nbEnfant, electricity, car));
        }