-
Notifications
You must be signed in to change notification settings - Fork 4
Handling Bonus Vacanze Tag Logic
lukmay edited this page Aug 6, 2023
·
1 revision
If an accommodation possesses the Feature D448B037F37843B3B49C15CAFBBC5669
, the SmgTag Bonus Vacanze
is added. Conversely, if the feature is absent, the tag is removed to ensure accurate representation.
The Code:
//Spezialfall Covid 19
var bonusvacanze = myacco.Features.Where(x => x.Id == "D448B037F37843B3B49C15CAFBBC5669").Count();
if(bonusvacanze > 0)
{
//Füge SMGTag Balance hinzu
if (myacco.SmgTags == null)
myacco.SmgTags = new List<string>();
if (!myacco.SmgTags.Contains("Bonus Vacanze"))
myacco.SmgTags.Add("Bonus Vacanze");
}
if(bonusvacanze == 0)
{
if(myacco.SmgTags != null)
{
if (myacco.SmgTags.Contains("Bonus Vacanze"))
myacco.SmgTags.Remove("Bonus Vacanze");
}
}
This wiki contains additional information about the Open Data Hub alongside the Open Data Hub - Official Documentation 🔗 .