private void RetourneHistoriqueClient(int idClient) { int response = LoadingManager.BeginLoading(Galatee.Silverlight.Resources.Accueil.Langue.En_Cours); this.dtg_HistoriquePassWord.ItemsSource = null; AdministrationServiceClient client = new AdministrationServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Administration")); client.RetourneHistoriquePasswordsCompleted += (ss, res) => { if (res.Cancelled || res.Error != null) { string error = res.Error.Message; Message.ShowError(error, Galatee.Silverlight.Resources.Langue.errorTitle); LoadingManager.EndLoading(response); return; } if (res.Result == null || res.Result.Count == 0) { Message.ShowInformation(Galatee.Silverlight.Resources.Langue.msgNodata, Galatee.Silverlight.Resources.Langue.informationTitle); LoadingManager.EndLoading(response); return; } List <CsHistoriquePassword> lstresult = res.Result; lstresult.ForEach(t => t.DATECREATION = Convert.ToDateTime(t.DATECREATION)); dtg_HistoriquePassWord.ItemsSource = null; dtg_HistoriquePassWord.ItemsSource = lstresult; dtg_HistoriquePassWord.Tag = lstresult; LoadingManager.EndLoading(response); }; client.RetourneHistoriquePasswordsAsync(idClient); }