private async Task OnSubmit()
        {
            try
            {
                IsBusy = true;
                RequestOrderDateChangeViewModel context = new RequestOrderDateChangeViewModel
                {
                    CustomerAccountNumber = Settings.MyInfo.CustomerInfo.Key,
                    Comments        = _notes,
                    SalesOrder      = _order,
                    FullName        = Settings.MyInfo.CurrentUser.FullName,
                    NewDeliveryDate = _newDate,
                    BranchCode      = _order.InventLocationId
                };
                var result = await Api.RequestDateChange(context);

                if (!result.Successful.GetValueOrDefault())
                {
                    await Alert.DisplayApiCallError(result.ExceptionMessage, result.ValidationErrors);

                    return;
                }

                await Nav.Nav.PopAsync();
            }
            catch (Exception e)
            {
                await Alert.DisplayError(e);
            }
            finally
            {
                IsBusy = false;
            }
        }
예제 #2
0
 public async Task <ApiResponseOfResponse> RequestDateChange(RequestOrderDateChangeViewModel context)
 {
     return(await AXClient.Instance.RequestDateChangeAsync(context).ConfigureAwait(false));
 }