Exemple #1
0
        public FormUserInterface(string UserID)
        {
            InitializeComponent();
            connection  = new Connect2DB();
            this.UserID = UserID;
            string userRole = connection.getUserRole(UserID);

            if (userRole == "admin")
            {
                SwitchToAdmin.Visible = true;
                SwitchToAdmin.Enabled = true;
            }
            else
            {
                SwitchToAdmin.Visible = false;
                SwitchToAdmin.Enabled = false;
            }
        }