private void btn_addTable_Click(object sender, EventArgs e) { using (TableED tableED = new TableED()) { if (tableED.ShowDialog() != DialogResult.Cancel) { btnt_clear.Hide(); txtt_search.Clear(); txtt_search.Focus(); refreshTable(tables.getTables()); } } }
private void dgvt_table_CellClick(object sender, DataGridViewCellEventArgs e) { int index = e.RowIndex; if (index != -1) { DataGridViewRow selectedRow = dgvt_table.Rows[index]; string table_id = selectedRow.Cells["table_id"].Value.ToString(); using (TableED tableED = new TableED(table_id)) { if (tableED.ShowDialog() != DialogResult.Cancel) { btnt_clear.Hide(); txtt_search.Clear(); txtt_search.Focus(); refreshTable(tables.getTables()); } } } }