public static void Main() { Console.WriteLine("LoginAPP - TEST - START"); int MAX_LOGINS = 1, memberSuccess, cobrandSuccess; bool auth = false; int count = 0; do { cobrandSuccess = LoginApp.doCoBrandLogin(); while (cobrandSuccess == 0) { Console.WriteLine("Try Again"); LoginApp.Main(); } // Console.WriteLine("Select the apps to run:"); // Console.WriteLine( // @" // 1-Register // 2-LogIn // "); // string choice; // choice = Console.ReadLine(); // int choiceValue; // int.TryParse(choice, out choiceValue); // switch(choiceValue) memberSuccess = LoginApp.doMemberLogin(); } while (!auth && ++count < MAX_LOGINS); while (memberSuccess == 0) { Console.WriteLine("Try Again"); memberSuccess = LoginApp.doMemberLogin(); } if (memberSuccess == 1) { List <string> headers = new List <string>(); string usersessionid = LoginApp.usession; string cbrandsessionid = LoginApp.cbsession; headers.Add("Authorization:{userSession= " + usersessionid + ",cobSession=" + cbrandsessionid + "}"); readValue(); } }
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; } } }