Пример #1
0
 public void LoadDebtOfPerson(Person person)
 {
     DataGridDebts.ItemsSource = database.GetDebtsOfPerson(person);
     if (DataGridDebts.Items.Count > 0)
     {
         DataGridDebts.SelectedItem = DataGridDebts.Items[0];
         AddDebtView.FillUpDebt(DataGridDebts.Items[0] as Debt);
     }
 }
Пример #2
0
        private void DataGridDebts_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (DataGridDebts.SelectedItem != null)
            {
                var debt = (DataGridDebts.SelectedItem as Debt);
                if (debt == null)
                {
                    return;
                }

                AddDebtView.FillUpDebt(debt);
            }
        }