private void btnSQLSet_Click(object sender, EventArgs e) { Connection con = new Connection(); SQLSetForm sqlSet = new SQLSetForm(con.GetConnectionStr()); sqlSet.ShowDialog(); if (con.DoConnection()) { initComboBox(); } }
private void initButtons() { btnSearch.Enabled = false; btnExecute.Enabled = false; btnSQL.Enabled = false; btnSQLSet.Text = "连接设置\r\n(未设置)"; DataGridViewCellStyle style = new DataGridViewCellStyle(); style.ForeColor = Color.Red; foreach (DataGridViewColumn col in this.dgvDJList.Columns) { col.HeaderCell.Style = style; } this.dgvDJList.EnableHeadersVisualStyles = false; SQLSetForm sqlSet = new SQLSetForm(); sqlSet.ShowDialog(); initComboBox(); }