예제 #1
0
 public void AccessControl()
 {
     if (objDBAccess.AuthenticateUser(strUsrName, strPswd) == "Emp")
     {
         shipToolStripMenuItem.Enabled   = false;
         reportToolStripMenuItem.Enabled = false;
     }
 }
예제 #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;
            }
        }