public int Compare(object x, object y)
        {
            AgendaEntry dateToCompare1 = (AgendaEntry)x;
            AgendaEntry dateToCompare2 = (AgendaEntry)y;

            return(DateTime.Compare(Validators.GetDateTime(dateToCompare1.date), Validators.GetDateTime(dateToCompare2.date)));
        }
Beispiel #2
0
        public static string BuildEntryShowingMessage(AgendaEntry agendaEntry)
        {
            string showingText = " Texto: " + agendaEntry.text + " ";
            string showingTime = string.Empty;

            if (!agendaEntry.time.Equals(string.Empty))
            {
                showingTime = "Hora: " + agendaEntry.time + " ";
            }
            return("Fecha: " + agendaEntry.date + showingText + showingTime + "ID: " + (agendaEntry.ID));
        }