Gestion repa Ok
This commit is contained in:
@@ -10,103 +10,104 @@ using ProjetTheAlone.Classes;
|
||||
|
||||
namespace ProjetTheAlone.Acces
|
||||
{
|
||||
/// <summary>
|
||||
/// Couche d'accès aux données (Data Access Layer)
|
||||
/// </summary>
|
||||
public class A_T_beneficiaire : ADBase
|
||||
{
|
||||
#region Constructeurs
|
||||
public A_T_beneficiaire(string sChaineConnexion)
|
||||
: base(sChaineConnexion)
|
||||
{ }
|
||||
#endregion
|
||||
public int Ajouter(string B_nom, string B_prenom, DateTime? B_anniversaire, byte?[] B_img)
|
||||
{
|
||||
CreerCommande("AjouterT_beneficiaire");
|
||||
int res = 0;
|
||||
Commande.Parameters.Add("ID_beneficiaire", SqlDbType.Int);
|
||||
Direction("ID_beneficiaire", ParameterDirection.Output);
|
||||
if(B_nom == null) Commande.Parameters.AddWithValue("@B_nom", Convert.DBNull);
|
||||
else Commande.Parameters.AddWithValue("@B_nom", B_nom);
|
||||
if(B_prenom == null) Commande.Parameters.AddWithValue("@B_prenom", Convert.DBNull);
|
||||
else Commande.Parameters.AddWithValue("@B_prenom", B_prenom);
|
||||
if(B_anniversaire == null) Commande.Parameters.AddWithValue("@B_anniversaire", Convert.DBNull);
|
||||
else Commande.Parameters.AddWithValue("@B_anniversaire", B_anniversaire);
|
||||
if(B_img == null) Commande.Parameters.AddWithValue("@B_img", Convert.DBNull);
|
||||
else Commande.Parameters.AddWithValue("@B_img", B_img);
|
||||
Commande.Connection.Open();
|
||||
Commande.ExecuteNonQuery();
|
||||
res = int.Parse(LireParametre("ID_beneficiaire"));
|
||||
Commande.Connection.Close();
|
||||
return res;
|
||||
}
|
||||
public int Modifier(int ID_beneficiaire, string B_nom, string B_prenom, DateTime? B_anniversaire, byte?[] B_img)
|
||||
{
|
||||
CreerCommande("ModifierT_beneficiaire");
|
||||
int res = 0;
|
||||
Commande.Parameters.AddWithValue("@ID_beneficiaire", ID_beneficiaire);
|
||||
if(B_nom == null) Commande.Parameters.AddWithValue("@B_nom", Convert.DBNull);
|
||||
else Commande.Parameters.AddWithValue("@B_nom", B_nom);
|
||||
if(B_prenom == null) Commande.Parameters.AddWithValue("@B_prenom", Convert.DBNull);
|
||||
else Commande.Parameters.AddWithValue("@B_prenom", B_prenom);
|
||||
if(B_anniversaire == null) Commande.Parameters.AddWithValue("@B_anniversaire", Convert.DBNull);
|
||||
else Commande.Parameters.AddWithValue("@B_anniversaire", B_anniversaire);
|
||||
if(B_img == null) Commande.Parameters.AddWithValue("@B_img", Convert.DBNull);
|
||||
else Commande.Parameters.AddWithValue("@B_img", B_img);
|
||||
Commande.Connection.Open();
|
||||
Commande.ExecuteNonQuery();
|
||||
Commande.Connection.Close();
|
||||
return res;
|
||||
}
|
||||
public List<C_T_beneficiaire> Lire(string Index)
|
||||
{
|
||||
CreerCommande("SelectionnerT_beneficiaire");
|
||||
Commande.Parameters.AddWithValue("@Index", Index);
|
||||
Commande.Connection.Open();
|
||||
SqlDataReader dr = Commande.ExecuteReader();
|
||||
List<C_T_beneficiaire> res = new List<C_T_beneficiaire>();
|
||||
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());
|
||||
tmp.B_img = 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");
|
||||
Commande.Parameters.AddWithValue("@ID_beneficiaire", ID_beneficiaire);
|
||||
Commande.Connection.Open();
|
||||
SqlDataReader dr = Commande.ExecuteReader();
|
||||
C_T_beneficiaire res = new C_T_beneficiaire();
|
||||
while (dr.Read())
|
||||
{
|
||||
res.ID_beneficiaire = int.Parse(dr["ID_beneficiaire"].ToString());
|
||||
res.B_nom = dr["B_nom"].ToString();
|
||||
res.B_prenom = dr["B_prenom"].ToString();
|
||||
if(dr["B_anniversaire"] != DBNull.Value) res.B_anniversaire = DateTime.Parse(dr["B_anniversaire"].ToString());
|
||||
res.B_img = (byte?[])dr["B_img"];
|
||||
}
|
||||
dr.Close();
|
||||
Commande.Connection.Close();
|
||||
return res;
|
||||
}
|
||||
public int Supprimer(int ID_beneficiaire)
|
||||
{
|
||||
CreerCommande("SupprimerT_beneficiaire");
|
||||
int res = 0;
|
||||
Commande.Parameters.AddWithValue("@ID_beneficiaire", ID_beneficiaire);
|
||||
Commande.Connection.Open();
|
||||
res = Commande.ExecuteNonQuery();
|
||||
Commande.Connection.Close();
|
||||
return res;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Couche d'accès aux données (Data Access Layer)
|
||||
/// </summary>
|
||||
public class A_T_beneficiaire : ADBase
|
||||
{
|
||||
#region Constructeurs
|
||||
public A_T_beneficiaire(string sChaineConnexion)
|
||||
: base(sChaineConnexion)
|
||||
{ }
|
||||
#endregion
|
||||
public int Ajouter(string B_nom, string B_prenom, DateTime? B_anniversaire, byte?[] B_img)
|
||||
{
|
||||
CreerCommande("AjouterT_beneficiaire");
|
||||
int res = 0;
|
||||
Commande.Parameters.Add("ID_beneficiaire", SqlDbType.Int);
|
||||
Direction("ID_beneficiaire", ParameterDirection.Output);
|
||||
if (B_nom == null) Commande.Parameters.AddWithValue("@B_nom", Convert.DBNull);
|
||||
else Commande.Parameters.AddWithValue("@B_nom", B_nom);
|
||||
if (B_prenom == null) Commande.Parameters.AddWithValue("@B_prenom", Convert.DBNull);
|
||||
else Commande.Parameters.AddWithValue("@B_prenom", B_prenom);
|
||||
if (B_anniversaire == null) Commande.Parameters.AddWithValue("@B_anniversaire", Convert.DBNull);
|
||||
else Commande.Parameters.AddWithValue("@B_anniversaire", B_anniversaire);
|
||||
if (B_img == null) Commande.Parameters.AddWithValue("@B_img", SqlDbType.Image).Value = Convert.DBNull;
|
||||
else Commande.Parameters.AddWithValue("@B_img", SqlDbType.Image).Value = Outil.toByteArray.Convert(B_img);
|
||||
Commande.Connection.Open();
|
||||
Commande.ExecuteNonQuery();
|
||||
res = int.Parse(LireParametre("ID_beneficiaire"));
|
||||
Commande.Connection.Close();
|
||||
return res;
|
||||
}
|
||||
public int Modifier(int ID_beneficiaire, string B_nom, string B_prenom, DateTime? B_anniversaire, byte?[] B_img)
|
||||
{
|
||||
CreerCommande("ModifierT_beneficiaire");
|
||||
int res = 0;
|
||||
Commande.Parameters.AddWithValue("@ID_beneficiaire", ID_beneficiaire);
|
||||
if (B_nom == null) Commande.Parameters.AddWithValue("@B_nom", Convert.DBNull);
|
||||
else Commande.Parameters.AddWithValue("@B_nom", B_nom);
|
||||
if (B_prenom == null) Commande.Parameters.AddWithValue("@B_prenom", Convert.DBNull);
|
||||
else Commande.Parameters.AddWithValue("@B_prenom", B_prenom);
|
||||
if (B_anniversaire == null) Commande.Parameters.AddWithValue("@B_anniversaire", Convert.DBNull);
|
||||
else Commande.Parameters.AddWithValue("@B_anniversaire", B_anniversaire);
|
||||
if (B_img == null) Commande.Parameters.AddWithValue("@B_img", Convert.DBNull);
|
||||
else Commande.Parameters.AddWithValue("@B_img", B_img);
|
||||
Commande.Connection.Open();
|
||||
Commande.ExecuteNonQuery();
|
||||
Commande.Connection.Close();
|
||||
return res;
|
||||
}
|
||||
public List<C_T_beneficiaire> Lire(string Index)
|
||||
{
|
||||
CreerCommande("SelectionnerT_beneficiaire");
|
||||
Commande.Parameters.AddWithValue("@Index", Index);
|
||||
Commande.Connection.Open();
|
||||
SqlDataReader dr = Commande.ExecuteReader();
|
||||
List<C_T_beneficiaire> res = new List<C_T_beneficiaire>();
|
||||
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");
|
||||
Commande.Parameters.AddWithValue("@ID_beneficiaire", ID_beneficiaire);
|
||||
Commande.Connection.Open();
|
||||
SqlDataReader dr = Commande.ExecuteReader();
|
||||
C_T_beneficiaire res = new C_T_beneficiaire();
|
||||
while (dr.Read())
|
||||
{
|
||||
res.ID_beneficiaire = int.Parse(dr["ID_beneficiaire"].ToString());
|
||||
res.B_nom = dr["B_nom"].ToString();
|
||||
res.B_prenom = dr["B_prenom"].ToString();
|
||||
if (dr["B_anniversaire"] != DBNull.Value) res.B_anniversaire = DateTime.Parse(dr["B_anniversaire"].ToString());
|
||||
if (dr["B_img"] != DBNull.Value) res.B_img = Outil.toNullableByteArray.Convert((byte[])dr["B_img"]);
|
||||
res.B_img = (byte?[])dr["B_img"];
|
||||
}
|
||||
dr.Close();
|
||||
Commande.Connection.Close();
|
||||
return res;
|
||||
}
|
||||
public int Supprimer(int ID_beneficiaire)
|
||||
{
|
||||
CreerCommande("SupprimerT_beneficiaire");
|
||||
int res = 0;
|
||||
Commande.Parameters.AddWithValue("@ID_beneficiaire", ID_beneficiaire);
|
||||
Commande.Connection.Open();
|
||||
res = Commande.ExecuteNonQuery();
|
||||
Commande.Connection.Close();
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace ProjetTheAlone.Acces
|
||||
: base(sChaineConnexion)
|
||||
{ }
|
||||
#endregion
|
||||
public int Ajouter(string E_nom, string E_point, int? ID_evenement)
|
||||
public int Ajouter(string E_nom, int E_point, int? ID_evenement)
|
||||
{
|
||||
CreerCommande("AjouterT_equipe");
|
||||
int res = 0;
|
||||
@@ -28,8 +28,7 @@ namespace ProjetTheAlone.Acces
|
||||
Direction("ID_equipe", ParameterDirection.Output);
|
||||
if(E_nom == null) Commande.Parameters.AddWithValue("@E_nom", Convert.DBNull);
|
||||
else Commande.Parameters.AddWithValue("@E_nom", E_nom);
|
||||
if(E_point == null) Commande.Parameters.AddWithValue("@E_point", Convert.DBNull);
|
||||
else Commande.Parameters.AddWithValue("@E_point", E_point);
|
||||
Commande.Parameters.AddWithValue("@E_point", E_point);
|
||||
if(ID_evenement == null) Commande.Parameters.AddWithValue("@ID_evenement", Convert.DBNull);
|
||||
else Commande.Parameters.AddWithValue("@ID_evenement", ID_evenement);
|
||||
Commande.Connection.Open();
|
||||
@@ -38,15 +37,14 @@ namespace ProjetTheAlone.Acces
|
||||
Commande.Connection.Close();
|
||||
return res;
|
||||
}
|
||||
public int Modifier(int ID_equipe, string E_nom, string E_point, int? ID_evenement)
|
||||
public int Modifier(int ID_equipe, string E_nom, int E_point, int? ID_evenement)
|
||||
{
|
||||
CreerCommande("ModifierT_equipe");
|
||||
int res = 0;
|
||||
Commande.Parameters.AddWithValue("@ID_equipe", ID_equipe);
|
||||
if(E_nom == null) Commande.Parameters.AddWithValue("@E_nom", Convert.DBNull);
|
||||
else Commande.Parameters.AddWithValue("@E_nom", E_nom);
|
||||
if(E_point == null) Commande.Parameters.AddWithValue("@E_point", Convert.DBNull);
|
||||
else Commande.Parameters.AddWithValue("@E_point", E_point);
|
||||
Commande.Parameters.AddWithValue("@E_point", E_point);
|
||||
if(ID_evenement == null) Commande.Parameters.AddWithValue("@ID_evenement", Convert.DBNull);
|
||||
else Commande.Parameters.AddWithValue("@ID_evenement", ID_evenement);
|
||||
Commande.Connection.Open();
|
||||
@@ -66,7 +64,7 @@ namespace ProjetTheAlone.Acces
|
||||
C_T_equipe tmp = new C_T_equipe();
|
||||
tmp.ID_equipe = int.Parse(dr["ID_equipe"].ToString());
|
||||
tmp.E_nom = dr["E_nom"].ToString();
|
||||
tmp.E_point = dr["E_point"].ToString();
|
||||
tmp.E_point = int.Parse(dr["E_point"].ToString());
|
||||
if(dr["ID_evenement"] != DBNull.Value) tmp.ID_evenement = int.Parse(dr["ID_evenement"].ToString());
|
||||
res.Add(tmp);
|
||||
}
|
||||
@@ -85,7 +83,7 @@ namespace ProjetTheAlone.Acces
|
||||
{
|
||||
res.ID_equipe = int.Parse(dr["ID_equipe"].ToString());
|
||||
res.E_nom = dr["E_nom"].ToString();
|
||||
res.E_point = dr["E_point"].ToString();
|
||||
res.E_point = int.Parse(dr["E_point"].ToString());
|
||||
if(dr["ID_evenement"] != DBNull.Value) res.ID_evenement = int.Parse(dr["ID_evenement"].ToString());
|
||||
}
|
||||
dr.Close();
|
||||
|
||||
122
ProjetTheAlone/Model/A_T_event-Comp-Hugues.cs
Normal file
122
ProjetTheAlone/Model/A_T_event-Comp-Hugues.cs
Normal file
@@ -0,0 +1,122 @@
|
||||
#region Ressources extérieures
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Data.SqlTypes;
|
||||
using ProjetTheAlone.Classes;
|
||||
#endregion
|
||||
|
||||
namespace ProjetTheAlone.Acces
|
||||
{
|
||||
/// <summary>
|
||||
/// Couche d'accès aux données (Data Access Layer)
|
||||
/// </summary>
|
||||
public class A_T_event : ADBase
|
||||
{
|
||||
#region Constructeurs
|
||||
public A_T_event(string sChaineConnexion)
|
||||
: base(sChaineConnexion)
|
||||
{ }
|
||||
#endregion
|
||||
public int Ajouter(DateTime? E_date, DateTime? E_duree, int? ID_typeEvenement,string E_description, int? ID_lieu, Byte?[] E_Pic)
|
||||
{
|
||||
CreerCommande("AjouterT_event");
|
||||
int res = 0;
|
||||
Commande.Parameters.Add("ID_event", SqlDbType.Int);
|
||||
Direction("ID_event", ParameterDirection.Output);
|
||||
if(E_date == null) Commande.Parameters.AddWithValue("@E_date", Convert.DBNull);
|
||||
else Commande.Parameters.AddWithValue("@E_date", E_date);
|
||||
if(E_duree == null) Commande.Parameters.AddWithValue("@E_duree", Convert.DBNull);
|
||||
else Commande.Parameters.AddWithValue("@E_duree", E_duree);
|
||||
if(ID_typeEvenement == null) Commande.Parameters.AddWithValue("@ID_typeEvenement", Convert.DBNull);
|
||||
else Commande.Parameters.AddWithValue("@ID_typeEvenement", ID_typeEvenement);
|
||||
if(E_description == null) Commande.Parameters.AddWithValue("@E_description", Convert.DBNull);
|
||||
else Commande.Parameters.AddWithValue("@E_description", E_description);
|
||||
if(ID_lieu == null) Commande.Parameters.AddWithValue("@ID_lieu", Convert.DBNull);
|
||||
else Commande.Parameters.AddWithValue("@ID_lieu", ID_lieu);
|
||||
Commande.Parameters.AddWithValue("@E_Pic", E_Pic ?? Convert.DBNull);
|
||||
Commande.Connection.Open();
|
||||
Commande.ExecuteNonQuery();
|
||||
res = int.Parse(LireParametre("ID_event"));
|
||||
Commande.Connection.Close();
|
||||
return res;
|
||||
}
|
||||
public int Modifier(int ID_event, DateTime? E_date, DateTime? E_duree, int? ID_typeEvenement, string E_description, int? ID_lieu, Byte?[] E_Pic)
|
||||
{
|
||||
CreerCommande("ModifierT_event");
|
||||
int res = 0;
|
||||
Commande.Parameters.AddWithValue("@ID_event", ID_event);
|
||||
if(E_date == null) Commande.Parameters.AddWithValue("@E_date", Convert.DBNull);
|
||||
else Commande.Parameters.AddWithValue("@E_date", E_date);
|
||||
if(E_duree == null) Commande.Parameters.AddWithValue("@E_duree", Convert.DBNull);
|
||||
else Commande.Parameters.AddWithValue("@E_duree", E_duree);
|
||||
if(ID_typeEvenement == null) Commande.Parameters.AddWithValue("@ID_typeEvenement", Convert.DBNull);
|
||||
else Commande.Parameters.AddWithValue("@ID_typeEvenement", ID_typeEvenement);
|
||||
if(E_description == null) Commande.Parameters.AddWithValue("@E_description", Convert.DBNull);
|
||||
else Commande.Parameters.AddWithValue("@E_description", E_description);
|
||||
if(ID_lieu == null) Commande.Parameters.AddWithValue("@ID_lieu", Convert.DBNull);
|
||||
else Commande.Parameters.AddWithValue("@ID_lieu", ID_lieu);
|
||||
Commande.Parameters.AddWithValue("@E_Pic", E_Pic ?? Convert.DBNull);
|
||||
Commande.Connection.Open();
|
||||
Commande.ExecuteNonQuery();
|
||||
Commande.Connection.Close();
|
||||
return res;
|
||||
}
|
||||
public List<C_T_event> Lire(string Index)
|
||||
{
|
||||
CreerCommande("SelectionnerT_event");
|
||||
Commande.Parameters.AddWithValue("@Index", Index);
|
||||
Commande.Connection.Open();
|
||||
SqlDataReader dr = Commande.ExecuteReader();
|
||||
List<C_T_event> res = new List<C_T_event>();
|
||||
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 = (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);
|
||||
Commande.Connection.Open();
|
||||
SqlDataReader dr = Commande.ExecuteReader();
|
||||
C_T_event res = new C_T_event();
|
||||
while (dr.Read())
|
||||
{
|
||||
res.ID_event = int.Parse(dr["ID_event"].ToString());
|
||||
if(dr["E_date"] != DBNull.Value) res.E_date = DateTime.Parse(dr["E_date"].ToString());
|
||||
if(dr["E_duree"] != DBNull.Value) res.E_duree = DateTime.Parse(dr["E_duree"].ToString());
|
||||
if(dr["ID_typeEvenement"] != DBNull.Value) res.ID_typeEvenement = int.Parse(dr["ID_typeEvenement"].ToString());
|
||||
if(dr["E_description"] != DBNull.Value) res.E_description = (dr["E_description"].ToString());
|
||||
if(dr["ID_lieu"] != DBNull.Value) res.ID_lieu = int.Parse(dr["ID_lieu"].ToString());
|
||||
if (dr["E_Pic"] != DBNull.Value) res.E_Pic = (byte?[])dr["E_Pic"];
|
||||
}
|
||||
dr.Close();
|
||||
Commande.Connection.Close();
|
||||
return res;
|
||||
}
|
||||
public int Supprimer(int ID_event)
|
||||
{
|
||||
CreerCommande("SupprimerT_event");
|
||||
int res = 0;
|
||||
Commande.Parameters.AddWithValue("@ID_event", ID_event);
|
||||
Commande.Connection.Open();
|
||||
res = Commande.ExecuteNonQuery();
|
||||
Commande.Connection.Close();
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -36,8 +36,9 @@ namespace ProjetTheAlone.Acces
|
||||
else Commande.Parameters.AddWithValue("@E_description", E_description);
|
||||
if(ID_lieu == null) Commande.Parameters.AddWithValue("@ID_lieu", Convert.DBNull);
|
||||
else Commande.Parameters.AddWithValue("@ID_lieu", ID_lieu);
|
||||
Commande.Parameters.AddWithValue("@E_Pic", E_Pic ?? Convert.DBNull);
|
||||
Commande.Connection.Open();
|
||||
if (E_Pic != null) Commande.Parameters.AddWithValue("@E_Pic", SqlDbType.Image).Value = Outil.toByteArray.Convert(E_Pic);
|
||||
else Commande.Parameters.AddWithValue("@E_Pic", SqlDbType.Image).Value = new byte[] {0};
|
||||
Commande.Connection.Open();
|
||||
Commande.ExecuteNonQuery();
|
||||
res = int.Parse(LireParametre("ID_event"));
|
||||
Commande.Connection.Close();
|
||||
@@ -58,7 +59,8 @@ namespace ProjetTheAlone.Acces
|
||||
else Commande.Parameters.AddWithValue("@E_description", E_description);
|
||||
if(ID_lieu == null) Commande.Parameters.AddWithValue("@ID_lieu", Convert.DBNull);
|
||||
else Commande.Parameters.AddWithValue("@ID_lieu", ID_lieu);
|
||||
Commande.Parameters.AddWithValue("@E_Pic", E_Pic ?? Convert.DBNull);
|
||||
if (E_Pic != null) Commande.Parameters.AddWithValue("@E_Pic", SqlDbType.Image).Value = Outil.toByteArray.Convert(E_Pic);
|
||||
else Commande.Parameters.AddWithValue("@E_Pic", SqlDbType.Image).Value = new byte[] { 0 };
|
||||
Commande.Connection.Open();
|
||||
Commande.ExecuteNonQuery();
|
||||
Commande.Connection.Close();
|
||||
@@ -80,7 +82,7 @@ namespace ProjetTheAlone.Acces
|
||||
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 = (byte?[])dr["E_Pic"];
|
||||
if (dr["E_Pic"] != DBNull.Value) tmp.E_Pic = Outil.toNullableByteArray.Convert((byte[])dr["E_Pic"]);
|
||||
res.Add(tmp);
|
||||
}
|
||||
dr.Close();
|
||||
@@ -102,7 +104,7 @@ namespace ProjetTheAlone.Acces
|
||||
if(dr["ID_typeEvenement"] != DBNull.Value) res.ID_typeEvenement = int.Parse(dr["ID_typeEvenement"].ToString());
|
||||
if(dr["E_description"] != DBNull.Value) res.E_description = (dr["E_description"].ToString());
|
||||
if(dr["ID_lieu"] != DBNull.Value) res.ID_lieu = int.Parse(dr["ID_lieu"].ToString());
|
||||
if (dr["E_Pic"] != DBNull.Value) res.E_Pic = (byte?[])dr["E_Pic"];
|
||||
if (dr["E_Pic"] != DBNull.Value) res.E_Pic = Outil.toNullableByteArray.Convert((byte[])dr["E_Pic"]);
|
||||
}
|
||||
dr.Close();
|
||||
Commande.Connection.Close();
|
||||
|
||||
@@ -69,6 +69,27 @@ namespace ProjetTheAlone.Acces
|
||||
Commande.Connection.Close();
|
||||
return res;
|
||||
}
|
||||
public List<C_T_beneficiaire> Lire(int ID_Equipe)
|
||||
{
|
||||
CreerCommande("ListParticipantEquipe");
|
||||
Commande.Parameters.AddWithValue("@ID_equipe", ID_Equipe);
|
||||
Commande.Connection.Open();
|
||||
SqlDataReader dr = Commande.ExecuteReader();
|
||||
List<C_T_beneficiaire> res = new List<C_T_beneficiaire>();
|
||||
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_listParticipant Lire_ID(int ID_LP)
|
||||
{
|
||||
CreerCommande("SelectionnerT_listParticipant_ID");
|
||||
|
||||
@@ -20,13 +20,13 @@ namespace ProjetTheAlone.Acces
|
||||
: base(sChaineConnexion)
|
||||
{ }
|
||||
#endregion
|
||||
public int Ajouter(int ID_repa, int ID_plat)
|
||||
public int Ajouter(DateTime LP_DatePlat, int ID_plat)
|
||||
{
|
||||
CreerCommande("AjouterT_listPlat");
|
||||
int res = 0;
|
||||
Commande.Parameters.Add("ID_listPlat", SqlDbType.Int);
|
||||
Direction("ID_listPlat", ParameterDirection.Output);
|
||||
Commande.Parameters.AddWithValue("@ID_repa", ID_repa);
|
||||
Commande.Parameters.AddWithValue("@LP_DatePlat", LP_DatePlat);
|
||||
Commande.Parameters.AddWithValue("@ID_plat", ID_plat);
|
||||
Commande.Connection.Open();
|
||||
Commande.ExecuteNonQuery();
|
||||
@@ -34,13 +34,13 @@ namespace ProjetTheAlone.Acces
|
||||
Commande.Connection.Close();
|
||||
return res;
|
||||
}
|
||||
public int Modifier(int ID_listPlat, int ID_repa, int ID_plat)
|
||||
public int Modifier(int ID_listPlat, DateTime LP_DatePlat, int ID_plat)
|
||||
{
|
||||
CreerCommande("ModifierT_listPlat");
|
||||
int res = 0;
|
||||
Commande.Parameters.AddWithValue("@ID_listPlat", ID_listPlat);
|
||||
Commande.Parameters.AddWithValue("@ID_repa", ID_repa);
|
||||
Commande.Parameters.AddWithValue("@ID_plat", ID_plat);
|
||||
Commande.Parameters.AddWithValue("@LP_DatePlat", LP_DatePlat);
|
||||
Commande.Parameters.AddWithValue("@ID_plat", ID_plat);
|
||||
Commande.Connection.Open();
|
||||
Commande.ExecuteNonQuery();
|
||||
Commande.Connection.Close();
|
||||
@@ -81,13 +81,35 @@ namespace ProjetTheAlone.Acces
|
||||
dr.Close();
|
||||
Commande.Connection.Close();
|
||||
return res;
|
||||
}
|
||||
public int Supprimer(int ID_listPlat)
|
||||
}
|
||||
public List<C_T_plat> Lire(DateTime LP_DateRepas)
|
||||
{
|
||||
CreerCommande("SelectListPlatByDate");
|
||||
Commande.Parameters.AddWithValue("@dateV", LP_DateRepas);
|
||||
Commande.Connection.Open();
|
||||
SqlDataReader dr = Commande.ExecuteReader();
|
||||
List<C_T_plat> res = new List<C_T_plat>();
|
||||
while (dr.Read())
|
||||
{
|
||||
C_T_plat tmp = new C_T_plat();
|
||||
tmp.ID_plat = int.Parse(dr["ID_plat"].ToString());
|
||||
if (dr["P_nom"] != DBNull.Value) tmp.P_nom = (dr["P_nom"].ToString());
|
||||
if (dr["P_img"] != DBNull.Value) tmp.P_img = Outil.toNullableByteArray.Convert((byte[])dr["P_img"]);
|
||||
var x = dr["ID_typePlat"];
|
||||
if (dr["ID_typePlat"] != DBNull.Value) tmp.ID_typePlat = (C_T_plat.TypePlat_E)(int.Parse(dr["ID_typePlat"].ToString()));
|
||||
res.Add(tmp);
|
||||
}
|
||||
dr.Close();
|
||||
Commande.Connection.Close();
|
||||
return res;
|
||||
}
|
||||
public int Supprimer(int ID_Plat, DateTime dateV)
|
||||
{
|
||||
CreerCommande("SupprimerT_listPlat");
|
||||
int res = 0;
|
||||
Commande.Parameters.AddWithValue("@ID_listPlat", ID_listPlat);
|
||||
Commande.Connection.Open();
|
||||
Commande.Parameters.AddWithValue("@ID_Plat", ID_Plat);
|
||||
Commande.Parameters.AddWithValue("@dateV", SqlDbType.DateTime).Value = dateV;
|
||||
Commande.Connection.Open();
|
||||
res = Commande.ExecuteNonQuery();
|
||||
Commande.Connection.Close();
|
||||
return res;
|
||||
|
||||
@@ -15,12 +15,13 @@ namespace ProjetTheAlone.Acces
|
||||
/// </summary>
|
||||
public class A_T_plat : ADBase
|
||||
{
|
||||
public enum TypePlat_E { soupe, plat, dessert}
|
||||
#region Constructeurs
|
||||
public A_T_plat(string sChaineConnexion)
|
||||
: base(sChaineConnexion)
|
||||
{ }
|
||||
#endregion
|
||||
public int Ajouter(string P_nom, byte[] P_img, int? ID_typePlat)
|
||||
public int Ajouter(string P_nom, byte?[] P_img, int? ID_typePlat)
|
||||
{
|
||||
CreerCommande("AjouterT_plat");
|
||||
int res = 0;
|
||||
@@ -29,7 +30,7 @@ namespace ProjetTheAlone.Acces
|
||||
if(P_nom == null) Commande.Parameters.AddWithValue("@P_nom", Convert.DBNull);
|
||||
else Commande.Parameters.AddWithValue("@P_nom", P_nom);
|
||||
if(P_img == null) Commande.Parameters.AddWithValue("@P_img", Convert.DBNull);
|
||||
else Commande.Parameters.AddWithValue("@P_img", P_img);
|
||||
else Commande.Parameters.AddWithValue("@P_img", SqlDbType.Image).Value = Outil.toByteArray.Convert(P_img);
|
||||
if(ID_typePlat == null) Commande.Parameters.AddWithValue("@ID_typePlat", Convert.DBNull);
|
||||
else Commande.Parameters.AddWithValue("@ID_typePlat", ID_typePlat);
|
||||
Commande.Connection.Open();
|
||||
@@ -38,7 +39,7 @@ namespace ProjetTheAlone.Acces
|
||||
Commande.Connection.Close();
|
||||
return res;
|
||||
}
|
||||
public int Modifier(int ID_plat, string P_nom, byte[] P_img, int? ID_typePlat)
|
||||
public int Modifier(int ID_plat, string P_nom, byte?[] P_img, int? ID_typePlat)
|
||||
{
|
||||
CreerCommande("ModifierT_plat");
|
||||
int res = 0;
|
||||
@@ -46,8 +47,8 @@ namespace ProjetTheAlone.Acces
|
||||
if(P_nom == null) Commande.Parameters.AddWithValue("@P_nom", Convert.DBNull);
|
||||
else Commande.Parameters.AddWithValue("@P_nom", P_nom);
|
||||
if(P_img == null) Commande.Parameters.AddWithValue("@P_img", Convert.DBNull);
|
||||
else Commande.Parameters.AddWithValue("@P_img", P_img);
|
||||
if(ID_typePlat == null) Commande.Parameters.AddWithValue("@ID_typePlat", Convert.DBNull);
|
||||
else Commande.Parameters.AddWithValue("@P_img", SqlDbType.Image).Value = Outil.toByteArray.Convert(P_img);
|
||||
if (ID_typePlat == null) Commande.Parameters.AddWithValue("@ID_typePlat", Convert.DBNull);
|
||||
else Commande.Parameters.AddWithValue("@ID_typePlat", ID_typePlat);
|
||||
Commande.Connection.Open();
|
||||
Commande.ExecuteNonQuery();
|
||||
@@ -66,8 +67,9 @@ namespace ProjetTheAlone.Acces
|
||||
C_T_plat tmp = new C_T_plat();
|
||||
tmp.ID_plat = int.Parse(dr["ID_plat"].ToString());
|
||||
if(dr["P_nom"] != DBNull.Value) tmp.P_nom = (dr["P_nom"].ToString());
|
||||
if(dr["P_img"] != DBNull.Value) tmp.P_img = Encoding.ASCII.GetBytes(dr["P_img"].ToString());
|
||||
if(dr["ID_typePlat"] != DBNull.Value) tmp.ID_typePlat = int.Parse(dr["ID_typePlat"].ToString());
|
||||
if(dr["P_img"] != DBNull.Value) tmp.P_img = Outil.toNullableByteArray.Convert((byte[])dr["P_img"]);
|
||||
var x = dr["ID_typePlat"];
|
||||
if (dr["ID_typePlat"] != DBNull.Value) tmp.ID_typePlat = (C_T_plat.TypePlat_E)(int.Parse(dr["ID_typePlat"].ToString()));
|
||||
res.Add(tmp);
|
||||
}
|
||||
dr.Close();
|
||||
@@ -77,10 +79,10 @@ namespace ProjetTheAlone.Acces
|
||||
/// <summary>
|
||||
/// Permet de récupérer la liste des plats d'un repas
|
||||
/// </summary>
|
||||
public List<C_T_plat> ListPlat(int ID_listPlat)
|
||||
public List<C_T_plat> ListPlat(int ID_repa)
|
||||
{
|
||||
CreerCommande("ListPlat");
|
||||
Commande.Parameters.AddWithValue("@ID_listPlat", ID_listPlat);
|
||||
Commande.Parameters.AddWithValue("@ID_repa", ID_repa);
|
||||
Commande.Connection.Open();
|
||||
SqlDataReader dr = Commande.ExecuteReader();
|
||||
List<C_T_plat> res = new List<C_T_plat>();
|
||||
@@ -89,8 +91,8 @@ namespace ProjetTheAlone.Acces
|
||||
C_T_plat tmp = new C_T_plat();
|
||||
tmp.ID_plat = int.Parse(dr["ID_plat"].ToString());
|
||||
if (dr["P_nom"] != DBNull.Value) tmp.P_nom = (dr["P_nom"].ToString());
|
||||
if (dr["P_img"] != DBNull.Value) tmp.P_img = Encoding.ASCII.GetBytes(dr["P_img"].ToString());
|
||||
if (dr["ID_typePlat"] != DBNull.Value) tmp.ID_typePlat = int.Parse(dr["ID_typePlat"].ToString());
|
||||
if (dr["P_img"] != DBNull.Value) tmp.P_img = (byte?[])(dr["P_img"]);
|
||||
if (dr["ID_typePlat"] != DBNull.Value) tmp.ID_typePlat = (C_T_plat.TypePlat_E)int.Parse(dr["ID_typePlat"].ToString());
|
||||
res.Add(tmp);
|
||||
}
|
||||
dr.Close();
|
||||
@@ -108,8 +110,8 @@ namespace ProjetTheAlone.Acces
|
||||
{
|
||||
res.ID_plat = int.Parse(dr["ID_plat"].ToString());
|
||||
if(dr["P_nom"] != DBNull.Value) res.P_nom = (dr["P_nom"].ToString());
|
||||
if(dr["P_img"] != DBNull.Value) res.P_img = Encoding.ASCII.GetBytes(dr["P_img"].ToString());
|
||||
if(dr["ID_typePlat"] != DBNull.Value) res.ID_typePlat = int.Parse(dr["ID_typePlat"].ToString());
|
||||
if(dr["P_img"] != DBNull.Value) res.P_img = Outil.toNullableByteArray.Convert((byte[])dr["P_img"]);
|
||||
if(dr["ID_typePlat"] != DBNull.Value) res.ID_typePlat = (C_T_plat.TypePlat_E)int.Parse(dr["ID_typePlat"].ToString());
|
||||
}
|
||||
dr.Close();
|
||||
Commande.Connection.Close();
|
||||
|
||||
@@ -105,20 +105,21 @@ namespace ProjetTheAlone.Acces
|
||||
/// </summary>
|
||||
/// <param name="dateV">Date filtre</param>
|
||||
|
||||
public List<C_T_repa> Lire(DateTime dateV)
|
||||
public List<C_T_plat> Lire(DateTime dateV)
|
||||
{
|
||||
CreerCommande("SelectEventBetweenTwoDateTime");
|
||||
CreerCommande("SelectListPlatByDate");
|
||||
Commande.Parameters.AddWithValue("@dateV", dateV);
|
||||
Commande.Connection.Open();
|
||||
SqlDataReader dr = Commande.ExecuteReader();
|
||||
List<C_T_repa> res = new List<C_T_repa>();
|
||||
List<C_T_plat> res = new List<C_T_plat>();
|
||||
while (dr.Read())
|
||||
{
|
||||
C_T_repa tmp = new C_T_repa();
|
||||
tmp.ID_repa = int.Parse(dr["ID_repa"].ToString());
|
||||
tmp.R_Date = DateTime.Parse(dr["R_Date"].ToString());
|
||||
if (dr["ID_listPlat"] != DBNull.Value) tmp.ID_listPlat = int.Parse(dr["ID_listPlat"].ToString());
|
||||
if (dr["ID_typeRepa"] != DBNull.Value) tmp.ID_typeRepa = int.Parse(dr["ID_typeRepa"].ToString());
|
||||
C_T_plat tmp = new C_T_plat();
|
||||
tmp.ID_plat = int.Parse(dr["ID_plat"].ToString());
|
||||
if (dr["P_nom"] != DBNull.Value) tmp.P_nom = (dr["P_nom"].ToString());
|
||||
if (dr["P_img"] != DBNull.Value) tmp.P_img = Outil.toNullableByteArray.Convert((byte[])dr["P_img"]);
|
||||
var x = dr["ID_typePlat"];
|
||||
if (dr["ID_typePlat"] != DBNull.Value) tmp.ID_typePlat = (C_T_plat.TypePlat_E)(int.Parse(dr["ID_typePlat"].ToString()));
|
||||
res.Add(tmp);
|
||||
}
|
||||
dr.Close();
|
||||
|
||||
@@ -14,19 +14,19 @@ namespace ProjetTheAlone.Classes
|
||||
#region Données membres
|
||||
private int _ID_equipe;
|
||||
private string _E_nom;
|
||||
private string _E_point;
|
||||
private int _E_point;
|
||||
private int? _ID_evenement;
|
||||
#endregion
|
||||
#region Constructeurs
|
||||
public C_T_equipe()
|
||||
{ }
|
||||
public C_T_equipe(string E_nom_, string E_point_, int? ID_evenement_)
|
||||
public C_T_equipe(string E_nom_, int E_point_, int? ID_evenement_)
|
||||
{
|
||||
E_nom = E_nom_;
|
||||
E_point = E_point_;
|
||||
ID_evenement = ID_evenement_;
|
||||
}
|
||||
public C_T_equipe(int ID_equipe_, string E_nom_, string E_point_, int? ID_evenement_)
|
||||
public C_T_equipe(int ID_equipe_, string E_nom_, int E_point_, int? ID_evenement_)
|
||||
: this(E_nom_, E_point_, ID_evenement_)
|
||||
{
|
||||
ID_equipe = ID_equipe_;
|
||||
@@ -43,7 +43,7 @@ namespace ProjetTheAlone.Classes
|
||||
get { return _E_nom; }
|
||||
set { _E_nom = value; }
|
||||
}
|
||||
public string E_point
|
||||
public int E_point
|
||||
{
|
||||
get { return _E_point; }
|
||||
set { _E_point = value; }
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace ProjetTheAlone.Classes
|
||||
private int? _ID_typeEvenement;
|
||||
private string _E_description;
|
||||
private int? _ID_lieu;
|
||||
private byte?[] _E_Pic;
|
||||
private byte?[] _E_Pic;
|
||||
#endregion
|
||||
#region Constructeurs
|
||||
public C_T_event()
|
||||
|
||||
@@ -11,22 +11,23 @@ namespace ProjetTheAlone.Classes
|
||||
/// </summary>
|
||||
public class C_T_plat
|
||||
{
|
||||
#region Données membres
|
||||
private int _ID_plat;
|
||||
public enum TypePlat_E { Soupe, Plat, Dessert}
|
||||
#region Données membres
|
||||
private int _ID_plat;
|
||||
private string _P_nom;
|
||||
private byte[] _P_img;
|
||||
private int? _ID_typePlat;
|
||||
private byte?[] _P_img;
|
||||
private TypePlat_E _ID_typePlat;
|
||||
#endregion
|
||||
#region Constructeurs
|
||||
public C_T_plat()
|
||||
{ }
|
||||
public C_T_plat(string P_nom_, byte[] P_img_, int? ID_typePlat_)
|
||||
public C_T_plat(string P_nom_, byte?[] P_img_, int? ID_typePlat_)
|
||||
{
|
||||
P_nom = P_nom_;
|
||||
P_img = P_img_;
|
||||
ID_typePlat = ID_typePlat_;
|
||||
ID_typePlat = (C_T_plat.TypePlat_E)(ID_typePlat_==null?0:ID_typePlat_.Value);
|
||||
}
|
||||
public C_T_plat(int ID_plat_, string P_nom_, byte[] P_img_, int? ID_typePlat_)
|
||||
public C_T_plat(int ID_plat_, string P_nom_, byte?[] P_img_, int? ID_typePlat_)
|
||||
: this(P_nom_, P_img_, ID_typePlat_)
|
||||
{
|
||||
ID_plat = ID_plat_;
|
||||
@@ -43,16 +44,16 @@ namespace ProjetTheAlone.Classes
|
||||
get { return _P_nom; }
|
||||
set { _P_nom = value; }
|
||||
}
|
||||
public byte[] P_img
|
||||
public byte?[] P_img
|
||||
{
|
||||
get { return _P_img; }
|
||||
set { _P_img = value; }
|
||||
}
|
||||
public int? ID_typePlat
|
||||
public TypePlat_E ID_typePlat
|
||||
{
|
||||
get { return _ID_typePlat; }
|
||||
set { _ID_typePlat = value; }
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,9 +21,9 @@ namespace ProjetTheAlone.Gestion
|
||||
: base(sChaineConnexion)
|
||||
{ }
|
||||
#endregion
|
||||
public int Ajouter(string E_nom, string E_point, int? ID_evenement)
|
||||
public int Ajouter(string E_nom, int E_point, int? ID_evenement)
|
||||
{ return new A_T_equipe(ChaineConnexion).Ajouter(E_nom, E_point, ID_evenement); }
|
||||
public int Modifier(int ID_equipe, string E_nom, string E_point, int? ID_evenement)
|
||||
public int Modifier(int ID_equipe, string E_nom, int E_point, int? ID_evenement)
|
||||
{ return new A_T_equipe(ChaineConnexion).Modifier(ID_equipe, E_nom, E_point, ID_evenement); }
|
||||
public List<C_T_equipe> Lire(string Index)
|
||||
{ return new A_T_equipe(ChaineConnexion).Lire(Index); }
|
||||
|
||||
@@ -25,8 +25,10 @@ namespace ProjetTheAlone.Gestion
|
||||
{ return new A_T_listParticipant(ChaineConnexion).Ajouter(ID_equipe, ID_benificiaire); }
|
||||
public int Modifier(int ID_LP, int? ID_equipe, int? ID_benificiaire)
|
||||
{ return new A_T_listParticipant(ChaineConnexion).Modifier(ID_LP, ID_equipe, ID_benificiaire); }
|
||||
public List<C_T_listParticipant> Lire(string Index)
|
||||
public List<C_T_listParticipant> Lire(string Index) //List<C_T_beneficiaire> Lire(string ID_Equipe)
|
||||
{ return new A_T_listParticipant(ChaineConnexion).Lire(Index); }
|
||||
public List<C_T_beneficiaire> Lire(int ID_Equipe) //List<C_T_beneficiaire> Lire(string ID_Equipe)
|
||||
{ return new A_T_listParticipant(ChaineConnexion).Lire(ID_Equipe); }
|
||||
public C_T_listParticipant Lire_ID(int ID_LP)
|
||||
{ return new A_T_listParticipant(ChaineConnexion).Lire_ID(ID_LP); }
|
||||
public int Supprimer(int ID_LP)
|
||||
|
||||
@@ -21,15 +21,18 @@ namespace ProjetTheAlone.Gestion
|
||||
: base(sChaineConnexion)
|
||||
{ }
|
||||
#endregion
|
||||
public int Ajouter(int ID_repa, int ID_plat)
|
||||
{ return new A_T_listPlat(ChaineConnexion).Ajouter(ID_repa, ID_plat); }
|
||||
public int Modifier(int ID_listPlat, int ID_repa, int ID_plat)
|
||||
{ return new A_T_listPlat(ChaineConnexion).Modifier(ID_listPlat, ID_repa, ID_plat); }
|
||||
public int Ajouter(DateTime LP_DatePlat, int ID_plat)
|
||||
{ return new A_T_listPlat(ChaineConnexion).Ajouter(LP_DatePlat, ID_plat); }
|
||||
public int Modifier(int ID_listPlat, DateTime LP_DatePlat, int ID_plat)
|
||||
{ return new A_T_listPlat(ChaineConnexion).Modifier(ID_listPlat, LP_DatePlat, ID_plat); }
|
||||
public List<C_T_listPlat> Lire(string Index)
|
||||
{ return new A_T_listPlat(ChaineConnexion).Lire(Index); }
|
||||
public C_T_listPlat Lire_ID(int ID_listPlat)
|
||||
{ return new A_T_listPlat(ChaineConnexion).Lire(Index); } //C_T_listPlat Lire(DateTime LP_DateRepas)
|
||||
public List<C_T_plat> Lire(DateTime dateV)
|
||||
{ return new A_T_listPlat(ChaineConnexion).Lire(dateV); } //C_T_listPlat Lire(DateTime LP_DateRepas)
|
||||
|
||||
public C_T_listPlat Lire_ID(int ID_listPlat)
|
||||
{ return new A_T_listPlat(ChaineConnexion).Lire_ID(ID_listPlat); }
|
||||
public int Supprimer(int ID_listPlat)
|
||||
{ return new A_T_listPlat(ChaineConnexion).Supprimer(ID_listPlat); }
|
||||
public int Supprimer(int ID_Plat, DateTime dateV)
|
||||
{ return new A_T_listPlat(ChaineConnexion).Supprimer(ID_Plat, dateV); }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,9 +21,9 @@ namespace ProjetTheAlone.Gestion
|
||||
: base(sChaineConnexion)
|
||||
{ }
|
||||
#endregion
|
||||
public int Ajouter(string P_nom, byte[] P_img, int? ID_typePlat)
|
||||
public int Ajouter(string P_nom, byte?[] P_img, int? ID_typePlat)
|
||||
{ return new A_T_plat(ChaineConnexion).Ajouter(P_nom, P_img, ID_typePlat); }
|
||||
public int Modifier(int ID_plat, string P_nom, byte[] P_img, int? ID_typePlat)
|
||||
public int Modifier(int ID_plat, string P_nom, byte?[] P_img, int? ID_typePlat)
|
||||
{ return new A_T_plat(ChaineConnexion).Modifier(ID_plat, P_nom, P_img, ID_typePlat); }
|
||||
public List<C_T_plat> Lire(string Index)
|
||||
{ return new A_T_plat(ChaineConnexion).Lire(Index); }
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace ProjetTheAlone.Gestion
|
||||
/// Permet de récupérer les repas d'une date donnée
|
||||
/// </summary>
|
||||
/// <param name="dateV">Date filtre</param>
|
||||
public List<C_T_repa> Lire(DateTime dateV)
|
||||
public List<C_T_plat> Lire(DateTime dateV)
|
||||
{ return new A_T_repa(ChaineConnexion).Lire(dateV); }
|
||||
public C_T_repa Lire_ID(int ID_repa)
|
||||
{ return new A_T_repa(ChaineConnexion).Lire_ID(ID_repa); }
|
||||
|
||||
Reference in New Issue
Block a user