Adam was utterly grief-stricken by the loss of his two sons: one was dead, the other was won over by the devil. Adam prayed for his son and turned to mundane matters, for he had to toil for his sustenance. At the same time, he was a prophet, advising his children and grandchildren, telling them about Allah, and calling them to believe in Him. He told them about Iblis and warned them by recounting his own experience with the devil and of how the devil had tempted Cain to kill his brother.
"When a person dies, his works end, except for three: ongoing charity, knowledge that is benefited from, and a righteous child who prays for him."
Prophet Mohammed (PBUH)
"The best of what a man leaves behind are three: a righteous child who supplicates for him, ongoing charity the reward of which reaches him, and knowledge that is acted upon after him."
Sunan Ibn Mājah
"Every day two angels come down from Heaven and one of them says, 'O Allah! Compensate every person who spends in Your Cause,' and the other (angel) says, 'O Allah! Destroy every miser.'"
Sahih Bukhari