Beispiel #1
0
        public void MoveToTask(TaskDeleted deleted)
        {
            Task task = new Task
            {
                Content      = deleted.Content,
                Finished     = deleted.Finished,
                Priority     = deleted.Priority,
                Difficulty   = deleted.Difficulty,
                DateCreated  = deleted.DateCreated,
                DateToFinish = deleted.DateToFinish,
                TaskList     = deleted.TaskList,
            };

            context.TaskDeleted.Remove(deleted);
            context.Tasks.Add(task);
            context.SaveChanges();
        }
Beispiel #2
0
        public void MoveToDelted(Task task)
        {
            TaskDeleted deleted = new TaskDeleted
            {
                Content      = task.Content,
                Finished     = task.Finished,
                Priority     = task.Priority,
                Difficulty   = task.Difficulty,
                DateCreated  = task.DateCreated,
                DateToFinish = DateTime.Now,
                TaskList     = task.TaskList,
            };

            context.TaskDeleted.Add(deleted);
            context.Tasks.Remove(task);
            context.SaveChanges();
        }
Beispiel #3
0
 public void DeletePermanently(TaskDeleted deleted)
 {
     context.TaskDeleted.Remove(deleted);
     context.SaveChanges();
 }
Beispiel #4
0
 public void DeleteTask(TaskDeleted deleted)
 {
     context.TaskDeleted.Remove(deleted);
     context.SaveChanges();
 }