//use for testing userId 3 /* * private static String[] getModelsByUserIDTest(String[] tk) * { * try * { * Dictionary<int, String> tempDictionary = sm.getModelsByUserID(int.Parse(tk[1])); * List<String> temp = new List<String>(); * * foreach (KeyValuePair<int, String> c in tempDictionary) * { * temp.Add(c.Key.ToString() + "\t" + c.Value); * } * return temp.ToArray(); * } * catch * { * return str2arr("Missing argument.Usage: getModelsByUserIDTest <UserID>"); * } * * } */ private static String[] getExternalAccountByUserIDTest(String[] tk) { try { List <ExternalAccount> testList = sm.getExternalAccountByUserID(int.Parse(tk[1])); List <String> accountList = new List <String>(); foreach (ExternalAccount c in testList) { accountList.Add(c.externalAccountID + "\t\t\t " + c.userID + "\t\t" + c.username); } Console.WriteLine("ExternalAccountID\tUserID\t\tUsername\n"); return(accountList.ToArray()); } catch { return(str2arr("Missing argument.Usage: getExternalAccountByUserIDTest <UserID>")); } }