Example #1
0
        private void GetLineItemsList(InvoiceInputDetails selectedInvoice)
        {
            string postData = DataSerializer.JsonSerializer <InvoiceInputDetails>(selectedInvoice);

            try
            {
                ServiceInvoker.InvokeServiceUsingPost("Invoice/InvoiceService.svc/GetLineItemList", postData, false, delegate(object a, ServiceEventArgs serviceEventArgs)
                {
                    ServiceResponse result = serviceEventArgs.Result;
                    if (result.Status)
                    {
                        List <InvoiceBasicInfo> lineItems = DataSerializer.JsonDeserialize <List <InvoiceBasicInfo> >(result.Output);
                        this.invoiceLineItems             = (from l in lineItems select l.LineItemId).ToList <string>();
                        this.GetLineItemsListResponse(result.Output);
                    }
                    else
                    {
                        List <Error> resultError = result.ErrorDetails;
                        ShowError(new AppException(resultError), LineItemListError);
                        if (resultError[0] != null && T360ErrorCodes.NotInReviewerQueue == resultError[0].Code)
                        {
                            Deployment.Current.Dispatcher.BeginInvoke(() =>
                            {
                                RedirectToInvoiceList();
                            });
                        }
                    }
                });
            }
            catch (Exception ex)
            {
                ShowError((AppException)ex);
            }
        }
Example #2
0
 private void lineItemsBrowser_LoadCompleted(object sender, System.Windows.Navigation.NavigationEventArgs e)
 {
     try
     {
         InvoiceInputDetails selectedInvoice = new InvoiceInputDetails((string)PhoneApplicationService.Current.State[SelectedInvoiceId]);
         this.GetLineItemsList(selectedInvoice);
     }
     catch (AppException ex)
     {
         ShowError(ex, LineItemListError);
     }
 }