本文整理汇总了C#中DotNetNuke.Entities.Portals.PortalInfo类的典型用法代码示例。如果您正苦于以下问题:C# PortalInfo类的具体用法?C# PortalInfo怎么用?C# PortalInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PortalInfo类属于DotNetNuke.Entities.Portals命名空间,在下文中一共展示了PortalInfo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Start
public void Start(PortalInfo portalInfo)
{
var cache = DataCache.GetCache("InspectorIT.FileMonitor." + portalInfo.PortalID);
if (cache == null)
{
FileSystemWatcher fileWatcher = new FileSystemWatcher();
fileWatcher.Path = portalInfo.HomeDirectoryMapPath;
fileWatcher.IncludeSubdirectories = true;
fileWatcher.EnableRaisingEvents = true;
fileWatcher.NotifyFilter = NotifyFilters.FileName;
fileWatcher.Created += (s, e) => onFileChanged(s, e, portalInfo);
fileWatcher.Deleted += (s, e) => onFileDeleted(s, e, portalInfo);
fileWatcher.Renamed += (s, e) => onFileRenamed(s, e, portalInfo);
FileSystemWatcher folderWatcher = new FileSystemWatcher();
folderWatcher.Path = portalInfo.HomeDirectoryMapPath;
folderWatcher.IncludeSubdirectories = true;
folderWatcher.EnableRaisingEvents = true;
folderWatcher.NotifyFilter = NotifyFilters.DirectoryName;
folderWatcher.Created += (s, e) => onFolderChanged(s, e, portalInfo);
folderWatcher.Deleted += (s, e) => onFolderDeleted(s, e, portalInfo);
folderWatcher.Renamed += (s, e) => onFolderRenamed(s, e, portalInfo);
DataCache.SetCache("InspectorIT.FileMonitor." + portalInfo.PortalID, true);
}
}
示例2: SerializeFiles
/// -----------------------------------------------------------------------------
/// <summary>
/// Serializes all Files
/// </summary>
/// <param name="objportal">Portal to serialize</param>
/// <param name="folderPath">The folder containing the files</param>
/// <remarks>
/// The serialization uses the xml attributes defined in FileInfo class.
/// </remarks>
/// <history>
/// [cnurse] 11/08/2004 Created
/// [cnurse] 05/20/2004 Extracted adding of file to zip to new FileSystemUtils method
/// </history>
/// -----------------------------------------------------------------------------
private void SerializeFiles(XmlWriter writer, PortalInfo objportal, string folderPath, ref ZipOutputStream zipFile)
{
var folderManager = FolderManager.Instance;
var objFolder = folderManager.GetFolder(objportal.PortalID, folderPath);
writer.WriteStartElement("files");
foreach (FileInfo objFile in folderManager.GetFiles(objFolder))
{
//verify that the file exists on the file system
var filePath = objportal.HomeDirectoryMapPath + folderPath + objFile.FileName;
if (File.Exists(filePath))
{
writer.WriteStartElement("file");
writer.WriteElementString("contenttype", objFile.ContentType);
writer.WriteElementString("extension", objFile.Extension);
writer.WriteElementString("filename", objFile.FileName);
writer.WriteElementString("height", objFile.Height.ToString());
writer.WriteElementString("size", objFile.Size.ToString());
writer.WriteElementString("width", objFile.Width.ToString());
writer.WriteEndElement();
FileSystemUtils.AddToZip(ref zipFile, filePath, objFile.FileName, folderPath);
}
}
writer.WriteEndElement();
}
示例3: FillPortalInfo
private static PortalInfo FillPortalInfo( IDataReader dr, bool CheckForOpenDataReader )
{
PortalInfo objPortalInfo = null;
// read datareader
bool canContinue = true;
if( CheckForOpenDataReader )
{
canContinue = false;
if( dr.Read() )
{
canContinue = true;
}
}
if( canContinue )
{
objPortalInfo = new PortalInfo();
objPortalInfo.PortalID = Convert.ToInt32( Null.SetNull( dr["PortalID"], objPortalInfo.PortalID ) );
objPortalInfo.PortalName = Convert.ToString( Null.SetNull( dr["PortalName"], objPortalInfo.PortalName ) );
objPortalInfo.LogoFile = Convert.ToString( Null.SetNull( dr["LogoFile"], objPortalInfo.LogoFile ) );
objPortalInfo.FooterText = Convert.ToString( Null.SetNull( dr["FooterText"], objPortalInfo.FooterText ) );
objPortalInfo.ExpiryDate = Convert.ToDateTime( Null.SetNull( dr["ExpiryDate"], objPortalInfo.ExpiryDate ) );
objPortalInfo.UserRegistration = Convert.ToInt32( Null.SetNull( dr["UserRegistration"], objPortalInfo.UserRegistration ) );
objPortalInfo.BannerAdvertising = Convert.ToInt32( Null.SetNull( dr["BannerAdvertising"], objPortalInfo.BannerAdvertising ) );
objPortalInfo.AdministratorId = Convert.ToInt32( Null.SetNull( dr["AdministratorID"], objPortalInfo.AdministratorId ) );
objPortalInfo.Email = Convert.ToString( Null.SetNull( dr["Email"], objPortalInfo.Email ) );
objPortalInfo.Currency = Convert.ToString( Null.SetNull( dr["Currency"], objPortalInfo.Currency ) );
objPortalInfo.HostFee = Convert.ToInt32( Null.SetNull( dr["HostFee"], objPortalInfo.HostFee ) );
objPortalInfo.HostSpace = Convert.ToInt32( Null.SetNull( dr["HostSpace"], objPortalInfo.HostSpace ) );
objPortalInfo.PageQuota = Convert.ToInt32( Null.SetNull( dr["PageQuota"], objPortalInfo.PageQuota ) );
objPortalInfo.UserQuota = Convert.ToInt32( Null.SetNull( dr["UserQuota"], objPortalInfo.UserQuota ) );
objPortalInfo.AdministratorRoleId = Convert.ToInt32( Null.SetNull( dr["AdministratorRoleID"], objPortalInfo.AdministratorRoleId ) );
objPortalInfo.RegisteredRoleId = Convert.ToInt32( Null.SetNull( dr["RegisteredRoleID"], objPortalInfo.RegisteredRoleId ) );
objPortalInfo.Description = Convert.ToString( Null.SetNull( dr["Description"], objPortalInfo.Description ) );
objPortalInfo.KeyWords = Convert.ToString( Null.SetNull( dr["KeyWords"], objPortalInfo.KeyWords ) );
objPortalInfo.BackgroundFile = Convert.ToString( Null.SetNull( dr["BackGroundFile"], objPortalInfo.BackgroundFile ) );
objPortalInfo.GUID = new Guid( Convert.ToString( Null.SetNull( dr["GUID"], objPortalInfo.GUID ) ) );
objPortalInfo.PaymentProcessor = Convert.ToString( Null.SetNull( dr["PaymentProcessor"], objPortalInfo.PaymentProcessor ) );
objPortalInfo.ProcessorUserId = Convert.ToString( Null.SetNull( dr["ProcessorUserId"], objPortalInfo.ProcessorUserId ) );
objPortalInfo.ProcessorPassword = Convert.ToString( Null.SetNull( dr["ProcessorPassword"], objPortalInfo.ProcessorPassword ) );
objPortalInfo.SiteLogHistory = Convert.ToInt32( Null.SetNull( dr["SiteLogHistory"], objPortalInfo.SiteLogHistory ) );
objPortalInfo.SplashTabId = Convert.ToInt32( Null.SetNull( dr["SplashTabID"], objPortalInfo.SplashTabId ) );
objPortalInfo.HomeTabId = Convert.ToInt32( Null.SetNull( dr["HomeTabID"], objPortalInfo.HomeTabId ) );
objPortalInfo.LoginTabId = Convert.ToInt32( Null.SetNull( dr["LoginTabID"], objPortalInfo.LoginTabId ) );
objPortalInfo.UserTabId = Convert.ToInt32( Null.SetNull( dr["UserTabID"], objPortalInfo.UserTabId ) );
objPortalInfo.DefaultLanguage = Convert.ToString( Null.SetNull( dr["DefaultLanguage"], objPortalInfo.DefaultLanguage ) );
objPortalInfo.TimeZoneOffset = Convert.ToInt32( Null.SetNull( dr["TimeZoneOffset"], objPortalInfo.TimeZoneOffset ) );
objPortalInfo.AdminTabId = Convert.ToInt32( Null.SetNull( dr["AdminTabID"], objPortalInfo.AdminTabId ) );
objPortalInfo.HomeDirectory = Convert.ToString( Null.SetNull( dr["HomeDirectory"], objPortalInfo.HomeDirectory ) );
objPortalInfo.SuperTabId = Convert.ToInt32( Null.SetNull( dr["SuperTabId"], objPortalInfo.SuperTabId ) );
objPortalInfo.AdministratorRoleName = Convert.ToString( Null.SetNull( dr["AdministratorRoleName"], objPortalInfo.AdministratorRoleName ) );
objPortalInfo.RegisteredRoleName = Convert.ToString( Null.SetNull( dr["RegisteredRoleName"], objPortalInfo.RegisteredRoleName ) );
objPortalInfo.Users = Null.NullInteger;
objPortalInfo.Pages = Null.NullInteger;
}
return objPortalInfo;
}
示例4: CopyUserToPortal
public static void CopyUserToPortal(UserInfo user, PortalInfo portal, bool mergeUser, bool deleteUser)
{
if (deleteUser)
{
MoveUserToPortal(user, portal, mergeUser);
}
else
{
CopyUserToPortal(user, portal, mergeUser);
}
}
示例5: AddAdminPage
/// <summary>
/// AddAdminPage adds an Admin Tab Page
/// </summary>
/// <param name="Portal">The Portal</param>
/// <param name="TabName">The Name to give this new Tab</param>
/// <param name="TabIconFile">The Icon for this new Tab</param>
/// <param name="IsVisible">A flag indicating whether the tab is visible</param>
private static TabInfo AddAdminPage(PortalInfo Portal, string TabName, string TabIconFile, bool IsVisible)
{
TabController objTabController = new TabController();
TabInfo AdminPage = objTabController.GetTab(Portal.AdminTabId, Portal.PortalID, false);
TabPermissionCollection objTabPermissions = new TabPermissionCollection();
AddPagePermission(ref objTabPermissions, "View", Convert.ToInt32(Portal.AdministratorRoleId));
//Call AddPage with parentTab = AdminPage & RoleId = AdministratorRoleId
return AddPage(AdminPage, TabName, TabIconFile, IsVisible, objTabPermissions, true);
}
示例6: GetManageablePortals
protected IEnumerable<PortalInfo> GetManageablePortals ()
{
if (UserInfo.IsSuperUser) {
// host can manage all portals plus host "portal"
var portals = PortalController.Instance.GetPortals ();
portals.Insert (0, new PortalInfo { PortalID = Const.HOST_PORTAL_ID, PortalName = LocalizeString ("Host.Text") });
return portals.Cast<PortalInfo> ();
}
if (UserInfo.IsInRole ("Administrators")) {
// admin can manage its portal only
var portals = new PortalInfo [] {
new PortalInfo { PortalID = PortalId, PortalName = PortalSettings.Current.PortalName }
};
return portals;
}
return Enumerable.Empty<PortalInfo> ();
}
示例7: onFileChanged
private void onFileChanged(object sender, FileSystemEventArgs e, PortalInfo portalInfo)
{
try
{
var relativeFilePath = Utils.GetRelativePath(portalInfo.HomeDirectoryMapPath, e.FullPath);
string fileName = Path.GetFileName(e.Name);
var fileInfo = FileManager.Instance.GetFile(0, relativeFilePath);
if (fileInfo == null)
{
//Get Folder
string folderPath = relativeFilePath.Replace(fileName, "");
var folderInfo = FolderManager.Instance.GetFolder(portalInfo.PortalID, folderPath);
if (folderInfo == null)
{
folderInfo = FolderManager.Instance.AddFolder(portalInfo.PortalID, folderPath);
}
FileManager.Instance.AddFile(folderInfo, fileName, null, false);
}
}
catch (Exception ex)
{
DotNetNuke.Services.Exceptions.Exceptions.LogException(ex);
}
}
示例8: SerializeFolderPermissions
/// <summary>
/// Serializes all Folder Permissions
/// </summary>
/// <param name="xmlTemplate">Reference to XmlDocument context</param>
/// <param name="nodePermissions"></param>
/// <param name="objportal">Portal to serialize</param>
/// <param name="folderPath">The folder containing the files</param>
/// <remarks>
/// The serialization uses the xml attributes defined in FolderInfo class.
/// </remarks>
/// <history>
/// [cnurse] 11/08/2004 Created
/// </history>
public void SerializeFolderPermissions( XmlDocument xmlTemplate, XmlNode nodePermissions, PortalInfo objportal, string folderPath )
{
FolderPermissionController objPermissions = new FolderPermissionController();
ArrayList arrPermissions = objPermissions.GetFolderPermissionsByFolder( objportal.PortalID, folderPath );
foreach( FolderPermissionInfo objPermission in arrPermissions )
{
XmlElement nodePermission = xmlTemplate.CreateElement( "permission" );
nodePermission.AppendChild( XmlUtils.CreateElement( xmlTemplate, "permissioncode", objPermission.PermissionCode ) );
nodePermission.AppendChild( XmlUtils.CreateElement( xmlTemplate, "permissionkey", objPermission.PermissionKey ) );
nodePermission.AppendChild( XmlUtils.CreateElement( xmlTemplate, "rolename", objPermission.RoleName ) );
nodePermission.AppendChild( XmlUtils.CreateElement( xmlTemplate, "allowaccess", objPermission.AllowAccess.ToString().ToLower() ) );
nodePermissions.AppendChild( nodePermission );
}
}
示例9: SerializeProfileDefinitions
/// <summary>
/// Serializes all Profile Definitions
/// </summary>
/// <param name="xmlTemplate">Reference to XmlDocument context</param>
/// <param name="nodeProfileDefinitions">Node to add the serialized objects</param>
/// <param name="objportal">Portal to serialize</param>
/// <remarks>
/// The serialization uses the xml attributes defined in ProfilePropertyDefinition class.
/// </remarks>
/// <history>
/// </history>
public void SerializeProfileDefinitions(XmlDocument xmlTemplate, XmlNode nodeProfileDefinitions, PortalInfo objportal)
{
ListController objListController = new ListController();
XmlSerializer xser = new XmlSerializer(typeof(ProfilePropertyDefinition));
foreach (ProfilePropertyDefinition objProfileProperty in ProfileController.GetPropertyDefinitionsByPortal(objportal.PortalID))
{
StringWriter sw = new StringWriter();
xser.Serialize(sw, objProfileProperty);
XmlDocument xmlPropertyDefinition = new XmlDocument();
xmlPropertyDefinition.LoadXml(sw.GetStringBuilder().ToString());
XmlNode nodeProfileDefinition = xmlPropertyDefinition.SelectSingleNode("profiledefinition");
nodeProfileDefinition.Attributes.Remove(nodeProfileDefinition.Attributes["xmlns:xsd"]);
nodeProfileDefinition.Attributes.Remove(nodeProfileDefinition.Attributes["xmlns:xsi"]);
ListEntryInfo objList = objListController.GetListEntryInfo(objProfileProperty.DataType);
XmlNode newnode = xmlPropertyDefinition.CreateElement("datatype");
if (objList == null)
{
newnode.InnerXml = "Unknown";
}
else
{
newnode.InnerXml = objList.Value;
}
nodeProfileDefinition.AppendChild(newnode);
nodeProfileDefinitions.AppendChild(xmlTemplate.ImportNode(nodeProfileDefinition, true));
}
}
示例10: SerializeFiles
/// <summary>
/// Serializes all Files
/// </summary>
/// <param name="xmlTemplate">Reference to XmlDocument context</param>
/// <param name="nodeFiles">Node to add the serialized objects</param>
/// <param name="objportal">Portal to serialize</param>
/// <param name="folderPath">The folder containing the files</param>
/// <param name="zipFile"></param>
/// <remarks>
/// The serialization uses the xml attributes defined in FileInfo class.
/// </remarks>
/// <history>
/// [cnurse] 11/08/2004 Created
/// [cnurse] 05/20/2004 Extracted adding of file to zip to new FileSystemUtils method
/// </history>
public void SerializeFiles(XmlDocument xmlTemplate, XmlNode nodeFiles, PortalInfo objportal, string folderPath, ref ZipOutputStream zipFile)
{
FolderController objFolders = new FolderController();
FolderInfo objFolder = objFolders.GetFolder( objportal.PortalID, folderPath );
ArrayList arrFiles = FileSystemUtils.GetFilesByFolder(objportal.PortalID, objFolder.FolderID);
XmlSerializer xser = new XmlSerializer(typeof(FileInfo));
foreach (FileInfo objFile in arrFiles)
{
// verify that the file exists on the file system
string filePath = objportal.HomeDirectoryMapPath + folderPath + objFile.FileName;
if (File.Exists(filePath))
{
StringWriter sw = new StringWriter();
xser.Serialize(sw, objFile);
//Add node to template
XmlDocument xmlFile = new XmlDocument();
xmlFile.LoadXml(sw.GetStringBuilder().ToString());
XmlNode nodeFile = xmlFile.SelectSingleNode("file");
nodeFile.Attributes.Remove(nodeFile.Attributes["xmlns:xsd"]);
nodeFile.Attributes.Remove(nodeFile.Attributes["xmlns:xsi"]);
nodeFiles.AppendChild(xmlTemplate.ImportNode(nodeFile, true));
FileSystemUtils.AddToZip(ref zipFile, filePath, objFile.FileName, folderPath);
}
}
}
示例11: SerializeFolders
/// <summary>
/// Serializes all Folders including Permissions
/// </summary>
/// <param name="xmlTemplate">Reference to XmlDocument context</param>
/// <param name="nodeFolders"></param>
/// <param name="objportal">Portal to serialize</param>
/// <param name="zipFile"></param>
/// <remarks>
/// The serialization uses the xml attributes defined in FolderInfo class.
/// </remarks>
/// <history>
/// [cnurse] 11/08/2004 Created
/// </history>
public void SerializeFolders( XmlDocument xmlTemplate, XmlNode nodeFolders, PortalInfo objportal, ref ZipOutputStream zipFile )
{
// Sync db and filesystem before exporting so all required files are found
FileSystemUtils.Synchronize(objportal.PortalID, objportal.AdministratorRoleId, objportal.HomeDirectoryMapPath);
FolderController objFolders = new FolderController();
ArrayList arrFolders = objFolders.GetFoldersByPortal( objportal.PortalID );
XmlSerializer xser = new XmlSerializer( typeof( FolderInfo ) );
foreach( FolderInfo objFolder in arrFolders )
{
StringWriter sw = new StringWriter();
xser.Serialize( sw, objFolder );
XmlDocument xmlFolder = new XmlDocument();
xmlFolder.LoadXml( sw.GetStringBuilder().ToString() );
XmlNode nodeFolder = xmlFolder.SelectSingleNode( "folder" );
nodeFolder.Attributes.Remove( nodeFolder.Attributes["xmlns:xsd"] );
nodeFolder.Attributes.Remove( nodeFolder.Attributes["xmlns:xsi"] );
//Serialize Folder Permissions
XmlNode nodePermissions = xmlTemplate.CreateElement( "folderpermissions" );
SerializeFolderPermissions( xmlTemplate, nodePermissions, objportal, objFolder.FolderPath );
nodeFolder.AppendChild( xmlFolder.ImportNode( nodePermissions, true ) );
// Serialize files
XmlNode nodeFiles = xmlTemplate.CreateElement( "files" );
SerializeFiles( xmlTemplate, nodeFiles, objportal, objFolder.FolderPath, ref zipFile );
nodeFolder.AppendChild( xmlFolder.ImportNode( nodeFiles, true ) );
nodeFolders.AppendChild( xmlTemplate.ImportNode( nodeFolder, true ) );
}
}
示例12: SerializePortalSettings
private void SerializePortalSettings(XmlWriter writer, PortalInfo portal)
{
writer.WriteStartElement("settings");
writer.WriteElementString("logofile", portal.LogoFile);
writer.WriteElementString("footertext", portal.FooterText);
writer.WriteElementString("userregistration", portal.UserRegistration.ToString());
writer.WriteElementString("banneradvertising", portal.BannerAdvertising.ToString());
writer.WriteElementString("defaultlanguage", portal.DefaultLanguage);
Dictionary<string, string> settingsDictionary = PortalController.GetPortalSettingsDictionary(portal.PortalID);
string setting;
settingsDictionary.TryGetValue("DefaultPortalSkin", out setting);
if (!string.IsNullOrEmpty(setting))
{
writer.WriteElementString("skinsrc", setting);
}
settingsDictionary.TryGetValue("DefaultAdminSkin", out setting);
if (!string.IsNullOrEmpty(setting))
{
writer.WriteElementString("skinsrcadmin", setting);
}
settingsDictionary.TryGetValue("DefaultPortalContainer", out setting);
if (!string.IsNullOrEmpty(setting))
{
writer.WriteElementString("containersrc", setting);
}
settingsDictionary.TryGetValue("DefaultAdminContainer", out setting);
if (!string.IsNullOrEmpty(setting))
{
writer.WriteElementString("containersrcadmin", setting);
}
settingsDictionary.TryGetValue("EnableSkinWidgets", out setting);
if (!string.IsNullOrEmpty(setting))
{
writer.WriteElementString("enableskinwidgets", setting);
}
settingsDictionary.TryGetValue("portalaliasmapping", out setting);
if (!string.IsNullOrEmpty(setting))
{
writer.WriteElementString("portalaliasmapping", setting);
}
writer.WriteElementString("contentlocalizationenabled", this.chkMultilanguage.Checked.ToString());
settingsDictionary.TryGetValue("TimeZone", out setting);
if (!string.IsNullOrEmpty(setting))
{
writer.WriteElementString("timezone", setting);
}
settingsDictionary.TryGetValue("EnablePopups", out setting);
if (!string.IsNullOrEmpty(setting))
{
writer.WriteElementString("enablepopups", setting);
}
settingsDictionary.TryGetValue("InlineEditorEnabled", out setting);
if (!string.IsNullOrEmpty(setting))
{
writer.WriteElementString("inlineeditorenabled", setting);
}
settingsDictionary.TryGetValue("HideFoldersEnabled", out setting);
if (!string.IsNullOrEmpty(setting))
{
writer.WriteElementString("hidefoldersenabled", setting);
}
settingsDictionary.TryGetValue("ControlPanelMode", out setting);
if (!string.IsNullOrEmpty(setting))
{
writer.WriteElementString("controlpanelmode", setting);
}
settingsDictionary.TryGetValue("ControlPanelSecurity", out setting);
if (!string.IsNullOrEmpty(setting))
{
writer.WriteElementString("controlpanelsecurity", setting);
}
settingsDictionary.TryGetValue("ControlPanelVisibility", out setting);
if (!string.IsNullOrEmpty(setting))
{
writer.WriteElementString("controlpanelvisibility", setting);
}
writer.WriteElementString("hostspace", portal.HostSpace.ToString());
writer.WriteElementString("userquota", portal.UserQuota.ToString());
writer.WriteElementString("pagequota", portal.PageQuota.ToString());
//End Portal Settings
writer.WriteEndElement();
}
示例13: SerializeSettings
/// <summary>
/// Serializes a PortalInfo object
/// </summary>
/// <param name="xmlTemplate">Reference to XmlDocument context</param>
/// <param name="nodePortal">Node to add the serialized objects</param>
/// <param name="objportal">Portal to serialize</param>
/// <remarks>
/// The serialization uses the xml attributes defined in PortalInfo class.
/// </remarks>
/// <history>
/// [VMasanas] 23/09/2004 Created
/// </history>
public void SerializeSettings( XmlDocument xmlTemplate, XmlNode nodePortal, PortalInfo objportal )
{
XmlSerializer xser;
StringWriter sw;
XmlNode nodeSettings;
XmlDocument xmlSettings;
xser = new XmlSerializer( typeof( PortalInfo ) );
sw = new StringWriter();
xser.Serialize( sw, objportal );
xmlSettings = new XmlDocument();
xmlSettings.LoadXml( sw.GetStringBuilder().ToString() );
nodeSettings = xmlSettings.SelectSingleNode( "settings" );
nodeSettings.Attributes.Remove( nodeSettings.Attributes["xmlns:xsd"] );
nodeSettings.Attributes.Remove( nodeSettings.Attributes["xmlns:xsi"] );
//remove unwanted elements
nodeSettings.RemoveChild( nodeSettings.SelectSingleNode( "portalid" ) );
nodeSettings.RemoveChild( nodeSettings.SelectSingleNode( "portalname" ) );
nodeSettings.RemoveChild( nodeSettings.SelectSingleNode( "administratorid" ) );
nodeSettings.RemoveChild( nodeSettings.SelectSingleNode( "administratorroleid" ) );
nodeSettings.RemoveChild( nodeSettings.SelectSingleNode( "administratorrolename" ) );
nodeSettings.RemoveChild( nodeSettings.SelectSingleNode( "registeredroleid" ) );
nodeSettings.RemoveChild( nodeSettings.SelectSingleNode( "registeredrolename" ) );
nodeSettings.RemoveChild( nodeSettings.SelectSingleNode( "description" ) );
nodeSettings.RemoveChild( nodeSettings.SelectSingleNode( "keywords" ) );
nodeSettings.RemoveChild( nodeSettings.SelectSingleNode( "processorpassword" ) );
nodeSettings.RemoveChild( nodeSettings.SelectSingleNode( "processoruserid" ) );
nodeSettings.RemoveChild( nodeSettings.SelectSingleNode( "admintabid" ) );
nodeSettings.RemoveChild( nodeSettings.SelectSingleNode( "supertabid" ) );
nodeSettings.RemoveChild( nodeSettings.SelectSingleNode( "users" ) );
nodeSettings.RemoveChild( nodeSettings.SelectSingleNode( "pages" ) );
nodeSettings.RemoveChild( nodeSettings.SelectSingleNode( "splashtabid" ) );
nodeSettings.RemoveChild( nodeSettings.SelectSingleNode( "hometabid" ) );
nodeSettings.RemoveChild( nodeSettings.SelectSingleNode( "logintabid" ) );
nodeSettings.RemoveChild( nodeSettings.SelectSingleNode( "usertabid" ) );
nodeSettings.RemoveChild( nodeSettings.SelectSingleNode( "homedirectory" ) );
nodeSettings.RemoveChild(nodeSettings.SelectSingleNode("expirydate"));
nodeSettings.RemoveChild(nodeSettings.SelectSingleNode("currency"));
nodeSettings.RemoveChild(nodeSettings.SelectSingleNode("hostfee"));
nodeSettings.RemoveChild(nodeSettings.SelectSingleNode("hostspace"));
nodeSettings.RemoveChild( nodeSettings.SelectSingleNode( "pagequota" ) );
nodeSettings.RemoveChild( nodeSettings.SelectSingleNode( "userquota" ) );
nodeSettings.RemoveChild(nodeSettings.SelectSingleNode("backgroundfile"));
nodeSettings.RemoveChild(nodeSettings.SelectSingleNode("paymentprocessor"));
nodeSettings.RemoveChild(nodeSettings.SelectSingleNode("siteloghistory"));
AddSkinXml( xmlSettings, nodeSettings, SkinInfo.RootSkin, "portal", objportal.PortalID );
AddSkinXml( xmlSettings, nodeSettings, SkinInfo.RootContainer, "portal", objportal.PortalID );
nodePortal.AppendChild( xmlTemplate.ImportNode( nodeSettings, true ) );
}
示例14: RenderPortalNode
/// <summary>
/// Renders the <paramref name="portal" /> node.
/// </summary>
/// <param name="portal">The <paramref name="portal" />.</param>
/// <param name="moduleController">The module controller.</param>
/// <param name="editorHostSettings">The editor host settings.</param>
private void RenderPortalNode(PortalInfo portal, ModuleController moduleController, List<EditorHostSetting> editorHostSettings)
{
var portalKey = string.Format("DNNCKP#{0}#", portal.PortalID);
var portalSettingsExists = SettingsUtil.CheckExistsPortalOrPageSettings(editorHostSettings, portalKey);
// Portals
var portalNode = new TreeNode
{
Text = portal.PortalName,
Value = string.Format("p{0}", portal.PortalID),
ImageUrl =
portalSettingsExists
? "../images/PortalHasSetting.png"
: "../images/PortalNoSetting.png",
Expanded = this.PortalOnly.Checked
};
foreach (var tabInfo in TabController.GetTabsByParent(-1, portal.PortalID))
{
this.RenderTabNode(portalNode, tabInfo, moduleController, editorHostSettings);
}
this.PortalTabsAndModulesTree.Nodes.Add(portalNode);
}
示例15: AddChildNodes
private void AddChildNodes(RadTreeNode parentNode, PortalInfo portal)
{
parentNode.Nodes.Clear();
var parentId = int.Parse(parentNode.Value);
var Tabs = TabController.Instance.GetTabsByPortal(portal.PortalID).WithCulture(languageComboBox.SelectedValue, true).WithParentId(parentId);
foreach (var tab in Tabs)
{
if (tab.ParentId == parentId)
{
string tooltip;
var nodeIcon = GetNodeIcon(tab, out tooltip);
var node = new RadTreeNode
{
Text = string.Format("{0} {1}", tab.TabName, GetNodeStatusIcon(tab)),
Value = tab.TabID.ToString(CultureInfo.InvariantCulture),
AllowEdit = true,
ImageUrl = nodeIcon,
ToolTip = tooltip,
Checked = true
};
AddChildNodes(node, portal);
parentNode.Nodes.Add(node);
}
}
}