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!");
            }
        }
Example #2
0
 /// <summary>
 /// 使用SQLbulkCopy批量存入数据库
 /// </summary>
 /// <param name="dtEndTable"></param>
 public static void BulkSave2DB(DataTable dtEndTable)
 {
     HeatService.BulkSave2DB(dtEndTable);
 }
Example #3
0
 /// <summary>
 /// 插入一条数据
 /// </summary>
 /// <param name="heat"></param>
 public static void InsertIntoOneHeatIntoTmpTable(CjdHeat heat)
 {
     HeatService.InsertIntoOneHeatIntoTmpTable(heat);
 }
Example #4
0
        protected override async Task OnInitializedAsync()
        {
            _lights = await LightService.GetAllAsync();

            _heats = await HeatService.GetAllAsync();
        }