The importance of dry and wet merging on the formation and evolution of elliptical galaxies