public async Task Load() { try { if (PackingSlip.Lines != null) { EnableRepack = _packingSlip.Lines.Any(p => p.PackingReasonList?.Any() ?? false); return; } IsBusy = true; PackingSlipLineQueryContext filter = new PackingSlipLineQueryContext { CustomerInfo = Api.GetCustomerContext(), SalesOrderId = _packingSlip.Order.Key, Id = _packingSlip.Key, PackingSlipDate = _packingSlip.DateShipped }; var response = await Api.GetPackingSlipsLines(filter); if (!response.Successful.GetValueOrDefault()) { await Alert.DisplayApiCallError(response.ExceptionMessage, response.ValidationErrors, Translate.Get(nameof(AppResources.CouldntGetPackingSlipLines))); return; } PackingSlip.Lines = response.Data; } catch (Exception e) { await Alert.DisplayError(e); } finally { IsBusy = false; } }
public async Task <ApiResponseOfListOfPackingSlipLine> GetPackingSlipsLines(PackingSlipLineQueryContext filter) { var result = await AXClient.Instance.GetPackingSlipLinesAsync(filter); return(result); }