// Зберігаємо змінений логін private void SaveLoginButton_Click(object sender, RoutedEventArgs e) { if (AdminLogin.Text != "") { if (AdminLogin.Text != login) { login = AdminLogin.Text; string answer = client.EditAdminLogin(login); if (answer == "succesfully") { ChangeLoginButton.IsEnabled = true; AdminLogin.IsEnabled = false; SaveLoginButton.Visibility = Visibility.Hidden; } else if (answer == "Exist admin with this login") { MessageBox.Show(answer); } else { MessageBox.Show("Error! Something wrong!"); } } else { MessageBox.Show("Error! You must enter another login!"); } } else { MessageBox.Show("Error! Enter login!"); } }