Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i m working with employee attendance system in c# windows form but there is a question in my mind that if the system shutdown automatically then in sql database logout time automatically updated with system time.if it is possible then tel me hw we can restore system time when my system shutdown automatically
Posted

Not sure if I understand your question correctly, but the Form class has FormClosing event and with the event arguments CloseReason[^] property is provided. If the Windows is shutting down, the reason is CloseReason.WindowsShutDown[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900