Esempio n. 1
0
 public JsonResult SaveParking(BaseParkinfo model)
 {
     try
     {
         bool result = false;
         if (string.IsNullOrWhiteSpace(model.PKID))
         {
             result = ParkingServices.Add(model);
         }
         else
         {
             result = ParkingServices.Update(model);
         }
         if (!result)
         {
             throw new MyException("保存失败");
         }
         return(Json(MyResult.Success()));
     }
     catch (MyException ex) {
         return(Json(MyResult.Error(ex.Message)));
     }
     catch (Exception ex)
     {
         ExceptionsServices.AddExceptions(ex, "保存车场信息失败");
         return(Json(MyResult.Error("保存失败")));
     }
 }