Celine.meneu 16 years ago
parent
commit
9a5fdbed58

+ 1 - 3
CG67.FicheCollege.root/CG67.FicheCollege/Core/CG67.FicheCollege.Domaine/ClasseDecouverte.cs

@@ -44,7 +44,5 @@ namespace CG67.FicheCollege.Domaine
             this.mNbEleves = nbEleves;
             this.mSubvention = Subvention;
         }
-
-        public ClasseDecouverte() { }
-}
+      }
 }

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

@@ -8,6 +8,7 @@ namespace CG67.FicheCollege.Domaine
     // pointeurs de fonction, lasy-loading.
 
     public delegate IList<ActionEducative> dlgLoadActionEducative(string codeRNE, int annee);
+    public delegate IList<ClasseDecouverte> dlgLoadClasseDecouverte(string codeRNE, int annee);
     public delegate IList<ATC> dlgLoadATC(string codeRNE);
     public delegate Bilinguisme dlgLoadBilinguisme(string codeRNE, int annee);
     public delegate Commentaires dlgLoadCommentaires(string codeRNE, int annee);

+ 13 - 21
CG67.FicheCollege.root/CG67.FicheCollege/Core/CG67.FicheCollege.Entrepot/EntrepotClasseDecouverte.cs

@@ -3,6 +3,7 @@ using System.Collections.Generic;
 using System.Text;
 using System.Data;
 using System.Data.SqlClient;
+using System.Data.OracleClient; 
 using CG67.FicheCollege.Domaine;
 using CG67.FicheCollege.Interface;
 
@@ -11,9 +12,9 @@ namespace CG67.FicheCollege.Entrepot
     public class EntrepotClasseDecouverte : EntrepotBase, IEntrepotClasseDecouverte
     {
 
-        public ClasseDecouverte GetByCodeRNEAndAnnee(string codeRNE, int annee)
+        public IList<ClasseDecouverte> GetByCodeRNEAndAnnee(string codeRNE, int annee)
         {
-            ClasseDecouverte resultat = new ClasseDecouverte();
+            IList<ClasseDecouverte> resultat = new List<ClasseDecouverte>();
             string codeAstre = "";
             using (SqlConnection connexion1 = new SqlConnection(this.ChaineDeConnexion))
             {
@@ -21,11 +22,11 @@ namespace CG67.FicheCollege.Entrepot
                 try
                 {
                     connexion1.Open();
-                    using (SqlCommand command = connexion1.CreateCommand())
+                    using (SqlCommand command1 = connexion1.CreateCommand())
                     {
-                        command.CommandText = "Select NumeroTiersAstreGF from Etablissement WHERE CodeRNE = @RNE";
-                        command.Parameters.AddWithValue("@RNE", codeRNE);
-                        using (SqlDataReader dr = command.ExecuteReader())
+                        command1.CommandText = "Select NumeroTiersAstreGF from Etablissement WHERE CodeRNE = @RNE";
+                        command1.Parameters.AddWithValue("@RNE", codeRNE);
+                        using (SqlDataReader dr = command1.ExecuteReader())
                         {
                             if (dr.Read())
                                 codeAstre = dr["NumeroTiersAstreGF"].ToString();
@@ -42,21 +43,21 @@ namespace CG67.FicheCollege.Entrepot
                         connexion1.Close();
                 }
 
-                using (SqlConnection connexion = new SqlConnection(this.ChaineDeConnexionSubvention))
+                using (OracleConnection connexion = new OracleConnection(this.ChaineDeConnexionSubvention))
                 {
                     try
                     {
                         connexion.Open();
-                        using (SqlCommand command = connexion.CreateCommand())
+                        using (OracleCommand command = connexion.CreateCommand())
                         {
-                            command.CommandText = "Select * from ASTRE_W67_SIC_FICHE_ELU WHERE CodeRNE = @RNE";
+                            command.CommandText = "Select * from ASTRE.W67_SIC_FICHE_ELU WHERE CodeRNE = @RNE AND ANNEE = @ANNEE";
                             command.Parameters.AddWithValue("@RNE", codeAstre);
-                            using (SqlDataReader dr = command.ExecuteReader())
+                            using (OracleDataReader dr = command.ExecuteReader())
                             {
 
                                 while (dr.Read())
                                 {
-                                    resultat= new ClasseDecouverte(dr["annee"].ToString(), dr["ZONE"].ToString(), dr["NB_ELEVE"].ToString(), Convert.ToDouble(dr["MT_VOTE"].ToString()));
+                                    resultat.Add(new ClasseDecouverte(dr["annee"].ToString(), dr["ZONE"].ToString(), dr["NB_ELEVE"].ToString(), Convert.ToDouble(dr["MT_VOTE"].ToString())));
                                 }
                             }
                         }
@@ -76,16 +77,7 @@ namespace CG67.FicheCollege.Entrepot
             }
         }
 
-        #region IEntrepotClasseDecouverte Membres
-
-        ClasseDecouverte IEntrepotClasseDecouverte.GetByCodeRNEAndAnnee(string codeRNE, int annee)
-        {
-            throw new Exception("The method or operation is not implemented.");
-        }
-
-        #endregion
-
-    }
+       }
 }
        
                     

+ 11 - 0
CG67.FicheCollege.root/CG67.FicheCollege/Core/CG67.FicheCollege.Entrepot/EntrepotFactory.cs

@@ -16,6 +16,15 @@ namespace CG67.FicheCollege.Entrepot
             return entrepotActionEducative;
         }
 
+
+        private static IEntrepotClasseDecouverte entrepotClasseDecouverte;
+        public static IEntrepotClasseDecouverte GetEntrepotClasseDecouverte()
+         {
+            if (entrepotClasseDecouverte == null)
+                entrepotClasseDecouverte = new EntrepotClasseDecouverte();
+            return entrepotClasseDecouverte;
+        }
+
         private static IEntrepotATC entrepotATC;
         public static IEntrepotATC GetEntrepotATC()
         {
@@ -128,6 +137,8 @@ namespace CG67.FicheCollege.Entrepot
             return entrepotProgTravaux;
         }
 
+   
+
         private static IEntrepotEtablissement entrepotEtablissement;
         public static IEntrepotEtablissement GetEntrepotEtablissement()
         {

+ 1 - 1
CG67.FicheCollege.root/CG67.FicheCollege/Core/CG67.FicheCollege.Interface/IEntrepotClasseDecouverte.cs

@@ -7,6 +7,6 @@ namespace CG67.FicheCollege.Interface
 {
     public interface IEntrepotClasseDecouverte
     {
-        ClasseDecouverte GetByCodeRNEAndAnnee(string codeRNE, int annee);
+        IList<ClasseDecouverte> GetByCodeRNEAndAnnee(string codeRNE, int annee);
     }
 }

+ 12 - 0
CG67.FicheCollege.root/CG67.FicheCollege/Core/CG67.FicheCollege.Service/ServiceFiche.cs

@@ -30,6 +30,18 @@ namespace CG67.FicheCollege.Service
                 throw new Exception(erreur.ToString());
             }
         }
