Esempio n. 1
0
 public void AccessControl()
 {
     if (objDBAccess.AuthenticateUser(strUsrName, strPswd) == "Emp")
     {
         shipToolStripMenuItem.Enabled   = false;
         reportToolStripMenuItem.Enabled = false;
     }
 }
Esempio n. 2
0
        private void Authenticate()
        {
            String strRole = dbLayer.AuthenticateUser(txtUserName.Text, txtPassword.Text);

            if (strRole == null)
            {
                MessageBox.Show("Invalid Username/Password. Try Again!");
            }
            else
            {
                frmShipMain objMainScreen = new frmShipMain(txtUserName.Text, strRole);
                objMainScreen.AccessControl();
                objMainScreen.Show();
                this.Visible = false;
            }
        }