Celine.meneu 16 years ago
parent
commit
a4027ef0ae

+ 51 - 28
CG67.FicheCollege.root/CG67.FicheCollege/Core/CG67.FicheCollege.Domaine/ATC.cs

@@ -8,27 +8,35 @@ namespace CG67.FicheCollege.Domaine
     /// Adjoint(Agent) Technique des Collèges
     /// </summary>
     [Serializable]
-    public class ATC : Contact
+    public class ATC 
     {
         #region propriétés 
         /// <summary>
         /// Valeur ETP (equivalent temps plein) de l'ATC.
         /// </summary>
-        private double mValeurETP;
+        private string mValeurETP;
         /// <summary>
-        /// Catégorie de l'ATC.
+        /// Nom de l'ATC.
+        /// </summary>
+        private string mNom;
+        /// <summary>
+        /// Prenom de l'ATC.
         /// </summary>
-        private string mCategorie;
+        private string mPrenom;
         /// <summary>
-        /// Grade de l'ATC
+        /// Catégorie de l'ATC.
         /// </summary>
+       
         private string mGrade;
         /// <summary>
-        /// Nombre de jours de formations suivis par l'ATC
+        /// Nombre le type de contrat de l'agent
         /// </summary>
-        private int mNbJoursFormation;
+        private string mStatut;
 
-        private bool mContratAide;
+        /// <summary>
+        /// Le libellé de la fiche de poste de l'agent
+        /// </summary>
+        private string mFonction;
 
         #endregion
 
@@ -36,18 +44,36 @@ namespace CG67.FicheCollege.Domaine
         /// <summary>
         /// Obtient ou définit la valeur ETP de l'ATC
         /// </summary>
-        public double ValeurETP
+        public string ValeurETP
         {
             get { return mValeurETP; }
             set { mValeurETP = value; }
         }
+        
+        /// <summary>
+        /// Obtient le nom
+        /// </summary>
+        public string Nom
+        {
+            get { return mNom; }
+            set { mNom = value; }
+        }
+        /// <summary>
+        /// Obtient le prénom
+        /// </summary>
+        public string Prenom
+        {
+            get { return mPrenom; }
+            set { mPrenom = value; }
+        }
+
         /// <summary>
-        /// Obtient ou définit la catégorie de l'ATC
+        /// Obtient ou définit la fonction
         /// </summary>
-        public string Categorie
+        public string Fonction
         {
-            get { return mCategorie; }
-            set { mCategorie = value; }
+            get { return mFonction; }
+            set { mFonction = value; }
         }
         /// <summary>
         /// Obtient ou définit le grade de l'ATC
@@ -57,28 +83,25 @@ namespace CG67.FicheCollege.Domaine
             get { return mGrade; }
             set { mGrade = value; }
         }
+        public string Statut
+        {
+            get { return mStatut; }
+            set { mStatut = value; }
+        }
         /// <summary>
         /// Obtient ou définit le nombre de jours de formations suivis par l'ATC
         /// </summary>
-        public int NbJoursFormation
-        {
-            get { return mNbJoursFormation; }
-            set { mNbJoursFormation = value; }
-        }
-        #endregion
+                #endregion
 
-        public ATC(double valeurETP, string nom, string prenom, string fonction, string typeContact, string categorie, string grade, int nbJoursFormation,bool contratAide) : base(nom, prenom, fonction, typeContact)
+        public ATC(string valeurETP, string nom, string prenom, string fonction, string grade,string statut)
         {
             this.mValeurETP = valeurETP;
-            this.mCategorie = categorie;
+            this.mNom = nom;
+            this.mPrenom = prenom;
+            this.mFonction = fonction;
             this.mGrade = grade;
-            this.mNbJoursFormation = nbJoursFormation;
-            this.mContratAide = contratAide;     
-        }
-        public bool ContratAide
-        {
-            get { return mContratAide; }
-            set { mContratAide = value; }
+            this.mStatut = statut;
         }
+       
     }
 }

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

