예제 #1
0
 private void ShowEntries(string entryDate)
 {
     foreach (AgendaEntry entry in AgendaTools.FilterByDate(entryDate, agendaController.GetAgenda()))
     {
         Console.WriteLine(AgendaTools.BuildEntryShowingMessage(entry));
     }
 }
예제 #2
0
 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");
 }
예제 #3
0
        public void ExecuteTask(string entryText)
        {
            ArrayList entriesToShow = FilterByText(entryText, agendaController.GetAgenda());

            foreach (AgendaEntry entry in entriesToShow)
            {
                Console.WriteLine(AgendaTools.BuildEntryShowingMessage(entry));
            }
        }
예제 #4
0
 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");
     }
 }