private void btnAdd_Click(object sender, RoutedEventArgs e) { WindowAddInhabit window = new WindowAddInhabit(); var result = window.ShowDialog(); if (result ?? false) { updateListData(); } }
private void btnUpd_Click(object sender, RoutedEventArgs e) { if (SelectedInhabit == null) { return; } WindowAddInhabit window = new WindowAddInhabit(SelectedInhabit.Id); var result = window.ShowDialog(); if (result ?? false) { context.Entry <Жилец>(SelectedInhabit).Reload(); updateListData(); } }