private void FillCollector() { try { int loaderHandler = LoadingManager.BeginLoading("Please Wait for pass payment ... "); ddbCollecter.Items.Clear(); ReportServiceClient service = new ReportServiceClient(Utility.Protocole(), Utility.EndPoint("Report")); service.SELECT_ALL_COLLECTORSAsync(); service.SELECT_ALL_COLLECTORSCompleted += (er, res) => { try { if (res.Error != null || res.Cancelled) { LoadingManager.EndLoading(loaderHandler); throw new Exception("Cannot display report"); } if (res.Result != null) { //Code en cas de succès foreach (var item in res.Result) { listeDesCaissieres_.Add(item); } ddbCollecter.ItemsSource = listeDesCaissieres_; //ddbCollecter.Items.Add(""); //foreach (Galatee.Silverlight.ServiceReport.CParametre collecteur in listeDesCaissieres) // ddbCollecter.Items.Add(collecteur.LIBELLE); } } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { LoadingManager.EndLoading(loaderHandler); } }; } catch (Exception) { } }