From 1c39f4b4022d9b15611e7ac8c69f4a9c18211e66 Mon Sep 17 00:00:00 2001 From: nimaye Date: Wed, 19 Oct 2022 08:28:00 +0200 Subject: [PATCH] modification de la surchage du constructeur inscrit --- Code/IHM/MainWindow.xaml.cs | 2 +- Code/LinqToPgSQL/PersLinqToPgSQL.cs | 6 ++---- Code/Model/Inscrit.cs | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Code/IHM/MainWindow.xaml.cs b/Code/IHM/MainWindow.xaml.cs index e6e57b6..09786c4 100644 --- a/Code/IHM/MainWindow.xaml.cs +++ b/Code/IHM/MainWindow.xaml.cs @@ -39,7 +39,7 @@ namespace IHM { - MessageBox.Show($"{i.Id} + {i.Nom} + {i.Mdp} + {i.Mail} + {i.Dev}"); + MessageBox.Show($"{i.Id} + {i.Nom} + {i.Prenom} + {i.Mail} + {i.Mdp}"); } diff --git a/Code/LinqToPgSQL/PersLinqToPgSQL.cs b/Code/LinqToPgSQL/PersLinqToPgSQL.cs index 17ba8e1..1eb575d 100644 --- a/Code/LinqToPgSQL/PersLinqToPgSQL.cs +++ b/Code/LinqToPgSQL/PersLinqToPgSQL.cs @@ -44,10 +44,6 @@ namespace LinqToPgSQL } - - - - NpgsqlDataReader dbReader = new NpgsqlCommand("SELECT * FROM Inscrit", conn).ExecuteReader(); @@ -55,7 +51,9 @@ namespace LinqToPgSQL { ListeInscrits.Add(new Inscrit(dbReader.GetString(0), dbReader.GetString(1), dbReader.GetString(2), dbReader.GetString(3), dbReader.GetString(4))); + } + dbReader.Close(); diff --git a/Code/Model/Inscrit.cs b/Code/Model/Inscrit.cs index 4a495fa..c952c38 100644 --- a/Code/Model/Inscrit.cs +++ b/Code/Model/Inscrit.cs @@ -10,7 +10,7 @@ namespace Model public class Inscrit { - public Inscrit(string id, string nom, string mail, string prenom, string mdp) + public Inscrit(string id, string nom, string prenom, string mail, string mdp) { Id = id; Nom = nom;