public void checkAdmin() { if (user.getAdmin() == false) { buttonEditUser.Visible = false; bool asdas = buttonEditUser.Visible; } }
private void button1_Click(object sender, EventArgs e) { Users2 user = new Users2(); if (user.Login(LoginBox.Text, PasswordBox.Text)) { Messeger newFormMessenger = new Messeger(); newFormMessenger.setUser(user.getLogin(), user.getPassword(), user.getAdmin()); newFormMessenger.checkAdmin(); this.Hide(); newFormMessenger.Show(); } }