Dropsy isn't actually a disease or something you can cure, it is more a symptom of the last stages of organ failure. When you can recognize that it is occuring, generally it is too late to fix anything. Sorry. The only way to prevent it from happening again is to make sure you take very good care of your water, feed carefully and pay attention to any changes in your betta to catch illnesses before they can escalate. The more care you can give, the better the chances of it never happening again.