Merge
This commit is contained in:
commit
cc64931c6e
5 changed files with 13 additions and 10 deletions
|
@ -204,7 +204,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
||||||
bool enable = !string.IsNullOrEmpty(serviceLevel.LevelName);
|
bool enable = !string.IsNullOrEmpty(serviceLevel.LevelName);
|
||||||
|
|
||||||
enable = enable ? cntx.Quotas.ContainsKey(Quotas.SERVICE_LEVELS + serviceLevel.LevelName) : false;
|
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)
|
if (!enable)
|
||||||
{
|
{
|
||||||
|
@ -212,7 +212,6 @@ namespace WebsitePanel.Portal.ExchangeServer
|
||||||
serviceLevel.LevelDescription = "";
|
serviceLevel.LevelDescription = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
//return ServiceLevels.Where(x => x.LevelId == levelId).DefaultIfEmpty(new ServiceLevel { LevelName = "", LevelDescription = "" }).FirstOrDefault();
|
|
||||||
return serviceLevel;
|
return serviceLevel;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -134,12 +134,17 @@ namespace WebsitePanel.Portal.HostedSolution
|
||||||
|
|
||||||
addLevel = addLevel && cntx.Quotas.ContainsKey(Quotas.SERVICE_LEVELS + serviceLevel.LevelName);
|
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)
|
if (addLevel)
|
||||||
{
|
{
|
||||||
ddlServiceLevels.Items.Add(new ListItem(serviceLevel.LevelName, serviceLevel.LevelId.ToString()));
|
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(string.Empty).Selected = false;
|
||||||
ddlServiceLevels.Items.FindByValue(serviceLevel.LevelId.ToString()).Selected = true;
|
ddlServiceLevels.Items.FindByValue(serviceLevel.LevelId.ToString()).Selected = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -317,7 +317,7 @@ namespace WebsitePanel.Portal.HostedSolution
|
||||||
bool enable = !string.IsNullOrEmpty(serviceLevel.LevelName);
|
bool enable = !string.IsNullOrEmpty(serviceLevel.LevelName);
|
||||||
|
|
||||||
enable = enable ? cntx.Quotas.ContainsKey(Quotas.SERVICE_LEVELS + serviceLevel.LevelName) : false;
|
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)
|
if (!enable)
|
||||||
{
|
{
|
||||||
|
@ -325,7 +325,6 @@ namespace WebsitePanel.Portal.HostedSolution
|
||||||
serviceLevel.LevelDescription = "";
|
serviceLevel.LevelDescription = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
//return ServiceLevels.Where(x => x.LevelId == levelId).DefaultIfEmpty(new ServiceLevel { LevelName = "", LevelDescription = "" }).FirstOrDefault();
|
|
||||||
return serviceLevel;
|
return serviceLevel;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<div class="Quota">
|
<div class="Quota">
|
||||||
<div class="Left">
|
<div class="Left">
|
||||||
<%# GetQuotaTitle((string)Eval("QuotaName"), (string)Eval("QuotaDescription"))%>:
|
<%# GetQuotaTitle((string)Eval("QuotaName"), (object)Eval("QuotaDescription"))%>:
|
||||||
</div>
|
</div>
|
||||||
<div class="Viewer">
|
<div class="Viewer">
|
||||||
<uc1:QuotaViewer ID="quota" runat="server"
|
<uc1:QuotaViewer ID="quota" runat="server"
|
||||||
|
|
|
@ -76,11 +76,11 @@ namespace WebsitePanel.Portal
|
||||||
return new DataView(dsQuotas.Tables[1], "GroupID=" + groupId.ToString(), "", DataViewRowState.CurrentRows);
|
return new DataView(dsQuotas.Tables[1], "GroupID=" + groupId.ToString(), "", DataViewRowState.CurrentRows);
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetQuotaTitle(string quotaName, string quotaDescription)
|
public string GetQuotaTitle(string quotaName, object quotaDescription)
|
||||||
{
|
{
|
||||||
return quotaName.Contains("ServiceLevel") ?
|
string description = (quotaDescription.GetType() == typeof(System.DBNull)) ? string.Empty : (string)quotaDescription;
|
||||||
(string.IsNullOrEmpty(quotaDescription) ?
|
|
||||||
string.Empty : quotaDescription).ToString()
|
return quotaName.Contains("ServiceLevel") ? description
|
||||||
: GetSharedLocalizedString("Quota." + quotaName);
|
: GetSharedLocalizedString("Quota." + quotaName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue