public JsonResult SaveUserInfo(string id, UserInfo user) { JsonReturnMessages msg = new JsonReturnMessages(); try { user.IsNew = string.IsNullOrEmpty(id); if (user.IsNew && string.IsNullOrEmpty(user.Password)) { throw new BizException("新用户密码不能为空"); } user.LastUpdateUserUID = base.UserId; user.LastUpdateUserName = base.CurrentUser.FullName; user.LastUpdateTime = DateTime.Now; sysManageService.SaveUserInfo(user); msg.IsSuccess = true; msg.Msg = "操作成功"; } catch (BizException ex) { msg.IsSuccess = false; msg.Msg = ex.Message; } catch { msg.IsSuccess = false; msg.Msg = "操作失败,请稍后重试!"; } return(Json(msg)); }