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);
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<ItemTemplate>
|
||||
<div class="Quota">
|
||||
<div class="Left">
|
||||
<%# GetQuotaTitle((string)Eval("QuotaName"), (string)Eval("QuotaDescription"))%>:
|
||||
<%# GetQuotaTitle((string)Eval("QuotaName"), (object)Eval("QuotaDescription"))%>:
|
||||
</div>
|
||||
<div class="Viewer">
|
||||
<uc1:QuotaViewer ID="quota" runat="server"
|
||||
|
|
|
@ -76,11 +76,11 @@ namespace WebsitePanel.Portal
|
|||
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.IsNullOrEmpty(quotaDescription) ?
|
||||
string.Empty : quotaDescription).ToString()
|
||||
string description = (quotaDescription.GetType() == typeof(System.DBNull)) ? string.Empty : (string)quotaDescription;
|
||||
|
||||
return quotaName.Contains("ServiceLevel") ? description
|
||||
: GetSharedLocalizedString("Quota." + quotaName);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue