Beispiel #1
0
        private void OnAddNewLoanAccount(object sender, ExecutedRoutedEventArgs e)
        {
            Account a = new Account();

            a.Type = AccountType.Loan;
            Walkabout.Dialogs.LoanDialog dialog = new Dialogs.LoanDialog(this.MyMoney, a);
            dialog.Owner = App.Current.MainWindow;

            if (dialog.ShowDialog() == true)
            {
                this.MyMoney.Accounts.AddAccount(a);

                //
                // Now select the newly create account
                //
                this.listBox1.SelectedItem = a;
            }
        }
Beispiel #2
0
 void EditDetails(Account a)
 {
     if (a.Type == AccountType.Loan)
     {
         Walkabout.Dialogs.LoanDialog dialog = new Dialogs.LoanDialog(myMoney, a);
         dialog.Owner = App.Current.MainWindow;
         if (dialog.ShowDialog() == true)
         {
             myMoney.Rebalance(a);
         }
     }
     else
     {
         Walkabout.Dialogs.AccountDialog dialog = new Dialogs.AccountDialog(myMoney, a, this.Site);
         dialog.Owner = App.Current.MainWindow;
         if (dialog.ShowDialog() == true)
         {
             myMoney.Rebalance(a);
         }
     }
 }