Ejemplo n.º 1
0
        public async Task ExecuteLoadJobsCommand()
        {
            if (IsBusy)
            {
                return;
            }

            IsBusy = true;

            try
            {
                JobItems.Clear();
                var items = await DataStoreJobs.GetItemsAsync(false);

                foreach (var item in items)
                {
                    JobItems.Add(item);
                }
            }
            catch (Exception ex)
            {
                // Debug.WriteLine(ex);
            }
            finally
            {
                IsBusy = false;
            }
        }
Ejemplo n.º 2
0
        async Task ExecuteLoadItemsCommand()
        {
            IsBusy = true;

            try
            {
                JobItems.Clear();
                var items = await App.JobsDataStore.FetchItems(CurrentSearchItem);

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