I was working at a bank a s my task was to develop one Windows based application using C#. The app had to do dealing of social aid from government for the poor one.
As it had to do with financial transactions I have developed the database in such way that every time the bank employee would check for the amount of the person that has to benefit that amount the data are saved in one table transactions and then in the budget table. Then while testing it accidentally instead of deleting the local database I deleted the server while the app was being tested. And then based the data on the table transactions I have recreated the data one the budget.
Next thing I have done while testing it I have changed the way how the app worked so less activity with the database were done. I did it in that way while the employee started the day it had blank table with no transactions carried on on that day. Then when an transaction occurred I just added the item to the List items list and then populated the ItemList with new ListViewItem in case the data were stored successfully. In case of power or internet failure as soon the problem was resolved all previous transactions carried on on that day were loaded back the App