Uriah comes to Dovid and asks why he was brought home. Dovid tells him to go hang out with his wife. Uriah refuses because all of the BN"Y are at war; why would he go home to his wife? Dovid allows Uriah to stay with him fro just this night and go to Batsheva tomorrow.
The next day Dovid decides to take another approach to the issue. He decides to try and get Uriah drunk. If Uriah is drunk maybe he won't be thinking of BN"Y and how they are at war. It doesn't work Uriah refuses again to go home and stays outside Dovid's the night with the servants.
Dovid goes to his last option and decides to send Uriah back to war with a letter written to Yoav. The letter tells Yoav to put Uriah in the front line of war so he is killed. Uriah dies and Dovid gets married to Batsheva.