Celine.meneu 16 éve
szülő
commit
6fa29e9ade

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

@@ -23,6 +23,7 @@ namespace CG67.FicheCollege.Domaine
     public delegate IList<ProgTravaux> dlgLoadProgTravaux(string codeRNE, int annee);
     public delegate IList<ProjetPilote> dlgLoadProjetPilote(string codeRNE, int annee);
     public delegate Restauration dlgLoadRestauration(string codeRNE, int annee);
+    public delegate SoutienScolaireEnLigne dlgLoadSoutienScolaireEnLigne(string codeRNE, int annee);
 
     [Serializable]    
     public class Etablissement
@@ -46,6 +47,7 @@ namespace CG67.FicheCollege.Domaine
         private dlgLoadProgTravaux LoaderProgTravaux;
         private dlgLoadProjetPilote LoaderProjetPilote;
         private dlgLoadRestauration LoaderRestauration;
+        private dlgLoadSoutienScolaireEnLigne LoaderSoutienScolaireEnLigne;
 
         #endregion
 
@@ -189,6 +191,10 @@ namespace CG67.FicheCollege.Domaine
         /// </summary>
         private Restauration mRestaurer;
         /// <summary>
+        /// objet SoutienScolaireEnligne
+        /// </summary>
+        private SoutienScolaireEnLigne mSoutienScolaireEnLigne;
+        /// <summary>
         /// Bilinguisme
         /// </summary>
         private IList<Bilinguisme> mBilingue;
@@ -558,6 +564,16 @@ namespace CG67.FicheCollege.Domaine
             }
             set { mRestaurer = value; }
         }
+        public SoutienScolaireEnLigne SoutienScolaireLigne
+        {
+            get
+            {
+                if (mSoutienScolaireEnLigne == null)
+                    mSoutienScolaireEnLigne = this.LoaderSoutienScolaireEnLigne(mCodeRNE, mAnnee);
+                return mSoutienScolaireEnLigne;
+            }
+            set { mSoutienScolaireEnLigne = value; }
+        }
         public IList<Bilinguisme> LstBilingue
         {
             get
@@ -1010,7 +1026,8 @@ namespace CG67.FicheCollege.Domaine
                                 dlgLoadClasseDecouverte loaderClasseDecouverte,
                                 dlgLoadATC loaderATC,
                                 dlgLoadContratAide loaderContratAide, 
-                                dlgLoadBilinguisme loaderBilinguisme, 
+                                dlgLoadBilinguisme loaderBilinguisme,
+                                dlgLoadSoutienScolaireEnLigne loaderSoutienScolaireEnLigne, 
                                 dlgLoadCommentaires loaderCommentaires,
                                 dlgLoadContact loaderContact,
                                 dlgLoadDotation loaderDotation,
@@ -1044,6 +1061,7 @@ namespace CG67.FicheCollege.Domaine
             this.LoaderATC = loaderATC;
             this.LoaderContratAide = loaderContratAide;
             this.LoaderBilinguisme = loaderBilinguisme;
+            this.LoaderSoutienScolaireEnLigne = loaderSoutienScolaireEnLigne;
             this.LoaderCommentaires = loaderCommentaires;
             this.LoaderContact = loaderContact;
             this.LoaderDotation = loaderDotation;

+ 41 - 2
CG67.FicheCollege.root/CG67.FicheCollege/Core/CG67.FicheCollege.Domaine/SoutienScolaireEnLigne.cs

@@ -4,7 +4,46 @@ using System.Text;
 
 namespace CG67.FicheCollege.Domaine
 {
-    class SoutienScolaireEnLigne
+    [Serializable]
+    public class SoutienScolaireEnLigne
     {
+        /// <summary>
+        /// Code RNE
+        /// </summary>
+        private string mCodeRNE;
+        /// <summary>
+        /// Année
+        /// </summary>
+
+        private int mAnnee;
+        /// <summary>
+        /// Nombre d'élèves
+        /// </summary>
+        private int mNbrEleves;
+
+        /// <summary>
+        /// Nombre total de classes
+        /// </summary>
+        private int mNbrClasses;
+
+        public int NbrEleves
+        {
+            get { return mNbrEleves; }
+            set { mNbrEleves = value; }
+        }
+        public int NbrClasses
+        {
+            get { return mNbrClasses; }
+            set { mNbrClasses = value; }
+
+        }
+        public SoutienScolaireEnLigne(int annee, string codeRNE, int nbrClasses, int nbrEleves)
+        {
+            this.mAnnee = annee;
+            this.mCodeRNE = codeRNE;
+            this.mNbrClasses = nbrClasses;
+            this.mNbrEleves = nbrEleves;
+
+        }
     }
-}
+}

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

