Exemplo n.º 1
0
 public void checkAdmin()
 {
     if (user.getAdmin() == false)
     {
         buttonEditUser.Visible = false;
         bool asdas = buttonEditUser.Visible;
     }
 }
Exemplo n.º 2
0
        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();
            }
        }