Exemplo n.º 1
0
        /// <summary>
        /// 获取服务器列表
        /// </summary>
        private void showDbSelect()
        {
            DatabaseSelect dbSelect = new DatabaseSelect();

            if (dbSelect.ShowDialog() == DialogResult.OK)
            {
                DialogResult dia = DialogResult.No;

                switch (DatabaseSelect.DatabaseType)
                {
                case Dos.ORM.DatabaseType.SqlServer:
                    DbSelect.DBSqlServer dbsqlserver = new Hxj.Tools.EntityDesign.DbSelect.DBSqlServer();
                    dia = dbsqlserver.ShowDialog();
                    break;

                case Dos.ORM.DatabaseType.MsAccess:
                    DbSelect.DBMsAccess dbMsAccess = new Hxj.Tools.EntityDesign.DbSelect.DBMsAccess();
                    dia = dbMsAccess.ShowDialog();
                    break;

                case Dos.ORM.DatabaseType.Oracle:
                    DbSelect.DBOracle dbOracle = new Hxj.Tools.EntityDesign.DbSelect.DBOracle();
                    dia = dbOracle.ShowDialog();
                    break;

                case Dos.ORM.DatabaseType.Sqlite3:
                    DbSelect.DbSqlite dbSqlite = new Hxj.Tools.EntityDesign.DbSelect.DbSqlite();
                    dia = dbSqlite.ShowDialog();
                    break;

                case Dos.ORM.DatabaseType.MySql:
                    DbSelect.DBMySql dbMySql = new Hxj.Tools.EntityDesign.DbSelect.DBMySql();
                    dia = dbMySql.ShowDialog();
                    break;

                default:
                    break;
                }

                if (dia == DialogResult.OK)
                {
                    refreshConnectionList();
                }
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 获取服务器列表
        /// </summary>
        private void showDbSelect()
        {
            DatabaseSelect dbSelect = new DatabaseSelect();

            if (dbSelect.ShowDialog() == DialogResult.OK)
            {
                DialogResult dia = DialogResult.No;

                switch (DatabaseSelect.DatabaseType)
                {
                    case Dos.ORM.DatabaseType.SqlServer:
                        DbSelect.DBSqlServer dbsqlserver = new Hxj.Tools.EntityDesign.DbSelect.DBSqlServer();
                        dia = dbsqlserver.ShowDialog();
                        break;
                    case Dos.ORM.DatabaseType.MsAccess:
                        DbSelect.DBMsAccess dbMsAccess = new Hxj.Tools.EntityDesign.DbSelect.DBMsAccess();
                        dia = dbMsAccess.ShowDialog();
                        break;
                    case Dos.ORM.DatabaseType.Oracle:
                        DbSelect.DBOracle dbOracle = new Hxj.Tools.EntityDesign.DbSelect.DBOracle();
                        dia = dbOracle.ShowDialog();
                        break;
                    case Dos.ORM.DatabaseType.Sqlite3:
                        DbSelect.DbSqlite dbSqlite = new Hxj.Tools.EntityDesign.DbSelect.DbSqlite();
                        dia = dbSqlite.ShowDialog();
                        break;
                    case Dos.ORM.DatabaseType.MySql:
                        DbSelect.DBMySql dbMySql = new Hxj.Tools.EntityDesign.DbSelect.DBMySql();
                        dia = dbMySql.ShowDialog();
                        break;
                    default:
                        break;
                }

                if (dia == DialogResult.OK)
                {
                    refreshConnectionList();
                }
            }
        }