private void MemberB_Click(object sender, EventArgs e) { login.ShowDialog(); if (successfullogin) { continueasadmin caa = new continueasadmin(); Hide(); logged.ShowDialog(); } }
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!"); } }