private async Task ConfigureProperties() { CellContexMenu = null; GridConfig.Total = (await GridConfig.GetListAsync(GridSearch)).Count(); GridConfig.ItemList = await GridConfig.GetPageAsync(Sort, GridSearch); GridSearch.SearchDateTo = GridSearch.SearchDateTo == DateTime.MinValue ? DateTime.Now : GridSearch.SearchDateTo; }
protected async Task DownloadExcel() { ShowTitleContextMenu = false; byte[] bytes = await GridConfig.DownloadExcel(await GridConfig.GetListAsync(GridSearch)); string fileName = string.IsNullOrWhiteSpace(GridConfig.ExcelFileName) ? $"{GridConfig.GridTitle}{DateTime.Now.Date.ToShortDateString().Replace("/", "-")}.xlsx" : GridConfig.ExcelFileName; JsHelper jsHelper = new JsHelper(); ErrorMessage = await jsHelper.DownloadExcelAsync(jSRuntime, bytes, fileName); }