Exemplo n.º 1
0
        private void PopulateAccounts()
        {
            IEnumerable <Account>?accounts = dataService.Accounts();

            foreach (var account in accounts)
            {
                viewModel.Accounts.Add(account);
            }
        }
Exemplo n.º 2
0
        private void PopulateAccountsList()
        {
            IEnumerable <Account>?accounts = dataService.Accounts();

            foreach (var account in accounts)
            {
                viewModel.AddItem(account);
            }

            if (viewModel.ItemList.Any())
            {
                viewModel.SelectedItem = viewModel.ItemList.FirstOrDefault();
            }
        }