本文整理汇总了C#中DotNetNuke.Entities.Modules.ModuleController.GetPortalTabModules方法的典型用法代码示例。如果您正苦于以下问题:C# ModuleController.GetPortalTabModules方法的具体用法?C# ModuleController.GetPortalTabModules怎么用?C# ModuleController.GetPortalTabModules使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DotNetNuke.Entities.Modules.ModuleController
的用法示例。
在下文中一共展示了ModuleController.GetPortalTabModules方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DeleteTab
/// <summary>
/// Deletes a tab
/// </summary>
/// <param name="intTabid">TabId of the tab to be deleted</param>
/// <remarks>
/// Adds a log entry for the action to the EventLog
/// </remarks>
/// <history>
/// [VMasanas] 18/08/2004 Created
/// 19/09/2004 Remove skin deassignment. BLL takes care of this.
/// 30/09/2004 Change logic so log is only added when tab is actually deleted
/// 28/02/2005 Remove modules when deleting pages
/// </history>
private void DeleteTab( int intTabid )
{
EventLogController objEventLog = new EventLogController();
// delete tab
TabController objTabs = new TabController();
ModuleController objModules = new ModuleController();
TabInfo objTab = objTabs.GetTab( intTabid );
if( objTab != null )
{
//save tab modules before deleting page
ArrayList arrTabModules = objModules.GetPortalTabModules( objTab.PortalID, objTab.TabID );
// hard delete the tab
objTabs.DeleteTab( objTab.TabID, objTab.PortalID );
// check if it's deleted
TabInfo objTabDeleted = objTabs.GetTab( intTabid );
if( objTabDeleted == null )
{
//delete modules that do not have other instances
foreach( ModuleInfo objmodule in arrTabModules )
{
// check if all modules instances have been deleted
ModuleInfo objDelModule = objModules.GetModule( objmodule.ModuleID, Null.NullInteger );
if( objDelModule == null || objDelModule.TabID == Null.NullInteger )
{
objModules.DeleteModule( objmodule.ModuleID );
}
}
objEventLog.AddLog( objTab, PortalSettings, UserId, "", EventLogController.EventLogType.TAB_DELETED );
}
else
{
// should be a parent tab
UI.Skins.Skin.AddModuleMessage( this, string.Format( Localization.GetString( "ParentTab.ErrorMessage", this.LocalResourceFile ), objTab.TabName ), ModuleMessageType.YellowWarning );
}
}
}