private void NombreDeJourMoyen(string CodeSite, string Periode) { Galatee.Silverlight.ServiceReport.ReportServiceClient service1 = new Galatee.Silverlight.ServiceReport.ReportServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Report")); service1.ReturneNombreMoyenDeFacturationCompleted += (sr, res) => { if (res != null && res.Cancelled) { return; } if (res.Result != null && res.Result.Count != 0) { string Rdlc = string.Empty; Rdlc = "NombreMoyenDeJour"; if (OptionImpression == SessionObject.EnvoiPrinter) { Utility.ActionDirectOrientation <ServicePrintings.CsEvenement, ServiceReport.CsEvenement>(res.Result, param, SessionObject.CheminImpression, Rdlc, "Report", true); } else if (OptionImpression == SessionObject.EnvoiExecl) { Utility.ActionExportation <ServicePrintings.CsEvenement, ServiceReport.CsEvenement>(res.Result, param, string.Empty, SessionObject.CheminImpression, Rdlc, "Report", true, "xlsx"); } else if (OptionImpression == SessionObject.EnvoiWord) { Utility.ActionExportation <ServicePrintings.CsEvenement, ServiceReport.CsEvenement>(res.Result, param, string.Empty, SessionObject.CheminImpression, Rdlc, "Report", true, "doc"); } else if (OptionImpression == SessionObject.EnvoiPdf) { Utility.ActionExportation <ServicePrintings.CsEvenement, ServiceReport.CsEvenement>(res.Result, param, string.Empty, SessionObject.CheminImpression, Rdlc, "Report", true, "pdf"); } } else { Message.ShowInformation("Aucune information trouvée", "Report"); return; } }; service1.ReturneNombreMoyenDeFacturationAsync(CodeSite, Periode); service1.CloseAsync(); }