Esempio n. 1
0
        public List <DbTableInfo> GetTablesWithPage(string tablename, string fieldNameToSort, bool isDescending, PagerInfo info)
        {
            List <DbTableInfo> list = new List <DbTableInfo>();

            if (dbType == DatabaseType.SqlServer)
            {
                MssqlExtractor mssqlExtractor = new MssqlExtractor();
                list = mssqlExtractor.GetAllTables(tablename, fieldNameToSort, isDescending, info);
            }
            else if (dbType == DatabaseType.MySql)
            {
                MySqlExtractor mysqlExtractor = new MySqlExtractor();
                list = mysqlExtractor.GetAllTables(this.dbName, tablename, fieldNameToSort, isDescending, info);
            }
            return(list);
        }
Esempio n. 2
0
        /// <summary>
        /// 获取数据所有表信息
        /// </summary>
        /// <param name="tablelist">数据库表名称</param>
        /// <returns></returns>
        public List <DbTableInfo> GetWhereTables(string tablelist = null)
        {
            List <DbTableInfo> list = new List <DbTableInfo>();

            if (dbType == DatabaseType.SqlServer)
            {
                MssqlExtractor mssqlExtractor = new MssqlExtractor();
                list = mssqlExtractor.GetAllTables(tablelist);
            }
            else if (dbType == DatabaseType.MySql)
            {
                MySqlExtractor mssqlExtractor = new MySqlExtractor();
                list = mssqlExtractor.GetAllTables(this.dbName, tablelist);
            }
            return(list);
        }