コード例 #1
0
ファイル: Reminder.cs プロジェクト: kannans89/whiplash
 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);
 }
コード例 #2
0
        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);
            }
        }
コード例 #3
0
        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);
            }
        }
コード例 #4
0
ファイル: Reminder.cs プロジェクト: kannans89/whiplash
 public Reminder()
 {
     _occurance = OccuranceType.NA;
 }