Esempio n. 1
0
        private void tStripAdd_Click(object sender, EventArgs e)
        {
            frmContactInfo contactinfoadd = new frmContactInfo();

            contactinfoadd.IsAdd = true;
            contactinfoadd.ShowDialog();
        }
Esempio n. 2
0
 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();
     }
 }