Procházet zdrojové kódy

Modifications effectuées le 08/07/2014:
suppression de la base PCOL.
modification de code pour ne plus prendre en compte l'instance et le developpement relatif à la programmation des travaux.

Celine.meneu před 11 roky
rodič
revize
0f8ddb4c44

+ 15 - 15
CG67.FicheCollege.root/CG67.FicheCollege/Core/CG67.FicheCollege.Domaine/Etablissement.cs

@@ -20,7 +20,7 @@ namespace CG67.FicheCollege.Domaine
     public delegate IList<EffectifDetail> dlgLoadEffectifDetail(string codeRNE, int annee);
     public delegate MCG dlgLoadMCG(string codeRNE);
     public delegate Logement dlgLoadLogement(string codeRNE);
-    public delegate IList<ProgTravaux> dlgLoadProgTravaux(string codeRNE, int annee);
+   // 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);
@@ -45,7 +45,7 @@ namespace CG67.FicheCollege.Domaine
         private dlgLoadEffectifDetail LoaderEffectifDetail;
         private dlgLoadMCG LoaderMCG;
         private dlgLoadLogement LoaderLogement;
-        private dlgLoadProgTravaux LoaderProgTravaux;
+       // private dlgLoadProgTravaux LoaderProgTravaux;
         private dlgLoadProjetPilote LoaderProjetPilote;
         private dlgLoadRestauration LoaderRestauration;
         private dlgLoadSoutienScolaireEnLigne LoaderSoutienScolaireEnLigne;
@@ -198,7 +198,7 @@ namespace CG67.FicheCollege.Domaine
         /// <summary>
         /// Liste de travaux de n-1 à n+1
         /// </summary>
-        private IList<ProgTravaux> mLstTravaux;
+      //  private IList<ProgTravaux> mLstTravaux;
 
              /// <summary>
         /// objet restauration
@@ -592,16 +592,16 @@ namespace CG67.FicheCollege.Domaine
             }
             set { mCommentairesGeneraux = value; }
         }
-        public IList<ProgTravaux> LstTravaux
-        {
-            get
-            {
-                if (mLstTravaux == null)
-                    mLstTravaux = this.LoaderProgTravaux(mCodeRNE, mAnnee); 
-                return mLstTravaux;
-            }
-            set { mLstTravaux = value; }
-        }
+     //   public IList<ProgTravaux> LstTravaux
+     //   {
+     //       get
+     //       {
+     //           if (mLstTravaux == null)
+     //               mLstTravaux = this.LoaderProgTravaux(mCodeRNE, mAnnee); 
+     //           return mLstTravaux;
+     //       }
+     //       set { mLstTravaux = value; }
+     //   }
 
 
         public IList<FichierTravaux> LstFichiersTravaux
@@ -1167,7 +1167,7 @@ namespace CG67.FicheCollege.Domaine
                                 dlgLoadInvestissement loaderInvestissement,
                                 dlgLoadEffectifDetail loaderEffectifDetail, 
                                 dlgLoadMCG loaderMCG, dlgLoadLogement loaderLogement,
-                                dlgLoadProgTravaux loaderProgTravaux, 
+                              //  dlgLoadProgTravaux loaderProgTravaux, 
                                 dlgLoadProjetPilote loaderProjetPilote, 
                                 dlgLoadRestauration loaderRestauration,
                                 dlgLoadFichiersTravaux loaderFichiersTravaux)
@@ -1208,7 +1208,7 @@ namespace CG67.FicheCollege.Domaine
             this.LoaderEffectifDetail = loaderEffectifDetail;
             this.LoaderMCG = loaderMCG;
             this.LoaderLogement = loaderLogement;
-            this.LoaderProgTravaux = loaderProgTravaux;
+        //    this.LoaderProgTravaux = loaderProgTravaux;
             this.LoaderProjetPilote = loaderProjetPilote;
             this.LoaderRestauration = loaderRestauration;
             this.LoaderFichiersTravaux = loaderFichiersTravaux;

+ 6 - 6
CG67.FicheCollege.root/CG67.FicheCollege/Core/CG67.FicheCollege.Entrepot/EntrepotBase.cs

