mercredi 11 mars 2020

My Bools Turns to True even if it is False [closed]

I just realised my software gives all booleans true to everyone. So I checked it step by step, it takes info from my api right. When I check this code:

        MODULFINANS = (bool)dt2.Rows[0]["moduL_FINANS"];
        MODULFATURA = (bool)dt2.Rows[0]["moduL_FATURA"];
        MODULLOGO = (bool)dt2.Rows[0]["moduL_LOGOENTEGRE"];
        MODULPERSONEL = (bool)dt2.Rows[0]["moduL_PERSONEL"]; // for ex. this comes false

        if (MODULLOGO == true)
        {
            rbngrEntegre.Visible = true;
        }
        else
        {
            rbngrEntegre.Visible = false;
        }

        if (MODULOPTI == true)
        {
            btnOptimizasyon.Visibility = BarItemVisibility.Always;
        }
        else
        {
            btnOptimizasyon.Visibility = BarItemVisibility.Never;
        }

        if (MODULFATURA == true)
        {
            rbtnFatura.Visible = true;
        }
        else
        {
            rbtnFatura.Visible = false;
        }

        if (MODULPERSONEL == true) // but in here it turns to True, I don't know why
        {
            rbtnPersonel.Visible = true;
        }
        else
        {
            rbtnPersonel.Visible = false;
        }

but in the end when I check everything turns to true. All of this code in same void. How is that possible?

Aucun commentaire:

Enregistrer un commentaire