public bool AddTask(string title, string body, DateTime dueDate) { if (kanban.AddTask(title, body, dueDate)) { return(true); } return(false); }
public static void AddTask(string title, string body, DateTime dueDate) { if (!kanban.AddTask(title, body, dueDate)) // At least one of the inputs is incorrect { Console.ForegroundColor = ConsoleColor.Red; Log.Warn("Task adding has failed, one of the task's inputs was invalid"); Console.WriteLine("please make sure you are following the instruction carefully."); UserOption(); } else { Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("Task has been added."); Log.Info("The user added a task"); PrintBoard(); UserOption(); } }