Esempio n. 1
0
 private void Register_Click(object sender, EventArgs e)
 {
     register.ShowDialog();
     if (userlvl == 1)
     {
         Hide();
         logged.ShowDialog();
     }
 }
Esempio n. 2
0
        private void Loginbutton_Click(object sender, EventArgs e)
        {
            string mail     = usernbox.Text;
            string password = passbox.Text;

            if (usermethods.validation(mail, password))
            {
                openingwindow.loggeduserid    = usermethods.getUser(mail);
                openingwindow.successfullogin = true;
                continueasadmin con = new continueasadmin();
                if (usermethods.isadmin(mail))
                {
                    con.ShowDialog();
                }
                logged logged = new logged();
                logged.ShowDialog();
                Close();
            }
            else
            {
                MessageBox.Show("Mail or password is incorrect!");
            }
        }