Esempio n. 1
0
        private void Log_In_Click(object sender, RoutedEventArgs e)
        {
            if (username_text.Text.Equals("") || Password_text.Text.Equals(""))
            {
                MessageBox.Show("Please Enter User name and Password");
            }
            else
            {
                if (c.login(username_text.Text, Password_text.Text))
                {
                    c.teacher = c.m.teacher;
                    Menu0 main = new Menu0(username_text.Text.ToString(), c);
                    main.Show();
                    this.Close();
                }
                else
                {
                    MessageBox.Show("wrong password or username");
                }

            }
        }
Esempio n. 2
0
 private void Exit_Click(object sender, RoutedEventArgs e)
 {
     Menu0 main = new Menu0(teacherLogin, c);
     main.Show();
     this.Close();
 }