I read this notes: ocw.mit.edu Green's Theorem Proof .
Unfortunately I do not understand the following step: $$\int_{c}^{b} -\frac{\partial M}{\partial y}\, \mathrm dy = -M(x,y)\vert_{c}^{d}=-M(x,d)+M(x,c)$$
If I let $M=3x$ then $$\frac{\partial M}{\partial y}=0$$ Then I will get $0$ instead of $-M(x,d)+M(x,c)$. What did go wrong?
You didn't go wrong. What he is doing is apply the fundamental theorem of calculus to the partial derivative. The result is the difference of function applied at the end points.