internal static void AddCategory(string name, string incexp, int userID) { if (incexp == "Expense") { DBMethods.AddExpenseCategory(name, userID); } else if (incexp == "Income") { DBMethods.AddIncomeCategory(name, userID); } else { throw new ArgumentException("Invalid Type"); } }
private static void AddDefaultCategories(int userID) { if (DBMethods.GetAccountType(userID) == "Corporate") { DBMethods.AddExpenseCategory("Salaries", userID); DBMethods.AddExpenseCategory("Raw Materials", userID); DBMethods.AddExpenseCategory("Taxes", userID); DBMethods.AddExpenseCategory("Marketing", userID); DBMethods.AddIncomeCategory("Domestic Sales", userID); DBMethods.AddIncomeCategory("International Sales", userID); } else { DBMethods.AddExpenseCategory("General Expense", userID); DBMethods.AddIncomeCategory("General Income", userID); } }