private void tbtNew_Click(object sender, EventArgs e) { DataServerInfoForm frm = new DataServerInfoForm(); frm.m_DataServerMgr = m_Table.DataServerMgr; if (frm.ShowDialog() != DialogResult.OK) { m_Table.DataServerMgr.Cancel(); return; } LoadData(); }
private void tbtEdit_Click(object sender, EventArgs e) { if (dataGridView.CurrentRow == null) { MessageBox.Show("请选择一项!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } CDataServer DataServer = (CDataServer)dataGridView.CurrentRow.Tag; DataServerInfoForm frm = new DataServerInfoForm(); frm.m_DataServer = DataServer; frm.m_DataServerMgr = m_Table.DataServerMgr; if (frm.ShowDialog() != DialogResult.OK) { m_Table.DataServerMgr.Cancel(); return; } LoadData(); }