When whines, ignore him. Seriously. That's the only way.
For housebreaking, I'd recommend you Google many of the excellent articles on that subject.
Dogs will generally eliminate on an absorbent surface, so if you have carpet in your living room, try to keep him out of it. You should...