public virtual bool Edit(CarInfo model)
 {
     try
     {
         _carRepository.Update(model);
     }
     catch
     {
         return false;
     }
     return true;
 }
Example #2
0
 public JsonResult Edit(CarInfo model)
 {
     var result = _carInfoService.Edit(model);
     return Json(new OperateMessage<CarInfo>(OperateResult.Success, result, string.Empty, model));
 }
Example #3
0
 public JsonResult Create(CarInfo model)
 {
     var result = _carInfoService.Create(model);
     return Json(new OperateMessage<CarInfo>(OperateResult.Success, true, string.Empty, model));
 }
 public void OnCarCreating(CarInfo model)
 {
    if(model.Price<0)
        throw new ValidationException();
 }