You do know that you can avoid vampire attacks by not arriving in towns at night, right?
In any case, you have to do the whole Dawnguard main quest to end the attacks, which also includes doing the Main Quest sub-quest that involves getting the elder scroll.
Best thing is not to use fast travel to cities or towns and do not use carriages for the same reason. Do not go near cities from around 5pm to 9am. For the most part Vampire Attacks will happen Dusk, night, or at dawn and being in the area and then resting for the night it can still mean that Vamps are active in the day.
You can fast travel to someplace that is not that far from the city such as the the destroyed watch tower near Whiterun and wait until morning if it is too late to go to Whiterun. The stables are to close I found.
Dragons is what I have more problems with.
Minor addendum to this: they will trigger after 5 AM if you sleep overnight in an Inn.