@@ -60,6 +60,7 @@
     <Compile Include="EntrepotProjetPilote.cs" />
     <Compile Include="EntrepotRestauration.cs" />
     <Compile Include="EntrepotRestaurationExterne.cs" />
+    <Compile Include="EntrepotSoutienScolaireEnLigne.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
   </ItemGroup>
   <ItemGroup>

+ 1 - 1
CG67.FicheCollege.root/CG67.FicheCollege/Core/CG67.FicheCollege.Entrepot/EntrepotContratAide.cs

@@ -19,7 +19,7 @@ namespace CG67.FicheCollege.Entrepot
                 try
                 {
                   //  int nbJourFormation;
-                    double valeurETP;
+                  //  double valeurETP;
                     connexion.Open();
                     using (SqlCommand command = connexion.CreateCommand())
                     {

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

@@ -88,6 +88,7 @@ namespace CG67.FicheCollege.Entrepot
                                  EntrepotFactory.GetEntrepotATC().GetByCodeRNE,
                                  EntrepotFactory.GetEntrepotContratAide().GetByCodeRNE,
                                  EntrepotFactory.GetEntrepotBilinguisme().GetByCodeRNEAndAnnee,
+                                 EntrepotFactory.GetEntrepotSoutienScolaireEnLigne().GetByRNEAndAnnee,
                                  EntrepotFactory.GetEntrepotCommentaires().GetByCodeRNEAndAnnee,
                                  EntrepotFactory.GetEntrepotContact().GetAllContactByCodeRNE,
                                  EntrepotFactory.GetEntrepotDotation().GetByCodeRNEAndAnnee,

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

@@ -147,6 +147,14 @@ namespace CG67.FicheCollege.Entrepot
             return entrepotRestauration;
         }
 
+        private static IEntrepotSoutienScolaireEnLigne entrepotSoutienScolaireEnLigne;
+        public static IEntrepotSoutienScolaireEnLigne GetEntrepotSoutienScolaireEnLigne()
+        {
+            if (entrepotSoutienScolaireEnLigne == null)
+                entrepotSoutienScolaireEnLigne = new EntrepotSoutienScolaireEnLigne();
+            return entrepotSoutienScolaireEnLigne;
+        }
+
         private static IEntrepotProgTravaux entrepotProgTravaux;
         public static IEntrepotProgTravaux GetEntrepotProgTravaux()
         {

+ 53 - 0
CG67.FicheCollege.root/CG67.FicheCollege/Core/CG67.FicheCollege.Entrepot/EntrepotSoutienScolaireEnLigne.cs

@@ -0,0 +1,53 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Data;
+using System.Data.SqlClient;
+using CG67.FicheCollege.Domaine;
+using CG67.FicheCollege.Interface;
+
+
+namespace CG67.FicheCollege.Entrepot
+{
+    public class EntrepotSoutienScolaireEnLigne : EntrepotBase, IEntrepotSoutienScolaireEnLigne
+    {
+        public SoutienScolaireEnLigne GetByRNEAndAnnee(string codeRNE, int annee)
+        {
+             SoutienScolaireEnLigne resultat = null;
+
+            using (SqlConnection connexion = new SqlConnection(this.ChaineDeConnexion))
+            {
+                try
+                {
+                    connexion.Open();
+                    using (SqlCommand command = connexion.CreateCommand())
+                    {
+                        command.CommandText = "SELECT * FROM SoutienScolaireEnLigne WHERE CodeRNE = @RNE AND Annee = @Annee";
+                        command.Parameters.AddWithValue("@RNE", codeRNE);
+                        command.Parameters.AddWithValue("@Annee", annee);
+                        using (SqlDataReader dr = command.ExecuteReader())
+                        {
+                            if (dr.Read())
+
+                            {
+                               resultat = new SoutienScolaireEnLigne(Convert.ToInt16(dr["Annee"].ToString()),dr["CodeRNE"].ToString(),Convert.ToInt16(dr["NbClasses"].ToString()), Convert.ToInt16(dr["NbEleves"].ToString()));
+                                
+                            }
+                        }
+                    }
+                }
+                catch (Exception erreurInterne)
+                {
+                    throw new Exception(" " + erreurInterne);
+                }
+                finally
+                {
+                    if (connexion.State == ConnectionState.Open)
+                        connexion.Close();
+                }
+                return resultat ;
+            }
+        }
+    }
+    }
+

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

@@ -56,6 +56,7 @@
     <Compile Include="IEntrepotProjetPilote.cs" />
     <Compile Include="IEntrepotRestauration.cs" />
     <Compile Include="IEntrepotRestaurationExterne.cs" />
+    <Compile Include="IEntrepotSoutienScolaireEnLigne.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
   </ItemGroup>
   <ItemGroup>

+ 12 - 0
CG67.FicheCollege.root/CG67.FicheCollege/Core/CG67.FicheCollege.Interface/IEntrepotSoutienScolaireEnLigne.cs

@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using CG67.FicheCollege.Domaine;
+
+namespace CG67.FicheCollege.Interface
+{
+    public interface IEntrepotSoutienScolaireEnLigne
+    {
+       SoutienScolaireEnLigne GetByRNEAndAnnee(string codeRNE, int annee);
+    }
+}

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

@@ -209,6 +209,17 @@ namespace CG67.FicheCollege.Service
                 throw;
             }
         }
