This commit is contained in:
Virtuworks 2014-09-25 07:52:18 -04:00
commit 2f07f48623
20 changed files with 282 additions and 83 deletions

View file

@ -0,0 +1,44 @@
// Copyright (c) 2014, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.EnterpriseServer
{
public class ServiceLevelQuotaValueInfo
{
public int QuotaValue { get; set; }
public string QuotaDescription { get; set; }
public string QuotaName { get; set; }
public int QuotaTypeId { get; set; }
public int QuotaUsedValue { get; set; }
public int QuotaAvailable { get; set; }
}
}

View file

@ -121,6 +121,7 @@
<Compile Include="HostedSolution\CRMLycenseTypes.cs" />
<Compile Include="HostedSolution\ESPermission.cs" />
<Compile Include="Log\LogRecord.cs" />
<Compile Include="Packages\ServiceLevelQuotaValueInfo.cs" />
<Compile Include="Packages\HostingPlanContext.cs" />
<Compile Include="Packages\HostingPlanGroupInfo.cs" />
<Compile Include="Packages\HostingPlanInfo.cs" />

View file

@ -36,6 +36,7 @@ Default skin template. The following skins are provided as examples only.
<asp:Image SkinID="OrganizationUser48" runat="server" ImageUrl="images/Exchange/admin_48.png" ImageAlign="AbsMiddle" Width="48" Height="48"></asp:Image>
<asp:Image SkinID="OrganizationUserAdd48" runat="server" ImageUrl="images/Exchange/admin_add_48.png" ImageAlign="AbsMiddle" Width="48" Height="48"></asp:Image>
<asp:Image SkinID="VipUser16" runat="server" ImageUrl="images/Exchange/vip_user_16.png" ImageAlign="AbsMiddle" Width="16" Height="16"></asp:Image>
<%-- Exchange Icons --%>
<asp:Image SkinID="ExchangeOrg48" runat="server" ImageUrl="images/Exchange/server_mail_48.png" ImageAlign="AbsMiddle" Width="48" Height="48"></asp:Image>

View file

@ -21,6 +21,8 @@
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Edit Mailbox"></asp:Localize>
-
<asp:Literal ID="litDisplayName" runat="server" Text="John Smith" />
<asp:Image ID="imgVipUser" SkinID="VipUser16" runat="server" tooltip="VIP user" Visible="false"/>
<asp:Label ID="litServiceLevel" runat="server" style="float:right;padding-right:8px;" Visible="false"></asp:Label>
</div>
<div class="FormBody">
<wsp:MailboxTabs id="tabs" runat="server" SelectedTab="mailbox_settings" />

View file

