Beispiel #1
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            l.username  = txtUserName.Text.Trim();
            l.password  = txtPassword.Text.Trim();
            l.user_type = cmbUsertype.Text.Trim();

            bool issuccess = dal.loginCheck(l);

            if (issuccess == true)
            {
                Mymessage msg = new Mymessage("Logged In Successfull!");
                msg.Show();
                loggedInUser = txtUserName.Text;
                if (cmbUsertype.Text.Trim() == "admin")
                {
                    AdminDashboard adminDashboard = new AdminDashboard();
                    adminDashboard.Show();
                }
                else
                {
                    UserDashboard userDashboard = new UserDashboard();
                    userDashboard.Show();
                }
            }
            else
            {
                Mymessage mymessage = new Mymessage("Login Failed");
                mymessage.Show();
            }
        }
Beispiel #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            AdminDashboard adminDashboard = new AdminDashboard();

            adminDashboard.Show();
        }