+        public static SoutienScolaireEnLigne GetSoutienScolaireEnLigneByCodeRNEAndAnnee(string codeRNE, int annee)
+        {
+            try
+            {
+                return EntrepotFactory.GetEntrepotSoutienScolaireEnLigne().GetByRNEAndAnnee(codeRNE, annee);
+            }
+            catch
+            {
+                throw;
+            }
+        }
         public static IList<ProgTravaux> GetProgTravauxByCodeRNEAndAnnee(string codeRNE, int annee)
         {
             try

+ 1 - 1
CG67.FicheCollege.root/CG67.FicheCollege/Web/CG67.FicheCollege.Web/Web.config

@@ -3,7 +3,7 @@
 <configuration>
 
   <appSettings>
-      <add key="ConnexionStringSic" value="Data Source=ESNA\sqlstd2k5_1;Initial Catalog=TSic;User Id=UserTSicRW;password=UserTS!cRW!"/>
+      <add key="ConnexionStringSic" value="Data Source=PAN\SQLSTD2K5_1;Initial Catalog=TSic;User Id=UserTSicRW;password=UserTS!cRW!"/>
       <add key="ConnexionStringOracleCollege" value="Data Source=PCOL;User Id=college;Password=college;"/>
       <add key="ConnexionStringAccess" value="Provider=microsoft.jet.oledb.4.0;Data Source=\\Moder\App_production\College\data\Base\BD Collège_prod.mdb;Persist Security Info=False;"/>
       <add key="ConnexionStringOracleSubvention" value="Data Source=SGFP;User Id=ASTRE;Password=ASTRE;"/>

+ 9 - 0
CG67.FicheCollege.root/CG67.FicheCollege/Web/CG67.FicheCollege.Web/css/fichecollege.css

@@ -22,6 +22,15 @@ body
 {
 	width:350px;	
 }
+.nbClasse
+{
+	width: 150px;
+}
+.nbEleve
+{
+	width: 150px;
+}
+
 .titre
 {
 	width: 250px;

+ 27 - 1
CG67.FicheCollege.root/CG67.FicheCollege/Web/CG67.FicheCollege.Web/xslt/FicheCollege.xslt

@@ -845,7 +845,33 @@
         </tr>
         <tr>
           <td>Complément scolaire par internet </td>
-          <td>Extension du dispositif à tous les collèges, pour 15 000 places, à compter de septembre 2009. Marché reconduit pour une année avec Paraschool.</td>
+          
+          <xsl:if test ="count(Etablissement/SoutienScolaireEnLigne/NbrClasses)=0">
+            <td>  Néant</td>
+          </xsl:if>
+          <xsl:if test ="count(Etablissement/SoutienScolaireEnLigne/NbrClasses)!=0">
+            <td>
+            <table>
+              <colgroup>
+                  <col class="nbClasse"></col>
+                  <col class="nbEleve"></col>
+               </colgroup>
+              <tr>
+                <td class="sansbordure">Nombre de classe</td>
+                <td class="sansbordure">
+                  <xsl:value-of select="Etablissement/SoutienScolaireEnLigne/NbrClasses"/>
+                </td>
+                <tr>
+                  <td class="sansbordure">Nombre d'élèves</td>
+                  <td class="sansbordure">
+                 <xsl:value-of select ="Etablissement/SoutienScolaireEnLigne/NbrEleves"/>
+                </td>
+                </tr>
+              </tr>
+            </table>
+            </td>
+            <!--<td>Extension du dispositif à tous les collèges, pour 15 000 places, à compter de septembre 2009. Marché reconduit pour une année avec Paraschool.</td> -->
+          </xsl:if>
         </tr>
         <tr>
           <td>Prévention des conduites à risque </td>