private void btnnewCustomer_Click(object sender, EventArgs e)
        {
            AECustomerfrm ae = new AECustomerfrm();

            ae.ShowDialog();
            BindGrid();
        }
 private void btnEditCustomer_Click(object sender, EventArgs e)
 {
     if (dgvmain.CurrentRow != null)
     {
         int           id  = int.Parse(dgvmain.CurrentRow.Cells["CustomerID"].Value.ToString());
         AECustomerfrm frm = new AECustomerfrm();
         frm.customerID = int.Parse(dgvmain.CurrentRow.Cells[0].Value.ToString());
         frm.ShowDialog();
     }
     else
     {
         MessageBox.Show("Please Select a Customer", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }