private void tStripAdd_Click(object sender, EventArgs e) { frmContactInfo contactinfoadd = new frmContactInfo(); contactinfoadd.IsAdd = true; contactinfoadd.ShowDialog(); }
private void dgvContactInfo_DoubleClick(object sender, EventArgs e) { if (dgvContactInfo.SelectedCells.Count == 0) { MessageBox.Show("请选择要修改的数据", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } else { frmContactInfo contactinfoedit = new frmContactInfo(); contactinfoedit.IsAdd = false; contactinfoedit.ContactName = dgvContactInfo.SelectedCells[0].Value.ToString(); contactinfoedit.ShowDialog(); } }