當前位置: 首頁>>代碼示例>>C#>>正文


C# VistaQuery.addEncryptedParameter方法代碼示例

本文整理匯總了C#中gov.va.medora.mdo.dao.vista.VistaQuery.addEncryptedParameter方法的典型用法代碼示例。如果您正苦於以下問題:C# VistaQuery.addEncryptedParameter方法的具體用法?C# VistaQuery.addEncryptedParameter怎麽用?C# VistaQuery.addEncryptedParameter使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在gov.va.medora.mdo.dao.vista.VistaQuery的用法示例。


在下文中一共展示了VistaQuery.addEncryptedParameter方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: buildRpcRequest

        public MdoQuery buildRpcRequest(string rpcName, string[] paramValues, int[] paramTypes, bool[] paramEncrypted)
        {
            if (String.IsNullOrEmpty(rpcName))
            {
                throw new MdoException(MdoExceptionCode.ARGUMENT_INVALID, "rpcName must be specified");

            }
            if (paramValues.Length != paramTypes.Length || paramValues.Length != paramEncrypted.Length)
            {
                throw new MdoException(MdoExceptionCode.ARGUMENT_INVALID, "paramValues, paramTypes and paramEncrpted must be the same size");
            }

            VistaQuery vq = new VistaQuery(rpcName);
            for (int n = 0; n < paramValues.Length; n++)
            {
                if (paramEncrypted[n])
                    vq.addEncryptedParameter(paramTypes[n], paramValues[n]);
                else
                    vq.addParameter(paramTypes[n], paramValues[n]);
            }
            return vq;
        }
開發者ID:OSEHRA,項目名稱:mdo,代碼行數:22,代碼來源:VistaToolsDao.cs

示例2: buildSendOrderByPolicyRequest

 internal MdoQuery buildSendOrderByPolicyRequest(string dfn, string locIen, string esig, Order order)
 {
     VistaQuery vq = new VistaQuery("ORWDX SEND");
     vq.addParameter(vq.LITERAL, dfn);
     vq.addParameter(vq.LITERAL, "0");
     vq.addParameter(vq.LITERAL, locIen);
     vq.addEncryptedParameter(vq.LITERAL, ' ' + esig);	//' ' apparently needed to avoid a bug in Vista?  See CPRS.
     DictionaryHashList lst = new DictionaryHashList();
     String value = order.Id + '^' +
         VistaConstants.SS_ESIGNED + '^' +
         VistaConstants.RS_RELEASE + '^' +
         VistaConstants.NO_POLICY;
     lst.Add("1", value);
     vq.addParameter(vq.LIST, lst);
     return vq;
 }
開發者ID:OSEHRA,項目名稱:mdo,代碼行數:16,代碼來源:VistaOrdersDao.cs

示例3: sendOrder

        internal void sendOrder(String locIen, String esig, Order order)
        {
            VistaQuery vq = new VistaQuery("ORWDX SEND");
            vq.addParameter(vq.LITERAL, cxn.Pid);
            vq.addParameter(vq.LITERAL, "0");
            vq.addParameter(vq.LITERAL, locIen);
            vq.addEncryptedParameter(vq.LITERAL, ' ' + esig);	//' ' apparently needed to avoid a bug in Vista?  See CPRS.
            DictionaryHashList lst = new DictionaryHashList();
            string value = order.Id + '^' +
                VistaConstants.SS_ESIGNED + '^' +
                VistaConstants.RS_RELEASE + '^' +
                VistaConstants.NO_POLICY;
            lst.Add("1", value);
            vq.addParameter(vq.LIST, lst);
            string rtn = (string)cxn.query(vq);
            string[] flds = StringUtils.split(rtn, StringUtils.CARET);
            flds[1] = flds[1].TrimEnd(null);
            if (flds[1] == "RS")
            {
                order.Status = "Released";
            }
            else
            {
                order.Status = "Error: " + flds[3];
                throw new MdoException(MdoExceptionCode.ARGUMENT_INVALID, "Error: This order has been signed!");

            }
        }
