public static void AddType(string name, string type, int userID) { if (type == "Expense") { DBMethods.AddExpenseType(name, userID); } else if (type == "Income") { DBMethods.AddIncomeType(name, userID); } else { throw new ArgumentException("Invalid Type"); } }
private static void AddDefaultIncomeTypes(int userID) { if (DBMethods.GetAccountType(userID) == "Corporate") { DBMethods.AddIncomeTypetoCategory("İstanbul", userID, "Domestic Sales"); DBMethods.AddIncomeTypetoCategory("İzmir", userID, "Domestic Sales"); DBMethods.AddIncomeTypetoCategory("Ankara", userID, "Domestic Sales"); DBMethods.AddIncomeTypetoCategory("New York", userID, "International Sales"); DBMethods.AddIncomeTypetoCategory("Paris", userID, "International Sales"); DBMethods.AddIncomeTypetoCategory("London", userID, "International Sales"); } else { DBMethods.AddIncomeType("Salary", userID); DBMethods.AddIncomeType("Rent", userID); DBMethods.AddIncomeType("Dividents", userID); } }