There are 2 problems with the Device App in this walkthrough: the missing sync code (as mentioned by NewKiwi and allatthenook), and the missing code to allow bidirectional syncing (without this code the customer insert performed on the device will never be synced to the remote db).
Solution to Problem 1: My C# code for the Sync menu click event looks like this:-
// create SyncAgent with the Web Ref providing the Service proxy...
NorthwindSyncAgent sa = new NorthwindSyncAgent(new NorthwindWebRef.NorthwindSyncService());
// ...then do the sync
sa.Synchronize();
// Reload the DataSet/Datagrid from the local database
this.customersTableAdapter.Fill(this.northwindDataSet.Customers);
[
you will need to change the class names I've used to match those used in the walkthrough/your app]
Solution to Problem 2: Replace the existing OnInitialized function in your Sync Agent class with:
private void OnInitialized()
{
// enable bidirectional sync on Customers
// (Possible values are: DownloadOnly (default), Bidrectional, UploadOnly and Snapshot)
this.Customers.SyncDirection =
Microsoft.Synchronization.Data.SyncDirection.Bidirectional;
}
[the sync agent is defined (in the device app) in Northwind.Client.Designer.cs in my solution]