private void btnAdd_Click(object sender, RoutedEventArgs e) { WindowAddBen window = new WindowAddBen(); var result = window.ShowDialog(); if (result ?? false) { updateListData(); } }
private void btnUpd_Click(object sender, RoutedEventArgs e) { if (SelectedBen == null) { return; } WindowAddBen window = new WindowAddBen(SelectedBen.Id); var result = window.ShowDialog(); if (result ?? false) { context.Entry <Льгота>(SelectedBen).Reload(); updateListData(); } }