public static void AddTask(string title, string body, DateTime dueDate) { if (!kanban.AddTask(title, body, dueDate)) // At list one of the inputs is incorrect { Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("task adding has failed please make sure you are following the instruction carefully"); UserOption(); //ERROR "Please make sure ... title, due date, num of tasks" } else { Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("task has been added!"); PrintBoard(); UserOption(); } }
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(); } }