/// <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);
        }
Ejemplo n.º 2
0
        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);
            }
        }