private void Button1_Click(object sender, EventArgs e) { string email = login.Text; string heslo = pass.Text; if (SpravceServices.loginsuccessfull(email, heslo) && WindowManager.menu == null) { if (SpravceServices.loginsuccessfulladmin(email, heslo)) { WindowManager.admin = true; } else { WindowManager.admin = false; } WindowManager.menu = new Menu(); WindowManager.prihlaseni.Hide(); WindowManager.menu.Show(); } else { MessageBox.Show("Špatně zadané údaje"); } }
protected void Button1_Click(object sender, EventArgs e) { if (SpravceServices.changepassword(TextBox1.Text, TextBox2.Text, TextBox3.Text) == true) { Response.Redirect("~/Login.aspx"); } else { Response.Write("<script>alert('Chyba');</script>"); return; } }
protected void Button1_Click(object sender, EventArgs e) { Boolean test = SpravceServices.loginsuccessfull(TextBox1.Text, TextBox2.Text); if (test == true) { Response.Redirect("~/Players.aspx"); } else { Response.Write("<script>alert('Uživatel neexistuje');</script>"); return; } }