private void btnAdd_Click(object sender, RoutedEventArgs e) { WindowAddFlat window = new WindowAddFlat(); var result = window.ShowDialog(); if (result ?? false) { updateListData(); } }
private void btnUpd_Click(object sender, RoutedEventArgs e) { if (SelectedFlat == null) { return; } WindowAddFlat window = new WindowAddFlat(SelectedFlat.Id); var result = window.ShowDialog(); if (result ?? false) { context.Entry <Квартира>(SelectedFlat).Reload(); updateListData(); } }