Example #1
0
 public JsonResult EditVehicleModel(VehicleModel vehicleModel)
 {
     if (vehicleModel != null)
     {
         _vehicleModelService.Update(vehicleModel);
         return Json(true);
     }
     return Json(false);
 }
Example #2
0
 public JsonResult AddVehicleModel(VehicleModel vehicleModel)
 {
     if (vehicleModel != null)
     {
         vehicleModel.Id = Guid.NewGuid();
         _vehicleModelService.Add(vehicleModel);
         return Json(true);
     }
     return Json(false);
 }
Example #3
0
 public JsonResult DeleteVehicleModel(VehicleModel vehicleModel)
 {
     try
     {
         if (vehicleModel != null)
         {
             _vehicleModelService.Remove(vehicleModel.Id);
             return Json(true);
         }
         return Json(false);
     }
     catch (Exception ex)
     {
         return Json(false);
     }
 }
Example #4
0
 public VehicleModel Update(VehicleModel vehicleModel)
 {
     _vehicleModelRepository.Update(vehicleModel);
     return vehicleModel;
 }
Example #5
0
 public VehicleModel Add(VehicleModel vehicleModel)
 {
     _vehicleModelRepository.Add(vehicleModel);
     return vehicleModel;
 }