public static TabInfo MessagingPage(string ModuleFriendlyName)
        {
            if (((_MessagingPage != null)))
                return _MessagingPage;

            ModuleController mc = new ModuleController();
            ModuleInfo md = mc.GetModuleByDefinition(PortalSettings.Current.PortalId, ModuleFriendlyName);
            if ((md != null))
            {
                ArrayList a = mc.GetModuleTabs(md.ModuleID);
                if ((a != null))
                {
                    ModuleInfo mi = a[0] as ModuleInfo;
                    if ((mi != null))
                    {
                        TabController tc = new TabController();
                        _MessagingPage = tc.GetTab(mi.TabID, PortalSettings.Current.PortalId, false);
                    }
                }
            }

            return _MessagingPage;

        }
 public static void SynchronizeModule(int moduleID)
 {
     ModuleController objModules = new ModuleController();
     ArrayList arrModules = objModules.GetModuleTabs(moduleID);
     TabController tabController = new TabController();
     Hashtable tabSettings;
     foreach (ModuleInfo objModule in arrModules)
     {
         tabSettings = tabController.GetTabSettings(objModule.TabID);
         if (tabSettings["CacheProvider"] != null && tabSettings["CacheProvider"].ToString().Length > 0)
         {
             OutputCachingProvider provider = OutputCachingProvider.Instance(tabSettings["CacheProvider"].ToString());
             if (provider != null)
             {
                 provider.Remove(objModule.TabID);
             }
         }
         if (HttpContext.Current != null)
         {
             ModuleCachingProvider provider = ModuleCachingProvider.Instance(objModule.GetEffectiveCacheMethod());
             if (provider != null)
             {
                 provider.Remove(objModule.TabModuleID);
             }
         }
     }
 }
Ejemplo n.º 3
0
 private void AddAllTabsModules(TabInfo objTab)
 {
     ModuleController objmodules = new ModuleController();
     foreach (ModuleInfo allTabsModule in objmodules.GetAllTabsModules(objTab.PortalID, true))
     {
         bool canAdd = false;
         foreach (ModuleInfo allTabsInstance in objmodules.GetModuleTabs(allTabsModule.ModuleID))
         {
             TabInfo tab = new TabController().GetTab(allTabsInstance.TabID, objTab.PortalID, false);
             if (!tab.IsDeleted)
             {
                 canAdd = true;
                 break;
             }
         }
         if (canAdd)
         {
             objmodules.CopyModule(allTabsModule.ModuleID, allTabsModule.TabID, objTab.TabID, "", true);
         }
     }
 }