public AddBookingResponse AddBooking(AddBookingRequest request)
        {
            AdministrationServiceDAO adminDAO = new AdministrationServiceDAO();
            bool result = adminDAO.AddBooking(request.user_id, request.apartment_id, request.date_from, request.date_to, request.package_arrangment_id, request.discount_code);

            return(new AddBookingResponse(result));
        }
Exemplo n.º 2
0
        public AddBookingResponse AddBooking(AddBookingRequest request)
        {
            AdministrationServiceDAO adminDAO = new AdministrationServiceDAO();
            int itemId = adminDAO.AddBooking(request.user_trr, request.apartment_id, request.date_from, request.date_to, request.package_arrangment_id, request.discount_code);

            if (itemId != -1)
            {
                return(new AddBookingResponse(true, itemId));
            }
            else
            {
                // TODO: DB error
                return(new AddBookingResponse(false, -1));
            }
        }