private void btRegisterUser_Click(object sender, EventArgs e) { try { ManipulationDB manipulationDB = new ManipulationDB(); int adm = 0; if (chbAdmin.Checked == true) { adm = 1; } else { adm = 0; } string query = "UPDATE Пользователь SET " + "Логин = '" + tbUser.Text + "', Пароль = '" + shifr_PBKDF2.Encrypt(Convert.ToString(tbPassword.Text), "204503") + "', Администрирование = '" + adm + "'" + " WHERE ИД ="; manipulationDB.Update(query); this.Close(); } catch (Exception ex) { MessageBox.Show(ex.Message, "Ошибка"); } }