dishwasher

My dishwasher stopped working one day. After several days of not working I unplugged it. A few days later I plugged it in and locked the. The thing started working again. several loads later it stopped working again. I tried the unplug and plug in again trick once more, leaving it unplugged for a couple of days. This time when I locked the door it came on then shut down again like it was not getting power. Now it does not work at all, no matter what I do. The outlet is supplying power but the washer is not powering up. None of the lights come on and no audible beep. I thought it could be the door switch but I have not Bought any parts for it yet.