Exemple #1
0
 public OccuranceType FindOccuranceType()
 {
     if (DateTime.Today.Equals(FirstReminderDate))
     {
         _occurance = OccuranceType.BEFORE_MONTH;
     }
     else if (DateTime.Today.Equals(SecondReminderDate))
     {
         _occurance = OccuranceType.BEFORE_WEEK;
     }
     else if (DateTime.Today.Equals(ThirdReminderDate))
     {
         _occurance = OccuranceType.LAST_DAY;
     }
     return(_occurance);
 }
        public string GetEmailSubject(Reminder reminder)
        {
            OccuranceType occurance = reminder.FindOccuranceType();

            if (occurance == OccuranceType.BEFORE_MONTH)
            {
                return(" in a month");
            }
            else if (occurance == OccuranceType.BEFORE_WEEK)
            {
                return(" in a week");
            }
            else if (occurance == OccuranceType.LAST_DAY)
            {
                return("today");
            }
            else
            {
                return(string.Empty);
            }
        }
        private string GetFormattedOccuranceType(Reminder reminder)
        {
            OccuranceType occurance = reminder.FindOccuranceType();

            if (occurance == OccuranceType.BEFORE_MONTH)
            {
                return(" will get");
            }
            else if (occurance == OccuranceType.BEFORE_WEEK)
            {
                return(" will get");
            }
            else if (occurance == OccuranceType.LAST_DAY)
            {
                return("has");
            }
            else
            {
                return(string.Empty);
            }
        }
Exemple #4
0
 public Reminder()
 {
     _occurance = OccuranceType.NA;
 }