Пример #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (blc.SearchUser(textBox1.Text) == false)
                MessageBox.Show("The username doesn't exists", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            else
            {

                string pass=blc.ReturnPassword(textBox1.Text);

                if (blc.DecryptPassword(pass) == textBox2.Text)
                {

                    Program.LOG.Usr = textBox1.Text;
                    Program.LOG.ID = blc.ReturnIdU(textBox1.Text);

                    ClassRoom frm = new ClassRoom();
                    frm.Show();

                }

                else
                    MessageBox.Show("Password doesn't match!", "Not Found", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
        }
Пример #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     Program.LOG.ID = 0;
     ClassRoom c = new ClassRoom();
     c.Show();
 }