A locally convex version of Kadison 's representation theorem