Beispiel #1
0
        public static RefreshStatus addNonMFA_Account(Providers providers)
        {
            Console.WriteLine(" Add Non_MFA_Account:  ");
            Console.WriteLine("Enter your provider userName : "******"ysldemo.site16442.1";
            // For internal Yodlee Dag tool use this hardcoded user Name = "DBmet1.site16441.1"
            providers.getProvider()[0].getLoginForm().getRow()[0].getField()[0].setValue(userName);

            Console.WriteLine("Enter provider password : "******"site16442.1";
            //String password = con.readLine("Enter provider password : "******"site16441.1"
            providers.getProvider()[0].getLoginForm().getRow()[1].getField()[0].setValue(password);
            RefreshStatus refreshStatus = AddProviderAccount.addProviderAccount(providers);
            string        refMsg;
            RefreshStatus rstatus;

            do
            {
                rstatus = AddProviderAccount.getRefreshStatus(refreshStatus.providerAccountId);
                //RefreshStatus rstatus = (RefreshStatus)GSONParser.handleJson(jsonResponse, typeof(RefreshStatus));
                refMsg = rstatus.refreshInfo.refreshStatus;
                if (refMsg == "LOGIN_FAILURE" || refMsg == "REFRESH_TIMED_OUT" || refMsg == "REFRESH_CANCELLED" || refMsg == "SITE_CANNOT_BE_REFRESHED")
                {
                    Console.WriteLine("login failed please try again" + refMsg);
                    break;
                }
                if (refMsg == "REFRESH_COMPLETED_ACCOUNTS_ALREADY_AGGREGATED")
                {
                    Console.WriteLine("Account already added" + refMsg);
                    break;
                }
                // Console.WriteLine("login failed please try again" + refMsg);
                // }
            } while (refMsg != "REFRESH_COMPLETED");
            if (refMsg == "REFRESH_COMPLETED")
            {
                Console.WriteLine("Account added successfully");
            }
            return(rstatus);
        }
Beispiel #2
0
        public static void ProcessInput(int keyValue)
        {
            if (keyValue > 12)
            {
                Console.WriteLine("Enter One Valid Number");
                readValue();
            }
            else
            {
                switch (keyValue)
                {
                case 1:
                    Console.WriteLine("Enter the name of the  Provider you want to search : ");
                    String searchString = Console.ReadLine();
                    //String searchString = "Dag";
                    ProviderApp.searchProvider(searchString);
                    LoginApp.readValue();
                    break;

                case 2:
                    //AddSiteAccount.addSiteAccount();
                    AddProviderAccount.AddAccount(1);
                    break;

                case 3:
                    AddProviderAccount.AddAccount(2);
                    break;

                case 4:
                    AddProviderAccountNew.AddAccount(1);
                    break;

                case 5:
                    AddProviderAccountNew.AddAccount(2);
                    break;

                case 6:
                    AccountApp.accountApp(1);
                    break;

                case 7:
                    HoldingApp.holdingApp(1);
                    break;

                case 8:
                    TransactionApp.transactionApp();
                    break;

                case 9:
                    AssetSummaryApp.assetSummaryApp();
                    break;

                case 10:
                    HoldingApp.holdingApp(2);
                    break;

                case 11:
                    AccountApp.accountApp(2);
                    break;

                case 0:


                    Environment.Exit(0);
                    break;
                }
            }
        }