Setting aside that you seem to be binding parameters to queries that don't have any (as Anele pointed out in the comment above), you could concat the two queries in the same command using a Union. For instance:
SqlCommand cmd = new SqlCommand(
"SELECT 'U' AS type, field1, field2, field3 " +
"FROM EMPMASTERTBL "
"WHERE branchlctn=@Param1 "
"UNION " +
"SELECT 'M' as type, field1, field2, field3 " +
"FROM EMPMASTERTBL " +
"WHERE empid=@Param2 "
,CON);
The you bind the parameters normally:
cmd.Parameters.AddWithValue("@Param1", program.lctnpk);
cmd.Parameters.AddWithValue("@Param2", empshiftdata.Empid);
In this way you can concat two or more queries in a single one.
Also, notice I've used a little hack, which I don't know if it works in SQL Server, but it does in Oracle and MySQL, so I'm assuming it will work in SQL Server too:
SELECT 'U' AS type
This is to give per each row an indication from which Select statement it came from.
Also, what you need to know and take care of: when you use Union / Union All, the fields that come from the Select statements must be of the same type, and there has to be the same number of fields queried in all Select statements.
Also, seeing that you are selecting fields from the same table but you may different Where conditions, instead of Union a simple In may work too:
"SELECT field1, field2, field3 FROM EMPMASTERTBL WHERE branchlctn IN (@Param1, @Param2, @Param3)"
Further Union reading
here[
^]