private void button1_Click(object sender, RoutedEventArgs e) { Logi.Content = ""; Name.Content = ""; upremov.A(); Logi.Content = "Логин: " + db.Login; Name.Content = "ФИО: " + db.Name; }
private void button_Click_1(object sender, RoutedEventArgs e) { db a = new db(); UpdatePass up = new UpdatePass { Password = pass1.Password, NewPassword = pass2.Password }; a.A(); string login = db.Login; SaltedHash password = new SaltedHash(up.Password); string salt = password.Salt; string hash = password.Hash; if (Validate.Valid(up)) { if (a.Sign_in(login, up.Password)) { a.UpdatePass(salt, hash); MessageBox.Show("Пароль изменен"); this.Close(); } else { MessageBox.Show("Вы ввели неверный пароль!"); pass1.Password = ""; pass2.Password = ""; } } }
private void button_Click(object sender, RoutedEventArgs e) { db re = new db(); RemovePass remove = new RemovePass { Password = passwordBox1.Password }; if (Validate.Valid(remove)) { if (re.Sign_in(db.Login, remove.Password)) { re.A(); re.RemoveTicket(); re.RemovePass(); db.Login = ""; db.Name = ""; MessageBox.Show("Аккаунт удален"); Page1 start = new Page1(); NavigationService.Navigate(start); } else { passwordBox1.Password = ""; } pass1.Content = "Неверные данные"; } }
private void button_Click(object sender, RoutedEventArgs e) { db upremov = new db(); UpdateName a = new UpdateName { FullName = textBox.Text }; if (Validate.Valid(a)) { upremov.A(); upremov.UpdateName(a.FullName); MessageBox.Show("ФИО изменено"); this.Close(); } }
private void button_Click(object sender, RoutedEventArgs e) { db a = new db(); UpdateLogin up = new UpdateLogin { Log = textBox.Text }; if (Validate.Valid(up)) { if (a.Vald(up.Log)) { a.A(); a.UpdateLog(up.Log); MessageBox.Show("Логин изменен!"); this.Close(); } else { MessageBox.Show("Пользователь с таким логином существует"); } } }