isAuth() public method

public isAuth ( String cashieruser, String cashierpass ) : bool
cashieruser String
cashierpass String
return bool
Example #1
0
        private void KeyEnterLogin()
        {
            User u = new User(txtBoxCashierUser.Text);

            //try
            // {
            if (u.isAuth(txtBoxCashierUser.Text.Trim(), txtBoxPass.Text.Trim()))
            {
                currentUser = u;
                this.Hide();
                frmMain fm = new frmMain();
                if (u.isAdmin())
                {
                    fm.isnotAdmin();
                }
                fm.Show();
            }
            else
            {
                result = MessageBox.Show("Username and Password Incorrect or Not Completed", "Login Error", btn, MessageBoxIcon.Error);
            }
            //}
            //catch (Exception)
            //{
            //  result = MessageBox.Show(loginpop, caption, btn, icon);
            // }
        }
Example #2
0
        private void KeyEnterLogin()
        {
            User u = new User();

            //u.isAdmin();
            //u.isAdministrator();
            u.getCashierIDfromDB();
            try
            {
                if (u.isAuth(txtBoxCashierUser.Text, txtBoxPass.Text))
                {
                    this.Hide();
                    frmMain fm = new frmMain();
                    fm.Show();
                }
                else
                {
                    result = MessageBox.Show("Username and Password Incorrect or Not Completed", "Login Error", btn, MessageBoxIcon.Error);
                }
                //clearText();
            }
            catch (Exception)
            {
                result = MessageBox.Show(loginpop, caption, btn, icon);
            }
        }
Example #3
0
 private void KeyEnterLogin()
 {
     User u = new User();
     //u.isAdmin();
     //u.isAdministrator();
     u.getCashierIDfromDB();
     try
     {
         if (u.isAuth(txtBoxCashierUser.Text, txtBoxPass.Text))
         {
             this.Hide();
             frmMain fm = new frmMain();
             fm.Show();
         }
         else
             result = MessageBox.Show("Username and Password Incorrect or Not Completed", "Login Error", btn, MessageBoxIcon.Error);
             //clearText();
     }
     catch (Exception)
     {
         result = MessageBox.Show(loginpop, caption, btn, icon);
     }
 }
Example #4
0
 private void KeyEnterLogin()
 {
     User u = new User(txtBoxCashierUser.Text);
     //try
        // {
         if (u.isAuth(txtBoxCashierUser.Text.Trim(), txtBoxPass.Text.Trim()))
         {
             currentUser = u;
             this.Hide();
             frmMain fm = new frmMain();
             if (u.isAdmin())
             {
                 fm.isnotAdmin();
             }
             fm.Show();
         }
         else
             result = MessageBox.Show("Username and Password Incorrect or Not Completed", "Login Error", btn, MessageBoxIcon.Error);
     //}
     //catch (Exception)
     //{
       //  result = MessageBox.Show(loginpop, caption, btn, icon);
        // }
 }