Goals from Ryan Stevenson and John Sutton secured a first win in seven that moved the side up to 10th in the Scottish Premier League.
"We showed everything required to get us out of the position we are in," Locke, at the helm after the departure of John McGlynn, said.
"There was great endeavour, work-rate, we were first to every ball and I felt we were a bit unlucky not to score one or two more goals.
"I was absolutely delighted to get a win and I dedicate that to John McGlynn and all the supporters that came tonight."
The win came on a day of continuing financial uncertainty following the collapse of Vladimir Romanov's bank and his subsequent resignation from the board of UBIG, the club's majority shareholder.
The board earlier dismissed suggestions that Romanov had relinquished control of Hearts and then denied reports that staff had been told the club would be going into administration.
"I have heard the rumours, I just think that's a bit of scaremongering," Locke added.
"I don't know a lot about it, it's more the directors that deal with that side of things.
"I'm just here to concentrate on the football and I'm just delighted we got three points."