@@ -13,7 +13,7 @@ namespace CG67.FicheCollege.Entrepot
     public class EntrepotBase
     {
         protected string ChaineDeConnexion;
-        protected string ChaineDeConnexionCollege;
+    //    protected string ChaineDeConnexionCollege;
         protected string ChaineDeConnexionSubvention;
         protected string ChaineDeConnexionRH;
         protected string ChaineDeConnexionAstreGF;
@@ -32,11 +32,11 @@ namespace CG67.FicheCollege.Entrepot
                 throw new Exception("Chaine de connexion Sql Server non renseignée");
             }
 
-            this.ChaineDeConnexionCollege = ConfigurationManager.AppSettings["ConnexionStringOracleCollege"];
-            if (string.IsNullOrEmpty(this.ChaineDeConnexionCollege))
-            {
-                throw new Exception("Chaine de connexion Oracle non renseignée");
-            }
+         //   this.ChaineDeConnexionCollege = ConfigurationManager.AppSettings["ConnexionStringOracleCollege"];
+         //   if (string.IsNullOrEmpty(this.ChaineDeConnexionCollege))
+         //   {
+         //      throw new Exception("Chaine de connexion Oracle non renseignée");
+         //   }
 
             this.ChaineDeConnexionSubvention = ConfigurationManager.AppSettings["ConnexionStringOracleSubvention"];
             if (string.IsNullOrEmpty(this.ChaineDeConnexionSubvention))

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

@@ -100,13 +100,14 @@ namespace CG67.FicheCollege.Entrepot
                                  EntrepotFactory.GetEntrepotEffectifDetail().GetByCodeRNEAndAnnee,
                                  EntrepotFactory.GetEntrepotMCG().GetByCodeRNE,
                                  EntrepotFactory.GetEntrepotLogement().GetByCodeRNE,
-                                 EntrepotFactory.GetEntrepotProgTravaux().GetByCodeRNEAndAnnee,
                                  EntrepotFactory.GetEntrepotProjetPilote().GetByCodeRNEAndAnnee,
                                EntrepotFactory.GetEntrepotRestauration().GetByRNEAndAnnee,
                                EntrepotFactory.GetEntrepotFichiersTravaux().GetByCodeRNE);
                             }
                         }
-                        
+
+                        // suppression programmation des travaux dans l'établissement 
+                        // EntrepotFactory.GetEntrepotProgTravaux().GetByCodeRNEAndAnnee,
                         // liste chargées d'office. pourquoi ?
 
                      //   command.CommandText = "SELECT * FROM EtpTheorique WHERE CodeRNE = @RNE AND Annee = @Annee";

+ 7 - 7
CG67.FicheCollege.root/CG67.FicheCollege/Core/CG67.FicheCollege.Entrepot/EntrepotFactory.cs

@@ -156,13 +156,13 @@ namespace CG67.FicheCollege.Entrepot
             return entrepotSoutienScolaireEnLigne;
         }
 
-        private static IEntrepotProgTravaux entrepotProgTravaux;
-        public static IEntrepotProgTravaux GetEntrepotProgTravaux()
-        {
-            if (entrepotProgTravaux == null)
-                entrepotProgTravaux = new EntrepotProgTravaux();
-            return entrepotProgTravaux;
-        }
+     //   private static IEntrepotProgTravaux entrepotProgTravaux;
+     //   public static IEntrepotProgTravaux GetEntrepotProgTravaux()
+     //   {
+     //       if (entrepotProgTravaux == null)
+     //           entrepotProgTravaux = new EntrepotProgTravaux();
+     //       return entrepotProgTravaux;
+     //   }
 
         private static IEntrepotFichiersTravaux entrepotFichiersTravaux;
         public static IEntrepotFichiersTravaux GetEntrepotFichiersTravaux()

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

