private static void TestValues() { Categories.AddCategory("Alcohol"); Categories.AddCategory("Home"); Categories.AddCategory("Food"); Categories.AddCategory("Car"); Categories.AddCategory("Sports"); Categories.AddCategory("Goods"); Categories.AddCategory("Medicine"); Categories.AddCategory("Clothes"); Categories.AddCategory("Mobile phone"); Categories.AddCategory("Transportation"); Categories.AddCategory("Taxi"); Accounts.AddAccount("Visa", 500); Accounts.AddAccount("MasterCard", 300); Accounts.AddAccount("BolCart", 200); TransactionServicecs.Transfer("Visa", "Car", 200); TransactionServicecs.Transfer("Visa", "Clothes", 50); TransactionServicecs.Transfer("BolCart", "Taxi", 50); TransactionServicecs.Transfer("MasterCard", "Taxi", 100); }
private void DecreaseBalanceMenu() { ChangeBalance(-1); if (String.IsNullOrEmpty(AccountNameId)) { return; } string categoryNameId = ""; while (!Categories.CategoryExists(categoryNameId)) { if (!Accounts.EnoughFunds(AccountNameId, Amount)) { Console.WriteLine(Literals.getLiterals("Not enough funds !")); Console.ReadKey(true); return; } categories.Show(); Console.WriteLine(Literals.getLiterals("Input the name of category or it's identity describer , or 123 to exit")); categoryNameId = Console.ReadLine(); if (categoryNameId.CompareTo("123") == 0) { break; } if (Categories.CategoryExists(categoryNameId)) { TransactionServicecs.Transfer(AccountNameId, categoryNameId, Amount); } else { Console.WriteLine(Literals.getLiterals("Category does not exist")); Console.ReadKey(true); } Console.Clear(); } }