private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) { if (tabControl1.SelectedIndex == 0) { _DBSelected = Apq.Data.Common.DBProduct.MySql; } if (tabControl1.SelectedIndex == 1) { _DBSelected = Apq.Data.Common.DBProduct.MsSql; } }
private void tsbConnectDB_ButtonClick(object sender, EventArgs e) { // 连接到数据库并执行刷新动作 Apq.Windows.Forms.DBConnector DBConnector = new Apq.Windows.Forms.DBConnector(); if (DBConnector.ShowDialog(GlobalObject.MainForm) == System.Windows.Forms.DialogResult.OK) { _DBConnectionType = DBConnector.DBSelected; _DBConnection = DBConnector.DBConnection; tsbRefresh_Click(sender, e); this.Show(); } }