Esempio n. 1
0
 void InitialConnection(DbConnection dbConnection)
 {
     cmbDbType.SelectedIndex = (int)dbConnection.DbType;
     tbServerAddress.Text = dbConnection.ServerAddress;
     tbDbName.Text = dbConnection.DbName;
     tbPort.Text = dbConnection.Port;
     tbUserName.Text = dbConnection.UserName;
     tbPassword.Text = dbConnection.Password;
 }
Esempio n. 2
0
        void LoadConnectionInfo()
        {
            MySqlConnection = new DbConnection
            {
                DbType=EDbType.MySql,
                ServerAddress = Common.GetAppConfig("MySqlServerAddress"),
                DbName = Common.GetAppConfig("MySqlDbName"),
                Port=Common.GetAppConfig("MySqlPort"),
                UserName = Common.GetAppConfig("MySqlUserName"),
                Password = Common.GetAppConfig("MySqlPassword")
            };

            OracleConnection = new DbConnection
            {
                DbType = EDbType.Oracle,
                ServerAddress = Common.GetAppConfig("OracleServerAddress"),
                DbName = Common.GetAppConfig("OracleDbName"),
                Port = Common.GetAppConfig("OraclePort"),
                UserName = Common.GetAppConfig("OracleUserName"),
                Password = Common.GetAppConfig("OraclePassword")
            };
        }