public void OrderTicket(Order newOrder, SeatIndex[] seats, Guid callID) { try { callback_prox = CallBackChannelFactory.GetProxy(false); Guid result; // Do the job and call back the ticketing bridge result = generalTicketing.OrderTicket(newOrder, seats); //Call back the bridge callback_prox.IDArrived(result, callID); } catch (TicketingException tex) { LoggingManager.Logger.Log(LoggingCategory.Error, StringsResource.TicketingFailed + " " + tex.Message); throw new TicketingException(StringsResource.TicketingFailed + " " + tex.Message, tex); } catch (Exception ex) { LoggingManager.Logger.Log(LoggingCategory.Error, StringsResource.FailedToContactTicketingBridge + " " + ex.Message); throw new TicketingException(StringsResource.TicketingFailed + " " + ex.Message, ex); } finally { if ((callback_prox != null) && ((callback_prox as ICommunicationObject).State == CommunicationState.Opened)) (callback_prox as ICommunicationObject).Close(); } }
public void PayForTicket(Guid orderID, Guid payingCustomerID, double amount, PaymentType methodOfPayment, Currencies? currency, Guid callID, string creditCard) { try { callback_prox = CallBackChannelFactory.GetProxy(false); Payment payment = null; // Do the job and call back the ticketing bridge payment = generalTicketing.PayForTicket(orderID, payingCustomerID, amount, methodOfPayment, currency, creditCard); callback_prox.PaymentArrived(payment, callID); } catch (TicketingException tex) { LoggingManager.Logger.Log(LoggingCategory.Error, StringsResource.TicketingFailed + " " + tex.Message); throw new TicketingException(StringsResource.TicketingFailed + " " + tex.Message, tex); } catch (Exception ex) { LoggingManager.Logger.Log(LoggingCategory.Error, StringsResource.FailedToContactTicketingBridge + " " + ex.Message); throw new TicketingException(StringsResource.TicketingFailed + " " + ex.Message, ex); } finally { if ((callback_prox != null) && ((callback_prox as ICommunicationObject).State == CommunicationState.Opened)) (callback_prox as ICommunicationObject).Close(); } }
public void PrintTicket(Guid orderID, Guid callID) { try { callback_prox = CallBackChannelFactory.GetProxy(false); // Do the job and call back the ticketing bridge callback_prox.MessageArrived(generalTicketing.PrintTicket(orderID), callID); } catch (TicketingException tex) { LoggingManager.Logger.Log(LoggingCategory.Error, StringsResource.TicketingFailed + " " + tex.Message); throw new TicketingException(StringsResource.TicketingFailed + " " + tex.Message, tex); } catch (Exception ex) { LoggingManager.Logger.Log(LoggingCategory.Error, StringsResource.FailedToContactTicketingBridge + " " + ex.Message); throw new TicketingException(StringsResource.TicketingFailed + " " + ex.Message, ex); } finally { if ((callback_prox != null) && ((callback_prox as ICommunicationObject).State == CommunicationState.Opened)) (callback_prox as ICommunicationObject).Close(); } }