Band theory of magnetism in metals and alloys