Commit changes for Lync Global Plans
This commit is contained in:
commit
752902b7ee
16 changed files with 950 additions and 205 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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue