/// <summary> /// Removes the task from the selected list. This method is invoked by the RemoveCommand. /// </summary> public void RemoveTask() { TaskViewModel selectedTaskVM = SelectedTasks.FirstOrDefault(t => t.IsSelected == true); UnassignedTasks.Add(selectedTaskVM); SelectedTasks.Remove(selectedTaskVM); }
private void FetchUnassignedTasks() { List <DailyTask> taskModels = db.DailyTasks .Where(p => p.UserId == User.Id) .Where(p => p.Completed == 0) .Where(p => p.Date == null) .ToList <DailyTask>(); UnassignedTasks.Clear(); foreach (var m in taskModels) { UnassignedTasks.Add(m); } }