コード例 #1
0
        public static int UpdateByUserId(Guid userId, string userName, string userPassword, Guid personId)
        {
            using (ObjectConnection objectConnection = new ObjectConnection())
            {
                using (UpdateUserAccessByUserIdCommand objectCommand = new UpdateUserAccessByUserIdCommand(objectConnection))
                {
                    objectCommand.UserId       = userId;
                    objectCommand.UserName     = userName;
                    objectCommand.UserPassword = userPassword;
                    objectCommand.PersonId     = personId;

                    objectConnection.Open();
                    objectCommand.ExecuteNonQuery();

                    return(objectCommand.ReturnValue);
                }
            }
        }
コード例 #2
0
        public static int UpdateByUserId(UserAccess userAccess)
        {
            using (ObjectConnection objectConnection = new ObjectConnection())
            {
                using (UpdateUserAccessByUserIdCommand objectCommand = new UpdateUserAccessByUserIdCommand(objectConnection))
                {
                    objectCommand.UserId          = userAccess.UserId;
                    objectCommand.UserName        = userAccess.UserName;
                    objectCommand.UserPassword    = userAccess.UserPassword;
                    objectCommand.PersonId        = userAccess.PersonId;
                    objectCommand.PermissionToken = userAccess.PermissionToken;

                    objectConnection.Open();
                    objectCommand.ExecuteNonQuery();

                    return(objectCommand.ReturnValue);
                }
            }
        }