@@ -43,6 +43,7 @@
     <Compile Include="ChiffresSignificatifs.cs" />
     <Compile Include="ClasseDecouverte.cs" />
     <Compile Include="Commentaires.cs" />
+    <Compile Include="ContratAide.cs" />
     <Compile Include="Effectif.cs" />
     <Compile Include="Equipement.cs" />
     <Compile Include="Etablissement.cs" />

+ 91 - 0
CG67.FicheCollege.root/CG67.FicheCollege/Core/CG67.FicheCollege.Domaine/ContratAide.cs

@@ -0,0 +1,91 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace CG67.FicheCollege.Domaine
+{
+     /// <summary>
+    /// Adjoint(Agent) Technique des Collèges
+    /// </summary>
+    [Serializable]
+    public class ContratAide : Contact
+    {
+        #region propriétés 
+        /// <summary>
+        /// Valeur ETP (equivalent temps plein) de l'ATC.
+        /// </summary>
+        private double mValeurETP;
+        /// <summary>
+        /// Catégorie de l'ATC.
+        /// </summary>
+        private string mCategorie;
+        /// <summary>
+        /// Grade de l'ATC
+        /// </summary>
+        private string mGrade;
+        /// <summary>
+        /// Nombre de jours de formations suivis par l'ATC
+        /// </summary>
+        private int mNbJoursFormation;
+
+        private bool mBoulContratAide;
+
+        #endregion
+
+        #region méthodes
+        /// <summary>
+        /// Obtient ou définit la valeur ETP de l'ATC
+        /// </summary>
+        public double ValeurETP
+        {
+            get { return mValeurETP; }
+            set { mValeurETP = value; }
+        }
+        /// <summary>
+        /// Obtient ou définit la catégorie de l'ATC
+        /// </summary>
+        public string Categorie
+        {
+            get { return mCategorie; }
+            set { mCategorie = value; }
+        }
+        /// <summary>
+        /// Obtient ou définit le grade de l'ATC
+        /// </summary>
+        public string Grade
+        {
+            get { return mGrade; }
+            set { mGrade = value; }
+        }
+        /// <summary>
+        /// Obtient ou définit le nombre de jours de formations suivis par l'ATC
+        /// </summary>
+        public int NbJoursFormation
+        {
+            get { return mNbJoursFormation; }
+            set { mNbJoursFormation = value; }
+        }
+        /// <summary>
+        /// Obtient ou définit le nombre de jours de formations suivis par l'ATC
+        /// </summary>
+        public bool boulContratAide
+        {
+            get { return mBoulContratAide; }
+            set { mBoulContratAide = value; }
+        }
+
+        #endregion
+
+        public ContratAide(double valeurETP, string nom, string prenom, string fonction, string typeContact, string categorie, string grade, int nbJoursFormation, bool typeContrat) : base(nom, prenom, fonction, typeContact)
+        {
+            this.mValeurETP = valeurETP;
+            this.mCategorie = categorie;
+            this.mGrade = grade;
+            this.mNbJoursFormation = nbJoursFormation;
+            this.boulContratAide = typeContrat;
+
+        
+        }
+     
+    }    }
+

+ 109 - 13
CG67.FicheCollege.root/CG67.FicheCollege/Core/CG67.FicheCollege.Domaine/Etablissement.cs

@@ -10,6 +10,7 @@ namespace CG67.FicheCollege.Domaine
     public delegate IList<ActionEducative> dlgLoadActionEducative(string codeRNE, int annee);
     public delegate IList<ClasseDecouverte> dlgLoadClasseDecouverte(string codeRNE, int annee);
     public delegate IList<ATC> dlgLoadATC(string codeRNE);
+    public delegate IList<ContratAide> dlgLoadContratAide(string codeRNE);
     public delegate Bilinguisme dlgLoadBilinguisme(string codeRNE, int annee);
     public delegate Commentaires dlgLoadCommentaires(string codeRNE, int annee);
     public delegate IList<Contact> dlgLoadContact(string codeRNE);