開發者ID:OSEHRA,項目名稱:mdo,代碼行數:28,代碼來源:VistaOrdersDao.cs

示例4: login

        internal string login(AbstractCredentials credentials)
        {
            if (String.IsNullOrEmpty(credentials.AccountName))
            {
                throw new MdoException(MdoExceptionCode.ARGUMENT_NULL, "Missing Access Code");
            }
            if (String.IsNullOrEmpty(credentials.AccountPassword))
            {
                throw new MdoException(MdoExceptionCode.ARGUMENT_NULL, "Missing Verify Code");
            }

            VistaQuery vq = new VistaQuery("XUS SIGNON SETUP");
            string rtn = (string)Cxn.query(vq);
            if (rtn == null)
            {
                throw new UnexpectedDataException("Unable to setup authentication");
            }

            vq = new VistaQuery("XUS AV CODE");

            // This is here so we can test with MockConnection
            if (Cxn.GetType().Name != "MockConnection")
            {
                vq.addEncryptedParameter(vq.LITERAL, credentials.AccountName + ';' + credentials.AccountPassword);
            }
            else
            {
                vq.addParameter(vq.LITERAL, credentials.AccountName + ';' + credentials.AccountPassword);
            }
            rtn = (string)Cxn.query(vq);

            //TODO - need to catch renew verify id error

            string[] flds = StringUtils.split(rtn, StringUtils.CRLF);
            if (flds[0] == "0")
            {
                throw new UnauthorizedAccessException(flds[3]);
            }
            AccountId = flds[0];

            // Set the connection's UID
            Cxn.Uid = AccountId;

            // Save the credentials
            credentials.LocalUid = AccountId;
            credentials.AuthenticationSource = Cxn.DataSource;
            credentials.AuthenticationToken = Cxn.DataSource.SiteId.Id + '_' + AccountId;

            IsAuthenticated = true;
            Cxn.IsRemote = false;

            // Set the greeting if there is one
            if (flds.Length > 7)
            {
                return flds[7];
            }
            return "OK";
        }
開發者ID:kunalkot,項目名稱:mdo,代碼行數:58,代碼來源:VistaAccount.cs

示例5: buildSetContextRequest

 internal MdoQuery buildSetContextRequest(string context)
 {
     VistaQuery vq = new VistaQuery("XWB CREATE CONTEXT");
     if (Cxn.GetType().Name != "MockConnection")
     {
         vq.addEncryptedParameter(vq.LITERAL, context);
     }
     else
     {
         vq.addParameter(vq.LITERAL, context);
     }
     return vq;
 }
開發者ID:kunalkot,項目名稱:mdo,代碼行數:13,代碼來源:VistaAccount.cs

示例6: buildSetContextRequest

 //-----------------------------------------------------------------------------------------
 internal MdoQuery buildSetContextRequest(string context)
 {
     VistaQuery vq = new VistaQuery("XWB CREATE CONTEXT");
     vq.addEncryptedParameter(vq.LITERAL, context);
     return vq;
 }
開發者ID:OSEHRA,項目名稱:mdo,代碼行數:7,代碼來源:VistaUserDao.cs

示例7: buildIsValidEsigRequest

        //DP 5/23/2011  Added guard clause to  this query builder methos so it will not save a (one time valid)
        //encrypted string in the mock connection file.
        internal MdoQuery buildIsValidEsigRequest(string esig)
        {
            VistaQuery vq = new VistaQuery("ORWU VALIDSIG");

            if (cxn.GetType().Name != "MockConnection")
            {
                vq.addEncryptedParameter(vq.LITERAL, esig);
            }
            else
            {
                vq.addParameter(vq.LITERAL, esig);
            }
            //vq.addParameter(vq.LITERAL, esig);

            return vq;
        }
開發者ID:OSEHRA,項目名稱:mdo,代碼行數:18,代碼來源:VistaUserDao.cs


注:本文中的gov.va.medora.mdo.dao.vista.VistaQuery.addEncryptedParameter方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。