Ejemplo n.º 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();
                }
            }
        }
Ejemplo n.º 2
0
        private void UserButton_Click(object sender, EventArgs e)
        {
            NormalUserMainForm objNormalUserMainForm = new NormalUserMainForm();

            objNormalUserMainForm.ShowDialog();
        }