private void Remplirfacture(CsRegCli csRegCli, List <string> listperiode) { allowProgressBar(); ActiverElement(false); Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient service = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); service.RemplirfactureCompleted += (s, args) => { if (args != null && args.Cancelled) { return; } Lstfacture = args.Result; if (this.Anciennecamp != null) { foreach (var item_ in this.Anciennecamp) { foreach (var item in item_.DETAILCAMPAGNEGC_) { CsLclient facture = new CsLclient(); facture.CENTRE = item.CENTRE; facture.CLIENT = item.CLIENT; facture.ORDRE = item.ORDRE; facture.NOM = item.NOM; facture.REFEM = item.PERIODE; facture.SOLDEFACTURE = item.MONTANT; facture.NDOC = item.NDOC; Lstfacture.Add(facture); } } } System.Windows.Data.PagedCollectionView view = new System.Windows.Data.PagedCollectionView(Lstfacture); LoadDataPager <CsLclient>(Lstfacture, datapager, dg_facture); if (dg_facture.ItemsSource != null) { this.txt_TotalFacture.Text = Lstfacture.Sum(t => t.SOLDEFACTURE).Value.ToString(SessionObject.FormatMontant); } btn_Rech.IsEnabled = true; desableProgressBar(); ActiverElement(true); return; }; service.RemplirfactureAsync(csRegCli, listperiode); }