Skip to content

Instantly share code, notes, and snippets.

@AntoniosHadji
Created February 24, 2014 21:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AntoniosHadji/9197312 to your computer and use it in GitHub Desktop.
Save AntoniosHadji/9197312 to your computer and use it in GitHub Desktop.
TTUSAPI Gateway Available and AutoLogin setings
if (ASG.TTUS.m_Users.ContainsKey(dr[0].ToString()))
{
TTUSAPI.DataObjects.User u = ASG.TTUS.m_Users[dr[0].ToString()];
TTUSAPI.DataObjects.UserProfile up = new TTUSAPI.DataObjects.UserProfile(u);
Trace.WriteLine(u.UserName);
foreach (string key in up.UserGatewayLogins.Keys)
{
Trace.WriteLine(key);
TTUSAPI.DataObjects.UserGatewayLoginProfile UserGWP = new TTUSAPI.DataObjects.UserGatewayLoginProfile(up.UserGatewayLogins[key]);
foreach (string innerKey in up.UserGatewayLogins[key].UserGatewayCredentials.Keys)
{
Trace.WriteLine(innerKey);
TTUSAPI.DataObjects.UserGatewayCredentialProfile ugcp = new TTUSAPI.DataObjects.UserGatewayCredentialProfile(up.UserGatewayLogins[key].UserGatewayCredentials[innerKey]);
ugcp.Accessibility = TTUSAPI.DataObjects.UserGatewayCredential.AccessibilityMode.Available;
//ugcp.OperatorID = lookupOperatorID(newUserInformation.UserName, ugcp.GatewayID, ugcp.Trader);
UserGWP.UpdateGateway(ugcp);
}
up.UpdateUserGatewayLogin(UserGWP);
}
ResultStatus r = ASG.TTUS.m_TTUSAPI.UpdateUser(up);
Trace.WriteLine(string.Format("RESULT: {0} [{1}] {2}", r.Result, r.TransactionID, r.ErrorMessage));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment