private void btnAdd_Click(object sender, EventArgs e) { customer = null; CustomerDetailForm detailForm = new CustomerDetailForm(customer); detailForm.FormClosed += new FormClosedEventHandler(DetailForm_Closed); detailForm.ShowDialog(); }
private void btnViewDetail_Click(object sender, EventArgs e) { if (customer != null) { CustomerDetailForm detailForm = new CustomerDetailForm(customer); detailForm.FormClosed += new FormClosedEventHandler(DetailForm_Closed); detailForm.ShowDialog(); } }