private void TravauxRealierDansLesDelais(List <int> lstCentre, DateTime dateDebut, DateTime dateFin, List <string> Typedemande, string Produit) { Galatee.Silverlight.ServiceReport.ReportServiceClient service1 = new Galatee.Silverlight.ServiceReport.ReportServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Report")); service1.ReturneTravauxRealiserDsDelaisCompleted += (sr, res) => { prgBar.Visibility = System.Windows.Visibility.Collapsed; if (res != null && res.Cancelled) { return; } if (res.Result != null && res.Result.Count != 0) { Dictionary <string, string> param = new Dictionary <string, string>(); param.Add("pParametre", "LISTE DE DEMANDE REALISES DANS DELAIS"); Utility.ActionExportation <ServicePrintings.CsDemandeBase, ServiceReport.CsDemandeBase>(res.Result, param, string.Empty, SessionObject.CheminImpression, "Demande", "Report", true, "xlsx"); } else { Message.ShowInformation("Aucune information trouvée", "Report"); return; } }; service1.ReturneTravauxRealiserDsDelaisAsync(lstCentre, dateDebut, dateFin, Typedemande, Produit); service1.CloseAsync(); }