How to fix my windows 8 restart issue?

I have lenovo all in one c540. This started back in June. Since then its been to the service dept twice and still comes back with same problem (the only thing i can visual see that they replaced was the power input where i plug in the power cord because i figured that they thought it was a shortage like i had thought.

issue: while i'm doing just anything the computer restarts. Sometimes it'll do it every five or ten mintues sometimes 3 or more hours go by. A couple times it'll restart and these green lines will pop on the screen. And on the first time getting it back i've tried updating to windows 8.1 but that has effect because it still has the same issue.

i alone have tried the following

- i've even tried to completely restet the computer, i waited 5 hours for this process. And when it loads to the login screen it does it just cuts off and restarts

- have even tried loading without the drivers to see but it still does it

- i have also tried unchecking the "fast reboot" in power options but to no avail.

-ive booted in safe mode this morning and it gave me a blue screen and listed the following:

c:\windows\minidump\080614-17765-01.dmp

c:\users\desmond\appdata\local\temp\wer-58968-0.sysdata.xml

c:\windows\memory.dmp

please help! If i fear that if i have the service dept "Try to fix it again" its not gong to work ill just be wasting time and money. I'm pretty sure this is a hardware issue not a software issue.

You may not need to waste money on sending it for service. But you should ask someone or your friends who are experienced in computers about the problem.

Try to install windows 7
if you got same problem
maybe its ram problem otherwise it's a motherboard problemm