Consider creating a generic method with this logic and a delegate for the internal action. You have this on at least 3 places so far.