private void button1_Click(object sender, EventArgs e) { if (comboBox1.Text == "admin" && textBox2.Text == "hjkl") { globalVars.permissions.Add("*"); violation = false; this.Close(); } else { string cmd = String.Format("SELECT Benutzer.ID, Benutzer.Benutzername, Benutzer.Passwort, Benutzer.Berechtigungen FROM Benutzer WHERE(((Benutzer.Benutzername) = '{0}'));", comboBox1.Text); List <List <string> > lst = DBConnection.getUser(cmd); string pw = Verschlüsselung.Base64Decode(lst[0][2]); try { if (pw == textBox2.Text) { listPermissions(lst); } else { MessageBox.Show("Passwort falsch!"); textBox2.Text = ""; } } catch (Exception ex) { MessageBox.Show("Benutzer existiert nicht!"); comboBox1.Text = ""; textBox2.Text = ""; MessageBox.Show(ex.Message); } } }
private void button1_Click(object sender, EventArgs e) { globalVars.tmpPW = Verschlüsselung.Base64Encode(textBox2.Text); this.Close(); }