private void GetCustomerOrders()
        {
            try
            {
                MainModuleServiceClient client = new MainModuleServiceClient();

                client.GetOrdersByOrderInformationAsync(new OrderInformation()
                {
                    CustomerId   = Customer.CustomerId,
                    DateTimeFrom = DateTime.MinValue,
                    DateTimeTo   = DateTime.Now
                });

                client.GetOrdersByOrderInformationCompleted += delegate(object sender, GetOrdersByOrderInformationCompletedEventArgs e)
                {
                    CustomerOrders.Clear();

                    e.Result.ToList().ForEach(c => CustomerOrders.Add(c));
                };
            }
            catch (Exception excep)
            {
                Debug.WriteLine("GetCustomerOrders: Error at Service:" + excep.ToString());
            }
        }
Exemplo n.º 2
0
        private void GetCustomerOrders()
        {
            try
            {
                MainModuleServiceClient client = new MainModuleServiceClient();

                client.GetOrdersByOrderInformationAsync( new OrderInformation()
                                                        {
                                                            CustomerId =  Customer.CustomerId,
                                                            DateTimeFrom = DateTime.MinValue,
                                                            DateTimeTo =  DateTime.Now
                                                        });

                client.GetOrdersByOrderInformationCompleted += delegate(object sender, GetOrdersByOrderInformationCompletedEventArgs e)
                {
                    CustomerOrders.Clear();

                    e.Result.ToList().ForEach(c => CustomerOrders.Add(c));

                };
            }
            catch (Exception excep)
            {
                Debug.WriteLine("GetCustomerOrders: Error at Service:" + excep.ToString());
            }

        }