@@ -9,53 +9,53 @@ using CG67.FicheCollege.Interface;
 
 namespace CG67.FicheCollege.Entrepot
 {
-    public class EntrepotProgTravaux : EntrepotBase, IEntrepotProgTravaux
-    {
-        public IList<ProgTravaux> GetByCodeRNEAndAnnee(string codeRNE, int annee)
-        {
-            IList<ProgTravaux> resultat = new List<ProgTravaux>();
-            using (OracleConnection connexion = new OracleConnection(this.ChaineDeConnexionCollege))
-            {
-                try
-                {
-                    connexion.Open();
-                    using (OracleCommand command = connexion.CreateCommand())
-                    {
-                        command.CommandText = "SELECT ANNEE, LIBELLE_OPERATION, MONTANT_PREV, TYPE_OPERATION, STATUT_OP, IMPREVU FROM T_OPERAT_SERV_BAT INNER JOIN T_COLLEGE ON (T_OPERAT_SERV_BAT.LIEN_T_COLLEGE = T_COLLEGE.REF_COLLEGE) WHERE CODE_COLLEGE = :RNE AND LIBELLE_OPERATION NOT IN (Select LIBELLE_OPERATION FROM T_OPERAT_SERV_BAT WHERE LIBELLE_OPERATION = 'Op') AND ANNEE BETWEEN :AnneeMoins2 AND :Annee ORDER BY ANNEE , TYPE_OPERATION ASC";
-                        //     command.CommandText = "SELECT ANNEE, LIBELLE_OPERATION, MONTANT_PREV, TYPE_OPERATION, STATUT_OP, IMPREVU FROM T_OPERAT_SERV_BAT INNER JOIN T_COLLEGE ON (T_OPERAT_SERV_BAT.LIEN_T_COLLEGE = T_COLLEGE.REF_COLLEGE) WHERE (TYPE_OPERATION Like 'Restructuration%' OR TYPE_OPERATION Like 'Maintenance%') AND CODE_COLLEGE = :RNE AND LIBELLE_OPERATION NOT IN (Select LIBELLE_OPERATION FROM T_OPERAT_SERV_BAT WHERE LIBELLE_OPERATION = 'Op') AND ANNEE BETWEEN :AnneeMoins2 AND :Annee ORDER BY ANNEE , TYPE_OPERATION ASC";
-                        command.Parameters.AddWithValue (":RNE", codeRNE);
-                        int anneeMoins2 = annee - 1;
-                        command.Parameters.AddWithValue(":AnneeMoins2", anneeMoins2);
-                        command.Parameters.AddWithValue (":Annee", annee +1 );
-                        double montantPrev;
-                        using (OracleDataReader reader = command.ExecuteReader())
-                        {
-                            while (reader.Read())
-                            {
-                                try
-                                {
-                                    montantPrev = Convert.ToDouble(reader["MONTANT_PREV"].ToString());
-                                }
-                                catch
-                                {
-                                    montantPrev = 0;
-                                }
-                                resultat.Add(new ProgTravaux(Convert.ToInt16(reader["ANNEE"].ToString()), reader["LIBELLE_OPERATION"].ToString(), montantPrev, reader["TYPE_OPERATION"].ToString(), reader["STATUT_OP"].ToString(), Convert.ToInt16(reader["IMPREVU"].ToString())));
-                            }
-                        }
-                    }
-                }
-                catch 
-                {
-                    throw;
-                }
-                finally
-                {
-                    if (connexion.State == ConnectionState.Open)
-                        connexion.Close();
-                }
-            }
-            return resultat;
-        }
-    }
+  //  public class EntrepotProgTravaux : EntrepotBase, IEntrepotProgTravaux
+  //  {
+  //      public IList<ProgTravaux> GetByCodeRNEAndAnnee(string codeRNE, int annee)
+  //      {
+  //          IList<ProgTravaux> resultat = new List<ProgTravaux>();
+  //          using (OracleConnection connexion = new OracleConnection(this.ChaineDeConnexionCollege))
+  //          {
+  //              try
+  //              {
+  //                  connexion.Open();
+  //                  using (OracleCommand command = connexion.CreateCommand())
+  //                  {
+  //                      command.CommandText = "SELECT ANNEE, LIBELLE_OPERATION, MONTANT_PREV, TYPE_OPERATION, STATUT_OP, IMPREVU FROM T_OPERAT_SERV_BAT INNER JOIN T_COLLEGE ON (T_OPERAT_SERV_BAT.LIEN_T_COLLEGE = T_COLLEGE.REF_COLLEGE) WHERE CODE_COLLEGE = :RNE AND LIBELLE_OPERATION NOT IN (Select LIBELLE_OPERATION FROM T_OPERAT_SERV_BAT WHERE LIBELLE_OPERATION = 'Op') AND ANNEE BETWEEN :AnneeMoins2 AND :Annee ORDER BY ANNEE , TYPE_OPERATION ASC";
+  //                      //     command.CommandText = "SELECT ANNEE, LIBELLE_OPERATION, MONTANT_PREV, TYPE_OPERATION, STATUT_OP, IMPREVU FROM T_OPERAT_SERV_BAT INNER JOIN T_COLLEGE ON (T_OPERAT_SERV_BAT.LIEN_T_COLLEGE = T_COLLEGE.REF_COLLEGE) WHERE (TYPE_OPERATION Like 'Restructuration%' OR TYPE_OPERATION Like 'Maintenance%') AND CODE_COLLEGE = :RNE AND LIBELLE_OPERATION NOT IN (Select LIBELLE_OPERATION FROM T_OPERAT_SERV_BAT WHERE LIBELLE_OPERATION = 'Op') AND ANNEE BETWEEN :AnneeMoins2 AND :Annee ORDER BY ANNEE , TYPE_OPERATION ASC";
+  //                      command.Parameters.AddWithValue (":RNE", codeRNE);
+  //                      int anneeMoins2 = annee - 1;
+  //                      command.Parameters.AddWithValue(":AnneeMoins2", anneeMoins2);
+  //                      command.Parameters.AddWithValue (":Annee", annee +1 );
+  //                      double montantPrev;
+  //                      using (OracleDataReader reader = command.ExecuteReader())
+  //                      {
+  //                          while (reader.Read())
+  //                          {
+  //                              try
+  //                              {
+  //                                  montantPrev = Convert.ToDouble(reader["MONTANT_PREV"].ToString());
+  //                              }
+   //                             catch
+   //                             {
+  //                                  montantPrev = 0;
+  //                              }
+  //                              resultat.Add(new ProgTravaux(Convert.ToInt16(reader["ANNEE"].ToString()), reader["LIBELLE_OPERATION"].ToString(), montantPrev, reader["TYPE_OPERATION"].ToString(), reader["STATUT_OP"].ToString(), Convert.ToInt16(reader["IMPREVU"].ToString())));
+  //                          }
+  //                      }
+   //                 }
+   //             }
+   //             catch 
+   //             {
+   //                 throw;
+   //             }
+   //             finally
+   //             {
+   //                 if (connexion.State == ConnectionState.Open)
+   //                     connexion.Close();
+    //            }
+    //        }
+    //        return resultat;
+    //    }
+    //}
 }

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

