private void ShowEntries(string entryDate) { foreach (AgendaEntry entry in AgendaTools.FilterByDate(entryDate, agendaController.GetAgenda())) { Console.WriteLine(AgendaTools.BuildEntryShowingMessage(entry)); } }
public void AddEntry(string entryText, string entryDate = "", string entryTime = "") { entryDate = AgendaTools.GetDateIfNecessary(entryDate); userAgenda.Add(entryID, new AgendaEntry(entryText, entryDate, entryTime, entryID)); entryID++; Console.WriteLine("Texto ingresado correctamente"); }
public void ExecuteTask(string entryText) { ArrayList entriesToShow = FilterByText(entryText, agendaController.GetAgenda()); foreach (AgendaEntry entry in entriesToShow) { Console.WriteLine(AgendaTools.BuildEntryShowingMessage(entry)); } }
public void ExecuteTask(string showDate) { showDate = AgendaTools.GetDateIfNecessary(showDate); if (Validators.IsValidDate(showDate.Trim())) { ShowEntries(showDate); } else { Console.WriteLine("Formato Erroneo, por favor intente de nuevo"); } }