Dominique.freyd vor 16 Jahren
Ursprung
Commit
cff1801ec1
15 geänderte Dateien mit 213 neuen und 85 gelöschten Zeilen
  1. 1 0
      CG67.FicheCollege.root/CG67.FicheCollege/Core/CG67.FicheCollege.Domaine/CG67.FicheCollege.Domaine.csproj
  2. 45 0
      CG67.FicheCollege.root/CG67.FicheCollege/Core/CG67.FicheCollege.Domaine/Effectif.cs
  3. 25 43
      CG67.FicheCollege.root/CG67.FicheCollege/Core/CG67.FicheCollege.Domaine/Etablissement.cs
  4. 2 2
      CG67.FicheCollege.root/CG67.FicheCollege/Core/CG67.FicheCollege.Entrepot/EntrepotEquipement.cs
  5. 14 22
      CG67.FicheCollege.root/CG67.FicheCollege/Core/CG67.FicheCollege.Entrepot/EntrepotEtablissement.cs
  6. 5 1
      CG67.FicheCollege.root/CG67.FicheCollege/Core/CG67.FicheCollege.Entrepot/EntrepotMCG.cs
  7. 2 2
      CG67.FicheCollege.root/CG67.FicheCollege/Core/CG67.FicheCollege.Entrepot/EntrepotProgTravaux.cs
  8. 3 1
      CG67.FicheCollege.root/CG67.FicheCollege/Core/CG67.FicheCollege.Service/ServiceFiche.cs
  9. 4 4
      CG67.FicheCollege.root/CG67.FicheCollege/Core/CG67.FicheCollege.Testeur/Program.cs
  10. 1 0
      CG67.FicheCollege.root/CG67.FicheCollege/Web/CG67.FicheCollege.Web/CG67.FicheCollege.Web.csproj
  11. 9 2
      CG67.FicheCollege.root/CG67.FicheCollege/Web/CG67.FicheCollege.Web/FicheCollege.aspx.cs
  12. 5 1
      CG67.FicheCollege.root/CG67.FicheCollege/Web/CG67.FicheCollege.Web/HttpHandlerHistogramme.cs
  13. 6 1
      CG67.FicheCollege.root/CG67.FicheCollege/Web/CG67.FicheCollege.Web/css/fichecollege.css
  14. 12 0
      CG67.FicheCollege.root/CG67.FicheCollege/Web/CG67.FicheCollege.Web/xml/Entete.xml
  15. 79 6
      CG67.FicheCollege.root/CG67.FicheCollege/Web/CG67.FicheCollege.Web/xslt/FicheCollege.xslt

+ 1 - 0
CG67.FicheCollege.root/CG67.FicheCollege/Core/CG67.FicheCollege.Domaine/CG67.FicheCollege.Domaine.csproj

@@ -42,6 +42,7 @@
     <Compile Include="Bilinguisme.cs" />
     <Compile Include="ChiffresSignificatifs.cs" />
     <Compile Include="Commentaires.cs" />
+    <Compile Include="Effectif.cs" />
     <Compile Include="Equipement.cs" />
     <Compile Include="Etablissement.cs" />
     <Compile Include="Contact.cs" />

+ 45 - 0
CG67.FicheCollege.root/CG67.FicheCollege/Core/CG67.FicheCollege.Domaine/Effectif.cs

@@ -0,0 +1,45 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace CG67.FicheCollege.Domaine
+{
+    
+    public class Effectif
+    {
+        private string annee;
+
+        public string Annee
+        {
+            get { return annee; }
+            set { annee = value; }
+        }
+
+        private string typeEffectif;
+
+        public string TypeEffectif
+        {
+            get { return typeEffectif; }
+            set { typeEffectif = value; }
+        }
+        private int effectifTotal;
+
+        public int EffectifTotal
+        {
+            get { return effectifTotal; }
+            set { effectifTotal = value; }
+        }
+
+
+        public Effectif()
+        {
+        }
+        public Effectif(string annee, string typeEffectif, int effectifTotal)
+        {
+            this.annee = annee;
+            this.typeEffectif = typeEffectif;
+            this.effectifTotal = effectifTotal;
+        }
+	
+    }
+}