@@ -220,17 +220,17 @@ namespace CG67.FicheCollege.Service
                 throw;
             }
         }
-        public static IList<ProgTravaux> GetProgTravauxByCodeRNEAndAnnee(string codeRNE, int annee)
-        {
-            try
-            {
-                return EntrepotFactory.GetEntrepotProgTravaux().GetByCodeRNEAndAnnee(codeRNE, annee);
-            }
-            catch
-            {
-                throw;
-            }
-        }
+     //   public static IList<ProgTravaux> GetProgTravauxByCodeRNEAndAnnee(string codeRNE, int annee)
+     //   {
+     //       try
+     //       {
+     //           return EntrepotFactory.GetEntrepotProgTravaux().GetByCodeRNEAndAnnee(codeRNE, annee);
+     //       }
+     //       catch
+     //       {
+     //           throw;
+     //       }
+     //   }
         public static IList<Etablissement> GetAllEtablissement()
         {
             try

+ 1 - 1
CG67.FicheCollege.root/CG67.FicheCollege/Core/CG67.FicheCollege.Testeur/App.config

@@ -2,7 +2,7 @@
 <configuration>
   <appSettings>
     <add key="ConnexionStringSic" value="Data Source=ESNA\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="ConnexionStringOracleSubvention" value="Data Source=SGFP;User Id=ASTRE;Password=ASTRE;"/>
     <add key="ConnexionStringOracleAstreGF" value="Data Source=SGTP;User Id=SO;Password=SO;"/>
     <add key="ConnexionStringOracleRH" value="Data Source=SRHP;User Id=CG67_ATC;Password=ATC_CG67;"/>

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

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