Ejemplo n.º 1
0
    public bool cancelBooking(string bookingId, out string cancelId, out services.hilton.com.types.Status Status)
    {
        cancelBookingRequest inValue = new cancelBookingRequest();

        inValue.Body           = new cancelBookingRequestBody();
        inValue.Body.bookingId = bookingId;
        cancelBookingResponse retVal = ((HiltonBookingService)(this)).cancelBooking(inValue);

        cancelId = retVal.Body.cancelId;
        Status   = retVal.Body.Status;
        return(retVal.Body.result);
    }
Ejemplo n.º 2
0
        public cancelBookingResponse CancelBooking(cancelBookingRequest acbr_cbr)
        {
            cancelBookingResponse lcbr_response;

            lcbr_response             = new cancelBookingResponse();
            lcbr_response.Body        = new cancelBookingResponseBody();
            lcbr_response.Body.Status = new services.hilton.com.types.Status();

            try
            {
                string ls_bookingId;
                IHiltonBookingServiceBusiness lhbsb_hbsb;
                long ll_cancelId;

                ls_bookingId = acbr_cbr.Body.bookingId;
                lhbsb_hbsb   = new HiltonBookingServiceBusiness();
                ll_cancelId  = lhbsb_hbsb.CancelBooking(ls_bookingId);

                if (ll_cancelId > 0)
                {
                    lcbr_response.Body.Status.codeError = "0";
                    lcbr_response.Body.Status.message   = "";
                    lcbr_response.Body.result           = true;
                    lcbr_response.Body.cancelId         = ll_cancelId.ToString();
                }
                else
                {
                    lcbr_response.Body.Status.codeError = "01";
                    lcbr_response.Body.Status.message   = "Error en la ejecución del servicio";
                    lcbr_response.Body.result           = false;
                }
            }
            catch (Exception ae_e)
            {
                Exception le_e;

                le_e = ae_e.InnerException != null ? ae_e.InnerException : ae_e;
                lcbr_response.Body.Status.codeError = "01";
                lcbr_response.Body.Status.message   = "Error en la ejecución del servicio:" + ae_e.Message;
                lcbr_response.Body.result           = false;
                Common.CreateTrace.WriteLog(Common.CreateTrace.LogLevel.Error, "ERROR EN EL SERVICIO HiltonBookingService:CancelBooking");
                Common.CreateTrace.WriteLog(Common.CreateTrace.LogLevel.Error, " :: " + ae_e.Message);
            }

            return(lcbr_response);
        }