|
|
@@ -10,9 +10,10 @@ namespace CG67.FicheCollege.Entrepot
|
|
|
{
|
|
|
public class EntrepotBilinguisme : EntrepotBase, IEntrepotBilinguisme
|
|
|
{
|
|
|
- public Bilinguisme GetByCodeRNEAndAnnee(string codeRNE, int annee)
|
|
|
+ public IList<Bilinguisme> GetByCodeRNEAndAnnee(string codeRNE, int annee)
|
|
|
{
|
|
|
- Bilinguisme resultat = null;
|
|
|
+ IList<Bilinguisme> resultat = new List<Bilinguisme>();
|
|
|
+
|
|
|
using (SqlConnection connexion = new SqlConnection(this.ChaineDeConnexion))
|
|
|
{
|
|
|
try
|
|
|
@@ -25,16 +26,17 @@ namespace CG67.FicheCollege.Entrepot
|
|
|
command.Parameters.AddWithValue("@Annee", annee);
|
|
|
using (SqlDataReader dr = command.ExecuteReader())
|
|
|
{
|
|
|
- List<int> lstNiveaux = new List<int>();
|
|
|
- int nombreTotalEleves = 0;
|
|
|
+ // List<int> lstNiveaux = new List<int>();
|
|
|
while (dr.Read())
|
|
|
{
|
|
|
//lstNiveaux.Add(Convert.ToInt16(dr["Niveau"].ToString()));
|
|
|
//Céline, on peut pas faire tenir "3ème" dans un int!
|
|
|
- lstNiveaux.Add(Convert.ToInt16(dr["Niveau"].ToString().Substring(0,1)));
|
|
|
- nombreTotalEleves += Convert.ToInt16(dr["NbEleve"].ToString());
|
|
|
+ // lstNiveaux.Add(Convert.ToInt16(dr["Niveau"].ToString().Substring(0,1)));
|
|
|
+ // nombreTotalEleves += Convert.ToInt16(dr["NbEleve"].ToString());
|
|
|
+ resultat.Add(new Bilinguisme(dr["Niveau"].ToString(), Convert.ToInt16(dr["NbEleve"].ToString())));
|
|
|
+ //resultat = new Bilinguisme(lstNiveaux, nombreTotalEleves);
|
|
|
}
|
|
|
- resultat = new Bilinguisme(lstNiveaux, nombreTotalEleves);
|
|
|
+ // resultat.Add(new Bilinguisme(dr["Niveau"].ToString(), Convert.ToInt16(dr["NbEleve"].ToString());
|
|
|
}
|
|
|
}
|
|
|
}
|