Do not feed or water on demand. Have set times feed wait 15/20 take the dog out. Don't LET the dog out. Walk it patiently and give it a chance to go. If it's a puppy (I assume it is) you need to feed it 2 times per day. Always take it out first thing in the morning for a good walk, take out after each feeding. Really it should be taken out about every 2 hours. Like babies they go frequently. Eventually it will become accustom to going outside and won't want to go inside. Remember as a puppy you'll need to take it out often!
Take the dog outside every hour and make sure it pees. If it ever does the restroom inside the house put his nose to the pee or poop without touching his nose just so he can get the scent and realize that it's wrong to do that inside.
Take it out often do not watch him , then wate till he sits by the door or barks , then let it inside if it pees or poops inside u put it outside even if it was just out ther. Wate for 20 min then let it indoors. If u do take ur dog outside and watch it go then give it a treat :) hope this helped:D
I give my dog a biscuit every time she goes potty outside so she knows she'll be rewarded when she's good but if she rolls around in the dirt or grass, I spank her twice. Same with if she goes potty inside the house. Now she puts her paw at the sliding glass door to move the curtain to let me know she needs to go outside.