Added saving dialog result to db