HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/TDijk1/erp-apps.eu/wwwroot/CMSModules/MyDesk/WaitingForApproval/Header.aspx.cs
using System;

using CMS.Core;
using CMS.UIControls;
using CMS.SiteProvider;
using CMS.Modules;

[Tabs("CMS.Content", "Pending", "content")]
public partial class CMSModules_MyDesk_WaitingForApproval_Header : CMSContentManagementPage
{
    #region "Methods"

    protected void Page_Load(object sender, EventArgs e)
    {
        Title = "Pending";
        PageTitle.TitleText = "Pending";
        OnTabCreated += Header_OnTabCreated;
    }


    protected void Header_OnTabCreated(object sender, TabCreatedEventArgs e)
    {
        if (e.Tab == null)
        {
            return;
        }

        switch (e.TabIndex)
        {
            case 1:
                if ((!ModuleEntryManager.IsModuleLoaded(ModuleName.ONLINEMARKETING) && ResourceSiteInfoProvider.IsResourceOnSite(ModuleName.ONLINEMARKETING, SiteContext.CurrentSiteName)))
                {
                    // Hide tab if module is not loaded
                    e.Tab = null;
                }
                break;
        }
    }

    #endregion
}