Exemple #1
0
        private void Add_Click(object sender, EventArgs e)
        {
            AddOrEdit frm = new AddOrEdit();

            frm.ShowDialog();
            if (frm.DialogResult == DialogResult.OK)
            {
                DataBind();
            }
        }
Exemple #2
0
 private void Edit_Click(object sender, EventArgs e)
 {
     if (dgView.CurrentRow != null)
     {
         int       contactID = Convert.ToInt32(dgView.CurrentRow.Cells[0].Value);
         AddOrEdit frm       = new AddOrEdit();
         frm.contactID = contactID;
         if (frm.ShowDialog() == DialogResult.OK)
         {
             DataBind();
         }
     }
 }