private async void LoadTans() { if (BatchSummary != null) { TANs.Clear(); WorkInProgress = true; try { var result = await RestHub.TansOfDelivery(BatchSummary.Id, IsZeroRxns, IsQueried); if (result.HttpCode == System.Net.HttpStatusCode.OK) { List <DeliveryTanDTO> dtos = (List <DeliveryTanDTO>)result.UserObject; foreach (var dto in dtos) { TANs.Add(new DeliveryTanVM { Id = dto.Id, TanNumber = dto.TanNumber, RXNCount = dto.RXNCount, IsQueried = dto.IsQueried, DeliveryRevertMessage = dto.DeliveryRevertMessage }); } } else { AppErrorBox.ShowErrorMessage("Error While Batches . .", result.StatusMessage); } } catch (Exception ex) { AppErrorBox.ShowErrorMessage("Error While Batches . .", ex.ToString()); } finally { WorkInProgress = false; } } }