gov.va.medora.mdo.dao.vista.VistaUserDao.validateLocalAccount C# (CSharp) Method

validateLocalAccount() public method

public validateLocalAccount ( string duz ) : void
duz string
return void
        public void validateLocalAccount(string duz)
        {
            string arg = "$G(^VA(200," + duz + ",0))";
            string response = VistaUtils.getVariableValue(cxn, arg);
            if (response == "")
            {
                throw new UnauthorizedAccessException("No such user");
            }
            string[] flds = StringUtils.split(response, StringUtils.CARET);
            if (flds.Length < 2 || flds[2] == "")
            {
                throw new UnauthorizedAccessException("User has no access code at this site");
            }
            if (flds.Length > 6 && flds[6] != "")
            {
                throw new UnauthorizedAccessException("Account has been disusered");
            }
            if (flds.Length > 10 && flds[10] != "")
            {
                throw new UnauthorizedAccessException("Account has been deactivated");
            }
        }
VistaUserDao