private void btnAdd_Click(object sender, RoutedEventArgs e) { WindowAddUsl window = new WindowAddUsl(); var result = window.ShowDialog(); if (result ?? false) { updateListData(); } }
private void btnUpd_Click(object sender, RoutedEventArgs e) { if (SelectedUsl == null) { return; } WindowAddUsl window = new WindowAddUsl(SelectedUsl.Id); var result = window.ShowDialog(); if (result ?? false) { context.Entry <Услуга>(SelectedUsl).Reload(); updateListData(); } }