Buy and Update DB close window onClick