lundi 3 avril 2017

If statement is not hitting [on hold]

I have a string dictionary which i want to do some logic on, but for some reason one of my if statements isn't hitting.

here is my code:

    foreach (var param in paramList)
    {
        // q1
        if (param.Key == "q1")
        {
            if (param.Value == "accountholders")
            {
                // account level
do_smth();
            }
            else
            {
                // customer level
                p1Answer = "LEFT JOIN DIM_BANK_CustomerParties cm ON cm.CustomerNumber = cus.Customer " +
                                "LEFT JOIN DIM_BANK_MemberParty mp ON cm.MemberParty = mp.MemberPartyID";
            }
         }
    }

my code runs upto the point where the if statement goes executes the code where the param.key == "q1", but the next if statement which checks if the param.Value == "accountholders", it doesn't execute this part of code.

What is going wrong?

Aucun commentaire:

Enregistrer un commentaire