integrate add,view,update in one view and controller