Exemple #1
0
        public List <string> GetPermissionKeys(string pUserId, out bool pSuperUserFlag)
        {
            List <string> permKeyList = new List <string>();

            ConfirmationsManagerClient client = new ConfirmationsManagerClient(CONFIRMATIONS_MGR_ENDPOINT, urlStr);

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

            GetPermissionKeysRequest  request  = new GetPermissionKeysRequest();
            GetPermissionKeysResponse response = new GetPermissionKeysResponse();

            request.applicationName = APPLICATION_NAME;
            request.userId          = pUserId;

            response       = client.getPermissionKeys(request);
            pSuperUserFlag = response.superUserFlag;

            foreach (string permKey in response.permissionKeyCodes)
            {
                permKeyList.Add(permKey);
            }

            return(permKeyList);
        }
Exemple #2
0
        private GetConfirmationTemplatesResponse GetTemplates(string pTradingSysCode)
        {
            string confirmMgrUrl = baseUrlStr + @"/" + CONFIRMATIONS_MGR_URL_EXT;
            ConfirmationsManagerClient client = new ConfirmationsManagerClient(CONFIRMATIONS_MGR_ENDPOINT, confirmMgrUrl);

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

            GetConfirmationTemplatesRequest  request  = new GetConfirmationTemplatesRequest();
            GetConfirmationTemplatesResponse response = new GetConfirmationTemplatesResponse();

            request.tradingSystemCode = pTradingSysCode;
            response = client.getConfirmationTemplates(request);
            //throw new Exception(); //for test bad scenario
            return(response);
        }
        public List<string> GetPermissionKeys(string pUserId, out bool pSuperUserFlag)
        {
            List<string> permKeyList = new List<string>();

            ConfirmationsManagerClient client = new ConfirmationsManagerClient(CONFIRMATIONS_MGR_ENDPOINT, urlStr);
            client.ClientCredentials.UserName.UserName = svcUserName;
            client.ClientCredentials.UserName.Password = svcPassword;

            GetPermissionKeysRequest request = new GetPermissionKeysRequest();
            GetPermissionKeysResponse response = new GetPermissionKeysResponse();
            request.applicationName = APPLICATION_NAME;
            request.userId = pUserId;

            response = client.getPermissionKeys(request);
            pSuperUserFlag = response.superUserFlag;
            
            foreach(string permKey in response.permissionKeyCodes){
                permKeyList.Add(permKey);
            }

            return permKeyList;
        }
        private GetConfirmationTemplatesResponse GetTemplates(string pTradingSysCode)
        {
            string confirmMgrUrl = baseUrlStr + @"/" + CONFIRMATIONS_MGR_URL_EXT;
            ConfirmationsManagerClient client = new ConfirmationsManagerClient(CONFIRMATIONS_MGR_ENDPOINT, confirmMgrUrl);
            client.ClientCredentials.UserName.UserName = svcUserName;
            client.ClientCredentials.UserName.Password = svcPassword;

            GetConfirmationTemplatesRequest request = new GetConfirmationTemplatesRequest();
            GetConfirmationTemplatesResponse response = new GetConfirmationTemplatesResponse();

            request.tradingSystemCode = pTradingSysCode;
            response = client.getConfirmationTemplates(request);
            //throw new Exception(); //for test bad scenario
            return response;
        }