Ejemplo n.º 1
0
        private void dashBtn_Click(object sender, EventArgs e)
        {
            UserDashboard userDashboard = new UserDashboard(userid);

            userDashboard.Show();
            this.Hide();
        }
Ejemplo n.º 2
0
        private void loginBtn_Click(object sender, EventArgs e)
        {
            string    userId    = userIdBox.Text;
            string    password  = passTextBox.Text;
            UserLogin userLogin = new UserLogin();
            int       flag      = userLogin.getLoginInfo(userId, password);

            if (flag == 1)
            {
                UserDashboard dashboard = new UserDashboard(userId);
                dashboard.Show();
                this.Hide();
            }
            else if (flag == 2)
            {
                AdminDashboard adminDashboard = new AdminDashboard(userid);
                adminDashboard.Show();
                this.Hide();
            }
            else
            {
                MessageBox.Show("Invalid ID or Password");
            }
        }