public void printCustomerDetails(Customer customer) { UserProfileForm userForm = new UserProfileForm(customer); userForm.ShowDialog(); userForm.Dispose(); }
private void btnUserProfile_Click(object sender, EventArgs e) { UserProfileForm userProfile = new UserProfileForm(user); user.printCustomerDetails(user); }