Lync user plans aligned with Exchange mailbox plans
This commit is contained in:
parent
0ecd34363a
commit
260e981140
17 changed files with 921 additions and 260 deletions
|
@ -40,6 +40,9 @@ namespace WebsitePanel.Portal.Lync
|
|||
|
||||
if (!IsPostBack)
|
||||
{
|
||||
|
||||
PackageContext cntx = ES.Services.Packages.GetPackageContext(PanelSecurity.PackageId);
|
||||
|
||||
if (PanelRequest.GetInt("LyncUserPlanId") != 0)
|
||||
{
|
||||
Providers.HostedSolution.LyncUserPlan plan = ES.Services.Lync.GetLyncUserPlan(PanelRequest.ItemID, PanelRequest.GetInt("LyncUserPlanId"));
|
||||
|
@ -81,7 +84,6 @@ namespace WebsitePanel.Portal.Lync
|
|||
chkIM.Checked = true;
|
||||
chkIM.Enabled = false;
|
||||
chkNone.Checked = true;
|
||||
PackageContext cntx = ES.Services.Packages.GetPackageContext(PanelSecurity.PackageId);
|
||||
if (cntx != null)
|
||||
{
|
||||
foreach (QuotaValueInfo quota in cntx.QuotasArray)
|
||||
|
|
|
@ -34,6 +34,11 @@
|
|||
<asp:GridView ID="gvPlans" runat="server" AutoGenerateColumns="False" EnableViewState="true"
|
||||
Width="100%" EmptyDataText="gvPlans" CssSelectorClass="NormalGridView" OnRowCommand="gvPlan_RowCommand">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Image ID="img2" runat="server" Width="16px" Height="16px" ImageUrl='<%# GetPlanType((int)Eval("LyncUserPlanType")) %>' ImageAlign="AbsMiddle" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="gvPlan">
|
||||
<ItemStyle Width="70%"></ItemStyle>
|
||||
<ItemTemplate>
|
||||
|
|
|
@ -106,6 +106,16 @@ namespace WebsitePanel.Portal.Lync
|
|||
|
||||
try
|
||||
{
|
||||
LyncUserPlan plan = ES.Services.Lync.GetLyncUserPlan(PanelRequest.ItemID, planId);
|
||||
|
||||
if (plan.LyncUserPlanType > 0)
|
||||
{
|
||||
ShowErrorMessage("EXCHANGE_UNABLE_USE_SYSTEMPLAN");
|
||||
BindPlans();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
int result = ES.Services.Lync.DeleteLyncUserPlan(PanelRequest.ItemID, planId);
|
||||
|
||||
if (result < 0)
|
||||
|
@ -113,6 +123,9 @@ namespace WebsitePanel.Portal.Lync
|
|||
messageBox.ShowResultMessage(result);
|
||||
return;
|
||||
}
|
||||
else
|
||||
ShowSuccessMessage("REQUEST_COMPLETED_SUCCESFULLY");
|
||||
|
||||
|
||||
}
|
||||
catch (Exception)
|
||||
|
@ -131,8 +144,19 @@ namespace WebsitePanel.Portal.Lync
|
|||
|
||||
try
|
||||
{
|
||||
LyncUserPlan plan = ES.Services.Lync.GetLyncUserPlan(PanelRequest.ItemID, planId);
|
||||
|
||||
if (plan.LyncUserPlanType > 0)
|
||||
{
|
||||
ShowErrorMessage("EXCHANGE_UNABLE_USE_SYSTEMPLAN");
|
||||
BindPlans();
|
||||
return;
|
||||
}
|
||||
|
||||
ES.Services.Lync.SetOrganizationDefaultLyncUserPlan(PanelRequest.ItemID, planId);
|
||||
|
||||
ShowSuccessMessage("REQUEST_COMPLETED_SUCCESFULLY");
|
||||
|
||||
// rebind domains
|
||||
BindPlans();
|
||||
}
|
||||
|
@ -170,5 +194,29 @@ namespace WebsitePanel.Portal.Lync
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public string GetPlanType(int planType)
|
||||
{
|
||||
string imgName = string.Empty;
|
||||
|
||||
LyncUserPlanType type = (LyncUserPlanType)planType;
|
||||
switch (type)
|
||||
{
|
||||
case LyncUserPlanType.Reseller:
|
||||
imgName = "company24.png";
|
||||
break;
|
||||
case LyncUserPlanType.Administrator:
|
||||
imgName = "company24.png";
|
||||
break;
|
||||
default:
|
||||
imgName = "admin_16.png";
|
||||
break;
|
||||
}
|
||||
|
||||
return GetThemedImage("Exchange/" + imgName);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
|
@ -1,31 +1,3 @@
|
|||
// Copyright (c) 2012, 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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue