public JsonResult SaveSparePartAndManufacturer(VehicleSparePartsVM saveSpareAndManufacturerDetails)
        {
            var success = vehDetails.SaveSparePartDetails(saveSpareAndManufacturerDetails.ManufacturerId,
                                                          saveSpareAndManufacturerDetails.SparePartName, saveSpareAndManufacturerDetails.Cost);

            return(Json(success));
        }
        public ActionResult SpareParts()
        {
            List <ManufacturerVM> manufacturersList = new List <ManufacturerVM>();

            VehicleSparePartsVM model = new VehicleSparePartsVM();
            var manufactures          = vehDetails.GetManufacturers();

            manufactures.ForEach(x => manufacturersList.Add(new ManufacturerVM
            {
                ManufacturerId   = x.ManufacturerId,
                ManufacturerName = x.ManufacturerName
            }));

            model.Manufacturers = new SelectList(manufacturersList, "ManufacturerId", "ManufacturerName");
            return(View(model));
        }