public bool bookRoom(services.hilton.com.types.RoomReservation RoomReservation, out string bookingId, out services.hilton.com.types.Status Status) { bookRoomRequest inValue = new bookRoomRequest(); inValue.Body = new bookRoomRequestBody(); inValue.Body.RoomReservation = RoomReservation; bookRoomResponse retVal = ((HiltonBookingService)(this)).bookRoom(inValue); bookingId = retVal.Body.bookingId; Status = retVal.Body.Status; return(retVal.Body.result); }
public bookRoomResponse BookRoom(bookRoomRequest abrr_brr) { bookRoomResponse lbrr_response; lbrr_response = new bookRoomResponse(); lbrr_response.Body = new bookRoomResponseBody(); lbrr_response.Body.Status = new services.hilton.com.types.Status(); try { RoomReservationDTO lrr_rr; IHiltonBookingServiceBusiness lhbsb_hbsb; long ll_bookingId; lrr_rr = new RoomReservationDTO(); lrr_rr.GuestName = abrr_brr.Body.RoomReservation.guestName; lrr_rr.RoomNumber = abrr_brr.Body.RoomReservation.roomNumber; lrr_rr.CheckIn = abrr_brr.Body.RoomReservation.checkin; lrr_rr.CheckOut = abrr_brr.Body.RoomReservation.checkout; lrr_rr.Hotel = abrr_brr.Body.RoomReservation.hotel; lhbsb_hbsb = new HiltonBookingServiceBusiness(); ll_bookingId = lhbsb_hbsb.BookRoom(lrr_rr); if (ll_bookingId > 0) { lbrr_response.Body.Status.codeError = "0"; lbrr_response.Body.Status.message = ""; lbrr_response.Body.result = true; lbrr_response.Body.bookingId = ll_bookingId.ToString(); } else { lbrr_response.Body.Status.codeError = "01"; lbrr_response.Body.Status.message = "Error en la reserva"; lbrr_response.Body.result = false; } } catch (Exception ae_e) { Exception le_e; le_e = ae_e.InnerException != null ? ae_e.InnerException : ae_e; lbrr_response.Body.Status.codeError = "01"; lbrr_response.Body.Status.message = "Error en la ejecución del servicio:" + ae_e.Message; lbrr_response.Body.result = false; Common.CreateTrace.WriteLog(Common.CreateTrace.LogLevel.Error, "ERROR EN EL SERVICIO HiltonBookingService:BookRoom"); Common.CreateTrace.WriteLog(Common.CreateTrace.LogLevel.Error, " :: " + ae_e.Message); } return(lbrr_response); }