Ejemplo n.º 1
0
        // GET: VehicleImageController
        public ActionResult Index(int vehicleId)
        {
            SetVehicleToViewBag(vehicleId);
            var items = VehicleImageService.GetByVehicle(vehicleId);

            return(View(items));
        }
Ejemplo n.º 2
0
        private void SetVehicleDetailToViewBag(int id)
        {
            VehicleDetailViewModel vehicleDetail = new VehicleDetailViewModel();

            vehicleDetail.Vehicle             = VehicleService.GetDetail(id);
            vehicleDetail.VehicleImages       = VehicleImageService.GetByVehicle(id);
            vehicleDetail.VehicleRentalPrices = VehicleRentalPriceService.Get(new VehicleRentalPriceFilter(id, DateTime.Today));
            ViewBag.VehicleDetail             = vehicleDetail;
        }
Ejemplo n.º 3
0
        public IActionResult Detail(int id)
        {
            VehicleDetailViewModel vehicleDetail = new VehicleDetailViewModel();

            vehicleDetail.Vehicle             = VehicleService.GetDetail(id);
            vehicleDetail.VehicleImages       = VehicleImageService.GetByVehicle(id);
            vehicleDetail.VehicleRentalPrices = VehicleRentalPriceService.Get(new VehicleRentalPriceFilter(id, DateTime.Today));
            ViewBag.VehicleDetail             = vehicleDetail;
            return(View());
        }