private void ReturneVentePeriodeAnnee(List <int> lstCentre, string Annee, string periode, bool IsRecap) { Galatee.Silverlight.ServiceReport.ReportServiceClient service1 = new Galatee.Silverlight.ServiceReport.ReportServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Report")); service1.ReturneVenteCompleted += (sr, res) => { if (res != null && res.Cancelled) { return; } if (res.Result != null && res.Result.Count != 0) { if (IsRecap) { Utility.ActionDirectOrientation <ServicePrintings.CsStatFactRecap, ServiceReport.CsStatFactRecap>(res.Result, null, SessionObject.CheminImpression, "VentreRecap", "Report", true); } else { Utility.ActionDirectOrientation <ServicePrintings.CsStatFactRecap, ServiceReport.CsStatFactRecap>(res.Result, null, SessionObject.CheminImpression, "VentreStatDetail", "Report", true); } } else { Message.ShowInformation("Aucune information trouvée", "Report"); return; } }; service1.ReturneVenteAsync(lstCentre, Annee, periode, IsRecap); service1.CloseAsync(); }