Ejemplo n.º 1
0
        // RETRIEVE USER TASKS
        public async Task GetUserTasks() {
            // Get current user's tasks
            ParseQuery<ParseObject> userTaskQuery = new ParseQuery<ParseObject>("UserTask").WhereEqualTo("owner", ParseUser.CurrentUser);
            IEnumerable<ParseObject> poUserTasks = await userTaskQuery.FindAsync();

            // Add each task to UserTasks collection (which will be viewed in WebView)
            foreach (var poUserTask in poUserTasks) {
                UserTask toAdd = new UserTask() {
                    Title = poUserTask.Get<string>("title"),
                    Description = poUserTask.Get<string>("description"),
                    DueDate = poUserTask.Get<DateTime>("dueDate")
                };
                UserTasks.Add(toAdd);
                UserTasks.OrderBy(x => x.DueDate);
            }
        }
Ejemplo n.º 2
0
 public TaskViewModel() {
     LoginOrCreateAccount();
     CurrentTask = new UserTask();
     UserTasks = new ObservableCollection<UserTask>();
 }