Linked gui search to last name search and refactor.

refactored database update to grid view to updateGridView.