I have found articles like this one helpful
http://www.mysmartpuppy.com/articles/YoureGrounded.htmShe also describes tethering. Dog on a mat (not required, but makes it easier to train a "go to mat" command, or whatever you wish to call it). Put the dog on a leash and attach to a sturdy object or doorway (helpful to open a door, loop the leash handle on the opposite side door handle, then close the door). It is a helpful way to keep the dog out of your hair but in the same room. You can treat (click and treat, praise, whatever you are using) whenever he settles down on the mat.
You should never leave him tethered unattended. It is better to train the dog to go to a mat without a tether (click/treat whenever he goes onto the mat, starting in small steps, such as looking at the mat, going near the mat, standing on the mat, laying on the mat), but the tether works in situations when you can't have your full attention on him (such as when guests are over and trying to eat). If you give him a stuffed kong on the mat, it could help as well to create a positive association.
I stopped my dogs from mooching by never giving in and never giving them any attention (including telling them to go away, pushing them off of me, etc.). I would stand up and move away with my food whenever they'd beg. If they were being particularly pushy, I proceeded as above.
I'm not perfect with it. I haven't trained them to go to the mat when we aren't at home yet.
PLEASE NOTE: I am NOT an expert on these things. Just sharing what has worked with me.