private void BTN_USE_SELECTED_TABLE_CLICK(object sender, EventArgs e) { LOGGER.METHOD_ENTER(); string SELECTED_TABLE = DGV_2.SelectedCells[0].Value.ToString(); DataTable TABLE = CONNECTION.GET_TABLE(SELECTED_TABLE); if (TABLE == null) { LOGGER.LOG("GET_METHOD returned nothing."); LOGGER.METHOD_EXIT_FAIL(); } DGV_3.DataSource = TABLE; LBL_TABLE.Text = string.Format("Table {0} Selected", SELECTED_TABLE); LBL_TABLE.Image = Properties.Resources.table_green; GRP_BOX_TABLE.Enabled = false; DGV_2.DataSource = null; DGV_2.Refresh(); LOGGER.METHOD_EXIT_SUCCESS(); }
private void DATABASE_CONNECTION_SWITCH(string NAME) { if (NAME == null) { LBL_DB_CONNECTION.Text = "Not connected to a DB"; LBL_DB_CONNECTION.Image = Properties.Resources.server_disconnected; GRP_BOX_DB_CONNECTION.Enabled = true; GRP_BOX_TABLE.Enabled = false; DGV_2.DataSource = null; DGV_2.Refresh(); } else { LBL_DB_CONNECTION.Text = string.Format("Connected to {0}", NAME); LBL_DB_CONNECTION.Image = Properties.Resources.server_connected; GRP_BOX_DB_CONNECTION.Enabled = false; DGV_1.DataSource = null; DGV_1.Refresh(); GRP_BOX_TABLE.Enabled = true; } }