private async Task Send() { var result = await loadingService.WithExecuteAsync("Data send", async() => { NetworkResult ret = null; foreach (var entity in allEntities) { if (entity.IsChecked) { var pair = await inspectionService.QueryInspectionAsync(entity.StorageNo); var request = new StorageDetailsRequest { Renew = false, StorageNo = entity.StorageNo, UserId = session.UserId, Entries = pair.Entities.Select(x => new StorageDetailsRequestEntry { ItemCode = x.ItemCode, ItemName = x.ItemName, SalesPrice = x.SalesPrice, Qty = x.Qty }).ToArray() }; ret = await networkClient.Post( EndPoint.StorageDetails(settingService.GetEndPoint()), request, Definition.Timeout); if (!ret.Success) { return(ret); } } await inspectionService.DeleteInspectionLisAsynct(entity.StorageNo); } return(ret); }); if (result.Success) { await dialogService.DisplayInformation("Data send", "Send completed."); await Back(); } else { await dialogService.DisplayNetworkError(result); } }