@@ -31,6 +32,7 @@ namespace CG67.FicheCollege.Domaine
         private dlgLoadActionEducative LoaderActionEducative;
         private dlgLoadClasseDecouverte LoaderClasseDecouverte;
         private dlgLoadATC LoaderATC;
+        private dlgLoadContratAide LoaderContratAide;
         private dlgLoadBilinguisme LoaderBilinguisme;
         private dlgLoadCommentaires LoaderCommentaires;
         private dlgLoadContact LoaderContact;
@@ -143,6 +145,10 @@ namespace CG67.FicheCollege.Domaine
         /// </summary>
         private IList<ATC> mLstATC;
         /// <summary>
+        /// IListe des contrats Aidés
+        /// </summary>
+        private IList<ContratAide> mLstContratAide;
+        /// <summary>
         /// IListe des équipements
         /// </summary>
         private IList<Equipement> mLstEquipements;
@@ -191,6 +197,7 @@ namespace CG67.FicheCollege.Domaine
         /// </summary>
         private int mNbrRemplacementsATC;
 
+        private int mNbrRemplacementsContratAide;
 
         private bool mIsRestautant;
 
@@ -442,6 +449,19 @@ namespace CG67.FicheCollege.Domaine
             set { mLstATC = value; }
         }
         /// <summary>
+        /// Obtient ou définit la IListe d'ATC
+        /// </summary>
+        public IList<ContratAide> LstContratAide
+        {
+            get
+            {
+                if (mLstContratAide == null)
+                    mLstContratAide = this.LoaderContratAide(mCodeRNE);
+                return mLstContratAide;
+            }
+            set { mLstContratAide = value; }
+        }
+        /// <summary>
         /// Obtient ou définit la IListe des équipements obtenus.
         /// </summary>
         public IList<Equipement> LstEquipements
@@ -539,6 +559,11 @@ namespace CG67.FicheCollege.Domaine
             get { return mNbrRemplacementsATC; }
             set { mNbrRemplacementsATC = value; }
         }
+        public int NbrRemplacementsContratAide
+        {
+            get { return mNbrRemplacementsContratAide; }
+            set { mNbrRemplacementsContratAide = value; }
+        }
         #endregion
 
         #region autres méthodes
@@ -781,30 +806,99 @@ namespace CG67.FicheCollege.Domaine
         /// <summary>
         /// retourne la phrase concernant le total d'ATC de l'établissement
         /// </summary>
