The fermionic Green's function theory for calculation of magnetization