diff --git a/Code/IHM/MainWindow.xaml.cs b/Code/IHM/MainWindow.xaml.cs index 568fc61..e6e57b6 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(); + testSelect(); + /* testSuppression();*/ } } diff --git a/Code/LinqToPgSQL/PersLinqToPgSQL.cs b/Code/LinqToPgSQL/PersLinqToPgSQL.cs index 53d3ecc..e83f7fd 100644 --- a/Code/LinqToPgSQL/PersLinqToPgSQL.cs +++ b/Code/LinqToPgSQL/PersLinqToPgSQL.cs @@ -76,11 +76,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(); }