From 732f827e827c114b776890fbb01371fa900cb63f Mon Sep 17 00:00:00 2001 From: vfedosevich Date: Tue, 16 Sep 2014 12:37:59 +0300 Subject: [PATCH 1/2] fix bug in SpaceQuotasControl. --- .../DesktopModules/WebsitePanel/SpaceQuotasControl.ascx | 2 +- .../WebsitePanel/SpaceQuotasControl.ascx.cs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SpaceQuotasControl.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SpaceQuotasControl.ascx index 2c94c5ff..004c1c4a 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SpaceQuotasControl.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SpaceQuotasControl.ascx @@ -13,7 +13,7 @@
- <%# GetQuotaTitle((string)Eval("QuotaName"), (string)Eval("QuotaDescription"))%>: + <%# GetQuotaTitle((string)Eval("QuotaName"), (object)Eval("QuotaDescription"))%>:
Date: Tue, 16 Sep 2014 16:02:32 +0300 Subject: [PATCH 2/2] fix issue with "Service Level" DropDownList on UserGeneralSetings page. --- .../WebsitePanel/ExchangeServer/ExchangeMailboxes.ascx.cs | 3 +-- .../ExchangeServer/OrganizationUserGeneralSettings.ascx.cs | 7 ++++++- .../WebsitePanel/ExchangeServer/OrganizationUsers.ascx.cs | 3 +-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxes.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxes.ascx.cs index 6473cd61..b3fa7da7 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxes.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxes.ascx.cs @@ -204,7 +204,7 @@ namespace WebsitePanel.Portal.ExchangeServer bool enable = !string.IsNullOrEmpty(serviceLevel.LevelName); enable = enable ? cntx.Quotas.ContainsKey(Quotas.SERVICE_LEVELS + serviceLevel.LevelName) : false; - enable = enable ? cntx.Quotas[Quotas.SERVICE_LEVELS + serviceLevel.LevelName].QuotaAllocatedValue > 0 : false; + enable = enable ? cntx.Quotas[Quotas.SERVICE_LEVELS + serviceLevel.LevelName].QuotaAllocatedValue != 0 : false; if (!enable) { @@ -212,7 +212,6 @@ namespace WebsitePanel.Portal.ExchangeServer serviceLevel.LevelDescription = ""; } - //return ServiceLevels.Where(x => x.LevelId == levelId).DefaultIfEmpty(new ServiceLevel { LevelName = "", LevelDescription = "" }).FirstOrDefault(); return serviceLevel; } } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx.cs index 27a541d6..7fe1cae5 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx.cs @@ -134,12 +134,17 @@ namespace WebsitePanel.Portal.HostedSolution addLevel = addLevel && cntx.Quotas.ContainsKey(Quotas.SERVICE_LEVELS + serviceLevel.LevelName); - addLevel = addLevel ? cntx.Quotas[Quotas.SERVICE_LEVELS + serviceLevel.LevelName].QuotaAllocatedValue > 0 : addLevel; + addLevel = addLevel ? cntx.Quotas[Quotas.SERVICE_LEVELS + serviceLevel.LevelName].QuotaAllocatedValue != 0 : addLevel; if (addLevel) { ddlServiceLevels.Items.Add(new ListItem(serviceLevel.LevelName, serviceLevel.LevelId.ToString())); + } + bool levelInDDL = ddlServiceLevels.Items.FindByValue(serviceLevel.LevelId.ToString()) != null; + + if (levelInDDL) + { ddlServiceLevels.Items.FindByValue(string.Empty).Selected = false; ddlServiceLevels.Items.FindByValue(serviceLevel.LevelId.ToString()).Selected = true; } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUsers.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUsers.ascx.cs index ffe51701..1d9941bb 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUsers.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUsers.ascx.cs @@ -317,7 +317,7 @@ namespace WebsitePanel.Portal.HostedSolution bool enable = !string.IsNullOrEmpty(serviceLevel.LevelName); enable = enable ? cntx.Quotas.ContainsKey(Quotas.SERVICE_LEVELS + serviceLevel.LevelName) : false; - enable = enable ? cntx.Quotas[Quotas.SERVICE_LEVELS + serviceLevel.LevelName].QuotaAllocatedValue > 0 : false; + enable = enable ? cntx.Quotas[Quotas.SERVICE_LEVELS + serviceLevel.LevelName].QuotaAllocatedValue != 0 : false; if (!enable) { @@ -325,7 +325,6 @@ namespace WebsitePanel.Portal.HostedSolution serviceLevel.LevelDescription = ""; } - //return ServiceLevels.Where(x => x.LevelId == levelId).DefaultIfEmpty(new ServiceLevel { LevelName = "", LevelDescription = "" }).FirstOrDefault(); return serviceLevel; } }