When He (sal-Allaahu 'alayhe wa sallam) used to receive pleasant news, He (sal-Allaahu 'alayhe wa sallam) would say:
اَلْحَمْدُ لِلّٰهِ الَّذِيْ بِنِعْمَتِهِ تَتِمُّ الصَّالِحَاتُ
Praise is to Allah Who by His blessings all good things are perfected.
Alhamdu lillaahil-lathee bini'matihi tatimmus-saalihaat.
And if something happened that displeased him, he used to say:
اَلْحَمْدُ لِلّٰهِ عَلَى كُلِّ حَالٍ
Praise is to Allah in all circumstances.
Alhamdu lillaahi 'alaa kulli haal.