+
+        public static IList<ClasseDecouverte> GetClasseDecouverteByRNEAndAnnee(string codeRNE, int annee)
+        {
+            try
+            {
+                return EntrepotFactory.GetEntrepotClasseDecouverte().GetByCodeRNEAndAnnee(codeRNE, annee);
+            }
+            catch (Exception erreur)
+            {
+                throw new Exception(erreur.ToString());
+            }
+        }
         public static IList<ATC> GetATCByRNE(string codeRNE)
         {
             try

+ 8 - 5
CG67.FicheCollege.root/CG67.FicheCollege/Web/CG67.FicheCollege.Web/css/fichecollege.css

@@ -1,5 +1,8 @@
 body
 {
+	font-size: smaller;
+	font-family: Arial;
+
 }
 
 
@@ -61,25 +64,25 @@ body
 }
 .travannee
 {
- width: 50px; 
+ width: 80px; 
 }
 .typetravaux
 {
-	width:80px;
+	width:120px;
 }
 .travlibelle
 {
- width:400px; 	
+ width:700px; 	
 }
 
 .travmontant
 {
-	 width:120px;
+	 width:160px;
 	 text-align: right;
 }
 .travstatus
 {
-	width:100px;
+	width:150px;
 }
 
 h2

+ 10 - 7
CG67.FicheCollege.root/CG67.FicheCollege/Web/CG67.FicheCollege.Web/xslt/FicheCollege.xslt

@@ -205,7 +205,10 @@
         </td>
       </tr>
       <tr>
-        <td>Programmation des travaux Maintenance (année n-1,n,n+1)</td>
+       <table>
+         <br></br>
+        <h3>Programmation des travaux Maintenance (année n-1, n, n+1)</h3>
+        </table>
         <td>
           <xsl:if test="count(Etablissement/LstTravaux/child::*) >0">
           <table id="travaux">
@@ -217,15 +220,15 @@
               <col class="travstatus"></col>
             </colgroup>
             <tr>
-              <th class="bordure">Année</th>
-              <th class="bordure">Type</th>
-              <th class="bordure">Libelle</th>              
+              <th class="bordurecentre">Année</th>
+              <th class="bordurecentre">Type</th>
+              <th class="bordurecentre">Libelle</th>              
               <th class="bordurecentre">Montant prévisionnel</th>
-              <th class="bordure">Statut</th>
+              <th class="bordurecentre">Statut</th>
             </tr>
             <xsl:for-each select="Etablissement/LstTravaux/ProgTravaux">              
               <tr>
-                <td class="bordure">
+                <td class="bordurecentre">
                   <xsl:value-of select="Annee"/>
                 </td>
                 <td class="bordure">
@@ -238,7 +241,7 @@
                     <xsl:value-of select="Montant"/>                  
                   <xsl:text> €</xsl:text> 
                 </td>
-                <td class="bordure">
+                <td class="bordurecentre">
                   <xsl:value-of select="StatutOp"/>
                 </td>
               </tr>