using TireTargets.Components.CSharp; namespace TireTargets.Components.Pages { public partial class Portal { public string locText = ""; private bool needSelection = false; private bool userHasLocation = false; protected override async Task OnInitializedAsync() { userHasLocation = await DatabaseDriver.DoesUserHaveLocation(Layout.MainLayout.Session["id"], Layout.MainLayout.Session["login_method"]); if (userHasLocation) { var needSelectionAll = await DatabaseDriver.DoesLocationNeedSelection(); foreach (var current in needSelectionAll) { if (current.Item2) { needSelection = true; break; } } } await base.OnInitializedAsync(); } } }