protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     _shoppingItem = (ShoppingItem) e.Parameter;
     if (_shoppingItem != null)
     {
         ItemName.Text = _shoppingItem.Name;
     }
 }
        private void SaveButton_OnClick(object sender, RoutedEventArgs e)
        {
            var client = FHSyncClient.GetInstance();
            if (_shoppingItem == null)
            {
                _shoppingItem = client.Create(MainPage.DatasetId, new ShoppingItem(ItemName.Text));
            }
            else if (!string.IsNullOrEmpty(ItemName.Text))
            {
                _shoppingItem.Name = ItemName.Text;
                client.Update(MainPage.DatasetId, _shoppingItem);
            }

            Frame.Navigate(typeof (MainPage), _shoppingItem);
        }