Thermodynamics of a trapped Bose-condensed gas