예제 #1
0
        public bool UpdateTask(int taskId, string title, string body, DateTime dueDate, bool toMove)
        {
            bool edited = kanban.EditTask(taskId, title, body, dueDate);
            bool moved  = true;

            if (toMove)
            {
                moved = kanban.MoveTask(taskId);
            }
            return(edited & moved);
        }
예제 #2
0
 public static void MoveTask(int taskId)
 {
     if (kanban.MoveTask(taskId))
     {
         Console.ForegroundColor = ConsoleColor.Green;
         Console.WriteLine("Task has been moved.");
         Console.ResetColor();
         PrintBoard();
         UserOption();
     }
     else
     {
         Console.ForegroundColor = ConsoleColor.Red;
         Log.Warn("Task moving failed. The column was full or the taskId doesn't exist or the user tried to move a task from the 'done column'");
         Console.WriteLine("Please check if your columns are full, the task Id exists \nand you are not trying to move task from 'done' column.");
         Console.ResetColor();
         UserOption();
     }
 }