Example #1
0
        private void btnNewContact_Click(object sender, EventArgs e)
        {
            frmAddOrEdit formAddorEdit = new frmAddOrEdit();

            formAddorEdit.ShowDialog();
            if (formAddorEdit.DialogResult == DialogResult.OK)
            {
                BindGrid();
            }
        }
Example #2
0
 private void btnEdit_Click(object sender, EventArgs e)
 {
     if (dgContacts.CurrentRow != null)
     {
         int          contactId = int.Parse(dgContacts.CurrentRow.Cells[0].Value.ToString());
         frmAddOrEdit frm       = new frmAddOrEdit();
         frm.contactId = contactId;
         if (frm.ShowDialog() == DialogResult.OK)
         {
             BindGrid();
         }
     }
 }