-        public string PhraseTotalATC
+    //    public string PhraseTotalATC
+    //    {
+   //         get
+   //         {
+   //             int nbr = 0;
+   //             foreach (ATC adjoint in LstATC)
+   //                 if (adjoint.ValeurETP < 1)
+   //                     nbr++;
+   //             if (nbr != 0)
+   //                 //return LstATC.Count + " agents , dont " + nbr + " à temps partiel.";
+   //                 return LstATC.Count + " agents.";
+   //             else
+  //                  return LstATC.Count + " agents.";
+  //          }
+  //      }
+        /// <summary>
+        /// retourne la phrase concernant la valeur ETP totale des ATC de l'établissement
+        /// </summary>
+ //       public string PhraseValeurETP
+ //       {
+ //           get
+ //           {
+ //               double valeurReel = 0;
+ //               foreach (ATC adjoint in LstATC)
+ //                   valeurReel += adjoint.ValeurETP;
+
+//                string retour = "ETP réels : " + valeurReel + "\nEtp Barème : " + ValeurETPTheorique + "\nEcart : ";
+//                double ecart = valeurReel - ValeurETPTheorique;
+//                if (ecart >= 0)
+//                    retour += ecart;
+ //               else
+ //                   retour += (ecart - ecart * 2);
+
+   //             return retour;
+   //         }
+  //      }
+        /// <summary>
+        /// retourne la phrase concernant le nombre de jours de formation des ATC de l'établissement
+        /// </summary>
+   //     public string PhraseNombreJoursFormation
+   //     {
+   //         get
+   //         {
+   //             int valeur = 0;
+   //             foreach (ATC adjoint in LstATC)
+   //                 valeur += adjoint.NbJoursFormation;
+
+  //              return valeur + " jours.";
+  //          }
+ //       }
+        /// <summary>
+        /// retourne la phrase concernant le(s) remplacement(s) de l'établissement
+        /// </summary>
+        /// 
+        public string PhraseRemplacements
+        {
+            get
+            {
+                if (NbrRemplacementsATC == 0)
+                    return "néant";
+                else if (NbrRemplacementsATC == 1)
+                    return "Le remplacement d'un agent à été assuré";
+                else
+                    return "Le remplacement de " + NbrRemplacementsATC + " à été assuré";
+            }
+        }
+        /// <summary>
+        /// retourne la phrase concernant le total de contrat aidé
+        /// </summary>
+        public string PhraseTotalContratAide
         {
             get
             {
                 int nbr = 0;
-                foreach (ATC adjoint in LstATC)
+                foreach (ContratAide adjoint in LstContratAide)
                     if (adjoint.ValeurETP < 1)
                         nbr++;
                 if (nbr != 0)
                     //return LstATC.Count + " agents , dont " + nbr + " à temps partiel.";
-                    return LstATC.Count + " agents.";
+                    return LstContratAide.Count + " agents.";
                 else
-                    return LstATC.Count + " agents.";
+                    return LstContratAide.Count + " agents.";
             }
         }
         /// <summary>
         /// retourne la phrase concernant la valeur ETP totale des ATC de l'établissement
         /// </summary>
