Hello, I have a problem I need to create a desktop WPF application in .NET. The application receives and sends data from Web- server, and the application can work in offline mode when the Web server isn't available. For example the application need to calculate how much time the user work on a project, the application connect to the server and get list of projects, user select one project, and press button to start timer and user can stop timer,the data project start and stop time need to be send on the server. How to implement this task when the application works in offline mode. Help me please, may be there are some existing solution or some libraries to simplify this task. Thanks in advance.
You'll need to do a couple of things differently in order to work offline.
First, you'll need to cache a list of projects. This way, the user doesn't have to go online to get the project list - you can pull it from your local cache when the user is offline.
Secondly, you'll need to save your timing results locally. Once you go online again, you can update the server will all of the historic timing data.
This just requires saving the information locally. You can choose to save it anywhere you wish, and even a simple XML file would suffice for the information you're saving, since it's simple - just a project + a timespan.
It sounds like this is a timing application for business tracking purposes, in which case you'll want to prevent the user from easily changing the data. Personally, I would probably save this in Isolated Storage, and potentially encrypt it.
You can use Sql Server Compact for you local storage and then you microsoft sync framework to sync your local database to the server database. I recommend doing some research on the Microsoft Sync Framework.