private void ChangePass_Click(object sender, RoutedEventArgs e) { ChangeUserDialogView changeUserDialogView = new ChangeUserDialogView(EntityController.LoadByLogin("Admin")); changeUserDialogView.Show(); RefreshGrid(); }
private void GridUsers_MouseDoubleClick(object sender, MouseButtonEventArgs e) { if (GridUsers.SelectedItem != null) { ChangeUserDialogView dialog = new ChangeUserDialogView((User)GridUsers.SelectedItem); dialog.ShowDialog(); RefreshGrid(); } }
private void Find_Click(object sender, RoutedEventArgs e) { if (string.IsNullOrEmpty(FindBox.Text) || string.IsNullOrWhiteSpace(FindBox.Text)) { return; } User u = EntityController.LoadByLogin(FindBox.Text); if (u != null) { ChangeUserDialogView dialog = new ChangeUserDialogView(u); dialog.ShowDialog(); RefreshGrid(); } else { MessageBox.Show("Пользователь не найден", "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error); } }