private void Button_Edit_click(object sender, RoutedEventArgs e) { if (listview_form.SelectedItem is User user) { idClient = user.idUser; WindowEditClient windowEditClient = new WindowEditClient(); windowEditClient.ShowDialog(); listview_form.ItemsSource = context.User.ToList();//обновляем listview } else { MessageBox.Show("Выберите клиента для редактирования !", "Уведомление", MessageBoxButton.OK, MessageBoxImage.Warning); } }
private void Button_Click_2(object sender, RoutedEventArgs e) { if (lvClient.SelectedItem is User User) { DataFrame.idClient = User.IdUser; WindowEditClient windoweditclient = new WindowEditClient(); windoweditclient.ShowDialog(); Filter(); } else { MessageBox.Show("Выбери шо нибудь пж", "Notification", MessageBoxButton.OK, MessageBoxImage.Warning); } lvClient.ItemsSource = context.User.ToList(); }