private void AddDebtorButtonPressedCommandHandler()
        {
            Debtor debtorUnderCreation = new Debtor();

            AddDebtorWindow          addDebtorWindow          = new AddDebtorWindow();
            AddDebtorWindowViewModel addDebtorWindowViewModel = new AddDebtorWindowViewModel(ref debtorUnderCreation, ref addDebtorWindow);

            addDebtorWindow.DataContext = addDebtorWindowViewModel;
            addDebtorWindow.Owner       = Application.Current.MainWindow;

            if (addDebtorWindow.ShowDialog() == true)
            {
                debtors.Add(debtorUnderCreation);
            }
        }
Example #2
0
 public AddDebtorWindowViewModel(ref Debtor debtorToCreate, ref AddDebtorWindow window)
 {
     DebtorToCreate = debtorToCreate;
     _window        = window;
 }