I'm reading David Eisenbud, Commutative Algebra with a View Toward Algebraic Geometry. At page 13, Chapter $0$, he says: "... if $e_1,\ldots,e_n$ is a complete set of orthogonal idempotents in a commutative ring, then $R=Re_1\times\cdots\times Re_n$ is a direct product decomposition."
How can be proved this?