Exemplo n.º 1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            allowProgressBar();
            Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient service = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement"));
            service.RetourneListeFactureNonSoldeCompleted += (s, args) =>
            {
                if (args != null && args.Cancelled)
                {
                    Message.ShowError("Une erreur est survenu lors du traitement", "Erreur");
                }
                if (args.Result == null || args.Result.Count <= 0)
                {
                    Message.ShowInformation("Aucune données corresponte aux critères", "Information");
                }
                //Lstfacture = args.Result;
                dg_facture.ItemsSource = args.Result;
                desableProgressBar();
                //btn_Rech.IsEnabled = true;
                //desableProgressBar();
                return;
            };
            string centre  = !string.IsNullOrWhiteSpace(txt_centre.Text) ? txt_centre.Text : string.Empty;
            string client  = !string.IsNullOrWhiteSpace(txt_client.Text) ? txt_client.Text : string.Empty;
            string ordre   = !string.IsNullOrWhiteSpace(txt_ordre.Text) ? txt_ordre.Text : string.Empty;
            string periode = !string.IsNullOrWhiteSpace(txt_periode.Text) ? txt_periode.Text : string.Empty;


            service.RetourneListeFactureNonSoldeAsync(centre, client, ordre, 0, periode);
        }