public IActionResult Consulta(string filtro) { var lista = new List <Funcionario>(); try { var funcionarioRepository = new FuncionarioRepository(); var cargoRepository = new CargoRepository(); var departamentoRepository = new DepartamentoRepository(); lista = funcionarioRepository.ConsultarPorNome(filtro); foreach (var item in lista) { item.Cargo = cargoRepository.ObterPorId(item.IdCargo); item.Departamento = departamentoRepository.ObterPorId(item.IdDepartamento); } } catch (Exception e) { TempData["Mensagem"] = e.Message; } return(View(lista)); }
public ReportPusher(ReportSubmission reportSubmission, CargoRepository cargoRepository, HandlingEventRepository handlingEventRepository) { this.reportSubmission = reportSubmission; this.cargoRepository = cargoRepository; this.handlingEventRepository = handlingEventRepository; }
public CargoUpdater(SystemEvents systemEvents, CargoRepository cargoRepository, HandlingEventRepository handlingEventRepository) { this.systemEvents = systemEvents; this.cargoRepository = cargoRepository; this.handlingEventRepository = handlingEventRepository; }
public void setUp() { cargoRepository = MockRepository.GenerateMock<CargoRepository>(); locationRepository = MockRepository.GenerateMock<LocationRepository>(); routingService = MockRepository.GenerateMock<RoutingService>(); trackingIdFactory = MockRepository.GenerateMock<TrackingIdFactory>(); bookingService = new BookingServiceImpl(routingService, trackingIdFactory, cargoRepository, locationRepository); }
public void setUp() { cargoRepository = MockRepository.GenerateMock <CargoRepository>(); locationRepository = MockRepository.GenerateMock <LocationRepository>(); routingService = MockRepository.GenerateMock <RoutingService>(); trackingIdFactory = MockRepository.GenerateMock <TrackingIdFactory>(); bookingService = new BookingServiceImpl(routingService, trackingIdFactory, cargoRepository, locationRepository); }
public HandlingEventFactory(CargoRepository cargoRepository, VoyageRepository voyageRepository, LocationRepository locationRepository) { this.cargoRepository = cargoRepository; this.voyageRepository = voyageRepository; this.locationRepository = locationRepository; }
public BookingServiceFacadeImpl(BookingService bookingService, LocationRepository locationRepository, CargoRepository cargoRepository, VoyageRepository voyageRepository) { this.bookingService = bookingService; this.locationRepository = locationRepository; this.cargoRepository = cargoRepository; this.voyageRepository = voyageRepository; }
public HomeController(UserManager <ApplicationUser> userManager, IRepository <ApplicationUser> userRepository, IRepository <Car> carRepository, IRepository <Cargo> cargoRepository) { _userManager = userManager; _userRepository = (UserRepository)userRepository; _carRepository = (CarRepository)carRepository; _cargoRepository = (CargoRepository)cargoRepository; }
public CargoController(IRepository <Cargo> cargoRepository, UserManager <ApplicationUser> userManager, IRepository <Group> groupRepository, IFileManager fileManager) { _cargoRepository = (CargoRepository)cargoRepository; _userManager = userManager; _fileManager = fileManager; _groupRepository = (GroupRepository)groupRepository; }
public BookingServiceImpl(RoutingService routingService, TrackingIdFactory trackingIdFactory, CargoRepository cargoRepository, LocationRepository locationRepository) { _routingService = routingService; _trackingIdFactory = trackingIdFactory; _cargoRepository = cargoRepository; _locationRepository = locationRepository; }
protected void setUp() { cargoRepository = MockRepository.GenerateMock<CargoRepository>(); voyageRepository = new VoyageRepositoryInMem(); locationRepository = new LocationRepositoryInMem(); factory = new HandlingEventFactory(cargoRepository, voyageRepository, locationRepository); trackingId = new TrackingId("ABC"); RouteSpecification routeSpecification = new RouteSpecification(L.TOKYO, L.HELSINKI, DateTime.Now); cargo = new Cargo(trackingId, routeSpecification); }
public void setUp() { systemEvents = MockRepository.GenerateMock<SystemEvents>(); cargoRepository = new CargoRepositoryInMem(); handlingEventRepository = new HandlingEventRepositoryInMem(); locationRepository = new LocationRepositoryInMem(); voyageRepository = new VoyageRepositoryInMem(); trackingIdFactory = new TrackingIdFactoryInMem(); handlingEventFactory = new HandlingEventFactory(cargoRepository, voyageRepository, locationRepository); cargoUpdater = new CargoUpdater(systemEvents, cargoRepository, handlingEventRepository); }
public CargoRepositoryTestSuite() { APIManagerMock = new Mock <IAPIManager>(); MappingServiceMock = new Mock <IMappingService>(); CargoRepository = new CargoRepository(APIManagerMock.Object, MappingServiceMock.Object); CargoAPIMock = new Mock <ICargoAPI>(); APIManagerMock .Setup(m => m.Get <ICargoAPI>((External.Models.Models.RequestPriority)RequestPriority.UserInitiated)) .Returns(CargoAPIMock.Object); }
protected void setUp() { cargoRepository = MockRepository.GenerateMock <CargoRepository>(); voyageRepository = new VoyageRepositoryInMem(); locationRepository = new LocationRepositoryInMem(); factory = new HandlingEventFactory(cargoRepository, voyageRepository, locationRepository); trackingId = new TrackingId("ABC"); RouteSpecification routeSpecification = new RouteSpecification(L.TOKYO, L.HELSINKI, DateTime.Now); cargo = new Cargo(trackingId, routeSpecification); }
protected void setUp() { cargoRepository = MockRepository.GenerateMock<CargoRepository>(); voyageRepository = MockRepository.GenerateMock<VoyageRepository>(); handlingEventRepository = MockRepository.GenerateMock<HandlingEventRepository>(); locationRepository = MockRepository.GenerateMock<LocationRepository>(); systemEvents = MockRepository.GenerateMock<SystemEvents>(); HandlingEventFactory handlingEventFactory = new HandlingEventFactory(cargoRepository, voyageRepository, locationRepository); service = new HandlingEventServiceImpl(handlingEventRepository, systemEvents, handlingEventFactory); }
protected void setUp() { cargoRepository = MockRepository.GenerateMock <CargoRepository>(); voyageRepository = MockRepository.GenerateMock <VoyageRepository>(); handlingEventRepository = MockRepository.GenerateMock <HandlingEventRepository>(); locationRepository = MockRepository.GenerateMock <LocationRepository>(); systemEvents = MockRepository.GenerateMock <SystemEvents>(); HandlingEventFactory handlingEventFactory = new HandlingEventFactory(cargoRepository, voyageRepository, locationRepository); service = new HandlingEventServiceImpl(handlingEventRepository, systemEvents, handlingEventFactory); }
public TrackingController(CargoRepository cargoRepository, HandlingEventRepository handlingEventRepository) { _cargoRepository = cargoRepository; _handlingEventRepository = handlingEventRepository; }
public ItineraryUpdater(VoyageRepository voyageRepository, CargoRepository cargoRepository) { this.voyageRepository = voyageRepository; this.cargoRepository = cargoRepository; }
public CargoService() { Repository = new CargoRepository(); }
public ReadyToClaimNotifier(CargoRepository cargoRepository) { this.cargoRepository = cargoRepository; }
public MisdirectedNotifier(CargoRepository cargoRepository) { this.cargoRepository = cargoRepository; }