Ejemplo n.º 1
0
        public string GetMaxDayCount()
        {
            int count = MaxDayCountLevel.GetMaxDayCount(_maxDayCountLevelID);

            if (count == MaxDayCountLevel.NeverExpire)
            {
                return("(infinite)");
            }
            return(count.ToString());
        }
Ejemplo n.º 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);
        }