Esempio n. 1
0
        public ActionResult Update(int ID)
        {
            var carviewmodel = new CarViewModel()
            {
                ID = ID,
            };

            var car = _carBLL.GetByID(carviewmodel);

            var viewModel = new CarViewModel()
            {
                ID           = car.ID,
                Seat         = car.Seat,
                Acceleration = car.Acceleration,
                Brandname    = car.Brandname,
                Cargospace   = car.Cargospace,
                Enginepower  = car.Enginepower,
                Fueltype     = car.Fueltype,
                ImageLink    = car.ImageLink,
                Modelname    = car.Modelname,
                RentalPrice  = car.RentalPrice,
                Transmission = car.Transmission,
                Weight       = car.Weight
            };

            return(View(viewModel));
        }
Esempio n. 2
0
        public ViewResult Details(int ID)
        {
            var carviewmodel = new CarViewModel()
            {
                ID = ID,
            };
            var cardetails = _carBLL.GetByID(carviewmodel);
            var viewmodel  = new CarViewModel()
            {
                ID           = cardetails.ID,
                Brandname    = cardetails.Brandname,
                Modelname    = cardetails.Modelname,
                Acceleration = cardetails.Acceleration,
                Enginepower  = cardetails.Enginepower,
                Cargospace   = cardetails.Cargospace,
                Fueltype     = cardetails.Fueltype,
                RentalPrice  = cardetails.RentalPrice,
                Seat         = cardetails.Seat,
                Transmission = cardetails.Transmission,
                Weight       = cardetails.Weight,
                ImageLink    = cardetails.ImageLink
            };


            return(View(viewmodel));
        }