public void assignCargoToRoute(string trackingIdStr, RouteCandidateDTO routeCandidateDTO) { var itinerary = DTOAssembler.fromDTO(routeCandidateDTO, voyageRepository, locationRepository); var trackingId = new TrackingId(trackingIdStr); bookingService.assignCargoToRoute(itinerary, trackingId); }
public IEnumerable <CargoRoutingDTO> listAllCargos() { var cargoList = cargoRepository.findAll(); var dtoList = new List <CargoRoutingDTO>(cargoList.Count()); foreach (Cargo cargo in cargoList) { dtoList.Add(DTOAssembler.toDTO(cargo)); } return(dtoList); }
public IEnumerable <RouteCandidateDTO> requestPossibleRoutesForCargo(string trackingId) { var itineraries = bookingService.requestPossibleRoutesForCargo(new TrackingId(trackingId)); var routeCandidates = new List <RouteCandidateDTO>(itineraries.Count()); foreach (Itinerary itinerary in itineraries) { routeCandidates.Add(DTOAssembler.toDTO(itinerary)); } return(routeCandidates); }
public CargoRoutingDTO loadCargoForRouting(string trackingId) { var cargo = bookingService.loadCargoForRouting(new TrackingId(trackingId)); return(DTOAssembler.toDTO(cargo)); }
public IEnumerable <LocationDTO> listShippingLocations() { var allLocations = locationRepository.findAll(); return(DTOAssembler.toDTOList(allLocations)); }