Esempio n. 1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            FrmAddOrEdit frmAddOrEdit = new FrmAddOrEdit();

            if (frmAddOrEdit.ShowDialog() == DialogResult.OK)
            {
                BindGrid();
            }
        }
Esempio n. 2
0
 private void btnEdit_Click(object sender, EventArgs e)
 {
     if (dgCustomers.CurrentRow != null)
     {
         int          customerId   = int.Parse(dgCustomers.CurrentRow.Cells[0].Value.ToString());
         FrmAddOrEdit frmAddOrEdit = new FrmAddOrEdit();
         frmAddOrEdit.customerId = customerId;
         if (frmAddOrEdit.ShowDialog() == DialogResult.OK)
         {
             BindGrid();
         }
     }
 }