private void ChargerListeAgentPIA(int idCentre, string CodeFonction) { ListeUtilisateurPia = new List <CsUtilisateur>(); Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient service = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); service.RetourneListeUtiliasteurPiaAsync(idCentre, CodeFonction); service.RetourneListeUtiliasteurPiaCompleted += (s, args) => { try { if (args.Cancelled || args.Error != null) { Message.ShowError("Erreur survenue à l'appel du service.", "Erreur"); return; } if (args.Result == null || args.Result.Count == 0) { Message.ShowError("Aucune tournée retournée par le système.", "Info"); return; } ListeUtilisateurPia = args.Result; this.CboAgentPia.ItemsSource = null; this.CboAgentPia.ItemsSource = ListeUtilisateurPia; this.CboAgentPia.DisplayMemberPath = "LIBELLE"; this.CboAgentPia.ItemsSource = ListeUtilisateurPia.Where(t => t.FK_IDCENTRE == (int)this.Txt_Centre.Tag); } catch (Exception ex) { Message.ShowError(ex, "Erreur"); } }; }