protected override async Task OnParametersSetAsync()
        {
            switch (Page)
            {
            case null:
            case "lights":
                if (Lights is null)
                {
                    Lights = await LightService.GetAllAsync();
                }
                break;

            case "heats":
                if (Heats is null)
                {
                    Heats = await HeatService.GetAllAsync();
                }
                break;

            case "courts":
                if (Courts is null)
                {
                    Courts = await CourtService.GetAllAsync();
                }
                break;

            case "rates":
                if (Rates is null)
                {
                    Rates = await RatesService.GetAllAsync();
                }
                break;

            default:
                throw new KeyNotFoundException("Dashboard nested page not found!");
            }
        }
示例#2
0
 protected override async Task OnInitializedAsync() =>
 Lights = await LightService.GetAllAsync();
示例#3
0
        protected override async Task OnInitializedAsync()
        {
            _lights = await LightService.GetAllAsync();

            _heats = await HeatService.GetAllAsync();
        }