Im with codatango on this one.
If that didn't work then i would explain to the guy that the dog didn't know what he was being beat for.
I would try to teach the guy a better why to work with the dog and offer to help him work with the dog.
If that didn't work then I would beat him over the head with my shotgun.
When I was done I would ask him if he figured out why I beat him over his head.
Some people shouldn't own dogs much less have kids.