Refactoring add DB Dialog