+ 25 - 43
CG67.FicheCollege.root/CG67.FicheCollege/Core/CG67.FicheCollege.Domaine/Etablissement.cs

@@ -109,11 +109,8 @@ namespace CG67.FicheCollege.Domaine
         /// <summary>
         /// IListe du  nombre d'effectif collégien sur les 10 dernières années
         /// </summary>
-        private IList<int> mLstEffectifReel;
-        /// <summary>
-        /// IListe du nombre prévisionnel d'effectif collégien sur les 5 prochaines années
-        /// </summary>
-        private IList<int> mLstEffectifPrevisionnel;
+        private IList<Effectif> mLstEffectif;
+        
         /// <summary>
         /// Surface d'emprise de l'établissement
         /// </summary>
@@ -344,18 +341,10 @@ namespace CG67.FicheCollege.Domaine
         /// <summary>
         /// Obtient ou définit la IListe du  nombre d'effectif collégien sur les 10 dernières années
         /// </summary>
-        public IList<int> LstEffectifReel
-        {
-            get { return mLstEffectifReel; }
-            set { mLstEffectifReel = value; }
-        }
-        /// <summary>
-        /// Obtient ou définit la IListe du nombre prévisionnel d'effectif collégien sur les 5 prochaines années
-        /// </summary>
-        public IList<int> LstEffectifPrevisionnel
+        public IList<Effectif> LstEffectif
         {
-            get { return mLstEffectifPrevisionnel; }
-            set { mLstEffectifPrevisionnel = value; }
+            get { return mLstEffectif; }
+            set { mLstEffectif = value; }
         }
         /// <summary>
         /// Obtient ou définit la surface d'emprise de l'établissement
@@ -561,7 +550,7 @@ namespace CG67.FicheCollege.Domaine
             {
                 string retour = string.Empty;
                 foreach (Contact cont in Contacts)
-                    if (cont.Fonction.ToLower() == "conseiller general")
+                    if (cont.Fonction.ToLower() == "conseiller général")
                         retour = cont.Civilite + " " + Utile.formatStringPrenom(cont.Prenom) + " " + cont.Nom.ToUpper();
                 return retour;
             }
@@ -573,24 +562,15 @@ namespace CG67.FicheCollege.Domaine
         {
             get
             {
-                int nbrEleves = 0;
+                int nbrElevesReel = 0;
+               
                 //le dernier enregistrement de cette liste est l'effectif actuel.
-                foreach (int nbr in LstEffectifReel)
-                    nbrEleves = nbr;
-
-                string retour = nbrEleves + " élèves (année scolaire en cours) ";
-                if (mTypeEtablissement == null)
-                    retour += "dont " + mTypeEtablissement.ToUpper();
-                retour += ". ";
-
-
-                bool valeurTest = true;
-                foreach(int nbr in LstEffectifPrevisionnel){
-                    if (valeurTest)
-                        retour += nbr + " élèves prévisionnel pour la prochaine rentrée.";
-                    valeurTest = false;
-                }
-
+                foreach (Effectif  effectif in LstEffectif)
+                    if (effectif.TypeEffectif == "R")
+                        nbrElevesReel = effectif.EffectifTotal;
+                
+                string retour = nbrElevesReel + " élèves (année scolaire en cours) ";
+                
                 return retour;
             }
         }
@@ -736,21 +716,23 @@ namespace CG67.FicheCollege.Domaine
                 int nbrPrev = 0;
                 int nbrEvolution = 0;
                 string retour;
-                // FREYD Bizarre !!
-                foreach (int nbr in LstEffectifPrevisionnel)
-                    nbrPrev = nbr;
-                foreach (int nbr in LstEffectifReel)
-                    nbrActuel = nbr;
-
+             
+                foreach (Effectif effectif in LstEffectif)
+                {
+                    if (effectif.TypeEffectif =="P")
+                        nbrPrev = effectif.EffectifTotal;
+                    if (effectif.TypeEffectif == "R")
+                        nbrActuel = effectif.EffectifTotal; 
+                }
                 nbrEvolution = nbrPrev - nbrActuel;
                 if (nbrActuel == 0)
                 {
                     return "calcul impossible, nbrActuelle =0";
                 }
