public Appointment(ResourceOutOfService oos) { Id = oos.Id; Type = AppointmentTypes.OutOfService.ToString(); Description = oos.Reason.ToString(); Start = oos.Period.Start; End = oos.Period.End; }
public ResourceOutOfServiceDto(ResourceOutOfService oos) { Id = oos.Id; Description = oos.Description; Reason = oos.Reason.ToString(); Start = oos.Period.Start; End = oos.Period.End; }
public async Task <int> Handle(CreateOutOfServiceCommand request, CancellationToken cancellationToken) { ResourceOutOfServiceReason reason; Enum.TryParse(request.Reason, true, out reason); var oos = new ResourceOutOfService { ResourceId = request.ResourceId, Description = request.Description, Reason = reason, Period = new DateTimeRange(request.Start, request.End) }; await _repo.Add(oos); return(oos.Id); }
public ConflictingEventDto(ResourceOutOfService outOfService) { Id = outOfService.Id; Type = AppointmentTypes.OutOfService.ToString(); }
public ScheduleEvent(ResourceOutOfService oos) { Id = oos.Id; Period = oos.Period; Type = AppointmentTypes.OutOfService.ToString(); }