six year old Male Yorkie

I need desperately need some help to solve my Yorkie's peeing and pooping problem. Cody is 6 six years old and has always been very stubborn about where he wants to go to the washroom. He can be outside in the backyard with his sister who is a ten year old black Lab and come in the house and pee. I have tried crating him while at work but he would go outside and pee and then pee again when he came back in. This has gone on since we first got him. Three months ago I decided to try do pants as he is destroying the house. This has solved the house destroying ;problem but now he cocks his leg right in front of us. It is like we have given him permission becaue of the pants to pee at will. Any suggestions of what to do would be greatly appreciated as we are at our wits end.