sqlclient from CheckIfStayOverTime function transfer to global var