private void buttonBack_Click(object sender, EventArgs e) { if (CheckUserType() == "admin") { changer.ShowAdminMain(); } else if (CheckUserType() == "user") { changer.ShowUserView(); } }
private void buttonLogin_Click(object sender, EventArgs e) { errorProvider.Clear(); if (SendLogin(Login, Password) == "admin") { changer.ShowAdminMain(); } else if (SendLogin(Login, Password) == "user") { changer.ShowUserView(); } else { textBoxLogin.Clear(); textBoxPassword.Clear(); errorProvider.SetError(textBoxPassword, "Błędna nazwa użytkownika lub hasło"); } }
private void buttonBack_Click(object sender, EventArgs e) { changer.ShowAdminMain(); }