本文整理汇总了C#中DotNetNuke.Entities.Modules.ModuleController.MoveModule方法的典型用法代码示例。如果您正苦于以下问题:C# ModuleController.MoveModule方法的具体用法?C# ModuleController.MoveModule怎么用?C# ModuleController.MoveModule使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DotNetNuke.Entities.Modules.ModuleController
的用法示例。
在下文中一共展示了ModuleController.MoveModule方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: cmdUpdate_Click
//.........这里部分代码省略.........
{
objModule.CacheTime = int.Parse( txtCacheTime.Text );
}
else
{
objModule.CacheTime = 0;
}
objModule.TabID = TabId;
if( objModule.AllTabs != chkAllTabs.Checked )
{
AllTabsChanged = true;
}
objModule.AllTabs = chkAllTabs.Checked;
switch( int.Parse( cboVisibility.SelectedItem.Value ) )
{
case 0:
objModule.Visibility = VisibilityState.Maximized;
break;
case 1:
objModule.Visibility = VisibilityState.Minimized;
break;
case 2:
objModule.Visibility = VisibilityState.None;
break;
}
objModule.IsDeleted = false;
objModule.Header = txtHeader.Text;
objModule.Footer = txtFooter.Text;
if( !String.IsNullOrEmpty( txtStartDate.Text ) )
{
objModule.StartDate = Convert.ToDateTime( txtStartDate.Text );
}
else
{
objModule.StartDate = Null.NullDate;
}
if( !String.IsNullOrEmpty( txtEndDate.Text ) )
{
objModule.EndDate = Convert.ToDateTime( txtEndDate.Text );
}
else
{
objModule.EndDate = Null.NullDate;
}
objModule.ContainerSrc = ctlModuleContainer.SkinSrc;
objModule.ModulePermissions = dgPermissions.Permissions;
objModule.InheritViewPermissions = chkInheritPermissions.Checked;
objModule.DisplayTitle = chkDisplayTitle.Checked;
objModule.DisplayPrint = chkDisplayPrint.Checked;
objModule.DisplaySyndicate = chkDisplaySyndicate.Checked;
objModule.IsDefaultModule = chkDefault.Checked;
objModule.AllModules = chkAllModules.Checked;
objModules.UpdateModule( objModule );
//Update Custom Settings
if( ctlSpecific != null )
{
ctlSpecific.UpdateSettings();
}
//These Module Copy/Move statements must be
//at the end of the Update as the Controller code assumes all the
//Updates to the Module have been carried out.
//Check if the Module is to be Moved to a new Tab
if( ! chkAllTabs.Checked )
{
int newTabId = int.Parse( cboTab.SelectedItem.Value );
if( TabId != newTabId )
{
objModules.MoveModule( moduleId, TabId, newTabId, "" );
}
}
//'Check if Module is to be Added/Removed from all Tabs
if( AllTabsChanged )
{
ArrayList arrTabs = Globals.GetPortalTabs( PortalSettings.DesktopTabs, false, true );
if( chkAllTabs.Checked )
{
objModules.CopyModule( moduleId, TabId, arrTabs, true );
}
else
{
objModules.DeleteAllModules( moduleId, TabId, arrTabs, false, false );
}
}
// Navigate back to admin page
Response.Redirect( Globals.NavigateURL(), true );
}
}
catch( Exception exc ) //Module failed to load
{
Exceptions.ProcessModuleLoadException( this, exc );
}
}