예제 #1
0
        public string GetMaxDayCount()
        {
            int count = MaxDayCountLevel.GetMaxDayCount(_maxDayCountLevelID);

            if (count == MaxDayCountLevel.NeverExpire)
            {
                return("(infinite)");
            }
            return(count.ToString());
        }
예제 #2
0
        public bool IsExpired(DateTime createDate)
        {
            int MaxDayCount = MaxDayCountLevel.GetMaxDayCount(MaxDayCountLevelID);

            if (MaxDayCount == MaxDayCountLevel.NeverExpire)
            {
                return(false);
            }

            DateTime dtNow = DateTime.Now;
            TimeSpan tSpan = dtNow.Subtract(createDate);

            return(tSpan.Days < 0 || tSpan.Days > MaxDayCount);
        }