diff --git a/Sources/Data/ClientAPI.cs b/Sources/Data/ClientAPI.cs index a6653f4..efc7ef4 100644 --- a/Sources/Data/ClientAPI.cs +++ b/Sources/Data/ClientAPI.cs @@ -298,9 +298,9 @@ namespace Data } - public static async Task DeleteOperationInscritAsync(string nomCompte, string nomOpe) + public static async Task DeleteOperationInscritAsync(string idCompte, string nomOpe) { - var dataBody = new Dictionary { { "compte", nomCompte }, { "nom", nomOpe } }; + var dataBody = new Dictionary { { "compte", idCompte }, { "nom", nomOpe } }; var reponse = cli.SendAsync( diff --git a/Sources/Data/PersAPI.cs b/Sources/Data/PersAPI.cs index 6b92b15..1417ec8 100644 --- a/Sources/Data/PersAPI.cs +++ b/Sources/Data/PersAPI.cs @@ -82,15 +82,15 @@ namespace Data //actions sur les Opérations public bool AjouterOperation(Compte compte, Operation operation) { - throw new NotImplementedException(); + return ClientAPI.PostAddOperationInscritAsync(compte,operation).GetAwaiter().GetResult(); } public bool SupprimerOperation(Compte compte, Operation operation) { - throw new NotImplementedException(); + return ClientAPI.DeleteOperationInscritAsync(compte.Identifiant, operation.IntituleOperation).GetAwaiter().GetResult(); } public IList RecupererOperation(Compte compte) { - throw new NotImplementedException(); + return ClientAPI.GetCompteAsync(compte.Identifiant).GetAwaiter().GetResult(); }