Skip to content

Theme Biken

lukmay edited this page Dec 16, 2023 · 2 revisions

If an accommodation has the MarketingGroupId: F2CAAF48AC1C4EE88342FB4E59610A68 or the features listed below, the theme "Biken" is added to the ThemeIds.

One of the Following 3 Options need to be in the Features list.

  • 8068941DF6F34B9D955965062614A3C2 and 349A4D98B26B448A908679142C3394D6 and BF108AD2B62042DF9FEAD4E865E11E75
  • 05988DB63E5146E481C95279FB285C6A
  • 5F22AD3E93D54E99B7E6F97719A47153
graph LR
A[1 of 3 needed for 'Biken'] --> E
A --> C[5F22AD3E93D54E99B7E6F97719A47153]
A --> B[05988DB63E5146E481C95279FB285C6A]
E[All 3 mandatory] --> F[8068941DF6F34B9D955965062614A3C2]
E --> G[349A4D98B26B448A908679142C3394D6]
E --> H[BF108AD2B62042DF9FEAD4E865E11E75]
Loading

code:

Is implemented here.

if (myacco.Features != null)
{
    var biken = myacco.Features.Where(x =>
        x.Id == "8068941DF6F34B9D955965062614A3C2" ||
        x.Id == "349A4D98B26B448A908679142C3394D6" ||
        x.Id == "BF108AD2B62042DF9FEAD4E865E11E75" ||
        x.Id == "05988DB63E5146E481C95279FB285C6A" ||
        x.Id == "5F22AD3E93D54E99B7E6F97719A47153");

    bool biken1 = false;
    bool biken2 = false;
    bool biken3 = false;
    bool biken4 = false;
    bool biken5 = false;
    bool bikenbadge = false;

    if (myacco.MarketingGroupIds.Where(x => x == "F2CAAF48AC1C4EE88342FB4E59610A68").Count() > 0)
        bikenbadge = true;


    if (biken.Count() > 0)
    {
        foreach (var mybiken in biken)
        {
            if (mybiken.Id == "8068941DF6F34B9D955965062614A3C2")
                biken1 = true;
            if (mybiken.Id == "349A4D98B26B448A908679142C3394D6")
                biken2 = true;
            if (mybiken.Id == "BF108AD2B62042DF9FEAD4E865E11E75")
                biken3 = true;
            if (mybiken.Id == "05988DB63E5146E481C95279FB285C6A")
                biken4 = true;
            if (mybiken.Id == "5F22AD3E93D54E99B7E6F97719A47153")
                biken5 = true;
        }                    
    }

    if ((biken1 && biken2 && biken3) || biken4 || biken5 || bikenbadge)
    {
        myacco.ThemeIds.Add("Biken");
    }
}
Clone this wiki locally