diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/EnterpriseStorage/EnterpriseStorageController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/EnterpriseStorage/EnterpriseStorageController.cs index 76f7541d..f3654fa5 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/EnterpriseStorage/EnterpriseStorageController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/EnterpriseStorage/EnterpriseStorageController.cs @@ -618,21 +618,23 @@ namespace WebsitePanel.EnterpriseServer DataProvider.SearchExchangeAccountsByTypes(SecurityContext.User.UserId, itemId, accountTypes, filterColumn, filterValue, sortColumn)); + return tmpAccounts; - List exAccounts = new List(); + // on large lists is very slow - foreach (ExchangeAccount tmpAccount in tmpAccounts.ToArray()) - { - if (tmpAccount.AccountType == ExchangeAccountType.SecurityGroup || tmpAccount.AccountType == ExchangeAccountType.DefaultSecurityGroup - ? OrganizationController.GetSecurityGroupGeneralSettings(itemId, tmpAccount.AccountId) == null - : OrganizationController.GetUserGeneralSettings(itemId, tmpAccount.AccountId) == null) - continue; + //List exAccounts = new List(); - exAccounts.Add(tmpAccount); - } + //foreach (ExchangeAccount tmpAccount in tmpAccounts.ToArray()) + //{ + // if (tmpAccount.AccountType == ExchangeAccountType.SecurityGroup || tmpAccount.AccountType == ExchangeAccountType.DefaultSecurityGroup + // ? OrganizationController.GetSecurityGroupGeneralSettings(itemId, tmpAccount.AccountId) == null + // : OrganizationController.GetUserGeneralSettings(itemId, tmpAccount.AccountId) == null) + // continue; - return exAccounts; + // exAccounts.Add(tmpAccount); + //} + //return exAccounts; } protected static SystemFilesPaged GetEnterpriseFoldersPagedInternal(int itemId, string filterValue, string sortColumn, int startRow, int maximumRows) diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/OrganizationController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/OrganizationController.cs index 7757dbd5..d5bf6d75 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/OrganizationController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/OrganizationController.cs @@ -2843,33 +2843,36 @@ namespace WebsitePanel.EnterpriseServer DataProvider.SearchExchangeAccountsByTypes(SecurityContext.User.UserId, itemId, accountTypes, filterColumn, filterValue, sortColumn)); + return tmpAccounts; - List accounts = new List(); + // on large lists is very slow - foreach (ExchangeAccount tmpAccount in tmpAccounts.ToArray()) - { - bool bSuccess = false; + //List accounts = new List(); - switch (tmpAccount.AccountType) - { - case ExchangeAccountType.SecurityGroup: - bSuccess = GetSecurityGroupGeneralSettings(itemId, tmpAccount.AccountId) != null; - break; - case ExchangeAccountType.DistributionList: - bSuccess = ExchangeServerController.GetDistributionListGeneralSettings(itemId, tmpAccount.AccountId) != null; - break; - default: - bSuccess = GetUserGeneralSettings(itemId, tmpAccount.AccountId) != null; - break; - } + //foreach (ExchangeAccount tmpAccount in tmpAccounts.ToArray()) + //{ + // bool bSuccess = false; - if (bSuccess) - { - accounts.Add(tmpAccount); - } - } + // switch (tmpAccount.AccountType) + // { + // case ExchangeAccountType.SecurityGroup: + // bSuccess = GetSecurityGroupGeneralSettings(itemId, tmpAccount.AccountId) != null; + // break; + // case ExchangeAccountType.DistributionList: + // bSuccess = ExchangeServerController.GetDistributionListGeneralSettings(itemId, tmpAccount.AccountId) != null; + // break; + // default: + // bSuccess = GetUserGeneralSettings(itemId, tmpAccount.AccountId) != null; + // break; + // } - return accounts; + // if (bSuccess) + // { + // accounts.Add(tmpAccount); + // } + //} + + //return accounts; } } } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationHome.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationHome.ascx.cs index 6869b014..c353096f 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationHome.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationHome.ascx.cs @@ -300,14 +300,14 @@ namespace WebsitePanel.Portal.ExchangeServer enterpriseStorageSpaceStats.QuotaUsedValue = stats.UsedEnterpriseStorageSpace; if (stats.AllocatedEnterpriseStorageSpace != -1) enterpriseStorageSpaceStats.QuotaAvailable = tenantStats.AllocatedEnterpriseStorageSpace - tenantStats.UsedEnterpriseStorageSpace; - lnkBESUsers.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "enterprisestorage_folders", + lnkEnterpriseStorageSpace.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "enterprisestorage_folders", "SpaceID=" + PanelSecurity.PackageId.ToString()); enterpriseStorageFoldersStats.QuotaValue = stats.AllocatedEnterpriseStorageFolders; enterpriseStorageFoldersStats.QuotaUsedValue = stats.CreatedEnterpriseStorageFolders; if (stats.AllocatedEnterpriseStorageFolders != -1) enterpriseStorageFoldersStats.QuotaAvailable = tenantStats.AllocatedEnterpriseStorageFolders - tenantStats.CreatedEnterpriseStorageFolders; - lnkBESUsers.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "enterprisestorage_folders", + lnkEnterpriseStorageFolders.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "enterprisestorage_folders", "SpaceID=" + PanelSecurity.PackageId.ToString()); }