Exemple #1
0
        private void btn_login_Click(object sender, EventArgs e)
        {
            User_db udb = new User_db();

            if (rbtn_admin.Checked)
            {
                udb.Usertype = "Admin";
            }
            else if (rbtn_user.Checked)
            {
                udb.Usertype = "Teacher";
            }
            udb.Username = txtbox_username.Text;
            udb.Password = txtbox_password.Text;

/*
 *
 *          if (udb.Username == txtbox_username.Text)
 *          {
 *              if (udb.Password == txtbox_password.Text)
 *              {
 *
 *              }
 *          }
 */
            if (udb.Authenticated(udb))
            {
                if (rbtn_admin.Checked)
                {
                    mainpage ud = new mainpage();
                    ud.Show();
                }
                else if (rbtn_user.Checked)
                {
                    userdisplay hform = new userdisplay();
                    hform.Show();
                }
            }
            else
            {
                MessageBox.Show("Something has gone wrong,please fill the entries again!!");
            }
        }
Exemple #2
0
        private void displayTeachersToolStripMenuItem_Click(object sender, EventArgs e)
        {
            userdisplay ud = new userdisplay();

            ud.Show();
        }