-                int pourcentageEvol = ((nbrPrev * 100)/nbrActuel);
+                double pourcentageEvol = (double) nbrEvolution * 100  / (double)nbrActuel;
                 if (nbrEvolution < 0)
                 {
-                    retour = "Diminution de " + (nbrActuel - nbrPrev) + " élèves, soit " + pourcentageEvol + "% en moins sur les cinq prochaines années.";
+                    retour = string.Format("Diminution de {0} élèves, soit {1:##0.00}% en moins sur les cinq prochaines années.", (nbrActuel - nbrPrev), pourcentageEvol);
                 }
                 else if (nbrEvolution == 0)
                 {
@@ -758,7 +740,7 @@ namespace CG67.FicheCollege.Domaine
                 }
                 else
                 {
-                    retour = "Augmentation de " + nbrEvolution + " élèves, soit " + pourcentageEvol + "% en plus sur les cinq prochaines années.";
+                    retour = string.Format("Augmentation de {0} élèves, soit {1:##0.00}% en plus sur les cinq prochaines années.",nbrEvolution,pourcentageEvol);
                 }
 
                 return retour;

+ 2 - 2
CG67.FicheCollege.root/CG67.FicheCollege/Core/CG67.FicheCollege.Entrepot/EntrepotEquipement.cs

@@ -32,9 +32,9 @@ namespace CG67.FicheCollege.Entrepot
                         }
                     }
                 }
-                catch (Exception erreurInterne)
+                catch
                 {
-                    throw new Exception(" " + erreurInterne);
+                    throw;
                 }
                 finally
                 {

+ 14 - 22
CG67.FicheCollege.root/CG67.FicheCollege/Core/CG67.FicheCollege.Entrepot/EntrepotEtablissement.cs

@@ -32,9 +32,9 @@ namespace CG67.FicheCollege.Entrepot
                         }
                     }
                 }
-                catch (Exception erreurInterne)
+                catch
                 {
-                    throw new Exception(" " + erreurInterne);
+                    throw;
                 }
                 finally
                 {
@@ -86,6 +86,8 @@ namespace CG67.FicheCollege.Entrepot
                                     EntrepotFactory.GetEntrepotRestauration().GetByRNEAndAnnee);
                             }
                         }
+                        
+                        // liste chargées d'office. pourquoi ?
 
                         command.CommandText = "SELECT * FROM EtpTheorique WHERE CodeRNE = @RNE AND Annee = @Annee";
                         using (SqlDataReader dr2 = command.ExecuteReader())
@@ -105,29 +107,19 @@ namespace CG67.FicheCollege.Entrepot
                             }
                         }
 
-                        command.CommandText = "SELECT Annee, sum(TotalEleves) as TotalEleves FROM Effectif WHERE CodeRNE = @RNE AND Annee BETWEEN @AnneeMoins10 AND @Annee GROUP BY Annee ORDER BY Annee ASC";
+                        command.CommandText = "SELECT Annee, TypeDonnees,EffectifTotal FROM EffectifTotal WHERE CodeRNE = @RNE AND Annee > @AnneeMoins10 ORDER BY Annee ASC";
                         command.Parameters.AddWithValue("@AnneeMoins10", annee - 10);
                         using (SqlDataReader dr4 = command.ExecuteReader())
                         {
-                            IList<int> lstEffectifReel = new List<int>();
+                            IList<Effectif> lstEffectifReel = new List<Effectif>();
                             while (dr4.Read())
                             {
-                                lstEffectifReel.Add(Convert.ToInt32(dr4["TotalEleves"].ToString()));
+                                lstEffectifReel.Add(new Effectif(dr4["Annee"].ToString(),dr4["TypeDonnees"].ToString(),  Convert.ToInt32(dr4["EffectifTotal"].ToString())));
                             }
-                            resultat.LstEffectifReel = lstEffectifReel;
+                            resultat.LstEffectif = lstEffectifReel;
                         }
 
