本文整理汇总了C#中DotNetNuke.Entities.Modules.ModuleController.RestoreModule方法的典型用法代码示例。如果您正苦于以下问题:C# ModuleController.RestoreModule方法的具体用法?C# ModuleController.RestoreModule怎么用?C# ModuleController.RestoreModule使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DotNetNuke.Entities.Modules.ModuleController
的用法示例。
在下文中一共展示了ModuleController.RestoreModule方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RestoreModule
private void RestoreModule(int moduleId, int tabId)
{
var eventLogController = new EventLogController();
var moduleController = new ModuleController();
// restore module
var module = moduleController.GetModule(moduleId, tabId, false);
if ((module != null))
{
if (DeletedTabs.Any(t => t.TabID == module.TabID))
{
var title = !string.IsNullOrEmpty(module.ModuleTitle) ? module.ModuleTitle : module.DesktopModule.FriendlyName;
Skin.AddModuleMessage(this, string.Format(Localization.GetString("TabDeleted.ErrorMessage", LocalResourceFile), title),
ModuleMessage.ModuleMessageType.RedError);
return;
}
moduleController.RestoreModule(module);
eventLogController.AddLog(module, PortalSettings, UserId, "", EventLogController.EventLogType.MODULE_RESTORED);
}
}
示例2: OnModuleRestoreClick
/// <summary>
/// Restores selected modules in the listbox
/// </summary>
/// <param name = "sender"></param>
/// <param name = "e"></param>
/// <remarks>
/// Adds a log entry for each restored module to the EventLog
/// </remarks>
/// <history>
/// [VMasanas] 18/08/2004 Added support for multiselect listbox
/// </history>
protected void OnModuleRestoreClick(Object sender, EventArgs e)
{
var objEventLog = new EventLogController();
var objModules = new ModuleController();
foreach (ListItem item in lstModules.Items)
{
if (item.Selected)
{
var values = item.Value.Split('-');
var tabId = int.Parse(values[0]);
var moduleId = int.Parse(values[1]);
// restore module
var objModule = objModules.GetModule(moduleId, tabId, false);
if ((objModule != null))
{
objModules.RestoreModule(objModule);
objEventLog.AddLog(objModule, PortalSettings, UserId, "", EventLogController.EventLogType.MODULE_RESTORED);
}
}
}
BindData();
}
示例3: RestoreModule
private void RestoreModule(int moduleId, int tabId)
{
var eventLogController = new EventLogController();
var moduleController = new ModuleController();
// restore module
var module = moduleController.GetModule(moduleId, tabId, false);
if ((module != null))
{
moduleController.RestoreModule(module);
eventLogController.AddLog(module, PortalSettings, UserId, "", EventLogController.EventLogType.MODULE_RESTORED);
}
}
示例4: RestoreModule
private void RestoreModule(int moduleId, int tabId)
{
var objEventLog = new EventLogController();
var objModules = new ModuleController();
// restore module
var objModule = objModules.GetModule(moduleId, tabId, false);
if ((objModule != null))
{
objModules.RestoreModule(objModule);
objEventLog.AddLog(objModule, PortalSettings, UserId, "", EventLogController.EventLogType.MODULE_RESTORED);
}
}