Skip to content

Instantly share code, notes, and snippets.

@BrianJVarley
Created February 11, 2015 21:30
Show Gist options
  • Save BrianJVarley/419df6d19925774983b5 to your computer and use it in GitHub Desktop.
Save BrianJVarley/419df6d19925774983b5 to your computer and use it in GitHub Desktop.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media;
using Mantin.Controls.Wpf;
using Mantin.Controls.Wpf.Notification;
namespace MyoTestv4.AdductionAbductionFlexion
{
public class DatabaseModel
{
public event Action<string> CommitUpdated;
//method to push progress data to database
public async void pushData()
{
var table = App.MobileService.GetTable<Item>();
Item item = new Item { Repititions = "22", Date = " " + DateTime.Now.ToString(@"MM\/dd\/yyyy h\:mm tt"), User = HomeView.Name, Exercise = "Abduction flexion", Gender = HomeView.Gender, Painful_Arc_Start = "5", Painful_Arc_End = "76"};
await App.MobileService.GetTable<Item>().InsertAsync(item);
var handler = CommitUpdated;
if (handler != null)
handler("Data committed successfully!");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment