private static void AddDefaultExpenseTypes(int userID) { if (DBMethods.GetAccountType(userID) == "Corporate") { DBMethods.AddExpenseTypetoCategory("User1", userID, "Salaries"); DBMethods.AddExpenseTypetoCategory("User2", userID, "Salaries"); DBMethods.AddExpenseTypetoCategory("Flour", userID, "Raw Materials"); DBMethods.AddExpenseTypetoCategory("Sugar", userID, "Raw Materials"); DBMethods.AddExpenseTypetoCategory("Cacao", userID, "Raw Materials"); DBMethods.AddExpenseTypetoCategory("Flour", userID, "Raw Materials"); DBMethods.AddExpenseTypetoCategory("KDV", userID, "Taxes"); DBMethods.AddExpenseTypetoCategory("OTV", userID, "Taxes"); DBMethods.AddExpenseTypetoCategory("TV Ads", userID, "Marketing"); DBMethods.AddExpenseTypetoCategory("Internet Ads", userID, "Marketing"); DBMethods.AddExpenseTypetoCategory("Street Posters", userID, "Marketing"); } else { DBMethods.AddExpenseType("Shopping", userID); DBMethods.AddExpenseType("Food", userID); DBMethods.AddExpenseType("Transport", userID); DBMethods.AddExpenseType("Electric", userID); DBMethods.AddExpenseType("Gas", userID); DBMethods.AddExpenseType("Home", userID); DBMethods.AddExpenseType("Entertainment", userID); DBMethods.AddExpenseType("Water", userID); DBMethods.AddExpenseType("Health", userID); DBMethods.AddExpenseType("Beauty", userID); DBMethods.AddExpenseType("Gift", userID); } }
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"); } }