@page "/Box/Check" @using MasaBlazorApp3.Pojo.Config @foreach (int i in DrawerNos) { } @for (int i = 0; i < DetailList.DetailList.Count; i++) { OrderDetail orderDetail = DetailList.DetailList[i]; @orderDetail.Drug.DrugName } @for (int i = 0; i < DetailList.DetailList.Count; i++) { OrderDetail orderDetail = DetailList.DetailList[i]; @orderDetail.SetManuNo } @for (int i = 0; i < DetailList.DetailList.Count; i++) { OrderDetail orderDetail = DetailList.DetailList[i]; @orderDetail.Quantity } @code { @inject IOrderInfoDao orderInfoDao; @inject DialogService dialogService; @inject Microsoft.Extensions.Options.IOptions setting; bool allowRowSelectOnRowClick = true; IEnumerable orderInfos; IList selectedOrderInfos; RadzenDataGrid grid; bool isLoading; int count; int[] DrawerNos = new int[] { 1, 2, 3, 4, 5, 6, 7, 8 }; int status = 0; int drawerNo = 1; string OrderNo; DateTime OrderDate; void SelectDrawer(int drawerNo) { this.drawerNo = drawerNo; grid.Reload(); } void OnCurrentDateChanged(DateTime args) { OrderDate = new DateTime(args.Year, args.Month, args.Day); } //重置 async Task reloadGrid() { OrderNo = ""; OrderDate = DateTime.MinValue; await grid.Reload(); } //确认 async Task Confirm() { orderInfoDao.CheckOrderInfo(selectedOrderInfos, drawerNo); } async Task LoadData(LoadDataArgs args) { isLoading = true; var result = await orderInfoDao.GetAllOrderInfoByBox(drawerNo, OrderNo, OrderDate, args.Top, args.Skip); // Update the Data property orderInfos = result.Desserts; // Update the count count = result.TotalDesserts; isLoading = false; DrawerNos = await orderInfoDao.GetDrawerNum(setting.Value.boxMachineId); } // protected override async Task OnInitializedAsync() // { // await base.OnInitializedAsync(); // // orderInfos = dbContext.Employees; // var result = await orderInfoDao.GetAllOrderInfo(OrderNo, OrderDate, args.Top, args.Skip); // // Update the Data property // orderInfos = result.Desserts; // // Update the count // count = result.TotalDesserts; // isLoading = false; // } }