Exemple #1
0
        private void Returnbtn_Click(object sender, EventArgs e)
        {
            ViewForAdmin viewForAdmin = new ViewForAdmin(UserId);

            viewForAdmin.Show();
            this.Hide();
        }
Exemple #2
0
 public void TryCreateSession()
 {
     userSession = LoginController.CreateSession(userIdBox.Text, passwordBox.Text);
     if (userSession == null)
     {
         MessageBox.Show("Fel användarnamn eller lösenord!!");
     }
     else if (userSession.AdminSession == true)
     {
         ViewForAdmin adminView = new ViewForAdmin(userIdBox.Text);
         this.Hide();
         adminView.Show();
     }
     else if (userSession.AdminSession == false)
     {
         AlumnView alumni = new AlumnView(userSession, userIdBox.Text);
         this.Hide();
         alumni.Show();
     }
 }