Exemplo n.º 1
0
        public static IGetSchema GetSchemaDAO(MDataBaseType dbType, MDBAccessType accessType)
        {
            switch (dbType)
            {
                case MDataBaseType.DB2:
                    return new DGetSchema();
            }

            throw new Exception(string.Format("未实现的IGetSchema接口:数据库类型:{0},数据库访问类型:{1}", dbType.ToString(), accessType.ToString()));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Gets the pager query DAO.
        /// </summary>
        /// <param name="dbtype">The dbtype.</param>
        /// <returns></returns>
        /// <exception cref="System.Exception"></exception>
        public static IPagerQuery GetPagerQueryDAO(MDataBaseType dbtype)
        {
            switch (dbtype)
            {
                case MDataBaseType.MYSQL:
                    return new DPagerQuery();
            }

            throw new Exception(string.Format("未实现的IPagerQuery接口:数据库类型:{0}", dbtype.ToString()));
        }
Exemplo n.º 3
0
        /// <summary>
        /// Gets the pager query DAO.
        /// </summary>
        /// <param name="dbtype">The dbtype.</param>
        /// <returns></returns>
        /// <exception cref="System.Exception"></exception>
        public static IPagerQuery GetPagerQueryDAO(MDataBaseType dbtype)
        {
            switch (dbtype)
            {
            case MDataBaseType.MYSQL:
                return(new DPagerQuery());
            }

            throw new Exception(string.Format("未实现的IPagerQuery接口:数据库类型:{0}", dbtype.ToString()));
        }
Exemplo n.º 4
0
        public static IGenerator GetGeneratorSQLDAL(MDataBaseType type)
        {
            switch (type)
            {
                case MDataBaseType.MySQL:
                    return new MySQLGeneratoDAO();

                default:
                    throw new Exception(string.Format("数据库类型:{0},并没有实现", type.ToString()));
            }
        }
Exemplo n.º 5
0
        public static IGenerator GetGeneratorSQLDAL(MDataBaseType type)
        {
            switch (type)
            {
            case MDataBaseType.MYSQL:
                return(new DGeneratoDAO());

            case MDataBaseType.SQLSERVER:
                return(new SQLServer.DGenerator());

            default:
                throw new Exception(string.Format("数据库类型:{0},并没有实现", type.ToString()));
            }
        }
Exemplo n.º 6
0
        public static IGetSchema GetSchemaDAO(MDataBaseType dbType, MDBAccessType accessType)
        {
            switch (dbType)
            {
            case MDataBaseType.DB2:
                return(new DGetSchema());

            case MDataBaseType.SQLSERVER:
                return(new Help.DBAccessLayer.SQLServer.DGetSchema());
            }

            throw new Exception(string.Format("未实现的IGetSchema接口:数据库类型:{0},数据库访问类型:{1}", dbType.ToString(), accessType.ToString()));
        }