diff --git a/Sources/API/routes/Banque.php b/Sources/API/routes/Banque.php index 9d7ce97..cd12389 100644 --- a/Sources/API/routes/Banque.php +++ b/Sources/API/routes/Banque.php @@ -45,7 +45,7 @@ $app->get('/Banque/', function(Request $request, Response $response){ $app->post('/Banque/FromId/', function(Request $request, Response $response,array $args){ $id = $request->getParsedBody()["id"]; - $query = 'SELECT * FROM Banque WHERE nom IN (SELECT nomBanque FROM InscrBanque WHERE idInscrit=:id)'; + $query = 'SELECT id, nomBanque FROM InscrBanque WHERE idInscrit=:id'; try{ $db = new Database(); diff --git a/Sources/Data/ClientAPI.cs b/Sources/Data/ClientAPI.cs index 6f9cf0b..cbfc306 100644 --- a/Sources/Data/ClientAPI.cs +++ b/Sources/Data/ClientAPI.cs @@ -155,14 +155,14 @@ namespace Data } } - public static async Task> GetBanqueAsync(string id) + public static async Task> GetBanqueAsync(string id) { var dataBody = new Dictionary { { "id", id } }; HttpResponseMessage reponse = await cli.PostAsJsonAsync(POST_BANQUES_INSCRIT_DATA_URL, dataBody); if (reponse.IsSuccessStatusCode) { - return JsonConvert.DeserializeObject>(await reponse.Content.ReadAsStringAsync()); + return JsonConvert.DeserializeObject>(await reponse.Content.ReadAsStringAsync()); } else { @@ -357,7 +357,7 @@ namespace Data var dataBody = new Dictionary { { "compte", compte.Identifiant }, - { "nom", planification.IntituleOperation }, + { "nom", planification.Nom }, { "montant", planification.Montant.ToString() }, { "dateO", planification.DateOperation.ToString() }, { "methodePayement", planification.ModePayement.ToString() }, diff --git a/Sources/Data/PersAPI.cs b/Sources/Data/PersAPI.cs index b7858a8..72af6ad 100644 --- a/Sources/Data/PersAPI.cs +++ b/Sources/Data/PersAPI.cs @@ -56,7 +56,7 @@ namespace Data { return await ClientAPI.DeleteBanqueInscritAsync(banque.Nom, inscrit.Id.ToString()); } - public async Task> RecupererBanques(Inscrit inscrit) + public async Task> RecupererBanques(Inscrit inscrit) { return await ClientAPI.GetBanqueAsync(inscrit.Id.ToString()); } @@ -75,9 +75,9 @@ namespace Data { return await ClientAPI.DeleteCompteInscritAsync(compte.Nom, inscrit.Id.ToString()); } - public async Task> RecupererCompte(Banque banque, Inscrit inscrit) + public async Task> RecupererCompte(BanqueInscrit banque) { - return await ClientAPI.GetCompteAsync(inscrit.Id.ToString()); + return await ClientAPI.GetCompteAsync(banque.Id.ToString()); } @@ -103,7 +103,7 @@ namespace Data } public async Task SupprimerPlanification(Compte compte, Planification planification) { - return await ClientAPI.DeletePlanificationInscritAsync(compte.Identifiant, planification.IntituleOperation); + return await ClientAPI.DeletePlanificationInscritAsync(compte.Identifiant, planification.Nom); } public async Task> RecupererPlanification(Compte compte) { diff --git a/Sources/Data/PersStub.cs b/Sources/Data/PersStub.cs index f4b5cde..c3923e3 100644 --- a/Sources/Data/PersStub.cs +++ b/Sources/Data/PersStub.cs @@ -201,7 +201,7 @@ namespace Data throw new NotImplementedException(); } - public Task> RecupererBanques(Inscrit inscrit) + public Task> RecupererBanques(Inscrit inscrit) { throw new NotImplementedException(); } @@ -211,7 +211,7 @@ namespace Data throw new NotImplementedException(); } - public Task> RecupererCompte(Banque banque, Inscrit inscrit) + public Task> RecupererCompte(BanqueInscrit banque) { throw new NotImplementedException(); } diff --git a/Sources/IHM/Desktop/CV_Planification.xaml b/Sources/IHM/Desktop/CV_Planification.xaml index 203614d..ec4a339 100644 --- a/Sources/IHM/Desktop/CV_Planification.xaml +++ b/Sources/IHM/Desktop/CV_Planification.xaml @@ -84,7 +84,7 @@ -