/// <summary> /// Refresh Table List /// </summary> void refreshTableList () { if (null != currentConnection) { // Prepare Database currentDB = new Database (currentConnection, initialCatalog); currentDB.loadTables (); // Show in grid if (tablesGrid.DataSource is DataTable) ((DataTable)tablesGrid.DataSource).Dispose (); tablesGrid.DataSource = tablesToDatatable (currentDB.getTables ()); } else MessageBox.Show (this, "Connect to database", "", MessageBoxButtons.OK, MessageBoxIcon.Warning); }