// GET: VehicleRentalPriceController
        public ActionResult Index(int vehicleId)
        {
            VehicleRentalPriceFilter filter = new VehicleRentalPriceFilter(vehicleId);
            var items = VehicleRentalPriceService.Get(filter);

            SetVehicleToViewBag(vehicleId);
            return(View(items));
        }
Пример #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;
        }