Pārlūkot izejas kodu

Mise à jour des Adresses
Mise à jour des adresses

Celine.meneu 14 gadi atpakaļ
vecāks
revīzija
a404e9c47c

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

@@ -178,6 +178,8 @@ namespace CG67.FicheCollege.Domaine
         /// ville de l'établissement.
         /// ville de l'établissement.
         /// </summary>
         /// </summary>
         private string mVille;
         private string mVille;
+
+        private string mCommune;
         /// <summary>
         /// <summary>
         /// Contient les commentaires utiles à différents moments de la fiche.
         /// Contient les commentaires utiles à différents moments de la fiche.
         /// </summary>
         /// </summary>
@@ -243,13 +245,20 @@ namespace CG67.FicheCollege.Domaine
             get { return mIsPrive; }
             get { return mIsPrive; }
             set { mIsPrive = value; }
             set { mIsPrive = value; }
         }
         }
+
+        public string Commune
+        {
+            get { return mCommune; }
+            set { mCommune = value; }
+        }
+
         public string Nom
         public string Nom
         {
         {
             //si le collège n'a pas de nom, on retourne la ville du collège (ex : collège de truchtersheim)
             //si le collège n'a pas de nom, on retourne la ville du collège (ex : collège de truchtersheim)
             get 
             get 
             {
             {
                 if (mNom == string.Empty)
                 if (mNom == string.Empty)
-                    return "de " + mVille;
+                    return "de " + mCommune;
                 return mNom;
                 return mNom;
             }
             }
             set { mNom = value; }
             set { mNom = value; }
@@ -548,6 +557,10 @@ namespace CG67.FicheCollege.Domaine
             get { return mVille; }
             get { return mVille; }
             set { mVille = value; }
             set { mVille = value; }
         }
         }
