Beispiel #1
0
        private async Task RefreshData()
        {
            InvoiceSource.Clear();
            var child    = MainHelper.FirebaseClient.Child("Invoices");
            var fooPosts = await child.OnceAsync <Invoice>();

            foreach (var item in fooPosts)
            {
                InvoiceSource.Add(new InvoiceVM()
                {
                    Key       = item.Key,
                    InvoiceNo = item.Object.InvoiceNo,
                    Amount    = item.Object.Amount,
                    Title     = item.Object.Title,
                    Date      = item.Object.Date,
                    Memo      = item.Object.Memo,
                });
            }
        }
        public async Task RefreshInvoice()
        {
            InvoiceSource.Clear();
            var child    = MainHelper.FirebaseClient.Child("Invoices");
            var fooPosts = await child.OnceAsync <Invoice>();

            foreach (var item in fooPosts)
            {
                var fooItem = new InvoiceVM()
                {
                    Amount    = item.Object.Amount,
                    Date      = item.Object.Date,
                    InvoiceNo = item.Object.InvoiceNo,
                    Memo      = item.Object.Title,
                    Key       = item.Key,
                };
                InvoiceSource.Add(fooItem);
            }
        }