We cannot disable/enable controls programatically. Because you donot have any reference to the Infopath UI controls in the code.
But there is a way that you can achieve this,
We should make the conditional formatting on a control in the Infopath design based on a secondary xml(dataconnection) node value. And set that secondary xml node value in the code.
Hope this helps.
Agni
InfopathDev India