예제 #1
0
        private void btnAddNewCustomer_Click(object sender, EventArgs e)
        {
            frmAddOrEditCustomer frmAddOrEditCustomer = new frmAddOrEditCustomer();

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