Ejemplo n.º 1
0
 //Login Button Clicked
 private void loginButton_Click(object sender, EventArgs e)
 {
     id       = txtUsername.Text;
     password = txtPassword.Text;
     if (id[2].Equals('-'))
     {
         if (manager.authUser(id, password) == true)
         {
             AlumniDashboard alumniDashboard = new AlumniDashboard();
             alumniDashboard.Show();
             this.Hide();
         }
         else
         {
             warning.Visible = true;
         }
     }
     else
     {
         if (manager.authAdmin(id, password) == true)
         {
             AdminDasboard adminDashboard = new AdminDasboard();
             adminDashboard.Show();
             this.Hide();
         }
         else
         {
             warning.Visible = true;
         }
     }
 }
        //Dashboard Icon clicked
        private void pictureBox2_Click(object sender, EventArgs e)
        {
            AdminDasboard dashboard = new AdminDasboard();

            dashboard.Show();
            this.Hide();
        }