using System; using System.Collections.Generic; 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 { public class EntrepotBase { protected string ChaineDeConnexion; // protected string ChaineDeConnexionCollege; protected string ChaineDeConnexionSubvention; protected string ChaineDeConnexionRH; protected string ChaineDeConnexionAstreGF; protected string CheminDeFichier; protected string Utilisateur; protected string MotDePasse; protected string NomDeDomaine; // protected string ChaineDeConnexionAccess; public EntrepotBase() { this.ChaineDeConnexion = ConfigurationManager.AppSettings["ConnexionStringSic"]; if (string.IsNullOrEmpty(this.ChaineDeConnexion)) { 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.ChaineDeConnexionSubvention = ConfigurationManager.AppSettings["ConnexionStringOracleSubvention"]; if (string.IsNullOrEmpty(this.ChaineDeConnexionSubvention)) { throw new Exception("Chaine de connexion Oracle non renseignée"); } this.ChaineDeConnexionAstreGF = ConfigurationManager.AppSettings["ConnexionStringOracleAstreGF"]; if (string.IsNullOrEmpty(this.ChaineDeConnexionAstreGF)) { 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.CheminDeFichier = ConfigurationManager.AppSettings["FileRepository"]; if (string.IsNullOrEmpty(this.CheminDeFichier)) { throw new Exception("Chemin d'accès aux fichiers non renseigné"); } this.Utilisateur = ConfigurationManager.AppSettings["ImpersonationUser"]; if (string.IsNullOrEmpty(this.Utilisateur)) { throw new Exception("Nom Utilisateur non renseigné"); } this.MotDePasse = ConfigurationManager.AppSettings["ImpersonationPassword"]; if (string.IsNullOrEmpty(this.MotDePasse)) { throw new Exception("Mot de passe non renseigné"); } this.NomDeDomaine = ConfigurationManager.AppSettings["ImpersonationDomain"]; if (string.IsNullOrEmpty(this.NomDeDomaine)) { throw new Exception("Nom de domaine non renseigné"); } //this.ChaineDeConnexionAccess = ConfigurationManager.AppSettings["ConnexionStringAccess"]; //if (string.IsNullOrEmpty(this.ChaineDeConnexionAccess)) //{ // throw new Exception("Chaine de connexion Access non renseignée"); //} } } }