private void newAccount_Click(object sender, RoutedEventArgs e) { tempAccount.Name = accountNameTb.Text; tempAccount.Id = "A" + getDateTag(); newAccount(tempAccount); tempAccount = new Core.Account(); }
private void accountListLv_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (accountListLv.SelectedItem != null) { activeAccount = accountListLv.SelectedItem as Core.Account; transLv.ItemsSource = new ObservableCollection <Core.Transaction>(activeAccount.TransactionsAList); } }
public void newAccount(Core.Account account) { database.Account.Add(account); database.SaveChanges(); accountListLv.ItemsSource = database.Account.ToList(); }