private void InsertionIndexCoupure(List <CsDetailCampagne> Lst) { try { RecouvrementServiceClient client = new RecouvrementServiceClient(Utility.ProtocoleIndex(), Utility.EndPoint("Recouvrement")); client.InsertListIndexCompleted += (ss, ress) => { try { if (ress.Cancelled || ress.Error != null) { Message.ShowError("Erreur survenue lors de l'appel service", "Informations"); return; } if (ress.Result == null) { Message.ShowInformation("Erreur lors de l'insertion des index de campange! Veuillez réessayer svp ", "Informations"); return; } NbrElet++; if (NbrElet == 5) { RemoveElementGridApresInsert(); } else { ReloadDatagraid(); } this.txt_index.Text = string.Empty; this.txt_index.Focus(); } catch (Exception ex) { Message.ShowError(ex, "Erreur"); } }; client.InsertListIndexAsync(Lst); } catch (Exception ex) { throw ex; } }