Example #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            IUserController objUserControllerImpl = new UserControllerImpl();
            UserLoginDTO    objUserLoginDTO       = objUserControllerImpl.validateUserLogin(textBox1.Text, textBox2.Text);

            if (objUserLoginDTO == null)
            {
                MessageBox.Show("Invalid Username or Password");
            }
            else
            {
                if (objUserLoginDTO.UserLevel == 1)
                {
                    NormalUserMainForm objNormalUserMainForm = new NormalUserMainForm();
                    objNormalUserMainForm.ShowDialog();
                }
                else if (objUserLoginDTO.UserLevel == 2)
                {
                    // send to stuitable page....
                }
                else if (objUserLoginDTO.UserLevel == 3)
                {
                    // send to stuitable page....
                    //MessageBox.Show("You are a guest user, you don't have access to this system yet");
                    AdminUserMainForm objAdminUserMainForm = new AdminUserMainForm();
                    objAdminUserMainForm.ShowDialog();
                }
            }
        }
Example #2
0
        private void AdminButton_Click(object sender, EventArgs e)
        {
            AdminUserMainForm objAdminUserMainForm = new AdminUserMainForm();

            objAdminUserMainForm.ShowDialog();
        }