The thermocouple is REQUIRED. Its function is to keep the gas valve open when there is a flame present. If the flame is not there when it should be the thermocouple cools and allows the gas valve to close.
It is NOT involved when operating on electric. However, the thermostat IS. It sounds like, from your description, a wire had come off the thermostat. That WOULD prevent both gas or electric from working.
Chuck - Sparta, TN
2012 Jay Flight 22FB, 2 x Honda EU2000i
2013 GMC Yukon XL Denali AWD
EDUCATION is what you get when you read the fine print.....
EXPERIENCE is what you get when you don't.