本文整理汇总了C#中DotNetNuke.Entities.Tabs.TabController.DeleteTabSetting方法的典型用法代码示例。如果您正苦于以下问题:C# TabController.DeleteTabSetting方法的具体用法?C# TabController.DeleteTabSetting怎么用?C# TabController.DeleteTabSetting使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DotNetNuke.Entities.Tabs.TabController
的用法示例。
在下文中一共展示了TabController.DeleteTabSetting方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UpdateWorkflow
/// -----------------------------------------------------------------------------
/// <summary>
/// UpdateWorkFlow updates the currently active Workflow
/// </summary>
/// <remarks>
/// </remarks>
/// <param name="WorkFlowType">The type of workflow (Module | Page | Site)</param>
/// <param name = "WorkflowID">The ID of the Workflow</param>
/// <param name="ObjectID">The ID of the object to apply the update to (depends on WorkFlowType)</param>
/// <param name="ReplaceExistingSettings">Should existing settings be overwritten?</param>
/// <history>
/// </history>
/// -----------------------------------------------------------------------------
public void UpdateWorkflow(int ObjectID, string WorkFlowType, int WorkflowID, bool ReplaceExistingSettings)
{
var tabController = new TabController();
var moduleController = new ModuleController();
switch (WorkFlowType)
{
case "Module":
moduleController.UpdateModuleSetting(ObjectID, "WorkflowID", WorkflowID.ToString());
break;
case "Page":
tabController.UpdateTabSetting(ObjectID, "WorkflowID", WorkflowID.ToString());
if (ReplaceExistingSettings)
{
//Get All Modules on the current Tab
foreach (var kvp in moduleController.GetTabModules(ObjectID))
{
ClearModuleSettings(kvp.Value);
}
}
break;
case "Site":
PortalController.UpdatePortalSetting(ObjectID, "WorkflowID", WorkflowID.ToString());
if (ReplaceExistingSettings)
{
//Get All Tabs aon the Site
foreach (var kvp in tabController.GetTabsByPortal(ObjectID))
{
tabController.DeleteTabSetting(kvp.Value.TabID, "WorkFlowID");
}
//Get All Modules in the current Site
foreach (ModuleInfo objModule in moduleController.GetModules(ObjectID))
{
ClearModuleSettings(objModule);
}
}
break;
}
}