소스 검색

Mise à jour des Adresses
Mise à jour des adresses

Celine.meneu 13 년 전
부모
커밋
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.
         /// </summary>
         private string mVille;
+
+        private string mCommune;
         /// <summary>
         /// Contient les commentaires utiles à différents moments de la fiche.
         /// </summary>
@@ -243,13 +245,20 @@ namespace CG67.FicheCollege.Domaine
             get { return mIsPrive; }
             set { mIsPrive = value; }
         }
+
+        public string Commune
+        {
+            get { return mCommune; }
+            set { mCommune = value; }
+        }
+
         public string Nom
         {
             //si le collège n'a pas de nom, on retourne la ville du collège (ex : collège de truchtersheim)
             get 
             {
                 if (mNom == string.Empty)
-                    return "de " + mVille;
+                    return "de " + mCommune;
                 return mNom;
             }
             set { mNom = value; }
@@ -548,6 +557,10 @@ namespace CG67.FicheCollege.Domaine
             get { return mVille; }
             set { mVille = value; }
         }
+
+
+      
+
         public Commentaires CommentaireGeneraux
         {
             get
@@ -608,7 +621,7 @@ namespace CG67.FicheCollege.Domaine
         /// </summary>
         public string NomCollegePourPresentation
         {
-            get { return mVille + " - Collège " + Nom; }
+            get { return Commune + " - Collège " + Nom; }
         }
         public string LienPhoto
         {
@@ -1092,13 +1105,13 @@ namespace CG67.FicheCollege.Domaine
         /// <param name="codeRNE"></param>
         /// <param name="nom"></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.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,
                                 dlgLoadActionEducative loaderActionEducative,
                                 dlgLoadClasseDecouverte loaderClasseDecouverte,
@@ -1121,6 +1134,7 @@ namespace CG67.FicheCollege.Domaine
             this.mIsPrive = isPrive;
             this.mAnnee = annee;
             this.mNom = nom;
+            this.mCommune = commune;
             this.mTypeEtablissement = typeEtablissement;
             this.mAnneConstruction = anneeConstruction;
             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();
                     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())
                         {
                             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();
 
 
-                                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["Telephone"].ToString(), dr["Email"].ToString(), dr["Fax"].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>
 
   <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;"/>

+ 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>
       </div>
       <h1>
-        <xsl:value-of select="Etablissement/NomCollegePourPresentation"/>
+         <xsl:value-of select="Etablissement/NomCollegePourPresentation"/>
       </h1>
       <xsl:if test ="Etablissement/LienPhoto !=''">
         <img id="photo" alt="Photo du collège"  width="500px">