diff --git a/Code/IHM/MainWindow.xaml.cs b/Code/IHM/MainWindow.xaml.cs index 7fb459a..a6ea73f 100644 --- a/Code/IHM/MainWindow.xaml.cs +++ b/Code/IHM/MainWindow.xaml.cs @@ -56,12 +56,13 @@ namespace IHM } } - + MessageBox.Show("Suppression ok"); } private void test_Click(object sender, RoutedEventArgs e) { testSelect(); + /* testSuppression();*/ } } } diff --git a/Code/LinqToPgSQL/PersLinqToPgSQL.cs b/Code/LinqToPgSQL/PersLinqToPgSQL.cs index a7306e1..9c5d4c6 100644 --- a/Code/LinqToPgSQL/PersLinqToPgSQL.cs +++ b/Code/LinqToPgSQL/PersLinqToPgSQL.cs @@ -75,11 +75,11 @@ namespace LinqToPgSQL string requete = $"DELETE FROM INSCRIT WHERE id=(@p)"; - string requeteFKey = $"DELETE FROM DEVISE WHERE id=(@p2)"; + string requeteFKey = $"DELETE FROM DEVISEINSCRIT WHERE idInscrit=(@p2)"; using (var command1 = new NpgsqlCommand(requeteFKey, conn)) { - command1.Parameters.AddWithValue("p2", i.Dev); + command1.Parameters.AddWithValue("p2", i.Id); await command1.ExecuteNonQueryAsync(); }