@ -172,6 +172,17 @@ namespace WebsitePanel.Portal.ExchangeServer
archivingQuotaViewer.QuotaValue = ArchivingMaxSize;
rowArchiving.Visible = chkEnableArchiving.Checked;
if (account.LevelId > 0 && Cntx.Groups.ContainsKey(ResourceGroups.ServiceLevels))
{
WebsitePanel.EnterpriseServer.Base.HostedSolution.ServiceLevel serviceLevel = ES.Services.Organizations.GetSupportServiceLevel(account.LevelId);
litServiceLevel.Visible = true;
litServiceLevel.Text = serviceLevel.LevelName;
litServiceLevel.ToolTip = serviceLevel.LevelDescription;
}
imgVipUser.Visible = account.IsVIP && Cntx.Groups.ContainsKey(ResourceGroups.ServiceLevels);
}
catch (Exception ex)
{

View file

@ -39,6 +39,24 @@ namespace WebsitePanel.Portal.ExchangeServer {
/// </remarks>
protected global::System.Web.UI.WebControls.Literal litDisplayName;
/// <summary>
/// imgVipUser control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Image imgVipUser;
/// <summary>
/// litServiceLevel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label litServiceLevel;
/// <summary>
/// tabs control.
/// </summary>

View file

@ -112,10 +112,26 @@
</SelectParameters>
</asp:ObjectDataSource>
<br />
<div>
<asp:Localize ID="locQuota" runat="server" meta:resourcekey="locQuota" Text="Total Mailboxes Created:"></asp:Localize>
&nbsp;&nbsp;&nbsp;
<wsp:QuotaViewer ID="mailboxesQuota" runat="server" QuotaTypeId="2" />
</div>
<asp:Repeater ID="dlServiceLevelQuotas" runat="server" EnableViewState="false">
<ItemTemplate>
<br />
<div>
<asp:Localize ID="locServiceLevelQuota" runat="server" Text='<%# Eval("QuotaDescription") %>'></asp:Localize>
&nbsp;&nbsp;&nbsp;
<wsp:QuotaViewer ID="serviceLevelQuota" runat="server"
QuotaTypeId='<%# Eval("QuotaTypeId") %>'
QuotaUsedValue='<%# Eval("QuotaUsedValue") %>'
QuotaValue='<%# Eval("QuotaValue") %>'
QuotaAvailable='<%# Eval("QuotaAvailable")%>'/>
</div>
</ItemTemplate>
</asp:Repeater>
</div>
</div>

View file

@ -32,6 +32,7 @@ using System.Web.UI.WebControls;
using WebsitePanel.Providers.HostedSolution;
using WebsitePanel.EnterpriseServer;
using WebsitePanel.EnterpriseServer.Base.HostedSolution;
using System.Collections.Generic;
namespace WebsitePanel.Portal.ExchangeServer
{
@ -55,6 +56,8 @@ namespace WebsitePanel.Portal.ExchangeServer
btnCreateMailbox.Visible = !ArchivingBoxes;
cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
if (!IsPostBack)
{
BindStats();
@ -62,7 +65,7 @@ namespace WebsitePanel.Portal.ExchangeServer
BindServiceLevels();
cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
if (cntx.Quotas.ContainsKey(Quotas.EXCHANGE2007_ISCONSUMER))
{
if (cntx.Quotas[Quotas.EXCHANGE2007_ISCONSUMER].QuotaAllocatedValue != 1)
@ -87,6 +90,35 @@ namespace WebsitePanel.Portal.ExchangeServer
mailboxesQuota.QuotaUsedValue = stats.CreatedMailboxes;
mailboxesQuota.QuotaValue = stats.AllocatedMailboxes;
if (stats.AllocatedMailboxes != -1) mailboxesQuota.QuotaAvailable = tenantStats.AllocatedMailboxes - tenantStats.CreatedMailboxes;
if (cntx != null && cntx.Groups.ContainsKey(ResourceGroups.ServiceLevels)) BindServiceLevelsStats();
}
private void BindServiceLevelsStats()
{
ServiceLevels = ES.Services.Organizations.GetSupportServiceLevels();
OrganizationUser[] accounts = ES.Services.Organizations.SearchAccounts(PanelRequest.ItemID, "", "", "", true);
List<ServiceLevelQuotaValueInfo> serviceLevelQuotas = new List<ServiceLevelQuotaValueInfo>();
foreach (var quota in Array.FindAll<QuotaValueInfo>(
cntx.QuotasArray, x => x.QuotaName.Contains(Quotas.SERVICE_LEVELS)))
{
int levelId = ServiceLevels.Where(x => x.LevelName == quota.QuotaName.Replace(Quotas.SERVICE_LEVELS, "")).FirstOrDefault().LevelId;
int usedInOrgCount = accounts.Where(x => x.LevelId == levelId).Count();
serviceLevelQuotas.Add(new ServiceLevelQuotaValueInfo
{
QuotaName = quota.QuotaName,
QuotaDescription = quota.QuotaDescription + " in this Organization:",
QuotaTypeId = quota.QuotaTypeId,
QuotaValue = quota.QuotaAllocatedValue,
QuotaUsedValue = usedInOrgCount,
//QuotaUsedValue = quota.QuotaUsedValue,
QuotaAvailable = quota.QuotaAllocatedValue - quota.QuotaUsedValue
});
}
dlServiceLevelQuotas.DataSource = serviceLevelQuotas;
dlServiceLevelQuotas.DataBind();
}
protected void btnCreateMailbox_Click(object sender, EventArgs e)

View file

@ -137,5 +137,14 @@ namespace WebsitePanel.Portal.ExchangeServer {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.QuotaViewer mailboxesQuota;
/// <summary>
/// dlServiceLevelQuotas control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Repeater dlServiceLevelQuotas;
}
}

View file

@ -27,6 +27,7 @@
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Linq;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using WebsitePanel.EnterpriseServer;
@ -391,6 +392,9 @@ namespace WebsitePanel.Portal.ExchangeServer
private void BindServiceLevelsStats(PackageContext cntx)
{
WebsitePanel.EnterpriseServer.Base.HostedSolution.ServiceLevel[] serviceLevels = ES.Services.Organizations.GetSupportServiceLevels();
OrganizationUser[] accounts = ES.Services.Organizations.SearchAccounts(PanelRequest.ItemID, "", "", "", true);
foreach (var quota in Array.FindAll<QuotaValueInfo>(
cntx.QuotasArray, x => x.QuotaName.Contains(Quotas.SERVICE_LEVELS)))
{
@ -401,17 +405,21 @@ namespace WebsitePanel.Portal.ExchangeServer
col1.Attributes["nowrap"] = "nowrap";
HyperLink link = new HyperLink();
link.ID = "lnk_" + quota.QuotaName.Replace(Quotas.SERVICE_LEVELS, "").Replace(" ", string.Empty).Trim();
link.Text = quota.QuotaDescription;
link.Text = quota.QuotaDescription.Replace(", users", " (users):");
col1.Controls.Add(link);
int levelId = serviceLevels.Where(x => x.LevelName == quota.QuotaName.Replace(Quotas.SERVICE_LEVELS, "")).FirstOrDefault().LevelId;
int usedInOrgCount = accounts.Where(x => x.LevelId == levelId).Count();
HtmlTableCell col2 = new HtmlTableCell();
QuotaViewer quotaControl = (QuotaViewer)LoadControl("../UserControls/QuotaViewer.ascx");
quotaControl.ID = quota.QuotaName.Replace(Quotas.SERVICE_LEVELS, "").Replace(" ", string.Empty).Trim() + "Stats";
quotaControl.QuotaTypeId = quota.QuotaTypeId;
quotaControl.DisplayGauge = true;
quotaControl.QuotaValue = quota.QuotaAllocatedValue;
quotaControl.QuotaUsedValue = quota.QuotaUsedValue;
quotaControl.QuotaUsedValue = usedInOrgCount;
//quotaControl.QuotaUsedValue = quota.QuotaUsedValue;
if (quota.QuotaAllocatedValue != -1)
quotaControl.QuotaAvailable = quota.QuotaAllocatedValue - quota.QuotaUsedValue;

View file

@ -28,6 +28,8 @@
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Edit User"></asp:Localize>
-
<asp:Literal ID="litDisplayName" runat="server" Text="John Smith" />
<asp:Image ID="imgVipUser" SkinID="VipUser16" runat="server" tooltip="VIP user" Visible="false"/>
<asp:Label ID="litServiceLevel" runat="server" style="float:right;padding-right:8px;" Visible="false"></asp:Label>
</div>
<div class="FormBody">

View file

@ -132,6 +132,10 @@ namespace WebsitePanel.Portal.HostedSolution
ServiceLevel serviceLevel = ES.Services.Organizations.GetSupportServiceLevel(user.LevelId);
litServiceLevel.Visible = true;
litServiceLevel.Text = serviceLevel.LevelName;
litServiceLevel.ToolTip = serviceLevel.LevelDescription;
bool addLevel = ddlServiceLevels.Items.FindByValue(serviceLevel.LevelId.ToString()) == null;
addLevel = addLevel && cntx.Quotas.ContainsKey(Quotas.SERVICE_LEVELS + serviceLevel.LevelName);
@ -152,6 +156,7 @@ namespace WebsitePanel.Portal.HostedSolution
}
}
chkVIP.Checked = user.IsVIP && secServiceLevels.Visible;
imgVipUser.Visible = user.IsVIP && secServiceLevels.Visible;
if (cntx.Quotas.ContainsKey(Quotas.ORGANIZATION_ALLOWCHANGEUPN))
@ -242,7 +247,7 @@ namespace WebsitePanel.Portal.HostedSolution
{
foreach (var serviceLevel in ES.Services.Organizations.GetSupportServiceLevels())
{
if (quota.Key.Replace(Quotas.SERVICE_LEVELS, "") == serviceLevel.LevelName && CheckServiceLevelQuota(quota.Value, serviceLevel.LevelId))
if (quota.Key.Replace(Quotas.SERVICE_LEVELS, "") == serviceLevel.LevelName && CheckServiceLevelQuota(quota.Value))
{
enabledServiceLevels.Add(serviceLevel);
}
@ -263,9 +268,8 @@ namespace WebsitePanel.Portal.HostedSolution
}
private bool CheckServiceLevelQuota(QuotaValueInfo quota, int levelID)
private bool CheckServiceLevelQuota(QuotaValueInfo quota)
{
quota.QuotaUsedValue = ES.Services.Organizations.SearchAccounts(PanelRequest.ItemID, "", "", "", true).Where(x => x.LevelId == levelID).Count();
if (quota.QuotaAllocatedValue != -1)
{
@ -329,6 +333,18 @@ namespace WebsitePanel.Portal.HostedSolution
if (!chkLocked.Checked)
chkLocked.Enabled = false;
litServiceLevel.Visible = !string.IsNullOrEmpty(ddlServiceLevels.SelectedValue) && secServiceLevels.Visible;
if (litServiceLevel.Visible)
{
ServiceLevel serviceLevel = ES.Services.Organizations.GetSupportServiceLevel(int.Parse(ddlServiceLevels.SelectedValue));
litServiceLevel.Text = serviceLevel.LevelName;
litServiceLevel.ToolTip = serviceLevel.LevelDescription;
}
imgVipUser.Visible = chkVIP.Checked && secServiceLevels.Visible;
messageBox.ShowSuccessMessage("ORGANIZATION_UPDATE_USER_SETTINGS");
}
catch (Exception ex)

View file

@ -48,6 +48,24 @@ namespace WebsitePanel.Portal.HostedSolution {
/// </remarks>
protected global::System.Web.UI.WebControls.Literal litDisplayName;
/// <summary>
/// imgVipUser control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Image imgVipUser;
/// <summary>
/// litServiceLevel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label litServiceLevel;
/// <summary>
/// UserTabsId control.
/// </summary>

View file

@ -109,10 +109,27 @@
</SelectParameters>
</asp:ObjectDataSource>
<br />
<div>
<asp:Localize ID="locQuota" runat="server" meta:resourcekey="locQuota" Text="Total Users Created:"></asp:Localize>
&nbsp;&nbsp;&nbsp;
<wsp:QuotaViewer ID="usersQuota" runat="server" QuotaTypeId="2" />
</div>
<asp:Repeater ID="dlServiceLevelQuotas" runat="server" EnableViewState="false">
<ItemTemplate>
<br />
<div>
<asp:Localize ID="locServiceLevelQuota" runat="server" Text='<%# Eval("QuotaDescription") %>'></asp:Localize>
&nbsp;&nbsp;&nbsp;
<wsp:QuotaViewer ID="serviceLevelQuota" runat="server"
QuotaTypeId='<%# Eval("QuotaTypeId") %>'
QuotaUsedValue='<%# Eval("QuotaUsedValue") %>'
QuotaValue='<%# Eval("QuotaValue") %>'
QuotaAvailable='<%# Eval("QuotaAvailable")%>'/>
</div>
</ItemTemplate>
</asp:Repeater>
</div>
</div>
</div>
</div>

View file

@ -43,6 +43,8 @@ namespace WebsitePanel.Portal.HostedSolution
protected void Page_Load(object sender, EventArgs e)
{
cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
if (!IsPostBack)
{
BindStats();
@ -50,7 +52,6 @@ namespace WebsitePanel.Portal.HostedSolution
BindServiceLevels();
cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
if (cntx.Quotas.ContainsKey(Quotas.EXCHANGE2007_ISCONSUMER))
{
if (cntx.Quotas[Quotas.EXCHANGE2007_ISCONSUMER].QuotaAllocatedValue != 1)
@ -74,6 +75,32 @@ namespace WebsitePanel.Portal.HostedSolution
usersQuota.QuotaUsedValue = stats.CreatedUsers;
usersQuota.QuotaValue = stats.AllocatedUsers;
if (stats.AllocatedUsers != -1) usersQuota.QuotaAvailable = tenantStats.AllocatedUsers - tenantStats.CreatedUsers;
if(cntx != null && cntx.Groups.ContainsKey(ResourceGroups.ServiceLevels)) BindServiceLevelsStats();
}
private void BindServiceLevelsStats()
{
ServiceLevels = ES.Services.Organizations.GetSupportServiceLevels();
OrganizationUser[] accounts = ES.Services.Organizations.SearchAccounts(PanelRequest.ItemID, "", "", "", true);
List<ServiceLevelQuotaValueInfo> serviceLevelQuotas = new List<ServiceLevelQuotaValueInfo>();
foreach (var quota in Array.FindAll<QuotaValueInfo>(
cntx.QuotasArray, x => x.QuotaName.Contains(Quotas.SERVICE_LEVELS)))
{
int levelId = ServiceLevels.Where(x => x.LevelName == quota.QuotaName.Replace(Quotas.SERVICE_LEVELS, "")).FirstOrDefault().LevelId;
int usedInOrgCount = accounts.Where(x => x.LevelId == levelId).Count();
serviceLevelQuotas.Add(new ServiceLevelQuotaValueInfo { QuotaName = quota.QuotaName,
QuotaDescription = quota.QuotaDescription + " in this Organization:",
QuotaTypeId = quota.QuotaTypeId,
QuotaValue = quota.QuotaAllocatedValue,
QuotaUsedValue = usedInOrgCount,
//QuotaUsedValue = quota.QuotaUsedValue,
QuotaAvailable = quota.QuotaAllocatedValue - quota.QuotaUsedValue });
}
dlServiceLevelQuotas.DataSource = serviceLevelQuotas;
dlServiceLevelQuotas.DataBind();
}
protected void btnCreateUser_Click(object sender, EventArgs e)

View file

@ -137,5 +137,14 @@ namespace WebsitePanel.Portal.HostedSolution {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.QuotaViewer usersQuota;
/// <summary>
/// dlServiceLevelQuotas control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Repeater dlServiceLevelQuotas;
}
}

View file

@ -19,6 +19,8 @@
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle"></asp:Localize>
-
<asp:Literal ID="litDisplayName" runat="server" Text="John Smith" />
<asp:Image ID="imgVipUser" SkinID="VipUser16" runat="server" tooltip="VIP user" Visible="false"/>
<asp:Label ID="litServiceLevel" runat="server" style="float:right;padding-right:8px;" Visible="false"></asp:Label>
</div>
<div class="FormBody">

View file

@ -118,6 +118,22 @@ namespace WebsitePanel.Portal.Lync
lyncUserSettings.sipAddress = lyncUser.SipAddress;
Utils.SelectListItem(ddlPhoneNumber, lyncUser.LineUri);
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
OrganizationUser user = ES.Services.Organizations.GetUserGeneralSettings(PanelRequest.ItemID,
PanelRequest.AccountID);
if (user.LevelId > 0 && cntx.Groups.ContainsKey(ResourceGroups.ServiceLevels))
{
WebsitePanel.EnterpriseServer.Base.HostedSolution.ServiceLevel serviceLevel = ES.Services.Organizations.GetSupportServiceLevel(user.LevelId);
litServiceLevel.Visible = true;
litServiceLevel.Text = serviceLevel.LevelName;
litServiceLevel.ToolTip = serviceLevel.LevelDescription;
}
imgVipUser.Visible = user.IsVIP && cntx.Groups.ContainsKey(ResourceGroups.ServiceLevels);
}
protected bool SaveSettings()

View file

@ -1,32 +1,4 @@
// Copyright (c) 2014, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
@ -76,6 +48,24 @@ namespace WebsitePanel.Portal.Lync {
/// </remarks>
protected global::System.Web.UI.WebControls.Literal litDisplayName;
/// <summary>
/// imgVipUser control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Image imgVipUser;
/// <summary>
/// litServiceLevel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label litServiceLevel;
/// <summary>
/// messageBox control.
/// </summary>

View file

@ -178,46 +178,6 @@ namespace WebsitePanel.Portal
}
}
//private void AddServiceLevelsQuotas()
//{
// foreach(var quota in Array.FindAll<QuotaValueInfo>(
// cntx.QuotasArray, x => x.QuotaName.Contains(Quotas.SERVICE_LEVELS)))
// {
// HtmlGenericControl tr = new HtmlGenericControl();
// tr.ID = "pnl_" + quota.QuotaName.Replace(Quotas.SERVICE_LEVELS, "");
// tr.TagName = "tr";
// HtmlGenericControl col1 = new HtmlGenericControl();
// col1.TagName = "td";
// col1.Attributes["class"] = "SubHead";
// col1.Attributes["nowrap"] = "nowrap";
// Label lbl = new Label();
// lbl.ID = "lbl_" + quota.QuotaName.Replace(Quotas.SERVICE_LEVELS, "");
// lbl.Text = quota.QuotaDescription;
// col1.Controls.Add(lbl);
// HtmlGenericControl col2 = new HtmlGenericControl();
// col2.TagName = "td";
// col2.Attributes["class"] = "Normal";
// //Quota quotaControl = new Quota();
// // quotaControl.ID = "quota_" + quota.QuotaName.Replace(Quotas.SERVICE_LEVELS, "");
// // quotaControl.QuotaName = quota.QuotaName;
// // quotaControl.Viewer = new QuotaViewer();
// // quotaControl.DisplayGauge = true;
// col2.InnerHtml = string.Format(
// "<wsp:Quota ID=\"{0}\" runat=\"server\" QuotaName=\"{1}\" DisplayGauge=\"True\" />",
// "quota_" + quota.QuotaName.Replace(Quotas.SERVICE_LEVELS, ""),
// quota.QuotaName);
// //col2.Controls.Add(quotaControl);
// tr.Controls.Add(col1);
// tr.Controls.Add(col2);
// tblQuotas.Controls.Add((Control)tr);
// Control c1 = new Control();
// }
//}
private void AddServiceLevelsQuotas()
{
foreach (var quota in Array.FindAll<QuotaValueInfo>(