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)); }
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()); }
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); }
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); }
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(); }
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); }
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; }