Example #1
0
 public Vehicle AddVehicleToMemember(Vehicle vehicle)
 {
     var obj = vehicleRepository.Add(vehicle);
     return obj;
 }
Example #2
0
 public ActionResult NewVehicle(Vehicle vehicle)
 {
     if (vehicle != null)
     {
         vehicle.Id = Guid.NewGuid();
         vehicleService.Add(vehicle);
         return Json(true);
     }
     return Json(false);
 }
Example #3
0
 public ActionResult EditVehicle(Vehicle vehicle)
 {
     vehicleService.Update(vehicle);
     return Json(true);
 }
Example #4
0
 public JsonResult DeleteVehicle(Vehicle vehicle)
 {
     try
     {
         return Json(vehicleService.Remove(vehicle.Id));
     }
     catch (Exception ex)
     {
         return Json(false);
     }
 }
Example #5
0
 public Vehicle Update(Vehicle vehicle)
 {
     vehicleRepository.Update(vehicle);
     return vehicle;
 }
Example #6
0
 public Vehicle Add(Vehicle vehicle)
 {
     vehicle.Id = Guid.NewGuid();
     vehicleRepository.Add(vehicle);
     return vehicle;
 }