Exemple #1
0
        public byte[] GetConfirm(string pTradingSysCode, string pTradingSysKey, string pTemplateName, out string pDocType)
        {
            byte[] resultDoc      = null;
            string getDocumentUrl = baseUrlStr + @"/" + GET_DOCUMENT_URL_EXT;

            GetDocumentClient client = new GetDocumentClient(GET_DOCUMENT_ENDPOINT, getDocumentUrl);

            client.ClientCredentials.UserName.UserName = svcUserName;
            client.ClientCredentials.UserName.Password = svcPassword;

            GetConfirmationRequest  request  = new GetConfirmationRequest();
            GetConfirmationResponse response = new GetConfirmationResponse();

            request.tradingSystemCode = pTradingSysCode;
            request.tradingSystemKey  = pTradingSysKey;
            request.templateName      = pTemplateName;
            response = client.getConfirmation(request);

            pDocType  = response.objectFormatInd.ToString();
            resultDoc = response.objectStream;

            return(resultDoc);
        }
        public byte[] GetConfirm(string pTradingSysCode, string pTradingSysKey, string pTemplateName, out string pDocType)
        {
            byte[] resultDoc = null;
            string getDocumentUrl = baseUrlStr + @"/" + GET_DOCUMENT_URL_EXT;

            GetDocumentClient client = new GetDocumentClient(GET_DOCUMENT_ENDPOINT, getDocumentUrl);
            client.ClientCredentials.UserName.UserName = svcUserName;
            client.ClientCredentials.UserName.Password = svcPassword;

            GetConfirmationRequest request = new GetConfirmationRequest();
            GetConfirmationResponse response = new GetConfirmationResponse();

            request.tradingSystemCode = pTradingSysCode;
            request.tradingSystemKey = pTradingSysKey;
            request.templateName = pTemplateName;
            response = client.getConfirmation(request);
            
            pDocType = response.objectFormatInd.ToString();
            resultDoc = response.objectStream;

            return resultDoc;
        }