示例#1
0
        public DateTime getRevBeginDate(DateTime EffDate)
        {
            HandicapSchedule HandicapSchedule = _context.HandicapSchedule.Where(r => r.Date < EffDate).OrderByDescending(r => r.Date).FirstOrDefault();

            if (HandicapSchedule != null && HandicapSchedule.Date != null)
            {
                return(HandicapSchedule.Date.Date);
            }
            return(EffDate);
        }
示例#2
0
        public DateTime getNextEffDate()
        {
            DateTime         currEffDate      = DateTime.Today.Date;
            HandicapSchedule HandicapSchedule = _context.HandicapSchedule.Where(r => r.Date > currEffDate).OrderBy(r => r.Date).FirstOrDefault();

            if (HandicapSchedule != null && HandicapSchedule.Date != null)
            {
                return(HandicapSchedule.Date);
            }
            return(currEffDate);
        }
示例#3
0
        public DateTime getNextDate(int GhinNumber)
        {
            DateTime maxDate  = DateTime.Today.Date;
            var      Handicap = _context.Handicap.Where(r => r.GhinNumber == GhinNumber).OrderByDescending(r => r.Date).FirstOrDefault();

            if (Handicap != null)
            {
                maxDate = Handicap.Date.Date;
            }
            HandicapSchedule HandicapSchedule = _context.HandicapSchedule.Where(r => r.Date > maxDate).OrderBy(r => r.Date).FirstOrDefault();

            if (HandicapSchedule != null && HandicapSchedule.Date != null)
            {
                return(HandicapSchedule.Date);
            }
            return(maxDate);
        }