void Recherche(DateTime?datedebut, DateTime?datefin) { try { detailcampagnes = new List <CsDetailCampagne>(); lvwResultat.ItemsSource = null; RecouvrementServiceClient client = new RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); client.EditerCLientaPoserAsync(datedebut, datefin); client.EditerCLientaPoserCompleted += (ss, args) => { try { if (args.Cancelled || args.Error != null) { string error = args.Error.Message; Message.ShowError("Erreur à l'exécution du service", "SearchCampagne"); return; } if (args.Result == null || args.Result.Count == 0) { Message.ShowInformation("Aucune donnée trouvée", "SearchCampagne"); return; } detailcampagnes = args.Result; lvwResultat.ItemsSource = null; lvwResultat.ItemsSource = detailcampagnes; } catch (Exception ex) { Message.ShowError(ex, Galatee.Silverlight.Resources.Langue.errorTitle); } }; } catch (Exception ex) { throw ex; } }