public void RetourneTypeCompte()
 {
     try
     {
         InterfaceComptableServiceClient service = new InterfaceComptableServiceClient(Utility.ProtocoleIndex(), Utility.EndPoint("InterfaceComptable"));
         service.RetourneTypeCompteCompleted += (s, args) =>
         {
             try
             {
                 if (args.Cancelled || args.Error != null || args.Result == null)
                 {
                     string error = args.Error.InnerException.ToString();
                     return;
                 }
                 else
                 {
                     if (args.Result != null && args.Result.Count != 0)
                     {
                         ListeTypeCompte = new List <CsTypeCompte>();
                         ListeTypeCompte = args.Result;
                     }
                     else
                     {
                         Message.ShowInformation("Le système n'a trouvé aucun Compte spécifique dans la base de données ", "Avertissement");
                     }
                 }
             }
             catch (Exception ex)
             {
                 Message.ShowError(ex, Galatee.Silverlight.Resources.Caisse.Langue.errorTitle);
             }
         };
         service.RetourneTypeCompteAsync();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 public void LoadAllTypeCompte()
 {
     try
     {
         InterfaceComptableServiceClient service = new InterfaceComptableServiceClient(Utility.ProtocoleIndex(), Utility.EndPoint("InterfaceComptable"));
         service.RetourneTypeCompteCompleted += (s, args) =>
         {
             try
             {
                 if (args.Cancelled || args.Error != null || args.Result == null)
                 {
                     string error = args.Error.InnerException.ToString();
                     return;
                 }
                 else
                 if (args.Result != null && args.Result.Count != 0)
                 {
                     args.Result.ForEach(t => ListeTypeCompte.Add(t));
                     LoadDatagrid();
                 }
                 else
                 {
                     Message.ShowInformation("Une erreur s'est produite, veuillez consultez le journal des erreurs", "Avertissement");
                 }
             }
             catch (Exception ex)
             {
                 throw ex;
             }
         };
         service.RetourneTypeCompteAsync();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }