public void Handle(BookingMade @event) { //Don't add this if it is relevant to this system - this will already have been done locally. if (@event.BookingTypeId != Constants.SalesAppointmentBookingTypeId) { var consultant = _consultantRepository.GetById(@event.EmployeeId); TimeAllocation.Book(consultant, @event.Id, @event.Start, @event.End); } }
public void Handle(BookingMade @event) { //Don't add this if it is relevant to this system - this will already have been done locally. if (@event.BookingTypeId != Constants.HolidayBookingTypeId) { var employee = _employeeRepository.GetById(@event.EmployeeId); TimeAllocation.Book(employee, @event.Id, @event.Start, @event.End); } }
// TODO : deprecate public bool IsInsideHoursClause(DateTime dt) { return(((null != ResultPositionsByHoursClauseOccurrences && ResultPositionsByHoursClauseOccurrences.Count > 0) || (null != HoursClauseResults && HoursClauseResults.Count > 0)) && (TimeAllocation != null) && (TimeAllocation.ContainsKey(dt))); }