Esempio n. 1
0
        private async void PostSales()
        {
            List <Sale> sales = await SaleSaveInfo.GetSaleList();

            var arLiveApi = new HttpClientWebApi();

            foreach (Sale sale in sales)
            {
                sale.Id = Guid.NewGuid().ToString();
                await arLiveApi.PostSaleInvoice(sale);
            }

            SaleSaveInfo.ResetSavedSales();

            //pendingInvoiceCount.Text = "Pending Invoices: " + 0;
        }
Esempio n. 2
0
        private async void Button_Click(object sender, RoutedEventArgs e)
        {
            // Record Invoice
            var sale = DefaultViewModel["Sale"] as Sale;

            if (sale == null)
            {
                return;
            }

            // All Offline Saved Sales
            List <Sale> sales = await SaleSaveInfo.GetSaleList();

            sales.Add(sale);

            SaleSaveInfo.SetSaleList(sales);
            Frame.GoBack();
        }