2
I have the following problem, I have a global variable public static bool HouveAlteracaoBD { get; set; }
and I need to monitor it when there is any change in its value, because I intend to follow the following logic:
if(Houve alteração na variável global "HouveAlteracaoBD" == true)
{
CadEmpresaEntity cadEmpresa = new CadEmpresaFacade().GetCadEmpresa(empresaId, ref resultado);
cadEmpresa.Ativa = true;
new CadEmpresaFacade().Alterar(cadEmpresa, ref resultado);
}
My problem is in the if expression, that I need to wait for the global variable to change, but I don’t know how to do that, if anyone can help I thank you.
Variable "global"? In what scope? Which class this variable belongs to?
– Jéf Bueno
It is in the same class as this excerpt I put above, but the code that changes its value is in another controller
– Brayan