+
+
+      
+
         public Commentaires CommentaireGeneraux
         public Commentaires CommentaireGeneraux
         {
         {
             get
             get
@@ -608,7 +621,7 @@ namespace CG67.FicheCollege.Domaine
         /// </summary>
         /// </summary>
         public string NomCollegePourPresentation
         public string NomCollegePourPresentation
         {
         {
-            get { return mVille + " - Collège " + Nom; }
+            get { return Commune + " - Collège " + Nom; }
         }
         }
         public string LienPhoto
         public string LienPhoto
         {
         {
@@ -1092,13 +1105,13 @@ namespace CG67.FicheCollege.Domaine
         /// <param name="codeRNE"></param>
         /// <param name="codeRNE"></param>
         /// <param name="nom"></param>
         /// <param name="nom"></param>
         /// <param name="ville"></param>
         /// <param name="ville"></param>
-        public Etablissement(string codeRNE, string nom, string ville)
+        public Etablissement(string codeRNE, string nom, string commune)
         {
         {
             this.mCodeRNE = codeRNE;
             this.mCodeRNE = codeRNE;
             this.mNom = nom;
             this.mNom = nom;
-            this.mVille = ville;
+            this.mCommune = commune;
         }
         }
-        public Etablissement(string codeRNE, bool isPrive, 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, 
+        public Etablissement(string codeRNE, bool isPrive, int annee, string nom, string commune, 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, bool ascenseur, int effectifTheorique,
                                 bool isRestaurant,bool isInternat, bool ascenseur, int effectifTheorique,
                                 dlgLoadActionEducative loaderActionEducative,
                                 dlgLoadActionEducative loaderActionEducative,
                                 dlgLoadClasseDecouverte loaderClasseDecouverte,
                                 dlgLoadClasseDecouverte loaderClasseDecouverte,
@@ -1121,6 +1134,7 @@ namespace CG67.FicheCollege.Domaine
             this.mIsPrive = isPrive;
             this.mIsPrive = isPrive;
             this.mAnnee = annee;
             this.mAnnee = annee;
             this.mNom = nom;
             this.mNom = nom;
+            this.mCommune = commune;
             this.mTypeEtablissement = typeEtablissement;
             this.mTypeEtablissement = typeEtablissement;
             this.mAnneConstruction = anneeConstruction;
             this.mAnneConstruction = anneeConstruction;
             this.mTelephone = telephone;
             this.mTelephone = telephone;

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

@@ -22,12 +22,13 @@ namespace CG67.FicheCollege.Entrepot
                     connexion.Open();
                     connexion.Open();
                     using (SqlCommand command = connexion.CreateCommand())
                     using (SqlCommand command = connexion.CreateCommand())
                     {
                     {
-                        command.CommandText = "Select Etablissement.CodeRNE, Etablissement.NomCollege, Adresse.Ville from Etablissement LEFT JOIN Adresse ON (Etablissement.IdAdresse = Adresse.Id) WHERE (Etablissement.Prive=0) ORDER BY Adresse.Ville, Etablissement.NomCollege ASC";
+                        command.CommandText = "Select Etablissement.CodeRNE, Etablissement.NomCollege, Etablissement.Commune, Adresse.Ville from Etablissement LEFT JOIN Adresse ON (Etablissement.IdAdresse = Adresse.Id) WHERE (Etablissement.Prive=0) ORDER BY Adresse.Ville, Etablissement.NomCollege ASC";
                         using (SqlDataReader dr = command.ExecuteReader())
                         using (SqlDataReader dr = command.ExecuteReader())
                         {
                         {
                             while (dr.Read())
                             while (dr.Read())
                             {
                             {
-                                resultat.Add(new Etablissement(dr["CodeRNE"].ToString(), dr["NomCollege"].ToString(), dr["Ville"].ToString()));
+     //                           resultat.Add(new Etablissement(dr["CodeRNE"].ToString(), dr["NomCollege"].ToString(),dr["Commune"].ToString(), dr["Ville"].ToString()));
+                                resultat.Add(new Etablissement(dr["CodeRNE"].ToString(), dr["NomCollege"].ToString(), dr["Commune"].ToString()));
                             }
                             }
                         }
                         }
                     }
                     }
@@ -77,7 +78,7 @@ namespace CG67.FicheCollege.Entrepot
                                 string  a = dr["DemiPension"].ToString();
                                 string  a = dr["DemiPension"].ToString();
 
 
 
 
-                                resultat = new Etablissement(codeRNE, dr.GetBoolean(dr.GetOrdinal("Prive")), annee, dr["NomCollege"].ToString(),
+                                resultat = new Etablissement(codeRNE, dr.GetBoolean(dr.GetOrdinal("Prive")), annee, dr["NomCollege"].ToString(), dr["Commune"].ToString(),
                                  dr["TypeEtablissement"].ToString(), Convert.ToInt16(dr["AnneeConstruction"].ToString()),
                                  dr["TypeEtablissement"].ToString(), Convert.ToInt16(dr["AnneeConstruction"].ToString()),
                                  dr["Telephone"].ToString(), dr["Email"].ToString(), dr["Fax"].ToString(),
                                  dr["Telephone"].ToString(), dr["Email"].ToString(), dr["Fax"].ToString(),
                                  dr["NomPropriétaire"].ToString(), adresse, dr["ComplementAdresse"].ToString(),
                                  dr["NomPropriétaire"].ToString(), adresse, dr["ComplementAdresse"].ToString(),

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

@@ -3,7 +3,7 @@
 <configuration>
 <configuration>
 
 
   <appSettings>
   <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="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="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;"/>
       <add key="ConnexionStringOracleSubvention" value="Data Source=SGFP;User Id=ASTRE;Password=ASTRE;"/>

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

@@ -9,7 +9,7 @@
         <img src="images/logocg67N.gif" alt="Logo du CG67"></img>
         <img src="images/logocg67N.gif" alt="Logo du CG67"></img>
       </div>
       </div>
       <h1>
       <h1>
-        <xsl:value-of select="Etablissement/NomCollegePourPresentation"/>
+         <xsl:value-of select="Etablissement/NomCollegePourPresentation"/>
       </h1>
       </h1>
       <xsl:if test ="Etablissement/LienPhoto !=''">
       <xsl:if test ="Etablissement/LienPhoto !=''">
         <img id="photo" alt="Photo du collège"  width="500px">
         <img id="photo" alt="Photo du collège"  width="500px">