public JsonResult Edit(User model) { var apiResult = new APIResult(); try { UserBll.AddOrUpdate(model, (UserEntity)UserContext.CurrentUser); } catch (Exception ex) { apiResult.Ret = -1; apiResult.Msg = ex.Message; if (!(ex is OperationExceptionFacade)) { LogFactory.GetLogger().Log(LogLevel.Error, ex); } } return(Json(apiResult)); }