Link event detail view with database