我们可以在系统关机时间后重新查看系统时间 [英] can we retrive system time when the system shutdown time

查看:64
本文介绍了我们可以在系统关机时间后重新查看系统时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用c#windows窗体中的员工考勤系统,但是在我的脑海中有一个问题,如果系统自动关机,那么在sql数据库注销时间会自动更新系统时间。如果有可能那么请告诉我,我们可以恢复我的系统自动关闭时的系统时间

解决方案

请参阅: https://msdn.microsoft.com/en-us/library/microsoft.win32.systemevents%28v=vs.110%29.aspx [ ^ ]。



-SA


不确定我是否理解你的问题正确,但Form类具有 FormClosing 事件,并且事件参数 CloseReason [ ^ ]属性。如果Windows正在关闭,原因是 CloseReason .WindowsShutDown [ ^ ]


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

解决方案

Please see: https://msdn.microsoft.com/en-us/library/microsoft.win32.systemevents%28v=vs.110%29.aspx[^].

—SA


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[^]


这篇关于我们可以在系统关机时间后重新查看系统时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