Skip to content

Instantly share code, notes, and snippets.

@BrianJVarley
Last active August 29, 2015 14:15
Show Gist options
  • Save BrianJVarley/bbe44513ad7fa572cf60 to your computer and use it in GitHub Desktop.
Save BrianJVarley/bbe44513ad7fa572cf60 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
{
//custom events
public event Action<string> CommitUpdated;
//constants
const String ExerciseValue = "Adduction Flexion";
const String RepititionsValue = "21";
const String GenderValue = "Male";
const String UserValue = "Brian J";
//method to push progress data to database
public Task SubmitChanges(String StartDegreeStatus, String EndDegreeStatus)
{
var table = App.MobileService.GetTable<Item>();
Item item = new Item { Repititions = RepititionsValue, Date = " " + DateTime.Now.ToString(@"MM\/dd\/yyyy h\:mm tt"), User = UserValue, Exercise = ExerciseValue, Gender = GenderValue, Painful_Arc_Start = StartDegreeStatus, Painful_Arc_End = EndDegreeStatus };
return table.InsertAsync(item);
}
//method to poll progress data from database
public async void PullChanges()
{
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment