Beispiel #1
0
        public EventFee GetCurrentFeeForWave(int eventWaveId, EventFeeType feeType)
        {
            if (eventWaveId <= 0)
            {
                throw new ArgumentException("eventWaveId must be greater than 0");
            }
            var eventId = _repository.EventWaves.Find(x => x.EventWaveId == eventWaveId).EventDate.EventId;

            return(GetCurrentFeeForEvent(eventId, feeType));
        }
Beispiel #2
0
 public EventFee GetFeeForEventByRegistrationDate(int eventId, EventFeeType feeType, DateTime registrationDate)
 {
     if (eventId <= 0)
     {
         throw new ArgumentException("eventId must be greater than 0");
     }
     return
         (_repository.EventFees.Filter(
              x => x.EventId == eventId && x.EventFeeType == feeType && x.EffectiveDate <= registrationDate)
          .OrderByDescending(x => x.EffectiveDate)
          .First());
 }
Beispiel #3
0
        public EventFee GetCurrentFeeForEvent(int eventId, EventFeeType feeType)
        {
            if (eventId <= 0)
            {
                throw new ArgumentException("eventId must be greater than 0");
            }
            var eventFee =
                _repository.EventFees.Filter(
                    x => x.EventId == eventId && x.EventFeeType == feeType && x.EffectiveDate < DateTime.Now)
                .OrderByDescending(x => x.EffectiveDate)
                .FirstOrDefault();

            if (eventFee == null)
            {
                throw new Exception(string.Format("Event ID: {0} has no Event Fees of type {1}", eventId, feeType));
            }
            return(eventFee);
        }
Beispiel #4
0
        public EventFee GetCurrentEventFeeForWave(int eventWaveId, EventFeeType feeType)
        {
            var eventService = new EventService(this._repository, false);

            return(eventService.GetCurrentFeeForWave(eventWaveId, feeType));
        }
 public EventFee GetCurrentEventFeeForWave(int eventWaveId, EventFeeType feeType)
 {
     var eventService = new EventService(this._repository, false);
     return eventService.GetCurrentFeeForWave(eventWaveId, feeType);
 }
Beispiel #6
0
 public EventFee GetFeeForEventByRegistrationDate(int eventId, EventFeeType feeType, DateTime registrationDate)
 {
     if (eventId <= 0)
         throw new ArgumentException("eventId must be greater than 0");
     return
         _repository.EventFees.Filter(
           x => x.EventId == eventId && x.EventFeeType == feeType && x.EffectiveDate <= registrationDate)
                    .OrderByDescending(x => x.EffectiveDate)
                    .First();
 }
Beispiel #7
0
 public EventFee GetCurrentFeeForWave(int eventWaveId, EventFeeType feeType)
 {
     if(eventWaveId <= 0)
         throw new ArgumentException("eventWaveId must be greater than 0");
     var eventId = _repository.EventWaves.Find(x => x.EventWaveId == eventWaveId).EventDate.EventId;
     return GetCurrentFeeForEvent(eventId, feeType);
 }
Beispiel #8
0
 public EventFee GetCurrentFeeForEvent(int eventId, EventFeeType feeType)
 {
     if (eventId <= 0)
         throw new ArgumentException("eventId must be greater than 0");
     var eventFee =
         _repository.EventFees.Filter(
             x => x.EventId == eventId && x.EventFeeType == feeType && x.EffectiveDate < DateTime.Now)
                    .OrderByDescending(x => x.EffectiveDate)
                    .FirstOrDefault();
     if (eventFee == null)
         throw new Exception(string.Format("Event ID: {0} has no Event Fees of type {1}", eventId, feeType));
     return eventFee;
 }