-        public string PhraseValeurETP
+        public string PhraseValeurETPContratAide
         {
             get
             {
                 double valeurReel = 0;
-                foreach (ATC adjoint in LstATC)
+                foreach (ContratAide adjoint in LstContratAide)
                     valeurReel += adjoint.ValeurETP;
 
                 string retour = "ETP réels : " + valeurReel + "\nEtp Barème : " + ValeurETPTheorique + "\nEcart : ";
@@ -820,12 +914,12 @@ namespace CG67.FicheCollege.Domaine
         /// <summary>
         /// retourne la phrase concernant le nombre de jours de formation des ATC de l'établissement
         /// </summary>
-        public string PhraseNombreJoursFormation
+        public string PhraseNombreJoursFormationContratAide
         {
             get
             {
                 int valeur = 0;
-                foreach (ATC adjoint in LstATC)
+                foreach (ContratAide adjoint in LstContratAide)
                     valeur += adjoint.NbJoursFormation;
 
                 return valeur + " jours.";
@@ -834,16 +928,16 @@ namespace CG67.FicheCollege.Domaine
         /// <summary>
         /// retourne la phrase concernant le(s) remplacement(s) de l'établissement
         /// </summary>
-        public string PhraseRemplacements
+        public string PhraseRemplacementsContratAide
         {
             get
             {
-                if (NbrRemplacementsATC == 0)
+                if (NbrRemplacementsContratAide == 0)
                     return "néant";
-                else if (NbrRemplacementsATC == 1)
+                else if (NbrRemplacementsContratAide == 1)
                     return "Le remplacement d'un agent à été assuré";
                 else
-                    return "Le remplacement de " + NbrRemplacementsATC + " à été assuré";
+                    return "Le remplacement de " + NbrRemplacementsContratAide + " à été assuré";
             }
         }
         public bool IsRestaurant
@@ -880,7 +974,8 @@ namespace CG67.FicheCollege.Domaine
                                 bool isRestaurant,bool isInternat,int effectifTheorique,
                                 dlgLoadActionEducative loaderActionEducative,
                                 dlgLoadClasseDecouverte loaderClasseDecouverte,
-                                dlgLoadATC loaderATC, 
+                                dlgLoadATC loaderATC,
+                                dlgLoadContratAide loaderContratAide, 
                                 dlgLoadBilinguisme loaderBilinguisme, 
                                 dlgLoadCommentaires loaderCommentaires,
                                 dlgLoadContact loaderContact,
@@ -912,6 +1007,7 @@ namespace CG67.FicheCollege.Domaine
             this.LoaderActionEducative = loaderActionEducative;
             this.LoaderClasseDecouverte = loaderClasseDecouverte;
             this.LoaderATC = loaderATC;
+            this.LoaderContratAide = loaderContratAide;
             this.LoaderBilinguisme = loaderBilinguisme;
             this.LoaderCommentaires = loaderCommentaires;
             this.LoaderContact = loaderContact;

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

@@ -47,6 +47,7 @@
     <Compile Include="EntrepotClasseDecouverte.cs" />
     <Compile Include="EntrepotCommentaires.cs" />
     <Compile Include="EntrepotContact.cs" />
+    <Compile Include="EntrepotContratAide.cs" />
     <Compile Include="EntrepotDotation.cs" />
     <Compile Include="EntrepotEquipement.cs" />
     <Compile Include="EntrepotEtablissement.cs" />

+ 39 - 10
CG67.FicheCollege.root/CG67.FicheCollege/Core/CG67.FicheCollege.Entrepot/EntrepotATC.cs

@@ -3,6 +3,7 @@ using System.Collections.Generic;
 using System.Text;
 using System.Data;
 using System.Data.SqlClient;
+using System.Data.OracleClient;
 using CG67.FicheCollege.Domaine;
 using CG67.FicheCollege.Interface;
 
@@ -17,25 +18,53 @@ namespace CG67.FicheCollege.Entrepot
             {
                 try
                 {
-                    int nbJourFormation;
-                    double valeurETP;
-                    connexion.Open();
+                   string codeAstre = "";
+                   connexion.Open();
                     using (SqlCommand command = connexion.CreateCommand())
                     {
-                        //on récupère les ATC.
-                        command.CommandText = "Select ValeurETP, TypeContact, Nom, Prenom, Fonction, Fonction, Catégorie, Grade, Sum(NbJours) as NbJoursFormation,contratAide from ATC INNER JOIN Contact ON (ATC.Id = Contact.Id) LEFT JOIN Formation_ATC ON (ATC.Id = Formation_ATC.IdATC) WHERE CodeRNE = @RNE GROUP BY ValeurETP, TypeContact, Nom, Prenom, Fonction, Fonction, Catégorie, Grade,ContratAide order by nom,prenom";
+                        command.CommandText = "Select CodeAstreRH from Etablissement WHERE CodeRNE = @RNE";
                         command.Parameters.AddWithValue("@RNE", codeRNE);
                         using (SqlDataReader dr = command.ExecuteReader())
                         {
-                            while (dr.Read())
+                            if (dr.Read())
+                                codeAstre = dr["CodeAstreRH"].ToString();
+                        }
+                    }
+
+                    using (OracleConnection connexion1 = new OracleConnection(this.ChaineDeConnexionRH))
+                    {
+                        try
+                        {
+                            connexion1.Open();
+                            using (OracleCommand command1 = connexion1.CreateCommand())
                             {
-                                nbJourFormation = dr["NbJoursFormation"] == DBNull.Value ? 0 : Convert.ToInt32(dr["NbJoursFormation"].ToString());
-                                valeurETP = dr["ValeurETP"] == DBNull.Value ? 0 : Convert.ToDouble(dr["ValeurETP"].ToString());
-                                resultat.Add(new ATC(valeurETP, dr["Nom"].ToString(), dr["Prenom"].ToString(), dr["Fonction"].ToString(), dr["TypeContact"].ToString(), dr["Catégorie"].ToString(), dr["Grade"].ToString(), nbJourFormation, dr.GetBoolean(dr.GetOrdinal("contratAide"))));
+                                //command1.CommandText = "Select * from V_ATC WHERE COD_STRUC = @CODESTRUC ";
+
+                                //command1.Parameters.AddWithValue("@CODESTRUC", codeAstre);
+                                command1.CommandText = "Select * from V_ATC WHERE COD_STRUC = '38401001'";
+
+                                using (OracleDataReader dr1 = command1.ExecuteReader())
+                                {
+
+                                    while (dr1.Read())
+                                    {
+                                        resultat.Add(new ATC(dr1["TAU_LIB"].ToString(), dr1["NOM_USUEL"].ToString(), dr1["NOM_PRENOM"].ToString(), dr1["LIB_POSTE"].ToString(), dr1["LIB_GRADE"].ToString(), dr1["LIB_CATAGT"].ToString()));
+                                    }
+                                }
                             }
                         }
+
+                        catch
+                        {
+                            throw;
+                        }
+                        finally
+                        {
+                            if (connexion1.State == ConnectionState.Open)
+                                connexion1.Close();
+                        }
+                    }    
                     }
-                }
                 catch
                 {
                     throw;

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

@@ -4,6 +4,7 @@ using System.Text;
 using System.Configuration;
 using System.Data;
 using System.Data.SqlClient;
+using System.Data.OracleClient;
 using CG67.FicheCollege.Domaine;
 
 namespace CG67.FicheCollege.Entrepot
@@ -14,6 +15,7 @@ namespace CG67.FicheCollege.Entrepot
         protected string ChaineDeConnexion;
         protected string ChaineDeConnexionCollege;
         protected string ChaineDeConnexionSubvention;
+        protected string ChaineDeConnexionRH;
       //  protected string ChaineDeConnexionAccess;
         public EntrepotBase()
         {
@@ -35,6 +37,12 @@ namespace CG67.FicheCollege.Entrepot
                 throw new Exception("Chaine de connexion Oracle non renseignée");
             }
 
+            this.ChaineDeConnexionRH = ConfigurationManager.AppSettings["ConnexionStringOracleRH"];
+            if (string.IsNullOrEmpty(this.ChaineDeConnexionRH))
+            {
+                throw new Exception("Chaine de connexion Oracle non renseignée");
+            }
+
 
             //this.ChaineDeConnexionAccess = ConfigurationManager.AppSettings["ConnexionStringAccess"];
             //if (string.IsNullOrEmpty(this.ChaineDeConnexionAccess))

+ 54 - 0
CG67.FicheCollege.root/CG67.FicheCollege/Core/CG67.FicheCollege.Entrepot/EntrepotContratAide.cs

@@ -0,0 +1,54 @@
+using System;
+using System.Data;
+using System.Data.SqlClient;
+using System.Collections.Generic;
+using System.Text;
+using CG67.FicheCollege.Domaine;
+using CG67.FicheCollege.Interface;
+
+
+namespace CG67.FicheCollege.Entrepot
+{
+  public class EntrepotContratAide : EntrepotBase, IEntrepotContratAide
+    {
+        public IList<ContratAide> GetByCodeRNE(string codeRNE)
+        {
+            IList<ContratAide> resultat = new List<ContratAide>();
+            using (SqlConnection connexion = new SqlConnection(this.ChaineDeConnexion))
+            {
+                try
+                {
+                    int nbJourFormation;
+                    double valeurETP;
+                    connexion.Open();
+                    using (SqlCommand command = connexion.CreateCommand())
+                    {
+                        //on récupère les ATC en contrat aidés.
+                        command.CommandText = "Select ValeurETP, TypeContact, Nom, Prenom, Fonction, Fonction, Catégorie, Grade, Sum(NbJours) as NbJoursFormation,contratAide from ATC INNER JOIN Contact ON (ATC.Id = Contact.Id) LEFT JOIN Formation_ATC ON (ATC.Id = Formation_ATC.IdATC) WHERE CodeRNE = @RNE GROUP BY ValeurETP, TypeContact, Nom, Prenom, Fonction, Fonction, Catégorie, Grade,ContratAide order by nom,prenom";
+                        command.Parameters.AddWithValue("@RNE", codeRNE);
+                        using (SqlDataReader dr = command.ExecuteReader())
+                        {
+                            while (dr.Read())
+                            {
+                                nbJourFormation = dr["NbJoursFormation"] == DBNull.Value ? 0 : Convert.ToInt32(dr["NbJoursFormation"].ToString());
+                                valeurETP = dr["ValeurETP"] == DBNull.Value ? 0 : Convert.ToDouble(dr["ValeurETP"].ToString());
+                                resultat.Add(new ContratAide(valeurETP, dr["Nom"].ToString(), dr["Prenom"].ToString(), dr["Fonction"].ToString(), dr["TypeContact"].ToString(), dr["Catégorie"].ToString(), dr["Grade"].ToString(), nbJourFormation, dr.GetBoolean(dr.GetOrdinal("contratAide"))));
+                            }
+                        }
+
+                    }
+                }
+                catch
+                {
+                    throw;
+                }
+                finally
+                {
+                    if (connexion.State == ConnectionState.Open)
+                        connexion.Close();
+                }
+            }
+            return resultat;
+        }
+    }
+   }

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

@@ -75,6 +75,7 @@ namespace CG67.FicheCollege.Entrepot
                                     EntrepotFactory.GetEntrepotActionEducative().GetByCodeRNEAndAnnee,
                                     EntrepotFactory.GetEntrepotClasseDecouverte().GetByCodeRNEAndAnnee,
                                     EntrepotFactory.GetEntrepotATC().GetByCodeRNE,
+                                    EntrepotFactory.GetEntrepotContratAide().GetByCodeRNE,
                                     EntrepotFactory.GetEntrepotBilinguisme().GetByCodeRNEAndAnnee,
                                     EntrepotFactory.GetEntrepotCommentaires().GetByCodeRNEAndAnnee,
                                     EntrepotFactory.GetEntrepotContact().GetAllContactByCodeRNE,

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

@@ -33,6 +33,15 @@ namespace CG67.FicheCollege.Entrepot
             return entrepotATC;
         }
 
+        private static  IEntrepotContratAide entrepotContratAide;
+        public static IEntrepotContratAide GetEntrepotContratAide()
+        {
+            if (entrepotContratAide == null)
+                entrepotContratAide = new EntrepotContratAide();
+            return entrepotContratAide;
+        }
+
+
         private static IEntrepotBilinguisme entrepotBilinguisme;
         public static IEntrepotBilinguisme GetEntrepotBilinguisme()
         {

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

@@ -44,6 +44,7 @@
     <Compile Include="IEntrepotClasseDecouverte.cs" />
     <Compile Include="IEntrepotCommentaires.cs" />
     <Compile Include="IEntrepotContact.cs" />
+    <Compile Include="IEntrepotContratAide.cs" />
     <Compile Include="IEntrepotDotation.cs" />
     <Compile Include="IEntrepotEquipement.cs" />
     <Compile Include="IEntrepotEtablissement.cs" />

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

@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using CG67.FicheCollege.Domaine;
+
+namespace CG67.FicheCollege.Interface
+{
+    public interface IEntrepotContratAide
+    {
+        IList<ContratAide> GetByCodeRNE(string codeRNE);
+    }
+}

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

@@ -53,6 +53,17 @@ namespace CG67.FicheCollege.Service
                 throw new Exception(erreur.ToString());
             }
         }
+        public static IList<ContratAide> GetContratAideByRNE(string codeRNE)
+        {
+            try
+            {
+                return EntrepotFactory.GetEntrepotContratAide().GetByCodeRNE(codeRNE);
+            }
+            catch (Exception erreur)
+            {
+                throw new Exception(erreur.ToString());
+            }
+        }
         public static Bilinguisme GetBilinguismeByRNEAndAnnee(string codeRNE, int annee)
         {
             try

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

@@ -7,6 +7,7 @@
       <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="ConnexionStringOracleRH" value="Data Source=SRHP;User Id=CG67_ATC;Password=ATC_CG67;"/>
   </appSettings>
   <connectionStrings/>
   <!-- -->