public static void AddItem(string ItemName, int Param, DictionaryTypes dict) { if (!Company.CheckDiskSpace()) { throw new MaxDiskSpaceException(); } switch (dict) { case DictionaryTypes.Categories: DBCommon.AddCategory(ItemName); break; case DictionaryTypes.IncidentSeverities: DBIncident.AddIncidentSeverity(ItemName); break; case DictionaryTypes.IncidentTypes: DBIncident.AddIncidentType(ItemName); break; case DictionaryTypes.ProjectTypes: AddProjectType(ItemName); break; case DictionaryTypes.ProjectCategories: DBProject.AddProjectCategory(ItemName); break; case DictionaryTypes.IncidentCategories: DBIncident.AddIncidentCategory(ItemName); break; case DictionaryTypes.Currency: DBCommon.AddCurrency(ItemName); break; case DictionaryTypes.DocumentStatus: DBDocument.AddDocumentStatus(ItemName, Param); break; case DictionaryTypes.ProjectPhases: DBProject.AddProjectPhase(ItemName, Param); break; case DictionaryTypes.RiskLevels: DBProject.AddRiskLevel(ItemName, Param); break; } }