From 1c4ec437f59a873c5a5018654de9ae680765dc89 Mon Sep 17 00:00:00 2001 From: Lucas EVARD Date: Fri, 21 Oct 2022 15:24:40 +0200 Subject: [PATCH] Modification connexion --- Code/IHM/MainWindow.xaml.cs | 2 +- Code/LinqToPgSQL/PersLinqToPgSQL.cs | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Code/IHM/MainWindow.xaml.cs b/Code/IHM/MainWindow.xaml.cs index 9b2e41f..f776a43 100644 --- a/Code/IHM/MainWindow.xaml.cs +++ b/Code/IHM/MainWindow.xaml.cs @@ -42,7 +42,7 @@ namespace IHM private void test_Click(object sender, RoutedEventArgs e) { - Manager.LoadInscrit("",""); + Manager.LoadInscrit("stef@.com", "teststef"); testSelect(); /* testSuppression();*/ } diff --git a/Code/LinqToPgSQL/PersLinqToPgSQL.cs b/Code/LinqToPgSQL/PersLinqToPgSQL.cs index 8e045b1..ed0d0d6 100644 --- a/Code/LinqToPgSQL/PersLinqToPgSQL.cs +++ b/Code/LinqToPgSQL/PersLinqToPgSQL.cs @@ -30,11 +30,16 @@ namespace LinqToPgSQL try { dr.Read(); + resultat = dr.GetString(0); + dr.Close(); + return resultat; } catch (Exception ex) - { Console.Out.WriteLine("A GERER"); } - dr.Close(); + { Console.Out.WriteLine("A GERER"); return null; + } + dr.Close(); + }