Beispiel #1
0
 public Cgrupo()
 {
     conn    = new ConnectionOracle();
     trans   = new Transaction[1];
     grupo   = new Mgrupo();
     docente = new Mdocente();
 }
        public IExecute CreateConnection()
        {
            try
            {
                IExecute execute;
                string[] prefix              = this.ConnectionString.Split(':');
                var      prefixdb            = prefix[0].ToLower();
                var      prefixConnectString = prefix[1];
                switch (prefixdb)
                {
                case prefixDatabaseType.MSSQL:
                    execute = new ConnectionSql(this, prefixConnectString); break;

                case prefixDatabaseType.ORACLE:
                    execute = new ConnectionOracle(this, prefixConnectString); break;

                case prefixDatabaseType.MYSQL:
                    execute = new ConnectionMySql(this, prefixConnectString); break;

                default:
                    execute = new ConnectionPostgre(this, prefixConnectString); break;
                }
                return(execute);
            }
            catch (KeyNotFoundException)
            {
                throw new KeyNotFoundException("Prefix wrong configuration.");
            }
        }
Beispiel #3
0
        /// <summary>
        /// Creates IConnection object with given parameters.
        /// </summary>
        /// <param name="connType">Connection Type</param>
        /// <param name="connectionString">Connection String</param>
        /// <returns>Returns IConnection object.</returns>
        public static IConnection CreateConnection(ConnectionTypes connType, string connectionString)
        {
            IConnection conn = null;

            try
            {
                switch (connType)
                {
                case ConnectionTypes.DB2:
                    conn = new ConnectionDB2(connectionString);
                    break;

                case ConnectionTypes.Oracle:
                    conn = new ConnectionOracle(connectionString);
                    break;

                case ConnectionTypes.Oledb:
                    conn = new ConnectionOleDb(connectionString);
                    break;

                case ConnectionTypes.Odbc:
                    conn = new ConnectionOdbc(connectionString);
                    break;

                case ConnectionTypes.PgSQL:
                    conn = new ConnectionPgSql(connectionString);
                    break;

                case ConnectionTypes.Sql:
                    conn = new ConnectionSql(connectionString);
                    break;

                default:
                    break;
                }
            }
            catch (Exception e)
            {
                throw;
            }
            return(conn);
        }
Beispiel #4
0
 public Mmodulo()
 {
     conn = new ConnectionOracle();
 }
Beispiel #5
0
 public Mcurso()
 {
     connect = new ConnectionOracle();
 }
 public Mproceso()
 {
     connect   = new ConnectionOracle();
     parameter = new Parametro[2];
     trans     = new Transaction[1];
 }
Beispiel #7
0
 public Msistema_evaluacion()
 {
     conn = new ConnectionOracle();
 }
Beispiel #8
0
 public Mnota()
 {
     conn = new ConnectionOracle();
 }
Beispiel #9
0
 public Masignatura()
 {
     connect   = new ConnectionOracle();
     parameter = new Parametro[2];
     trans     = new Transaction[1];
 }
Beispiel #10
0
 public Mdocente()
 {
     connect   = new ConnectionOracle();
     parameter = new Parametro[1];
     trans     = new Transaction[1];
 }
 public Cprematricula()
 {
     conn         = new ConnectionOracle();
     prematricula = new Mprematricula();
 }
Beispiel #12
0
        public Mgrupo()
        {
            conn = new ConnectionOracle();

            trans = new Transaction[1];
        }
Beispiel #13
0
 public Mcalificacion()
 {
     connect = new ConnectionOracle();
 }
Beispiel #14
0
 public Mcalendario_academico()
 {
     conn      = new ConnectionOracle();
     parameter = new Parametro[2];
     trans     = new Transaction[1];
 }
Beispiel #15
0
 public Mestudiante()
 {
     connect = new ConnectionOracle();
 }