Пример #1
0
 private void pb_headerLogo_Click(object sender, EventArgs e)
 {
     if (currentUser.getRole == form_Login.getRoleManager)
     {
         pnl_Dashboard.Controls.Clear();
         ManagerForm mf = new ManagerForm(currentUser);
         mf.TopLevel = false;
         pnl_Dashboard.Controls.Add(mf);
         mf.Show();
     }
     else
     {
     }
 }
Пример #2
0
        //Initialisation Constructor that recieves the user data from the login
        public Dashboard(User currentUser, Role role)
        {
            InitializeComponent();
            this.currentUser = currentUser;

            if (currentUser.getRole == form_Login.getRoleManager)
            {
                pnl_Dashboard.Controls.Clear();
                ManagerForm mf = new ManagerForm(currentUser);
                mf.TopLevel = false;
                pnl_Dashboard.Controls.Add(mf);
                mf.Show();
            }
            else
            {
            }
        }