Celine.meneu 16 jaren geleden
bovenliggende
commit
b6f828a1ab

+ 5 - 1
CG67.FicheCollege.root/CG67.FicheCollege/Core/CG67.FicheCollege.Domaine/Etablissement.cs

@@ -29,6 +29,7 @@ namespace CG67.FicheCollege.Domaine
 
         #region Loaders
         private dlgLoadActionEducative LoaderActionEducative;
+        private dlgLoadClasseDecouverte LoaderClasseDecouverte;
         private dlgLoadATC LoaderATC;
         private dlgLoadBilinguisme LoaderBilinguisme;
         private dlgLoadCommentaires LoaderCommentaires;
@@ -859,7 +860,9 @@ namespace CG67.FicheCollege.Domaine
         }
         public Etablissement(string codeRNE, int annee, string nom, string typeEtablissement, int anneeConstruction, string telephone, string email, string fax, string nomProprietaire, string adresse, string complementAdresse, int codePostal, string ville, string lienPhoto, 
                                 bool isRestaurant,bool isInternat,int effectifTheorique,
-                                dlgLoadActionEducative loaderActionEducative, dlgLoadATC loaderATC, 
+                                dlgLoadActionEducative loaderActionEducative,
+                                dlgLoadClasseDecouverte loaderClasseDecouverte,
+                                dlgLoadATC loaderATC, 
                                 dlgLoadBilinguisme loaderBilinguisme, 
                                 dlgLoadCommentaires loaderCommentaires,
                                 dlgLoadContact loaderContact,
@@ -889,6 +892,7 @@ namespace CG67.FicheCollege.Domaine
             this.mIsInternat = isInternat;
             this.mEffectifTheorique = effectifTheorique;
             this.LoaderActionEducative = loaderActionEducative;
+            this.LoaderClasseDecouverte = loaderClasseDecouverte;
             this.LoaderATC = loaderATC;
             this.LoaderBilinguisme = loaderBilinguisme;
             this.LoaderCommentaires = loaderCommentaires;

+ 4 - 3
CG67.FicheCollege.root/CG67.FicheCollege/Core/CG67.FicheCollege.Entrepot/EntrepotClasseDecouverte.cs

@@ -52,12 +52,13 @@ namespace CG67.FicheCollege.Entrepot
                         {
                             command.CommandText = "Select * from ASTRE.W67_SIC_FICHE_ELU WHERE CodeRNE = @RNE AND ANNEE = @ANNEE";
                             command.Parameters.AddWithValue("@RNE", codeAstre);
-                            using (OracleDataReader dr = command.ExecuteReader())
+                            command.Parameters.AddWithValue("@ANNEE", annee);
+                            using (OracleDataReader ds = command.ExecuteReader())
                             {
 
-                                while (dr.Read())
+                                while (ds.Read())
                                 {
-                                    resultat.Add(new ClasseDecouverte(dr["annee"].ToString(), dr["ZONE"].ToString(), dr["NB_ELEVE"].ToString(), Convert.ToDouble(dr["MT_VOTE"].ToString())));
+                                    resultat.Add(new ClasseDecouverte(ds["annee"].ToString(), ds["ZONE"].ToString(), ds["NB_ELEVE"].ToString(), Convert.ToDouble(ds["MT_VOTE"].ToString())));
                                 }
                             }
                         }

+ 1 - 0
CG67.FicheCollege.root/CG67.FicheCollege/Core/CG67.FicheCollege.Entrepot/EntrepotEtablissement.cs

@@ -73,6 +73,7 @@ namespace CG67.FicheCollege.Entrepot
                                     Convert.ToInt32(dr["CodePostal"].ToString()), dr["Ville"].ToString(), dr["LienPhoto"].ToString(),
                                     dr.GetBoolean(dr.GetOrdinal("DemiPension")),  dr.GetBoolean(dr.GetOrdinal("Internat")),int.Parse(dr["CapaciteTheorique"].ToString()),
                                     EntrepotFactory.GetEntrepotActionEducative().GetByCodeRNEAndAnnee,
+                                    EntrepotFactory.GetEntrepotClasseDecouverte().GetByCodeRNEAndAnnee,
                                     EntrepotFactory.GetEntrepotATC().GetByCodeRNE,
                                     EntrepotFactory.GetEntrepotBilinguisme().GetByCodeRNEAndAnnee,
                                     EntrepotFactory.GetEntrepotCommentaires().GetByCodeRNEAndAnnee,