[40] Implemented DB update on text field focus lost.

* Implemented restore of previous selected item in treeview on items
update.
* Relieved DB update task code.