Exemplo n.º 1
0
        async Task ExecuteLoadItemsCommand()
        {
            IsBusy = true;

            try
            {
                Items.Clear();
                var items = await SupplierStore.ListAsync(q => q.OrderBy(x => x.Name));

                foreach (var item in items)
                {
                    Items.Add(item);
                }
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex);
            }
            finally
            {
                IsBusy = false;
            }
        }
Exemplo n.º 2
0
        private async void OnDeleteItem(Supplier item)
        {
            await SupplierStore.DeleteAsync(item);

            Items.Remove(item);
        }