Adding the C# for handling popups dialogs

Fixes Issue #7944
on behalf of mpdellandrea. Added line to move the cursor onto the first row of the result set. After a statement.executeQuery, the cursor defaults to position before the first row so it needs to be moved prior to fetching values.

Fixes Issue #7949