maytag 300 not problem with dish washer

I own a Maytag quiet series 300 and no lights are coming on and none of the buttons are working most of the time. It does work every now and then randomly. I just replaced another dishwasher for the same problem, so I know it is not the dishwasher. I am getting 115 Volts to the dishwasher. What else could cause this problem. I do know how to work on electrical equipment.