Skip to content

Theme Familie

lukmay edited this page Dec 16, 2023 · 2 revisions

Familie Theme Criteria

When assessing whether an accommodation qualifies for the "Familie" theme, the following feature IDs are crucial:

  • 8B808C230FE34263BE3787680DA253C7
  • 36C354DC30F14DD7B1CCFEE78E82132C (DE = Spielzimmer, IT = Stanza giochi, EN = Playroom)
  • 188A9BADC0324C10B0013F108CE5EA5C (DE = Spielplatz, IT = Parco giochi, EN = Playground)

Each ID corresponds to a specific feature that an accommodation must have to be associated with the "Familie" theme.


code:

Is implemented here.

if (myacco.Features != null)
{
    var familie = myacco.Features.Where(x =>
        x.Id == "8B808C230FE34263BE3787680DA253C7" ||
        x.Id == "36C354DC30F14DD7B1CCFEE78E82132C" ||
        x.Id == "188A9BADC0324C10B0013F108CE5EA5C");

    bool familie1 = false;
    bool familie2 = false;
    bool familie3 = false;

    if (familie.Count() > 0)
    {
        foreach (var myfamilie in familie)
        {
            if (myfamilie.Id == "8B808C230FE34263BE3787680DA253C7")
                familie1 = true;
            if (myfamilie.Id == "36C354DC30F14DD7B1CCFEE78E82132C")
                familie2 = true;
            if (myfamilie.Id == "188A9BADC0324C10B0013F108CE5EA5C")
                familie3 = true;
        }

        if (familie1 && familie2 && familie3)
        {
            myacco.ThemeIds.Add("Familie");
        }
    }
}
Clone this wiki locally