-                        command.CommandText = "SELECT Annee, sum(NbEleve) as TotalEleves FROM PrevisionEffectif WHERE CodeRNE = @RNE AND Annee BETWEEN @Annee AND @AnneePlus5 GROUP BY Annee ORDER BY Annee ASC";
-                        command.Parameters.AddWithValue("@AnneePlus5", annee + 5);
-                        using (SqlDataReader dr5 = command.ExecuteReader())
-                        {
-                            IList<int> lstEffectifPrev = new List<int>();
-                            while (dr5.Read())
-                            {
-                                lstEffectifPrev.Add(Convert.ToInt32(dr5["TotalEleves"].ToString()));
-                            }
-                            resultat.LstEffectifPrevisionnel = lstEffectifPrev;
-                        }
+                        
 
                         command.CommandText = "SELECT * from Restructuration WHERE CodeRNE = @RNE";
                         using (SqlDataReader dr6 = command.ExecuteReader())
@@ -163,9 +155,9 @@ namespace CG67.FicheCollege.Entrepot
                         }
                     }
                 }
-                catch (Exception e)
+                catch
                 {
-                    throw new Exception(e.ToString());
+                    throw;
                 }
                 finally
                 {
@@ -173,7 +165,7 @@ namespace CG67.FicheCollege.Entrepot
                         connexion.Close();
                 }
             }
-            //FREYD
+          
 
             resultat.Surface = 0;
 
@@ -190,9 +182,9 @@ namespace CG67.FicheCollege.Entrepot
                         resultat.Surface = string.IsNullOrEmpty(sum) ? 0 : Convert.ToDouble(sum);
                     }
                 }
-                catch (Exception e)
+                catch
                 {
-                    throw new Exception(e.ToString());
+                    throw;
                 }
                 finally
                 {

+ 5 - 1
CG67.FicheCollege.root/CG67.FicheCollege/Core/CG67.FicheCollege.Entrepot/EntrepotMCG.cs

@@ -19,7 +19,11 @@ namespace CG67.FicheCollege.Entrepot
                     connexion.Open();
                     using (SqlCommand command = connexion.CreateCommand())
                     {
-                        command.CommandText = "Select Nom, Prenom, Ville FROM Etablissement INNER JOIN Mcg ON (Etablissement.IdMCG = Mcg.Id) INNER JOIN Contact ON (Mcg.IdContact = Contact.Id) WHERE Etablissement.CodeRNE = @RNE AND TypeContact = 'Directeur MCG'";
+                        //command.CommandText = "Select Nom, Prenom, Ville FROM Etablissement INNER JOIN Mcg ON (Etablissement.IdMCG = Mcg.Id) INNER JOIN Contact ON (Mcg.IdContact = Contact.Id) WHERE Etablissement.CodeRNE = @RNE AND Fonction = 'Directeur MCG'";
+                        //command.CommandText = "Select Nom, Prenom, Ville FROM Etablissement INNER JOIN Mcg ON (Etablissement.IdMCG = Mcg.Id) INNER JOIN Contact ON (Mcg.IdContact = Contact.Id) WHERE Etablissement.CodeRNE = @RNE AND Fonction = 'Directeur MCG'";
+                        command.CommandText = "SELECT Etablissement.CodeRNE, Ville, Civilite, Nom, Prenom FROM Etablissement INNER JOIN (Mcg INNER JOIN Contact ON Mcg.IdContact = Contact.Id) ON Etablissement.IdMCG = Mcg.Id WHERE Etablissement.CodeRNE = @RNE and Contact.Fonction='Directeur MCG';";
+                        
+
                         command.Parameters.AddWithValue("@RNE", codeRNE);
                         using (SqlDataReader dr = command.ExecuteReader())
                         {

+ 2 - 2
CG67.FicheCollege.root/CG67.FicheCollege/Core/CG67.FicheCollege.Entrepot/EntrepotProgTravaux.cs

@@ -36,9 +36,9 @@ namespace CG67.FicheCollege.Entrepot
                         }
                     }
                 }
