示例#1
0
        public async Task GetRegistrationsInternalAsync()
        {
            IsLoading = true;
            try
            {
                Registrations.Clear();
                var reg = await _notificationsFacade.GetRegistrationsAsync();

                reg.ForEach(x => Registrations.Add(new RegistrationViewModel(x)));

                if (reg.Count == 0)
                {
                    MessageBox.Show("No items found.", "No Items");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show($"An Error Occured. {ex.Message}", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
            }
            finally
            {
                IsLoading = false;
            }
        }