public static OrderStatusResult RequestOrderStatus(OrderStatusRequest statusRequest)
        {
            var channel = new ChannelFactory<IOrderProcessing>("*").CreateChannel();

            var result = channel.OrderStatusRequest(statusRequest);
            return result;
        }
        public static OrderStatusResult RequestOrderStatus(OrderStatusRequest statusRequest)
        {
            //var binding = new WSHttpBinding();
            //var address = new EndpointAddress(@"http://*****:*****@"net.tcp://localhost:8080/OrderProcessingService");

            var factory = new ChannelFactory<IOrderProcessing>(binding, address);
            var channel = factory.CreateChannel();

            var result = channel.OrderStatusRequest(statusRequest);
            return result;
        }
Beispiel #3
0
        private void buttonRequestOrderStatus_Click(object sender, EventArgs e)
        {
            var statusRequest = new OrderStatusRequest {OrderNumber = textRequestStatusOrderNumber.Text};

            var result = ServiceCommuincation.RequestOrderStatus(statusRequest);
            DisplayRequestOrderStatusResults(result);
        }
Beispiel #4
0
 public OrderStatusResult OrderStatusRequest(OrderStatusRequest request)
 {
     var requestor = new GetOrderStatusHandler(connectString);
     return requestor.GetOrderStatus(request);
 }