Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello friends,

I have developed one accounting system. i want it to be restored to its previous state (as it was opened before shutdown) after shutdown by power failure/ abnormal shutdown.

means if i start the application after abnormal shutdown it should open as it was before shutdown. (if before shutdown i was making a bill and its halfly done then when restarted it should open the halfly done bill's form.

any suggestions/ guidance please help.


Thanks in advance.
Posted

1 solution

You are going to have to institute some sort of automatic save feature for every data entry form in your app. The best way is to start a timer when a user opens any data entry form, then whenever the timer's tick event occurs you save whatever the user has entered into an text/xml file or temp database stored on the local computer. Then every time your user saves the data they have entered, you can empty the save file. Every time some one opens up your application, you should check this file/ temp database, and if it is not empty, then open up the appropriate form and fill in the data from the temp file/database. This is definitely not a trivial thing to do, especially on any application with more than a few pages/forms. Good luck!

Hope this helps
 
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