as I understood, you are going to fill a grid and getting the error.
as per the error description, you are trying to open a already opened sql connection inside your method - > pay_roll.show_in_datagridview().
so add a check before opening the connection
SqlConnection myConnection = new ...(...);
if (myConnection.State == ConnectionState.Closed)
{
myConnection.Open();
}
alternatively you can use
using
keyword while working with unmanaged resources like sqlConnection, which will enforce the propper closing of the resources after use.
mark as answer if satisfied... :) it motivates.. :)