-                catch (Exception erreurInterne)
+                catch 
                 {
-                    throw new Exception(" " + erreurInterne);
+                    throw;
                 }
                 finally
                 {

+ 3 - 1
CG67.FicheCollege.root/CG67.FicheCollege/Core/CG67.FicheCollege.Service/ServiceFiche.cs

@@ -265,8 +265,10 @@ namespace CG67.FicheCollege.Service
 
         public static XmlNode GetFicheCollege(string codeRNE, int annee)
         {
-            XmlDocument resultat = new XmlDocument();
+                        
+            XmlDocument resultat = new XmlDocument();             
             XmlNode xmlCollege = resultat.AppendChild(resultat.CreateElement("college"));
+            
             Etablissement etablissement = GetEtablissementByCodeRNEAndAnnee(codeRNE, annee);
             xmlCollege.AppendChild(Serializer(etablissement,resultat));
             ChiffresSignificatifs chiffres = GetChiffresSignificatifsByAnnee(annee);

+ 4 - 4
CG67.FicheCollege.root/CG67.FicheCollege/Core/CG67.FicheCollege.Testeur/Program.cs

@@ -16,11 +16,11 @@ namespace CG67.FicheCollege.Testeur
              */
 
 
-          //  ChiffresSignificatifs a = ServiceFiche.GetChiffresSignificatifsByAnnee(2009);
-           // Console.WriteLine("{0}", a.MontantTotalFinancements);
+            //  ChiffresSignificatifs a = ServiceFiche.GetChiffresSignificatifsByAnnee(2009);
+            // Console.WriteLine("{0}", a.MontantTotalFinancements);
             XmlDocument d = new XmlDocument();
-            d.LoadXml(ServiceFiche.GetFicheCollege("0670107C", 2009).OuterXml);
-              
+            d.LoadXml(ServiceFiche.GetFicheCollege("0671830A", 2009).OuterXml);
+
             d.Save("test.xml");
             //Console.WriteLine(ServiceFiche.GetFicheCollege("0670107C", 2009).OuterXml) ;
 

+ 1 - 0
CG67.FicheCollege.root/CG67.FicheCollege/Web/CG67.FicheCollege.Web/CG67.FicheCollege.Web.csproj

@@ -50,6 +50,7 @@
     <Content Include="FicheCollege.aspx" />
     <Content Include="GenerationFiche.aspx" />
     <Content Include="Web.config" />
+    <Content Include="xml\Entete.xml" />
     <Content Include="xslt\FicheCollege.xslt" />
   </ItemGroup>
   <ItemGroup>

+ 9 - 2
CG67.FicheCollege.root/CG67.FicheCollege/Web/CG67.FicheCollege.Web/FicheCollege.aspx.cs

@@ -8,6 +8,7 @@ using System.Web.UI;
 using System.Web.UI.WebControls;
 using System.Web.UI.WebControls.WebParts;
 using System.Web.UI.HtmlControls;
+using System.Xml;
 using CG67.FicheCollege.Service;
 namespace CG67.FicheCollege
 {
@@ -17,8 +18,14 @@ namespace CG67.FicheCollege
         {
             if (!this.IsPostBack)
             {
-               
-                this.Xml1.DocumentContent = ServiceFiche.GetFicheCollege(Session["RNE"].ToString(), int.Parse(Session["annee"].ToString())).OuterXml ;
+                XmlDocument entete = new XmlDocument();
+                entete.Load(Server.MapPath(@"~/xml/entete.xml"));
+
+                XmlNode xmlFicheCollege = ServiceFiche.GetFicheCollege(Session["RNE"].ToString(), int.Parse(Session["annee"].ToString()));
+
+                xmlFicheCollege.SelectSingleNode("college").InnerXml   += entete.DocumentElement.OuterXml;
+
+                this.Xml1.DocumentContent = xmlFicheCollege.OuterXml ;
                 this.DataBind();
             }
         }

+ 5 - 1
CG67.FicheCollege.root/CG67.FicheCollege/Web/CG67.FicheCollege.Web/HttpHandlerHistogramme.cs

@@ -32,6 +32,7 @@ namespace CG67.FicheCollege
 
             decimal[] valeurs = new decimal[nbBarre];
             Color[] couleurs = new Color[nbBarre];
+            string[] legende = new string[nbBarre];
             decimal valeurMaxi = decimal.MinValue;
             decimal valeurMini = decimal.MaxValue;
 
@@ -40,6 +41,7 @@ namespace CG67.FicheCollege
             {
                 valeurs[i - 1] = Convert.ToInt32(context.Request[string.Format("v{0}", i)]);
                 couleurs[i - 1] = Color.FromArgb(Convert.ToInt32(context.Request[string.Format("c{0}", i)]));
+                legende[i - 1] = context.Request[string.Format("t{0}", i)];
                 if (i == 1)
                 {
                     valeurMaxi = valeurs[i - 1];
@@ -72,8 +74,9 @@ namespace CG67.FicheCollege
                 g.FillRectangle(pinceau, ecartEntreBarre + ((largeurBarre + ecartEntreBarre) * i), (float)(hauteur - 20 - valeurs[i] * echelle), largeurBarre, (float)(valeurs[i] * echelle));
                 g.DrawString(valeurs[i].ToString(), police, stylo, ecartEntreBarre + ((largeurBarre + ecartEntreBarre) * i), (float)(hauteur - 35 - valeurs[i] * echelle));
                 pinceau.Dispose();
+                g.DrawString(legende[i], police, stylo, ecartEntreBarre + ((largeurBarre + ecartEntreBarre) * i), (float)(hauteur - 20));
             }
-
+            stylo.Dispose();
             // Envoi de l'image dans le flux http de sortie
             context.Response.ContentType = "image/bitmap";
             graphique.Save(context.Response.OutputStream, ImageFormat.Gif);
@@ -83,5 +86,6 @@ namespace CG67.FicheCollege
             g.Dispose();
         }
 
+
     }
 }

+ 6 - 1
CG67.FicheCollege.root/CG67.FicheCollege/Web/CG67.FicheCollege.Web/css/fichecollege.css

@@ -1,6 +1,11 @@
 body
 {
 }
+
+#conteneur
+{
+	margin-left:10px;
+}
 .libelle
 {
 	width:300px;	
@@ -8,4 +13,4 @@ body
 #graphique
 {
 	text-align: center;
-}
+}

+ 12 - 0
CG67.FicheCollege.root/CG67.FicheCollege/Web/CG67.FicheCollege.Web/xml/Entete.xml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<entete>
+  <valideur> Guy DIETRICH, DGA du PEP</valideur>
+  <suiviepar>
+    <direction>Direction des Collèges et de l'Education</direction>
+    <nomprenom>Pascale HAUGER</nomprenom>
+    <fonction>Chef de projet</fonction>
+    <tel>03 69 20 75 86</tel>
+    <fax>03 69 20 75 23</fax>
+    <email>pascale.hauger@cg67.fr</email>
+  </suiviepar>
+</entete>

+ 79 - 6
CG67.FicheCollege.root/CG67.FicheCollege/Web/CG67.FicheCollege.Web/xslt/FicheCollege.xslt

@@ -1,10 +1,64 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <xsl:output method="html"   />
   <xsl:template match="college">
+    <div id="conteneur">
     <h1>
       <xsl:text>Collège </xsl:text><xsl:value-of select="Etablissement/NomCollegePourPresentation"/>
       
     </h1>
+      <table>
+        <colgroup>
+          <col class="libelle"></col>
+          <col class="information"></col>
+        </colgroup>
+        <tr>
+          <td>
+            A l'attention de
+          </td>
+          <td>
+            Monsieur le Président du Conseil Général sous le couvert de Monsieur Pierre GEY,
+            Directeur Général des Services
+          </td>
+        </tr>
+        <tr>
+          <td>
+            Editée par
+          </td>
+          <td>
+            <xsl:value-of select="entete/suiviepar/direction"/>
+          </td>
+        </tr>
+        <tr>
+          <td>
+            Validée par
+          </td>
+          <td>
+            <xsl:value-of select="entete/valideur"/>
+          </td>
+        </tr>
+        <tr>
+          <td>
+            Date de Validation
+          </td>
+          <td>
+            15 Septembre 2009
+          </td>
+        </tr>
+        <tr>
+          <td>
+            Affaire suivie par
+          </td>
+          <td>
+            <xsl:value-of select="entete/suiviepar/direction"/><br />
+            <xsl:value-of select="entete/suiviepar/nomprenom"/><br />
+            <xsl:value-of select="entete/suiviepar/fonction"/><br />
+            <xsl:value-of select="entete/suiviepar/tel"/><br />
+            <xsl:value-of select="entete/suiviepar/fax"/><br />
+            <xsl:value-of select="entete/suiviepar/email"/>
+          </td>
+        </tr>
+    </table>      
     <h2>1. Fiche d'identité du collège</h2>
     <table>
       <colgroup>
@@ -15,6 +69,10 @@
         <td>Code RNE du collège</td>
         <td><xsl:value-of select="Etablissement/CodeRNE"/></td>
       </tr>
+      <tr>
+        <td>Type d'établissement</td>
+        <td><xsl:value-of select="Etablissement/TypeEtablissement"/></td>
+      </tr>
       <tr>
         <td>Coordonnées du collège</td>
         <td>
@@ -54,7 +112,9 @@
         <td>MCG de rattachement et<BR/>directeur de la MCG
       </td>
         <td>
-          <xsl:value-of select="Etablissement/McgRattachgement/Ville"/>
+          <xsl:value-of select="Etablissement/MCG/Ville"/>
+          <BR/><xsl:value-of select="Etablissement/MCG/NomPresident"/><xsl:text> </xsl:text>
+          <xsl:value-of select="Etablissement/MCG/PrenomPresident"/>
         </td>
       </tr>
       <tr>
@@ -154,8 +214,11 @@
         </td>        
       </tr>
       <tr>
-        <td colspan="2" id="graphique">          
-          <img alt="graphique de test" src="vide.histo?l=400&amp;h=400&amp;f=-64&amp;nb=7&amp;v1=500&amp;c1=-65536&amp;v2=56&amp;c2=-65536&amp;v3=25&amp;c3=-65536&amp;v4=154&amp;c4=-65536&amp;v5=50&amp;c5=-16776961&amp;v6=254&amp;c6=-16776961&amp;v7=25&amp;c7=-16776961"></img>
+        <td colspan="2" id="graphique">
+          <xsl:apply-templates select="Etablissement/LstEffectif"/>
+        <!--      
+          <img alt="graphique de test" src="dummy.histo?l=400&amp;h=400&amp;f=-64&amp;nb=7&amp;v1=500&amp;c1=-65536&amp;t1=2001&amp;v2=56&amp;c2=-65536&amp;t2=2002&amp;v3=25&amp;c3=-65536&amp;t3=2003&amp;v4=154&amp;c4=-65536&amp;t4=2004&amp;v5=50&amp;c5=-16776961&amp;t5=2005&amp;v6=254&amp;c6=-16776961&amp;t6=2006&amp;v7=25&amp;c7=-16776961&amp;t7=2007"></img>
+          -->
         </td>
       </tr>
       <tr>
@@ -288,7 +351,7 @@
         </tr>
       </tr>
     </table>    
-    <h2>6. Actions édicatives territoriales</h2>
+    <h2>6. Actions éducatives territoriales</h2>
     <table>
       <colgroup>
         <col class="libelle"></col>
@@ -355,7 +418,17 @@
       </tr>
 
     </table>
-    
+    </div>  
+  </xsl:template>
+  
+  <xsl:template match="Etablissement/LstEffectif">   
+  <img alt="Evolution des effectifs">
+    <xsl:attribute name="src">dummy.histo?l=400&amp;h=400&amp;f=-64&amp;nb=<xsl:value-of select="count(Effectif)"></xsl:value-of>     
+      <xsl:for-each select="Effectif">
+        <xsl:if test="TypeEffectif='R'">&amp;v<xsl:value-of select ="position()"></xsl:value-of>=<xsl:value-of select="EffectifTotal"/>&amp;c<xsl:value-of select ="position()"></xsl:value-of>=-16776961&amp;t<xsl:value-of select ="position()"></xsl:value-of>=<xsl:value-of select="Annee"/></xsl:if>
+        <xsl:if test="TypeEffectif='P'">&amp;v<xsl:value-of select ="position()"></xsl:value-of>=<xsl:value-of select="EffectifTotal"/>&amp;c<xsl:value-of select ="position()"></xsl:value-of>=-65536&amp;t<xsl:value-of select ="position()"></xsl:value-of>=<xsl:value-of select="Annee"/></xsl:if>
+      </xsl:for-each>    
+    </xsl:attribute>  
+  </img>
   </xsl:template>
-
 </xsl:stylesheet>