Hello and congratulations!
To be most correct, you should write two thank you notes, one for each event. However, since everyone who attended knows it was just a couple days before the wedding you should be clear to write one thank you note for both. BUT, it needs to be a really good (ie: longer) thank you note. Not just a couple lines :).
Melissa