public void DeleteTab(TabInfo t) { PortalSettings portalSettings = new PortalSettings(); int portalId = portalSettings.PortalId; if (t != null) { TabController tc = new TabController(); if (t != null) { if (t.Modules != null) { foreach (ModuleInfo mod in t.Modules) { ModuleController moduleC = new ModuleController(); moduleC.DeleteModule(mod.ModuleID); moduleC.DeleteModuleSettings(mod.ModuleID); } } tc.DeleteTab(t.TabID, portalId); tc.DeleteTabSettings(t.TabID); DataCache.ClearModuleCache(t.TabID); } } }