private void BindPortalDropDown() { int i; if (UserInfo.IsSuperUser) { PortalController objPortalController = new PortalController(); ArrayList arrPortals = objPortalController.GetPortals(); arrPortals.Sort(new PortalSortTitle()); ddlPortalid.DataTextField = "PortalName"; ddlPortalid.DataValueField = "PortalID"; ddlPortalid.DataSource = arrPortals; ddlPortalid.DataBind(); ListItem ddlAllPortals = new ListItem(Localization.GetString("All"), "-1"); ddlPortalid.Items.Insert(0, ddlAllPortals); //check to see if any portalname is empty, otherwise set it to portalid for (i = 0; i <= ddlPortalid.Items.Count - 1; i++) { if (ddlPortalid.Items[i].Text.Length == 0) { ddlPortalid.Items[i].Text = "Portal: " + ddlPortalid.Items[i].Value; } } } else { plPortalID.Visible = false; ddlPortalid.Visible = false; } }
private void BindSettingControls() { // Toggle fields if a redirect already exists for the Portal Home Page var defaultRedirect = HomePageRedirectExists(); // Populating Portals dropdown var portalController = new PortalController(); var portals = portalController.GetPortals().Cast <PortalInfo>().Where(p => p.PortalID != ModuleContext.PortalId).ToList(); if (portals.Count > 0) { cboPortal.DataSource = portals; cboPortal.DataTextField = "PortalName"; cboPortal.DataValueField = "PortalID"; cboPortal.DataBind(); } else { optRedirectTarget.Items[0].Enabled = false; optRedirectTarget.Items[0].Selected = false; optRedirectTarget.Items[1].Selected = true; } cboSourcePage.Visible = defaultRedirect; lblHomePage.Visible = !defaultRedirect; lblRedirectName.Visible = defaultRedirect; txtRedirectName.Visible = defaultRedirect; }
protected override void OnPreRender(EventArgs e) { base.OnPreRender(e); DataList1.DataSource = PortalController.GetPortals(CurrentUser.UserID, AppEnv.GetLanguage()); DataList1.ItemDataBound += new DataListItemEventHandler(DataList1_ItemDataBound); DataList1.DataBind(); }
public static void AddAdminPages(string tabName, string description, string tabIconFile, string tabIconFileLarge, bool isVisible, int moduleDefId, string moduleTitle, string moduleIconFile, bool inheritPermissions) { var portalController = new PortalController(); ArrayList portals = portalController.GetPortals(); //Add Page to Admin Menu of all configured Portals for (int intPortal = 0; intPortal <= portals.Count - 1; intPortal++) { var portal = (PortalInfo)portals[intPortal]; //Create New Admin Page (or get existing one) TabInfo newPage = Upgrade.AddAdminPage(portal, tabName, description, tabIconFile, tabIconFileLarge, isVisible); //Add Module To Page Upgrade.AddModuleToPage(newPage, moduleDefId, moduleTitle, moduleIconFile, inheritPermissions); var moduleController = new ModuleController(); if (newPage != null) { foreach (var module in moduleController.GetTabModules(newPage.TabID).Values) { moduleController.UpdateTabModuleSetting(module.TabModuleID, "hideadminborder", "true"); } } } }
/// ----------------------------------------------------------------------------- /// <summary> /// Page_Load runs when the control is loaded /// </summary> /// <param name="sender"></param> /// <param name="e"></param> /// <remarks> /// </remarks> /// <history> /// [VMasanas] 23/09/2004 Created /// </history> /// ----------------------------------------------------------------------------- protected override void OnLoad(EventArgs e) { base.OnLoad(e); cmdCancel.Click += cmdCancel_Click; cmdExport.Click += cmdExport_Click; cboPortals.SelectedIndexChanged += cboPortals_SelectedIndexChanged; try { if (!Page.IsPostBack) { var objportals = new PortalController(); cboPortals.DataTextField = "PortalName"; cboPortals.DataValueField = "PortalId"; cboPortals.DataSource = objportals.GetPortals(); cboPortals.DataBind(); cboPortals.SelectedValue = PortalId.ToString(CultureInfo.InvariantCulture); SetupSettings(); } } catch (Exception exc) { Exceptions.ProcessModuleLoadException(this, exc); } }
/// <summary> /// While upgrading to 05.04.02, make sure the template folders get renamed to "2sxc" /// </summary> private static void Version050500() { var portalController = new PortalController(); var portals = portalController.GetPortals(); var pathsToCopy = portals.Cast <PortalInfo>().Select(p => p.HomeDirectoryMapPath).ToList(); pathsToCopy.Add(HttpContext.Current.Server.MapPath("~/Portals/_default/")); foreach (var path in pathsToCopy) { var portalFolder = new DirectoryInfo(path); if (portalFolder.Exists) { var oldSexyFolder = new DirectoryInfo(Path.Combine(path, "2sexy")); var newSexyFolder = new DirectoryInfo(Path.Combine(path, "2sxc")); var newSexyContentFolder = new DirectoryInfo(Path.Combine(newSexyFolder.FullName, "Content")); if (oldSexyFolder.Exists && !newSexyFolder.Exists) { // Move 2sexy directory to 2scx/Content DirectoryCopy(oldSexyFolder.FullName, newSexyContentFolder.FullName, true); // Leave info message in the content folder File.WriteAllText(Path.Combine(oldSexyFolder.FullName, "__WARNING - old copy of files - READ ME.txt"), "This is a short information\r\n\r\n2sxc renamed the main folder from \"[Portal]/2Sexy\" to \"[Portal]/2sxc\" in version 5.5.\r\n\r\nTo make sure that links to images/css/js still work, the old folder was copied and this was left. Please clean up and delete the entire \"[Portal]/2Sexy/\" folder once you're done. \r\n\r\nMany thanks!\r\n2sxc\r\n\r\nPS: Remember that you might have ClientDependency activated, so maybe you still have bundled & minified JS/CSS-Files in your cache pointing to the old location. When done cleaning up, we recommend increasing the version just to be sure you're not seeing an old files that don't exist any more. "); // Move web.config (should be directly in 2sxc) if (File.Exists(Path.Combine(newSexyContentFolder.FullName, "web.config"))) { File.Move(Path.Combine(newSexyContentFolder.FullName, "web.config"), Path.Combine(newSexyFolder.FullName, "web.config")); } } } } }
/// ----------------------------------------------------------------------------- /// <summary> /// UpgradeModule implements the IUpgradeable Interface /// </summary> /// <param name="version">The current version of the module</param> /// ----------------------------------------------------------------------------- //public string UpgradeModule(string Version) //{ // throw new System.NotImplementedException("The method or operation is not implemented."); //} #endregion public string UpgradeModule(string version) { string res = ""; if (version == "02.01.00") { var pc = new PortalController(); foreach (var p in pc.GetPortals().Cast <PortalInfo>()) { string webConfig = HostingEnvironment.MapPath("~/" + p.HomeDirectory + "/OpenContent/Templates/web.config"); res += webConfig; if (File.Exists(webConfig)) { res += " : found \n"; File.Delete(webConfig); string filename = HostingEnvironment.MapPath("~/DesktopModules/OpenContent/Templates/web.config"); File.Copy(filename, webConfig); } } } else if (version == "03.02.00") { LuceneUtils.IndexAll(); } return(version + res); }
public CheckResult Execute() { var result = new CheckResult(SeverityEnum.Unverified, "CheckSiteRegistration"); try { var portalController = new PortalController(); result.Severity = SeverityEnum.Pass; foreach (PortalInfo portal in portalController.GetPortals()) { //check for public registration if (portal.UserRegistration == 2) { result.Severity = SeverityEnum.Warning; result.Notes.Add("Portal:" + portal.PortalName); } } } catch (Exception) { throw; } return(result); }
private static void UpdateSupportedFeatures(object objController, int desktopModuleId) { try { DesktopModuleInfo desktopModule = DesktopModuleController.GetDesktopModule(desktopModuleId, Null.NullInteger); if ((desktopModule != null)) { //Initialise the SupportedFeatures desktopModule.SupportedFeatures = 0; //Test the interfaces desktopModule.IsPortable = (objController is IPortable); #pragma warning disable 0618 desktopModule.IsSearchable = (objController is ModuleSearchBase) || (objController is ISearchable); #pragma warning restore 0618 desktopModule.IsUpgradeable = (objController is IUpgradeable); DesktopModuleController.SaveDesktopModule(desktopModule, false, false, false); var portalController = new PortalController(); foreach (PortalInfo portal in portalController.GetPortals()) { DataCache.RemoveCache(String.Format(DataCache.DesktopModuleCacheKey, portal.PortalID)); DataCache.RemoveCache(String.Format(DataCache.PortalDesktopModuleCacheKey, portal.PortalID)); } } } catch (Exception exc) { Exceptions.LogException(exc); } }
public CheckResult Execute() { var result = new CheckResult(SeverityEnum.Unverified, this.Id); try { var portalController = new PortalController(); var controller = new ListController(); var richTextDataType = controller.GetListEntryInfo("DataType", "RichText"); result.Severity = SeverityEnum.Pass; foreach (PortalInfo portal in portalController.GetPortals()) { var pd = ProfileController.GetPropertyDefinitionByName(portal.PortalID, "Biography"); if (pd != null && pd.DataType == richTextDataType.EntryID && !pd.Deleted) { result.Severity = SeverityEnum.Warning; result.Notes.Add("Portal:" + portal.PortalName); } } } catch (Exception) { throw; } return(result); }
private void BindPortalDropDown() { if (UserInfo.IsSuperUser) { //ddlPortalid.Items.Add(new ListItem(Localization.GetString("All"), "-1")); ddlPortalid.AddItem(Localization.GetString("All"), "-1"); var objPortalController = new PortalController(); foreach (PortalInfo portal in objPortalController.GetPortals().Cast <PortalInfo>() .OrderBy(p => p.PortalName) .ToList()) { ddlPortalid.AddItem(portal.PortalName, portal.PortalID.ToString()); } //check to see if any portalname is empty, otherwise set it to portalid for (var i = 0; i <= ddlPortalid.Items.Count - 1; i++) { if (String.IsNullOrEmpty(ddlPortalid.Items[i].Text)) { ddlPortalid.Items[i].Text = @"Portal: " + ddlPortalid.Items[i].Value; } } } else { plPortalID.Visible = false; ddlPortalid.Visible = false; } }
public override void DoWork() { try { this.Progressing(); this.ScheduleHistoryItem.AddLogNote("Start purging old carts...<br>"); BBStoreController ctrl = new BBStoreController(); PortalController pc = new PortalController(); var portals = pc.GetPortals(); foreach (PortalInfo portal in portals) { Hashtable cartsettings = ctrl.GetCartSettings(portal.PortalID); int interval = Convert.ToInt32(cartsettings["PurgeInterval"] ?? "0"); if (interval > 0) { ctrl.PurgeCarts(portal.PortalID, interval); this.ScheduleHistoryItem.AddLogNote("Deleting carts in portal '" + portal.PortalName + "' older than " + DateTime.Today.AddDays((-1) * interval).ToShortDateString() + "...<br>"); } } this.ScheduleHistoryItem.AddLogNote("Purging carts finished."); this.ScheduleHistoryItem.Succeeded = true; } catch (Exception ex) { this.ScheduleHistoryItem.Succeeded = false; this.ScheduleHistoryItem.AddLogNote("Exception: " + ex.ToString()); this.Errored(ref ex); DotNetNuke.Services.Exceptions.Exceptions.LogException(ex); } }
public UserCreateStatus CreateNewUser(string firstName, string lastName, string emailAddress, int portalId) { var ctlPortal = new PortalController(); var portalSettings = ctlPortal.GetPortals().Cast <PortalInfo>().FirstOrDefault(p => p.PortalID == portalId); var user = new UserInfo() { FirstName = firstName, LastName = lastName, Email = emailAddress, Username = emailAddress, DisplayName = string.Concat(firstName, " ", lastName), PortalID = portalId }; user.Profile.PreferredLocale = portalSettings.DefaultLanguage; user.Profile.FirstName = firstName; user.Profile.LastName = lastName; user.Membership.Approved = true; user.Membership.Password = PasswordGenerator.GeneratePassword(); user.Membership.UpdatePassword = true; var status = UserController.CreateUser(ref user); User = user; return(status); }
protected IEnumerable <string> LoadSeachContentSourcesList() { var portalCtrl = new PortalController(); var portals = portalCtrl.GetPortals(); var result = new List <string>(); foreach (var portal in portals) { var pi = portal as PortalInfo; if (pi != null) { var list = InternalSearchController.Instance.GetSearchContentSourceList(pi.PortalID); foreach (var src in list) { if (!src.IsPrivate && !result.Contains(src.LocalizedName)) { result.Add(src.LocalizedName); } } } } return(result); }
protected void Page_Load(object sender, EventArgs e) { userId = ConvertUtility.ToInt32(Request.QueryString["uid"]); if (!CurrentUser.IsAdmin) { pnlAdmin.Visible = false; } if (!CurrentUser.IsSuperAdmin) { pnlSuperadmin.Visible = false; } else if (CurrentUser.IsSuperAdmin) { pnlSuperadmin.Visible = true; pnlAdmin.Visible = true; } if (!Page.IsPostBack) { PortalController.LoadPortals(lstPortal.Items); UserInfo user = UserController.GetUser(userId); if (user == null) { this.btnUpdate.Visible = false; this.btnManagePassword.Visible = false; return; } lblUsername.Text = user.Username; txtAddress1.Text = user.Address1; txtAddress2.Text = user.Address2; MiscUtility.SelectItemFromList(dropCity, user.City.ToString()); MiscUtility.SelectItemFromList(dropCountry, user.Country.ToString()); txtDisplayName.Text = user.DisplayName; txtEmail.Text = user.Email; txtFirstName.Text = user.FirstName; chkIsSuperAdmin.Checked = user.IsSuperAdmin; chkIsAdmin.Checked = user.IsAdmin; txtLastName.Text = user.LastName; txtMobile.Text = user.Mobile; txtTel.Text = user.Tel; txtZipCode.Text = user.ZipCode; DataTable dtUserPortals = PortalController.GetPortals(user.UserID, AppEnv.GetLanguage()); foreach (DataRow row in dtUserPortals.Rows) { if (lstPortal.Items.FindByValue(row["PortalID"].ToString()) != null) { lstPortal.Items.FindByValue(row["PortalID"].ToString()).Selected = true; } } //dropPartner.DataSource = PartnerController.GetPartners(); //dropPartner.DataBind(); //if (user.PartnerID != 0) //{ // dropPartner.SelectedValue = user.PartnerID.ToString(); //} } }
private void ShowPortals() { #if DEBUG gvPortals.Columns[2].Visible = true; #endif PortalController pc = new PortalController(); gvPortals.DataSource = pc.GetPortals(); gvPortals.DataBind(); }
private static void ClearCache() { var portalController = new PortalController(); foreach (PortalAliasInfo portal in portalController.GetPortals()) { ClearCache(portal.PortalID); } }
public override void LoadSettings() { try { if (!Page.IsPostBack) { PortalController pc = new PortalController(); ArrayList Portals = pc.GetPortals(); ddlPortalList.DataTextField = "PortalName"; ddlPortalList.DataValueField = "PortalID"; ddlPortalList.DataSource = Portals; ddlPortalList.DataBind(); string BasePortalId = ((string)Settings["BasePortal"]); if (BasePortalId == null) { ddlPortalList.SelectedValue = "0"; } else { ddlPortalList.SelectedValue = BasePortalId; } if (Settings["HeaderTemplate"] == null) { txtHeaderTemplate.Text = "<table>"; } else { txtHeaderTemplate.Text = Settings["HeaderTemplate"].ToString(); } if (Settings["ItemTemplate"] == null) { txtItemTemplate.Text = SCAOfficerListUtility.DefaultItemTemplate; } else { txtItemTemplate.Text = Settings["ItemTemplate"].ToString(); } if (Settings["FooterTemplate"] == null) { txtFooterTemplate.Text = "</table>"; } else { txtFooterTemplate.Text = Settings["FooterTemplate"].ToString(); } } } catch (Exception exc) { Exceptions.ProcessModuleLoadException(this, exc); } }
public static void AddDesktopModuleToPortals(int desktopModuleID) { PortalController controller = new PortalController(); foreach (PortalInfo portal in controller.GetPortals()) { AddDesktopModuleToPortal(portal.PortalID, desktopModuleID, true, false); } DataCache.ClearHostCache(true); }
private void SynchronizeFiles() { var ctlPortal = new PortalController(); var portals = ctlPortal.GetPortals(); foreach (PortalInfo portal in portals) { SyncForPortal(portal.PortalID); } }
private void BindDetailData() { var pc = new PortalController(); ddlLogTypePortalID.DataTextField = "PortalName"; ddlLogTypePortalID.DataValueField = "PortalID"; ddlLogTypePortalID.DataSource = pc.GetPortals(); ddlLogTypePortalID.DataBind(); // ReSharper disable LocalizableElement var i = new ListItem { Text = Localization.GetString("All"), Value = "*" }; // ReSharper restore LocalizableElement ddlLogTypePortalID.Items.Insert(0, i); pnlEditLogTypeConfigInfo.Visible = true; pnlLogTypeConfigInfo.Visible = false; var logController = new LogController(); var arrLogTypeInfo = logController.GetLogTypeInfoDictionary().Values.OrderBy(t => t.LogTypeFriendlyName); ddlLogTypeKey.DataTextField = "LogTypeFriendlyName"; ddlLogTypeKey.DataValueField = "LogTypeKey"; ddlLogTypeKey.DataSource = arrLogTypeInfo; ddlLogTypeKey.DataBind(); int[] items = { 1, 2, 3, 4, 5, 10, 25, 100, 250, 500 }; ddlKeepMostRecent.Items.Clear(); ddlKeepMostRecent.Items.Add(new ListItem(Localization.GetString("All"), "*")); foreach (int item in items) { ddlKeepMostRecent.Items.Add(item == 1 ? new ListItem(item + Localization.GetString("LogEntry", LocalResourceFile), item.ToString(CultureInfo.InvariantCulture)) : new ListItem(item + Localization.GetString("LogEntries", LocalResourceFile), item.ToString(CultureInfo.InvariantCulture))); } int[] items2 = { 1, 2, 3, 4, 5, 10, 25, 100, 250, 500, 1000 }; ddlThreshold.Items.Clear(); foreach (int item in items2) { ddlThreshold.Items.Add(item == 1 ? new ListItem(item + Localization.GetString("Occurence", LocalResourceFile), item.ToString(CultureInfo.InvariantCulture)) : new ListItem(item + Localization.GetString("Occurences", LocalResourceFile), item.ToString(CultureInfo.InvariantCulture))); } // ReSharper disable LocalizableElement var j = new ListItem { Text = Localization.GetString("All"), Value = "*" }; // ReSharper restore LocalizableElement ddlLogTypeKey.Items.Insert(0, j); }
protected void ctlPortals_RemoveAllButtonClick(object sender, EventArgs e) { //Add all Portals var objPortals = new PortalController(); foreach (PortalInfo objPortal in objPortals.GetPortals()) { DesktopModuleController.RemoveDesktopModuleFromPortal(objPortal.PortalID, DesktopModule.DesktopModuleID, false); } DataCache.ClearHostCache(true); BindDesktopModule(false); }
private static void CacheMappedDirectory() { Services.FileSystem.FolderController objFolderController = new Services.FileSystem.FolderController(); PortalController objPortalController = new PortalController(); ArrayList arrPortals = objPortalController.GetPortals(); int i; for (i = 0; i <= arrPortals.Count - 1; i++) { PortalInfo objPortalInfo = (PortalInfo)arrPortals[i]; objFolderController.SetMappedDirectory(objPortalInfo, HttpContext.Current); } }
public string UpgradeModule(string Version) { try { switch (Version) { case "06.02.00": var portalController = new PortalController(); var moduleController = new ModuleController(); var tabController = new TabController(); var moduleDefinition = ModuleDefinitionController.GetModuleDefinitionByFriendlyName("Message Center"); if (moduleDefinition != null) { var portals = portalController.GetPortals(); foreach (PortalInfo portal in portals) { if (portal.UserTabId > Null.NullInteger) { //Find TabInfo var tab = tabController.GetTab(portal.UserTabId, portal.PortalID, true); if (tab != null) { foreach (var module in moduleController.GetTabModules(portal.UserTabId).Values) { if (module.DesktopModule.FriendlyName == "Messaging") { //Delete the Module from the Modules list moduleController.DeleteTabModule(module.TabID, module.ModuleID, false); //Add new module to the page Upgrade.AddModuleToPage(tab, moduleDefinition.ModuleDefID, "Message Center", "", true); break; } } } } } } break; } return("Success"); } catch (Exception exc) { Logger.Error(exc); return("Failed"); } }
private void BindSettingControls() { // Toggle fields if a redirect already exists for the Portal Home Page var defaultRedirect = HomePageRedirectExists(); // Populate Pages dropdowns var tabs = new TabController().GetTabsByPortal(ModuleContext.PortalId).AsList().Where(IsVisible); cboSourcePage.DataTextField = "IndentedTabName"; cboSourcePage.DataValueField = "TabID"; cboSourcePage.DataSource = tabs; cboSourcePage.DataBind(); cboTargetPage.DataTextField = "IndentedTabName"; cboTargetPage.DataValueField = "TabID"; //if set a default redirect then hide home page in target page list. if (!defaultRedirect) { cboTargetPage.DataSource = tabs.Where(t => t.TabID != ModuleContext.PortalSettings.HomeTabId); } else { cboTargetPage.DataSource = tabs; } cboTargetPage.DataBind(); // Populating Portals dropdown var portalController = new PortalController(); var portals = portalController.GetPortals().Cast <PortalInfo>().Where(p => p.PortalID != ModuleContext.PortalId).ToList(); if (portals.Count > 0) { cboPortal.DataSource = portals; cboPortal.DataTextField = "PortalName"; cboPortal.DataValueField = "PortalID"; cboPortal.DataBind(); } else { optRedirectTarget.Items[0].Enabled = false; optRedirectTarget.Items[0].Selected = false; optRedirectTarget.Items[1].Selected = true; } cboSourcePage.Visible = defaultRedirect; lblHomePage.Visible = !defaultRedirect; lblRedirectName.Visible = defaultRedirect; txtRedirectName.Visible = defaultRedirect; }
protected SearchItemInfoCollection GetContent(IndexingProvider indexer) { var searchItems = new SearchItemInfoCollection(); var objPortals = new PortalController(); var arrPortals = objPortals.GetPortals(); int intPortal; for (intPortal = 0; intPortal <= arrPortals.Count - 1; intPortal++) { var objPortal = (PortalInfo)arrPortals[intPortal]; searchItems.AddRange(indexer.GetSearchIndexItems(objPortal.PortalID)); } return(searchItems); }
public string UpgradeModule(string version) { var v = new Version(version); if (v == new Version(1, 8, 7)) { // Migrate UserStatus from UserProfile to EngageEmployment_UserStatus table. var portalController = new PortalController(); var portals = portalController.GetPortals(); foreach (PortalInfo portal in portals) { var maxSize = 0; var users = UserController.GetUsersByProfileProperty( portal.PortalID, propertyName: Utility.UserStatusPropertyName, propertyValue: "%", pageIndex: 0, pageSize: int.MaxValue, totalRecords: ref maxSize); foreach (UserInfo userInfo in users) { var userId = userInfo.UserID; var statusIdStr = userInfo.Profile.GetPropertyValue(Utility.UserStatusPropertyName); int statusId; if (int.TryParse(statusIdStr, NumberStyles.Integer, CultureInfo.InvariantCulture, out statusId)) { DataProvider.Instance().UpdateUserStatus(portal.PortalID, userId, statusId); } } var userStatusPropertyDefinition = ProfileController.GetPropertyDefinitionByName(portal.PortalID, Utility.UserStatusPropertyName); if (userStatusPropertyDefinition != null) { ProfileController.DeletePropertyDefinition(userStatusPropertyDefinition); } } return("Migrated user statuses from DNN user profile to EngageEmployment_UserStatus table"); } if (v == new Version(1, 9, 8)) { new PermissionController().CreateCustomPermissions(); return("Created custom module permissions"); } return("No upgrade action required for this version"); }
private void Synchronize() { PortalController objPortals = new PortalController(); ArrayList arrPortals = objPortals.GetPortals(); PortalInfo objPortal; FileSystemUtils.Synchronize(Null.NullInteger, Null.NullInteger, Common.Globals.HostMapPath, false); int intIndex; for (intIndex = 0; intIndex <= arrPortals.Count - 1; intIndex++) { objPortal = (PortalInfo)arrPortals[intIndex]; FileSystemUtils.Synchronize(objPortal.PortalID, objPortal.AdministratorRoleId, objPortal.HomeDirectoryMapPath, false); } }
/// ----------------------------------------------------------------------------- /// <summary> /// CacheMappedDirectory caches the Portal Mapped Directory(s) /// </summary> /// <remarks> /// </remarks> /// <history> /// [cnurse] 1/27/2005 Moved back to App_Start from Caching Module /// </history> /// ----------------------------------------------------------------------------- private static void CacheMappedDirectory() { //This code is only retained for binary compatability. #pragma warning disable 612,618 var objFolderController = new FolderController(); var objPortalController = new PortalController(); ArrayList arrPortals = objPortalController.GetPortals(); int i; for (i = 0; i <= arrPortals.Count - 1; i++) { var objPortalInfo = (PortalInfo)arrPortals[i]; objFolderController.SetMappedDirectory(objPortalInfo, HttpContext.Current); } #pragma warning restore 612,618 }
private void LoadPortalsList() { var portalCtrl = new PortalController(); ArrayList portals = portalCtrl.GetPortals(); SitesLst.ClearSelection(); SitesLst.Items.Clear(); SitesLst.DataSource = portals; SitesLst.DataTextField = "PortalName"; SitesLst.DataValueField = "PortalID"; SitesLst.DataBind(); SitesLst.Items.Insert(0, new ListItem(string.Empty)); }