Electrical problem

Dear all

My doughter has mb w204 c300 2011

Couple days first problem appear s when closing the drivers door the redio turns off and on again but yesterday she tried to turn it on but no start no egntion after taking the key out and try many times it's start but every single electricity in the car turns on and off  we tow it home but after that it's work fine as if nothing happens