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

            if (frm.ShowDialog() == DialogResult.OK)
            {
                BindGrid();
            }
        }
Exemple #2
0
 private void btnEditCustomer_Click(object sender, EventArgs e)
 {
     if (dgCustomers.CurrentRow != null)
     {
         int          customerId = int.Parse(dgCustomers.CurrentRow.Cells[0].Value.ToString());
         frmAddOrEdit frmEdit    = new frmAddOrEdit();
         frmEdit.customerId = customerId;
         if (frmEdit.ShowDialog() == DialogResult.OK)
         {
             BindGrid();
         }
     }
 }