Beispiel #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            UpdateDBLin ul = new UpdateDBLin();
            string      pass;

            if (check == 0)
            {
                pass = ul.getPassword(ui.UName);
                if (textBox1.Text == pass && textBox2.Text == textBox3.Text)
                {
                    ul.UpdateUP(ui.UName, textBox2.Text);

                    MessageBox.Show("Successfull");
                    obj.Show();
                    this.Close();
                }
                else
                {
                    MessageBox.Show("Password didn't match");
                }
            }
            else
            {
                pass = ul.getAdminPass(ai.UName);
                if (textBox1.Text == pass && textBox2.Text == textBox3.Text)
                {
                    ul.UpdateAP(ai.UName, textBox2.Text);
                    MessageBox.Show("Successfull");
                    obj.Show();
                    this.Close();
                }
                else
                {
                    MessageBox.Show("Password didn't match");
                }
            }
        }