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); }
public static void EditTask(int taskId, string title, string body, DateTime dueDate) { if (kanban.EditTask(taskId, title, body, dueDate)) { Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("task was Successfully updated"); Console.ResetColor(); PrintBoard(); UserOption(); } else { Console.ForegroundColor = ConsoleColor.Red; Log.Warn("Task updating has failed, one of the task's inputs was invalid."); Console.WriteLine("please make sure you are following the instruction carefully."); Console.ResetColor(); UserOption(); } }