A former Hanover businessman was sentenced to up to five years in state prison as part of a plea deal on drug and receiving stolen property charges on Wednesday.

Presiding Common Pleas Judge Craig T. Trebilcock ordered David Lynn Wagner, 49, to report to prison on June 6 to begin his 2 1/2- to 5-year sentence.

The prison time will run concurrent with five years probation, and Wagner was also ordered to pay court costs.

As part of the agreement, Wagner pleaded guilty to 10 counts of possession with intent to deliver and no contest to 16 counts of receiving stolen property. Ten charges of possession with intent to deliver and a weapons charge were dropped, according to court records.

As part of the plea agreement, Wagner will not contest the forfeiture of some items seized from his former business when police raided it and arrested him in October 2012.

Raid: Police said they seized more than 250 items — everything from pot to power tools, from thousands of pills to auto parts — when they raided Dad's Auto Detail and Bargain Outlet, 28 Baltimore St., on Oct. 24.

Wagner owned the business, also known as Dad's E-Bay and Auto Detail, at the time and also lived there, he said during his hearing on Wednesday. Wagner described the business as a pawn shop.

An undercover officer bought prescription pills — oxycodone, morphine and Percocet — from Wagner at the business four times in three weeks, authorities said at the time of the raid.

Wagner admitted in court to selling the officer the pills and marijuana.

He also said he accepted a power tool he knew was stolen in exchange for drugs on one occasion. Wagner admitted he told the officer what brands of drills he prefers to acquire.

Stockpile: Wagner said he turned to selling pills he "stockpiled" because he needed extra money. He said he got the pills through a prescription, the result of numerous back surgeries, and by trading for them.

Trebilcock advised him to turn his life around when he's released from prison or face more jail time.

"You're facing decades in prison if you even jaywalk," the judge warned.

— Reach Greg Gross at ggross@yorkdispatch.com.