Esempio n. 1
0
        async Task ExecuteLoadItemsCommand(object filter)
        {
            if (IsBusy)
            {
                return;
            }

            IsBusy = true;

            try
            {
                Operations.Clear();
                var items = await opRepository.GetItemsAsync(User.Id, filter);

                foreach (var item in items)
                {
                    Operations.Add(item);
                }
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex);
            }
            finally
            {
                IsBusy = false;
            }
        }