diff --git a/ProjetTheAlone/Config/Settings1.Designer.cs b/ProjetTheAlone/Config/Settings1.Designer.cs index 2a0c39c..5c5cb0a 100644 --- a/ProjetTheAlone/Config/Settings1.Designer.cs +++ b/ProjetTheAlone/Config/Settings1.Designer.cs @@ -36,5 +36,16 @@ namespace ProjetTheAlone.Config { this["schCon"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public global::System.Collections.Specialized.StringCollection alerte { + get { + return ((global::System.Collections.Specialized.StringCollection)(this["alerte"])); + } + set { + this["alerte"] = value; + } + } } } diff --git a/ProjetTheAlone/Config/Settings1.settings b/ProjetTheAlone/Config/Settings1.settings index 00691f6..b9851e5 100644 --- a/ProjetTheAlone/Config/Settings1.settings +++ b/ProjetTheAlone/Config/Settings1.settings @@ -5,5 +5,8 @@ Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename="C:\Users\adrie\OneDrive - Haute Ecole de la ville de Liège\3is\poo\ProjetTheAlone - Copie (9)\ProjetTheAlone\ProjetThe.mdf";Integrated Security=True + + + \ No newline at end of file diff --git a/ProjetTheAlone/Model/A_T_beneficiaire.cs b/ProjetTheAlone/Model/A_T_beneficiaire.cs index 84ea9ad..2eafd0f 100644 --- a/ProjetTheAlone/Model/A_T_beneficiaire.cs +++ b/ProjetTheAlone/Model/A_T_beneficiaire.cs @@ -79,6 +79,26 @@ namespace ProjetTheAlone.Acces Commande.Connection.Close(); return res; } + public List AnnifDuJour() + { + CreerCommande("AnifBene"); + Commande.Connection.Open(); + SqlDataReader dr = Commande.ExecuteReader(); + List res = new List(); + while (dr.Read()) + { + C_T_beneficiaire tmp = new C_T_beneficiaire(); + tmp.ID_beneficiaire = int.Parse(dr["ID_beneficiaire"].ToString()); + tmp.B_nom = dr["B_nom"].ToString(); + tmp.B_prenom = dr["B_prenom"].ToString(); + if (dr["B_anniversaire"] != DBNull.Value) tmp.B_anniversaire = DateTime.Parse(dr["B_anniversaire"].ToString()); + if (dr["B_img"] != DBNull.Value) tmp.B_img = Outil.toNullableByteArray.Convert((byte[])dr["B_img"]); + res.Add(tmp); + } + dr.Close(); + Commande.Connection.Close(); + return res; + } public C_T_beneficiaire Lire_ID(int ID_beneficiaire) { CreerCommande("SelectionnerT_beneficiaire_ID"); diff --git a/ProjetTheAlone/Model/A_T_event.cs b/ProjetTheAlone/Model/A_T_event.cs index df6f603..75a40ac 100644 --- a/ProjetTheAlone/Model/A_T_event.cs +++ b/ProjetTheAlone/Model/A_T_event.cs @@ -89,7 +89,35 @@ namespace ProjetTheAlone.Acces Commande.Connection.Close(); return res; } - public C_T_event Lire_ID(int ID_event) + /// + /// + /// + /// Date cible + /// List des évènement du jour + public List Lire(DateTime dateV) + { + CreerCommande("[SelectEventByDate]"); + Commande.Parameters.AddWithValue("@dateV", dateV); + Commande.Connection.Open(); + SqlDataReader dr = Commande.ExecuteReader(); + List res = new List(); + while (dr.Read()) + { + C_T_event tmp = new C_T_event(); + tmp.ID_event = int.Parse(dr["ID_event"].ToString()); + if (dr["E_date"] != DBNull.Value) tmp.E_date = DateTime.Parse(dr["E_date"].ToString()); + if (dr["E_duree"] != DBNull.Value) tmp.E_duree = DateTime.Parse(dr["E_duree"].ToString()); + if (dr["ID_typeEvenement"] != DBNull.Value) tmp.ID_typeEvenement = int.Parse(dr["ID_typeEvenement"].ToString()); + if (dr["E_description"] != DBNull.Value) tmp.E_description = (dr["E_description"].ToString()); + if (dr["ID_lieu"] != DBNull.Value) tmp.ID_lieu = int.Parse(dr["ID_lieu"].ToString()); + if (dr["E_Pic"] != DBNull.Value) tmp.E_Pic = Outil.toNullableByteArray.Convert((byte[])dr["E_Pic"]); + res.Add(tmp); + } + dr.Close(); + Commande.Connection.Close(); + return res; + } + public C_T_event Lire_ID(int ID_event) { CreerCommande("SelectionnerT_event_ID"); Commande.Parameters.AddWithValue("@ID_event", ID_event); diff --git a/ProjetTheAlone/Model/C_T_event.cs b/ProjetTheAlone/Model/C_T_event.cs index f2bdd8e..1c5eef7 100644 --- a/ProjetTheAlone/Model/C_T_event.cs +++ b/ProjetTheAlone/Model/C_T_event.cs @@ -46,9 +46,11 @@ namespace ProjetTheAlone.Classes } public DateTime? E_date { - get { return _E_date; } + get { return _E_date.Value; } set { _E_date = value; } } + public string E_Date_string + { get => _E_date.Value.ToShortDateString(); } public DateTime? E_duree { get { return _E_duree; } diff --git a/ProjetTheAlone/Model/G_T_beneficiaire.cs b/ProjetTheAlone/Model/G_T_beneficiaire.cs index c0b1462..e16110b 100644 --- a/ProjetTheAlone/Model/G_T_beneficiaire.cs +++ b/ProjetTheAlone/Model/G_T_beneficiaire.cs @@ -31,5 +31,9 @@ namespace ProjetTheAlone.Gestion { return new A_T_beneficiaire(ChaineConnexion).Lire_ID(ID_beneficiaire); } public int Supprimer(int ID_beneficiaire) { return new A_T_beneficiaire(ChaineConnexion).Supprimer(ID_beneficiaire); } + public List AnnifDuJour() + { + return new A_T_beneficiaire(ChaineConnexion).AnnifDuJour(); + } } } diff --git a/ProjetTheAlone/Model/G_T_event.cs b/ProjetTheAlone/Model/G_T_event.cs index e5ce7e2..3c9f0a2 100644 --- a/ProjetTheAlone/Model/G_T_event.cs +++ b/ProjetTheAlone/Model/G_T_event.cs @@ -27,7 +27,14 @@ namespace ProjetTheAlone.Gestion { return new A_T_event(ChaineConnexion).Modifier(ID_event, E_date, E_duree, ID_typeEvenement, E_description, ID_lieu, E_Pic_); } public List Lire(string Index) { return new A_T_event(ChaineConnexion).Lire(Index); } - public C_T_event Lire_ID(int ID_event) + /// + /// + /// + /// Date cible + /// Liste des event de la date cible + public List Lire(DateTime dateV) + { return new A_T_event(ChaineConnexion).Lire(dateV); } + public C_T_event Lire_ID(int ID_event) { return new A_T_event(ChaineConnexion).Lire_ID(ID_event); } public int Supprimer(int ID_event) { return new A_T_event(ChaineConnexion).Supprimer(ID_event); } diff --git a/ProjetTheAlone/ProjetTheAlone.csproj b/ProjetTheAlone/ProjetTheAlone.csproj index c26bab2..a384de3 100644 --- a/ProjetTheAlone/ProjetTheAlone.csproj +++ b/ProjetTheAlone/ProjetTheAlone.csproj @@ -98,6 +98,8 @@ + + FicDetailEvent.xaml @@ -175,6 +177,9 @@ FicEvenementEncode.xaml + + FicGestionAlert.xaml + FicNewEquipe.xaml @@ -243,6 +248,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile diff --git a/ProjetTheAlone/UserControlDIY/Plat.xaml b/ProjetTheAlone/UserControlDIY/Plat.xaml index 707fcf4..998a414 100644 --- a/ProjetTheAlone/UserControlDIY/Plat.xaml +++ b/ProjetTheAlone/UserControlDIY/Plat.xaml @@ -26,7 +26,7 @@ - + diff --git a/ProjetTheAlone/UserControlDIY/Repa.xaml b/ProjetTheAlone/UserControlDIY/Repa.xaml index 2691a29..e02b0d1 100644 --- a/ProjetTheAlone/UserControlDIY/Repa.xaml +++ b/ProjetTheAlone/UserControlDIY/Repa.xaml @@ -22,7 +22,7 @@ - + diff --git a/ProjetTheAlone/View/Accueil.xaml b/ProjetTheAlone/View/Accueil.xaml index b0d9548..b2da207 100644 --- a/ProjetTheAlone/View/Accueil.xaml +++ b/ProjetTheAlone/View/Accueil.xaml @@ -19,7 +19,8 @@