public bool Save() { ThrowExceptionIfValidateFailure(); string permissionCodes = string.Empty; if (Permissions != null) { permissionCodes = string.Join(",", Permissions); } //新用户仓储对象 Users user = new Users { UserId = ID, Username = Username, Name = Name, Password = EncryptPassword, Title = Title, Email = Email, Mobile = Mobile, CreateTime = DateTime.Now, LastTime = DateTime.Now, LoginCount = 0, Status = Status, PermissionCode = permissionCodes, IsSuper = IsSuper }; return(UsersAccessor.Add(user, Study)); }