Merge
This commit is contained in:
commit
a515c9a68c
116 changed files with 198344 additions and 6475 deletions
|
@ -216,4 +216,7 @@
|
|||
<data name="lblLitigationHoldUrl.Text" xml:space="preserve">
|
||||
<value>Litigation Hold Url:</value>
|
||||
</data>
|
||||
<data name="locTitleArchiving.Text" xml:space="preserve">
|
||||
<value>Add Retention policy</value>
|
||||
</data>
|
||||
</root>
|
|
@ -118,7 +118,7 @@
|
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="btnAddMailboxPlan.Text" xml:space="preserve">
|
||||
<value>Add New Mailbox plan</value>
|
||||
<value>Add New</value>
|
||||
</data>
|
||||
<data name="btnSave.Text" xml:space="preserve">
|
||||
<value>Stamp mailboxes</value>
|
||||
|
@ -162,4 +162,7 @@
|
|||
<data name="Text.PageName" xml:space="preserve">
|
||||
<value>Mailbox plans</value>
|
||||
</data>
|
||||
<data name="locTitleRetentionPolicy.Text" xml:space="preserve">
|
||||
<value>Retention Policy</value>
|
||||
</data>
|
||||
</root>
|
|
@ -174,4 +174,7 @@
|
|||
<data name="gvUsersLogin.Header" xml:space="preserve">
|
||||
<value>Login</value>
|
||||
</data>
|
||||
<data name="locTitleArchiving.Text" xml:space="preserve">
|
||||
<value>Archiving Mailboxes</value>
|
||||
</data>
|
||||
</root>
|
|
@ -0,0 +1,144 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="gvPolicy.Header" xml:space="preserve">
|
||||
<value>Retention policy</value>
|
||||
</data>
|
||||
<data name="gvPolicyEdit.Header" xml:space="preserve">
|
||||
<value>Select</value>
|
||||
</data>
|
||||
<data name="gvPolicy.Empty" xml:space="preserve">
|
||||
<value>No Retention policy tags have been added yet. To add a new mailbox plan click "Add New" button.</value>
|
||||
</data>
|
||||
<data name="gvPolicySelect.Header" xml:space="preserve">
|
||||
<value>Select</value>
|
||||
</data>
|
||||
<data name="valRequirePolicy.ErrorMessage" xml:space="preserve">
|
||||
<value>Please enter correct retention policy tags</value>
|
||||
</data>
|
||||
<data name="valRequirePolicy.Text" xml:space="preserve">
|
||||
<value>*</value>
|
||||
</data>
|
||||
<data name="locTitle.Text" xml:space="preserve">
|
||||
<value>Mailbox plans</value>
|
||||
</data>
|
||||
<data name="Text.PageName" xml:space="preserve">
|
||||
<value>Retention policy tags</value>
|
||||
</data>
|
||||
</root>
|
|
@ -6,6 +6,8 @@
|
|||
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
|
||||
<%@ Register Src="../UserControls/QuotaEditor.ascx" TagName="QuotaEditor" TagPrefix="uc1" %>
|
||||
|
||||
<%@ Import Namespace="WebsitePanel.Portal" %>
|
||||
|
||||
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
|
||||
|
||||
<div id="ExchangeContainer">
|
||||
|
@ -16,11 +18,13 @@
|
|||
<div class="Center">
|
||||
<div class="Title">
|
||||
<asp:Image ID="Image1" SkinID="ExchangeDomainNameAdd48" runat="server" />
|
||||
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Add Mailboxplan"></asp:Localize>
|
||||
<asp:Localize ID="locTitle" runat="server" Text="Add Mailboxplan"></asp:Localize>
|
||||
</div>
|
||||
<div class="FormBody">
|
||||
<wsp:SimpleMessageBox id="messageBox" runat="server" />
|
||||
|
||||
<asp:HiddenField runat="server" ID="hfArchivingPlan" />
|
||||
|
||||
<wsp:CollapsiblePanel id="secMailboxPlan" runat="server"
|
||||
TargetControlID="MailboxPlan" meta:resourcekey="secMailboxPlan" Text="Mailboxplan">
|
||||
</wsp:CollapsiblePanel>
|
||||
|
@ -70,6 +74,11 @@
|
|||
<asp:CheckBox ID="chkActiveSync" runat="server" meta:resourcekey="chkActiveSync" Text="ActiveSync"></asp:CheckBox>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:CheckBox ID="chkEnableArchiving" runat="server" meta:resourcekey="chkEnableArchiving" Text="Archiving"></asp:CheckBox>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
</asp:Panel>
|
||||
|
@ -159,7 +168,6 @@
|
|||
</table>
|
||||
</asp:Panel>
|
||||
|
||||
|
||||
<wsp:CollapsiblePanel id="secDeleteRetention" runat="server"
|
||||
TargetControlID="DeleteRetention" meta:resourcekey="secDeleteRetention" Text="Delete Item Retention">
|
||||
</wsp:CollapsiblePanel>
|
||||
|
@ -214,6 +222,39 @@
|
|||
</table>
|
||||
</asp:Panel>
|
||||
|
||||
<wsp:CollapsiblePanel id="secRetentionPolicyTags" runat="server"
|
||||
TargetControlID="RetentionPolicyTags" meta:resourcekey="secRetentionPolicyTags" Text="Retention policy tags">
|
||||
</wsp:CollapsiblePanel>
|
||||
<asp:Panel ID="RetentionPolicyTags" runat="server" Height="0" style="overflow:hidden;">
|
||||
<asp:UpdatePanel ID="GeneralUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
|
||||
<ContentTemplate>
|
||||
<asp:GridView id="gvPolicy" runat="server" EnableViewState="true" AutoGenerateColumns="false"
|
||||
Width="100%" EmptyDataText="" CssSelectorClass="NormalGridView" OnRowCommand="gvPolicy_RowCommand" >
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Tag">
|
||||
<ItemStyle Width="70%"></ItemStyle>
|
||||
<ItemTemplate>
|
||||
<asp:Label id="displayPolicy" runat="server" EnableViewState="true" ><%# PortalAntiXSS.Encode((string)Eval("TagName"))%></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:ImageButton id="imgDelPolicy" runat="server" Text="Delete" SkinID="ExchangeDelete"
|
||||
CommandName="DeleteItem" CommandArgument='<%# Eval("TagId") %>'
|
||||
meta:resourcekey="cmdDelete" OnClientClick="return confirm('Are you sure you want to delete selected policy tag?')" >
|
||||
</asp:ImageButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
|
||||
<asp:DropDownList ID="ddTags" runat ="server"></asp:DropDownList>
|
||||
<asp:Button ID="bntAddTag" runat="server" Text="Add tag" meta:resourcekey="bntAddTag" OnClick="bntAddTag_Click"/>
|
||||
<br />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Panel>
|
||||
|
||||
<br />
|
||||
<div class="FormFooterClean">
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2011, Outercurve Foundation.
|
||||
// Copyright (c) 2011-2014, Outercurve Foundation.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
|
@ -27,6 +27,13 @@
|
|||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.WebControls.WebParts;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using WebsitePanel.EnterpriseServer;
|
||||
using WebsitePanel.Providers.HostedSolution;
|
||||
using WebsitePanel.Providers.ResultObjects;
|
||||
|
@ -35,6 +42,20 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
{
|
||||
public partial class ExchangeAddMailboxPlan : WebsitePanelModuleBase
|
||||
{
|
||||
private bool RetentionPolicy
|
||||
{
|
||||
get
|
||||
{
|
||||
bool res = false;
|
||||
bool.TryParse(hfArchivingPlan.Value, out res);
|
||||
return res;
|
||||
}
|
||||
set
|
||||
{
|
||||
hfArchivingPlan.Value = value.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
|
@ -66,29 +87,19 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
txtLitigationHoldMsg.Text = plan.LitigationHoldMsg;
|
||||
txtLitigationHoldUrl.Text = plan.LitigationHoldUrl;
|
||||
|
||||
RetentionPolicy = plan.Archiving;
|
||||
|
||||
|
||||
/*
|
||||
txtMailboxPlan.Enabled = false;
|
||||
mailboxSize.Enabled = false;
|
||||
maxRecipients.Enabled = false;
|
||||
maxSendMessageSizeKB.Enabled = false;
|
||||
maxReceiveMessageSizeKB.Enabled = false;
|
||||
chkPOP3.Enabled = false;
|
||||
chkIMAP.Enabled = false;
|
||||
chkOWA.Enabled = false;
|
||||
chkMAPI.Enabled = false;
|
||||
chkActiveSync.Enabled = false;
|
||||
sizeIssueWarning.Enabled = false;
|
||||
sizeProhibitSend.Enabled = false;
|
||||
sizeProhibitSendReceive.Enabled = false;
|
||||
daysKeepDeletedItems.Enabled = false;
|
||||
chkHideFromAddressBook.Enabled = false;
|
||||
|
||||
btnAdd.Enabled = false;
|
||||
*/
|
||||
chkEnableArchiving.Checked = plan.EnableArchiving;
|
||||
|
||||
locTitle.Text = plan.MailboxPlan;
|
||||
|
||||
if (RetentionPolicy)
|
||||
{
|
||||
ExchangeMailboxPlanRetentionPolicyTag[] tags = ES.Services.ExchangeServer.GetExchangeMailboxPlanRetentionPolicyTags(plan.MailboxPlanId);
|
||||
gvPolicy.DataSource = tags;
|
||||
gvPolicy.DataBind();
|
||||
}
|
||||
|
||||
this.DisableControls = true;
|
||||
|
||||
}
|
||||
|
@ -156,15 +167,50 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
sizeProhibitSend.ValueKB = 100;
|
||||
sizeProhibitSendReceive.ValueKB = 100;
|
||||
recoverableItemsWarning.ValueKB = 95;
|
||||
|
||||
RetentionPolicy = PanelRequest.GetBool("archiving", false);
|
||||
}
|
||||
}
|
||||
else
|
||||
this.DisableControls = true;
|
||||
}
|
||||
|
||||
locTitle.Text = RetentionPolicy ? GetLocalizedString("locTitleArchiving.Text") : GetLocalizedString("locTitle.Text");
|
||||
|
||||
UpdateTags();
|
||||
|
||||
secMailboxFeatures.Visible = !RetentionPolicy;
|
||||
secMailboxGeneral.Visible = !RetentionPolicy;
|
||||
secRetentionPolicyTags.Visible = RetentionPolicy;
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected void UpdateTags()
|
||||
{
|
||||
if (RetentionPolicy)
|
||||
{
|
||||
ddTags.Items.Clear();
|
||||
|
||||
Providers.HostedSolution.ExchangeRetentionPolicyTag[] allTags = ES.Services.ExchangeServer.GetExchangeRetentionPolicyTags(PanelRequest.ItemID);
|
||||
|
||||
List<ExchangeMailboxPlanRetentionPolicyTag> selectedTags = ViewState["Tags"] as List<ExchangeMailboxPlanRetentionPolicyTag>;
|
||||
|
||||
foreach (Providers.HostedSolution.ExchangeRetentionPolicyTag tag in allTags)
|
||||
{
|
||||
if (selectedTags!=null)
|
||||
{
|
||||
if (selectedTags.Find(x => x.TagID == tag.TagID) != null)
|
||||
continue;
|
||||
}
|
||||
|
||||
ddTags.Items.Add(new System.Web.UI.WebControls.ListItem(tag.TagName, tag.TagID.ToString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
AddMailboxPlan();
|
||||
|
@ -201,20 +247,40 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
plan.RecoverableItemsWarningPct = recoverableItemsWarning.ValueKB;
|
||||
if ((plan.RecoverableItemsWarningPct == 0)) plan.RecoverableItemsWarningPct = 100;
|
||||
plan.LitigationHoldMsg = txtLitigationHoldMsg.Text.Trim();
|
||||
plan.LitigationHoldUrl = txtLitigationHoldUrl.Text.Trim();
|
||||
plan.LitigationHoldUrl = txtLitigationHoldUrl.Text.Trim();
|
||||
|
||||
plan.Archiving = RetentionPolicy;
|
||||
|
||||
int result = ES.Services.ExchangeServer.AddExchangeMailboxPlan(PanelRequest.ItemID,
|
||||
plan.EnableArchiving = chkEnableArchiving.Checked;
|
||||
|
||||
int planId = ES.Services.ExchangeServer.AddExchangeMailboxPlan(PanelRequest.ItemID,
|
||||
plan);
|
||||
|
||||
|
||||
if (result < 0)
|
||||
if (planId < 0)
|
||||
{
|
||||
messageBox.ShowResultMessage(result);
|
||||
messageBox.ShowResultMessage(planId);
|
||||
return;
|
||||
}
|
||||
|
||||
Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "mailboxplans",
|
||||
List<ExchangeMailboxPlanRetentionPolicyTag> tags = ViewState["Tags"] as List<ExchangeMailboxPlanRetentionPolicyTag>;
|
||||
|
||||
if (tags!=null)
|
||||
{
|
||||
foreach(ExchangeMailboxPlanRetentionPolicyTag tag in tags)
|
||||
{
|
||||
tag.MailboxPlanId = planId;
|
||||
int result = ES.Services.ExchangeServer.AddExchangeMailboxPlanRetentionPolicyTag(PanelRequest.ItemID, tag);
|
||||
if (result < 0)
|
||||
{
|
||||
messageBox.ShowResultMessage(result);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), RetentionPolicy ? "retentionpolicy" : "mailboxplans",
|
||||
"SpaceID=" + PanelSecurity.PackageId));
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
@ -222,5 +288,65 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
messageBox.ShowErrorMessage("EXCHANGE_ADD_MAILBOXPLAN", ex);
|
||||
}
|
||||
}
|
||||
|
||||
protected void bntAddTag_Click(object sender, EventArgs e)
|
||||
{
|
||||
int addTagId;
|
||||
if (!int.TryParse(ddTags.SelectedValue, out addTagId))
|
||||
return;
|
||||
|
||||
Providers.HostedSolution.ExchangeRetentionPolicyTag tag = ES.Services.ExchangeServer.GetExchangeRetentionPolicyTag(PanelRequest.ItemID, addTagId);
|
||||
if (tag == null) return;
|
||||
|
||||
List<ExchangeMailboxPlanRetentionPolicyTag> res = ViewState["Tags"] as List<ExchangeMailboxPlanRetentionPolicyTag>;
|
||||
if (res==null) res = new List<ExchangeMailboxPlanRetentionPolicyTag>();
|
||||
|
||||
ExchangeMailboxPlanRetentionPolicyTag add = new ExchangeMailboxPlanRetentionPolicyTag();
|
||||
add.MailboxPlanId = PanelRequest.GetInt("MailboxPlanId");
|
||||
add.TagID = tag.TagID;
|
||||
add.TagName = tag.TagName;
|
||||
|
||||
res.Add(add);
|
||||
|
||||
ViewState["Tags"] = res;
|
||||
|
||||
gvPolicy.DataSource = res;
|
||||
gvPolicy.DataBind();
|
||||
|
||||
UpdateTags();
|
||||
}
|
||||
|
||||
protected void gvPolicy_RowCommand(object sender, GridViewCommandEventArgs e)
|
||||
{
|
||||
|
||||
switch (e.CommandName)
|
||||
{
|
||||
case "DeleteItem":
|
||||
try
|
||||
{
|
||||
int tagId;
|
||||
if (!int.TryParse(e.CommandArgument.ToString(), out tagId))
|
||||
return;
|
||||
|
||||
List<ExchangeMailboxPlanRetentionPolicyTag> tags = ViewState["Tags"] as List<ExchangeMailboxPlanRetentionPolicyTag>;
|
||||
if (tags == null) return;
|
||||
|
||||
int i = tags.FindIndex(x => x.TagID == tagId);
|
||||
if (i >= 0) tags.RemoveAt(i);
|
||||
|
||||
ViewState["Tags"] = tags;
|
||||
gvPolicy.DataSource = tags;
|
||||
gvPolicy.DataBind();
|
||||
UpdateTags();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -76,6 +76,15 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
|
||||
|
||||
/// <summary>
|
||||
/// hfArchivingPlan 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.HiddenField hfArchivingPlan;
|
||||
|
||||
/// <summary>
|
||||
/// secMailboxPlan control.
|
||||
/// </summary>
|
||||
|
@ -175,6 +184,15 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox chkActiveSync;
|
||||
|
||||
/// <summary>
|
||||
/// chkEnableArchiving 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.CheckBox chkEnableArchiving;
|
||||
|
||||
/// <summary>
|
||||
/// secMailboxGeneral control.
|
||||
/// </summary>
|
||||
|
@ -490,6 +508,60 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtLitigationHoldMsg;
|
||||
|
||||
/// <summary>
|
||||
/// secRetentionPolicyTags control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.CollapsiblePanel secRetentionPolicyTags;
|
||||
|
||||
/// <summary>
|
||||
/// RetentionPolicyTags 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.Panel RetentionPolicyTags;
|
||||
|
||||
/// <summary>
|
||||
/// GeneralUpdatePanel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.UpdatePanel GeneralUpdatePanel;
|
||||
|
||||
/// <summary>
|
||||
/// gvPolicy 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.GridView gvPolicy;
|
||||
|
||||
/// <summary>
|
||||
/// ddTags 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.DropDownList ddTags;
|
||||
|
||||
/// <summary>
|
||||
/// bntAddTag 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.Button bntAddTag;
|
||||
|
||||
/// <summary>
|
||||
/// btnAdd control.
|
||||
/// </summary>
|
||||
|
|
|
@ -136,7 +136,15 @@
|
|||
<asp:Localize ID="locMailboxplanName" runat="server" meta:resourcekey="locMailboxplanName" Text="Mailboxplan Name: *"></asp:Localize>
|
||||
</td>
|
||||
<td>
|
||||
<wsp:MailboxPlanSelector ID="mailboxPlanSelector" runat="server" />
|
||||
<wsp:MailboxPlanSelector ID="mailboxPlanSelector" runat="server" Archiving="false" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="FormLabel150">
|
||||
<asp:Localize ID="locArchivingMailboxplanName" runat="server" meta:resourcekey="locArchivingMailboxplanName" Text="Archiving Mailboxplan Name: "></asp:Localize>
|
||||
</td>
|
||||
<td>
|
||||
<wsp:MailboxPlanSelector ID="archivingMailboxPlanSelector" runat="server" Archiving="true" AddNone="true" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -84,7 +84,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
|
||||
|
||||
|
||||
WebsitePanel.Providers.HostedSolution.ExchangeMailboxPlan[] plans = ES.Services.ExchangeServer.GetExchangeMailboxPlans(PanelRequest.ItemID);
|
||||
WebsitePanel.Providers.HostedSolution.ExchangeMailboxPlan[] plans = ES.Services.ExchangeServer.GetExchangeMailboxPlans(PanelRequest.ItemID, false);
|
||||
|
||||
if (plans.Length == 0)
|
||||
btnCreate.Enabled = false;
|
||||
|
@ -138,6 +138,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
chkSendInstructions.Checked,
|
||||
sendInstructionEmail.Text,
|
||||
Convert.ToInt32(mailboxPlanSelector.MailboxPlanId),
|
||||
Convert.ToInt32(archivingMailboxPlanSelector.MailboxPlanId),
|
||||
subscriberNumber);
|
||||
|
||||
|
||||
|
|
|
@ -337,6 +337,24 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.MailboxPlanSelector mailboxPlanSelector;
|
||||
|
||||
/// <summary>
|
||||
/// locArchivingMailboxplanName 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.Localize locArchivingMailboxplanName;
|
||||
|
||||
/// <summary>
|
||||
/// archivingMailboxPlanSelector control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.MailboxPlanSelector archivingMailboxPlanSelector;
|
||||
|
||||
/// <summary>
|
||||
/// chkSendInstructions control.
|
||||
/// </summary>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<%@ Register Src="UserControls/MailboxPlanSelector.ascx" TagName="MailboxPlanSelector" TagPrefix="wsp" %>
|
||||
<%@ Register Src="../UserControls/QuotaViewer.ascx" TagName="QuotaViewer" TagPrefix="wsp" %>
|
||||
|
||||
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
|
||||
<%-- < wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/> --%>
|
||||
|
||||
<div id="ExchangeContainer">
|
||||
<div class="Module">
|
||||
|
@ -26,10 +26,11 @@
|
|||
<wsp:MailboxTabs id="tabs" runat="server" SelectedTab="mailbox_settings" />
|
||||
<wsp:SimpleMessageBox id="messageBox" runat="server" />
|
||||
|
||||
<wsp:CollapsiblePanel id="secGeneral" runat="server" TargetControlID="General" meta:resourcekey="secGeneral" Text="General"></wsp:CollapsiblePanel>
|
||||
<asp:Panel ID="General" runat="server" Height="0" style="overflow:hidden;">
|
||||
<asp:UpdatePanel ID="GeneralUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
|
||||
<ContentTemplate>
|
||||
<asp:UpdatePanel ID="GeneralUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
|
||||
<ContentTemplate>
|
||||
|
||||
<wsp:CollapsiblePanel id="secGeneral" runat="server" TargetControlID="General" meta:resourcekey="secGeneral" Text="General"></wsp:CollapsiblePanel>
|
||||
<asp:Panel ID="General" runat="server" Height="0" style="overflow:hidden;">
|
||||
<table>
|
||||
<tr>
|
||||
<td></td>
|
||||
|
@ -48,7 +49,7 @@
|
|||
<tr>
|
||||
<td class="FormLabel150"><asp:Localize ID="Localize2" runat="server" meta:resourcekey="locMailboxplanName" Text="Mailbox plan: *"></asp:Localize></td>
|
||||
<td>
|
||||
<wsp:MailboxPlanSelector ID="mailboxPlanSelector" runat="server" />
|
||||
<wsp:MailboxPlanSelector ID="mailboxPlanSelector" runat="server" OnChanged="mailboxPlanSelector_Changed" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -65,9 +66,28 @@
|
|||
</tr>
|
||||
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Panel>
|
||||
</asp:Panel>
|
||||
|
||||
<wsp:CollapsiblePanel id="secArchiving" runat="server" TargetControlID="Archiving" meta:resourcekey="secArchiving" Text="Archiving"></wsp:CollapsiblePanel>
|
||||
<asp:Panel ID="Archiving" runat="server" Height="0" style="overflow:hidden;">
|
||||
<table>
|
||||
<tr>
|
||||
<td class="FormLabel150"></td>
|
||||
<td>
|
||||
<asp:CheckBox ID="chkArchiving" runat="server" meta:resourcekey ="chkArchiving" Text ="Enable Archiving" AutoPostBack="true" OnCheckedChanged="chkArchiving_CheckedChanged"></asp:CheckBox>
|
||||
</td>
|
||||
</tr>
|
||||
<tr runat="server" id="mailboxArchivePlan">
|
||||
<td class="FormLabel150"><asp:Localize ID="locRetentionPolicyName" runat="server" meta:resourcekey="locRetentionPolicyName" Text="Retention policy: "></asp:Localize></td>
|
||||
<td>
|
||||
<wsp:MailboxPlanSelector ID="mailboxRetentionPolicySelector" runat="server" Archiving="true" AddNone="true"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</asp:Panel>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<wsp:CollapsiblePanel id="secLitigationHoldSettings" runat="server" TargetControlID="LitigationHoldSettings" meta:resourcekey="secLitigationHoldSettings" Text="Litigation Hold"></wsp:CollapsiblePanel>
|
||||
<asp:Panel ID="LitigationHoldSettings" runat="server" Height="0" style="overflow:hidden;">
|
||||
|
|
|
@ -34,13 +34,25 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
{
|
||||
public partial class ExchangeMailboxGeneralSettings : WebsitePanelModuleBase
|
||||
{
|
||||
|
||||
private PackageContext cntx = null;
|
||||
private PackageContext Cntx
|
||||
{
|
||||
get
|
||||
{
|
||||
if (cntx == null)
|
||||
cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||
|
||||
return cntx;
|
||||
}
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||
|
||||
if (Utils.CheckQouta(Quotas.EXCHANGE2007_DISCLAIMERSALLOWED, cntx))
|
||||
if (Utils.CheckQouta(Quotas.EXCHANGE2007_DISCLAIMERSALLOWED, Cntx))
|
||||
{
|
||||
ddDisclaimer.Items.Add(new System.Web.UI.WebControls.ListItem("None", "-1"));
|
||||
ExchangeDisclaimer[] disclaimers = ES.Services.ExchangeServer.GetExchangeDisclaimers(PanelRequest.ItemID);
|
||||
|
@ -55,30 +67,25 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
|
||||
BindSettings();
|
||||
|
||||
SetArchivingVisible();
|
||||
|
||||
UserInfo user = UsersHelper.GetUser(PanelSecurity.EffectiveUserId);
|
||||
|
||||
if (user != null)
|
||||
{
|
||||
|
||||
if ((user.Role == UserRole.User) & (Utils.CheckQouta(Quotas.EXCHANGE2007_ISCONSUMER, cntx)))
|
||||
if ((user.Role == UserRole.User) & (Utils.CheckQouta(Quotas.EXCHANGE2007_ISCONSUMER, Cntx)))
|
||||
{
|
||||
chkHideAddressBook.Visible = false;
|
||||
chkDisable.Visible = false;
|
||||
}
|
||||
|
||||
secLitigationHoldSettings.Visible = (Utils.CheckQouta(Quotas.EXCHANGE2007_ALLOWLITIGATIONHOLD, cntx));
|
||||
secLitigationHoldSettings.Visible = (Utils.CheckQouta(Quotas.EXCHANGE2007_ALLOWLITIGATIONHOLD, Cntx));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private bool CheckQouta(string key, PackageContext cntx)
|
||||
{
|
||||
return cntx.Quotas.ContainsKey(key) &&
|
||||
((cntx.Quotas[key].QuotaAllocatedValue == 1 && cntx.Quotas[key].QuotaTypeId == 1) ||
|
||||
(cntx.Quotas[key].QuotaTypeId != 1 && (cntx.Quotas[key].QuotaAllocatedValue > 0 || cntx.Quotas[key].QuotaAllocatedValue == -1)));
|
||||
}
|
||||
|
||||
private void BindSettings()
|
||||
{
|
||||
try
|
||||
|
@ -114,6 +121,17 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
mailboxPlanSelector.MailboxPlanId = account.MailboxPlanId.ToString();
|
||||
}
|
||||
|
||||
if (account.ArchivingMailboxPlanId<1)
|
||||
{
|
||||
mailboxRetentionPolicySelector.MailboxPlanId = "-1";
|
||||
chkArchiving.Checked = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
mailboxRetentionPolicySelector.MailboxPlanId = account.ArchivingMailboxPlanId.ToString();
|
||||
chkArchiving.Checked = true;
|
||||
}
|
||||
|
||||
mailboxSize.QuotaUsedValue = Convert.ToInt32(stats.TotalSize / 1024 / 1024);
|
||||
mailboxSize.QuotaValue = (stats.MaxSize == -1) ? -1 : (int)Math.Round((double)(stats.MaxSize / 1024 / 1024));
|
||||
|
||||
|
@ -124,8 +142,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
litigationHoldSpace.QuotaUsedValue = Convert.ToInt32(stats.LitigationHoldTotalSize / 1024 / 1024);
|
||||
litigationHoldSpace.QuotaValue = (stats.LitigationHoldMaxSize == -1) ? -1 : (int)Math.Round((double)(stats.LitigationHoldMaxSize / 1024 / 1024));
|
||||
|
||||
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||
if (Utils.CheckQouta(Quotas.EXCHANGE2007_DISCLAIMERSALLOWED, cntx))
|
||||
if (Utils.CheckQouta(Quotas.EXCHANGE2007_DISCLAIMERSALLOWED, Cntx))
|
||||
{
|
||||
int disclaimerId = ES.Services.ExchangeServer.GetExchangeAccountDisclaimerId(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
ddDisclaimer.SelectedValue = disclaimerId.ToString();
|
||||
|
@ -163,7 +180,14 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
}
|
||||
else
|
||||
{
|
||||
result = ES.Services.ExchangeServer.SetExchangeMailboxPlan(PanelRequest.ItemID, PanelRequest.AccountID, Convert.ToInt32(mailboxPlanSelector.MailboxPlanId));
|
||||
int planId = Convert.ToInt32(mailboxPlanSelector.MailboxPlanId);
|
||||
int policyId = -1;
|
||||
if (chkArchiving.Checked)
|
||||
policyId = Convert.ToInt32(mailboxRetentionPolicySelector.MailboxPlanId);
|
||||
|
||||
result = ES.Services.ExchangeServer.SetExchangeMailboxPlan(PanelRequest.ItemID, PanelRequest.AccountID, planId,
|
||||
policyId);
|
||||
|
||||
if (result < 0)
|
||||
{
|
||||
messageBox.ShowResultMessage(result);
|
||||
|
@ -171,8 +195,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
}
|
||||
}
|
||||
|
||||
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||
if (Utils.CheckQouta(Quotas.EXCHANGE2007_DISCLAIMERSALLOWED, cntx))
|
||||
if (Utils.CheckQouta(Quotas.EXCHANGE2007_DISCLAIMERSALLOWED, Cntx))
|
||||
{
|
||||
int disclaimerId;
|
||||
if (int.TryParse(ddDisclaimer.SelectedValue, out disclaimerId))
|
||||
|
@ -241,5 +264,35 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
return result;
|
||||
}
|
||||
|
||||
protected void chkArchiving_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
SetArchivingVisible();
|
||||
}
|
||||
|
||||
private void SetArchivingVisible()
|
||||
{
|
||||
int id;
|
||||
if (!int.TryParse(mailboxPlanSelector.MailboxPlanId, out id))
|
||||
return;
|
||||
|
||||
bool archiving = false;
|
||||
|
||||
ExchangeMailboxPlan policy = ES.Services.ExchangeServer.GetExchangeMailboxPlan(PanelRequest.ItemID, id);
|
||||
|
||||
if (policy != null)
|
||||
archiving = policy.EnableArchiving & Utils.CheckQouta(Quotas.EXCHANGE2013_ALLOWARCHIVING, Cntx);
|
||||
|
||||
if (!archiving)
|
||||
chkArchiving.Checked = false;
|
||||
|
||||
secArchiving.Visible = archiving;
|
||||
mailboxArchivePlan.Visible = chkArchiving.Checked;
|
||||
}
|
||||
|
||||
protected void mailboxPlanSelector_Changed(object sender, EventArgs e)
|
||||
{
|
||||
SetArchivingVisible();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -48,6 +48,22 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks;
|
||||
/// breadcrumb control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Breadcrumb breadcrumb;
|
||||
|
||||
/// <summary>
|
||||
/// menu control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Menu menu;
|
||||
|
||||
/// <summary>
|
||||
/// Image1 control.
|
||||
|
@ -94,6 +110,15 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
|
||||
|
||||
/// <summary>
|
||||
/// GeneralUpdatePanel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.UpdatePanel GeneralUpdatePanel;
|
||||
|
||||
/// <summary>
|
||||
/// secGeneral control.
|
||||
/// </summary>
|
||||
|
@ -112,15 +137,6 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Panel General;
|
||||
|
||||
/// <summary>
|
||||
/// GeneralUpdatePanel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.UpdatePanel GeneralUpdatePanel;
|
||||
|
||||
/// <summary>
|
||||
/// chkHideAddressBook control.
|
||||
/// </summary>
|
||||
|
@ -193,6 +209,60 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.QuotaViewer mailboxSize;
|
||||
|
||||
/// <summary>
|
||||
/// secArchiving control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.CollapsiblePanel secArchiving;
|
||||
|
||||
/// <summary>
|
||||
/// Archiving 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.Panel Archiving;
|
||||
|
||||
/// <summary>
|
||||
/// chkArchiving 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.CheckBox chkArchiving;
|
||||
|
||||
/// <summary>
|
||||
/// mailboxArchivePlan control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlTableRow mailboxArchivePlan;
|
||||
|
||||
/// <summary>
|
||||
/// locRetentionPolicyName 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.Localize locRetentionPolicyName;
|
||||
|
||||
/// <summary>
|
||||
/// mailboxRetentionPolicySelector control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.MailboxPlanSelector mailboxRetentionPolicySelector;
|
||||
|
||||
/// <summary>
|
||||
/// secLitigationHoldSettings control.
|
||||
/// </summary>
|
||||
|
|
|
@ -15,14 +15,14 @@
|
|||
<div class="Center">
|
||||
<div class="Title">
|
||||
<asp:Image ID="Image1" SkinID="ExchangeDomainName48" runat="server" />
|
||||
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Domain Names"></asp:Localize>
|
||||
<asp:Localize ID="locTitle" runat="server"></asp:Localize>
|
||||
</div>
|
||||
<div class="FormBody">
|
||||
<wsp:SimpleMessageBox id="messageBox" runat="server" />
|
||||
|
||||
<div class="FormButtonsBarClean">
|
||||
<asp:Button ID="btnAddMailboxPlan" runat="server" meta:resourcekey="btnAddMailboxPlan"
|
||||
Text="Add New Mailboxplan" CssClass="Button1" OnClick="btnAddMailboxPlan_Click" />
|
||||
Text="Add New" CssClass="Button1" OnClick="btnAddMailboxPlan_Click" />
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="gvMailboxPlans" runat="server" AutoGenerateColumns="False" EnableViewState="true"
|
||||
|
|
|
@ -35,8 +35,21 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
{
|
||||
public partial class ExchangeMailboxPlans : WebsitePanelModuleBase
|
||||
{
|
||||
private bool RetentionPolicy
|
||||
{
|
||||
get
|
||||
{
|
||||
return PanelRequest.Ctl.ToLower().Contains("retentionpolicy");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
locTitle.Text = RetentionPolicy ? GetLocalizedString("locTitleRetentionPolicy.Text") : GetLocalizedString("locTitle.Text");
|
||||
gvMailboxPlans.Columns[2].Visible = !RetentionPolicy;
|
||||
btnSetDefaultMailboxPlan.Visible = !RetentionPolicy;
|
||||
|
||||
if (!IsPostBack)
|
||||
{
|
||||
// bind mailboxplans
|
||||
|
@ -71,7 +84,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
|
||||
private void BindMailboxPlans()
|
||||
{
|
||||
ExchangeMailboxPlan[] list = ES.Services.ExchangeServer.GetExchangeMailboxPlans(PanelRequest.ItemID);
|
||||
ExchangeMailboxPlan[] list = ES.Services.ExchangeServer.GetExchangeMailboxPlans(PanelRequest.ItemID, RetentionPolicy);
|
||||
|
||||
gvMailboxPlans.DataSource = list;
|
||||
gvMailboxPlans.DataBind();
|
||||
|
@ -94,7 +107,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
{
|
||||
btnSetDefaultMailboxPlan.Enabled = true;
|
||||
Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "add_mailboxplan",
|
||||
"SpaceID=" + PanelSecurity.PackageId));
|
||||
"SpaceID=" + PanelSecurity.PackageId, "archiving="+RetentionPolicy));
|
||||
}
|
||||
|
||||
protected void gvMailboxPlan_RowCommand(object sender, GridViewCommandEventArgs e)
|
||||
|
@ -177,7 +190,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
foreach (ExchangeAccount a in Accounts)
|
||||
{
|
||||
txtStatus.Text = "Completed";
|
||||
int result = ES.Services.ExchangeServer.SetExchangeMailboxPlan(PanelRequest.ItemID, a.AccountId, Convert.ToInt32(mailboxPlanSelectorTarget.MailboxPlanId));
|
||||
int result = ES.Services.ExchangeServer.SetExchangeMailboxPlan(PanelRequest.ItemID, a.AccountId, Convert.ToInt32(mailboxPlanSelectorTarget.MailboxPlanId), a.ArchivingMailboxPlanId);
|
||||
if (result < 0)
|
||||
{
|
||||
BindMailboxPlans();
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<div class="Center">
|
||||
<div class="Title">
|
||||
<asp:Image ID="Image1" SkinID="ExchangeMailbox48" runat="server" />
|
||||
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Mailboxes"></asp:Localize>
|
||||
<asp:Localize ID="locTitle" runat="server" Text="Mailboxes"></asp:Localize>
|
||||
</div>
|
||||
<div class="FormBody">
|
||||
<wsp:SimpleMessageBox id="messageBox" runat="server" />
|
||||
|
@ -88,12 +88,14 @@
|
|||
SelectMethod="GetExchangeAccountsPaged"
|
||||
SortParameterName="sortColumn"
|
||||
TypeName="WebsitePanel.Portal.ExchangeHelper"
|
||||
OnSelecting="odsAccountsPaged_Selecting"
|
||||
OnSelected="odsAccountsPaged_Selected">
|
||||
<SelectParameters>
|
||||
<asp:QueryStringParameter Name="itemId" QueryStringField="ItemID" DefaultValue="0" />
|
||||
<asp:Parameter Name="accountTypes" DefaultValue="1,5,6" />
|
||||
<asp:ControlParameter Name="filterColumn" ControlID="ddlSearchColumn" PropertyName="SelectedValue" />
|
||||
<asp:ControlParameter Name="filterValue" ControlID="txtSearchValue" PropertyName="Text" />
|
||||
<asp:Parameter Name="archiving" Type="Boolean" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
<br />
|
||||
|
|
|
@ -35,8 +35,20 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
{
|
||||
public partial class ExchangeMailboxes : WebsitePanelModuleBase
|
||||
{
|
||||
private bool ArchivingBoxes
|
||||
{
|
||||
get
|
||||
{
|
||||
return PanelRequest.Ctl.ToLower().Contains("archiving");
|
||||
}
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
locTitle.Text = ArchivingBoxes ? GetLocalizedString("locTitleArchiving.Text") : GetLocalizedString("locTitle.Text");
|
||||
|
||||
btnCreateMailbox.Visible = !ArchivingBoxes;
|
||||
|
||||
if (!IsPostBack)
|
||||
{
|
||||
BindStats();
|
||||
|
@ -149,5 +161,10 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
"ItemID=" + PanelRequest.ItemID,
|
||||
"Context=User");
|
||||
}
|
||||
|
||||
protected void odsAccountsPaged_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
|
||||
{
|
||||
e.InputParameters["archiving"] = ArchivingBoxes;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,141 @@
|
|||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ExchangeRetentionPolicyTag.ascx.cs" Inherits="WebsitePanel.Portal.ExchangeServer.ExchangeRetentionPolicyTag" %>
|
||||
<%@ Register Src="UserControls/SizeBox.ascx" TagName="SizeBox" TagPrefix="wsp" %><%@ Register Src="UserControls/DaysBox.ascx" TagName="DaysBox" TagPrefix="wsp" %>
|
||||
<%@ Register Src="../UserControls/CollapsiblePanel.ascx" TagName="CollapsiblePanel" TagPrefix="wsp" %>
|
||||
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
|
||||
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
|
||||
<%@ Register Src="../UserControls/QuotaEditor.ascx" TagName="QuotaEditor" TagPrefix="uc1" %>
|
||||
<%@ Register Src="UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %>
|
||||
<%@ Register Src="UserControls/Breadcrumb.ascx" TagName="Breadcrumb" TagPrefix="wsp" %>
|
||||
|
||||
<%@ Import Namespace="WebsitePanel.Portal" %>
|
||||
|
||||
<div id="ExchangeContainer">
|
||||
<div class="Module">
|
||||
<div class="Header">
|
||||
<wsp:breadcrumb id="breadcrumb" runat="server" PageName="Text.PageName" />
|
||||
</div>
|
||||
<div class="Left">
|
||||
<wsp:menu id="menu" runat="server" SelectedItem="domains" />
|
||||
</div>
|
||||
<div class="Content">
|
||||
<div class="Center">
|
||||
<div class="Title">
|
||||
<asp:Image ID="Image1" SkinID="ExchangeDomainName48" runat="server" />
|
||||
<asp:Localize ID="locTitle" runat="server"></asp:Localize>
|
||||
</div>
|
||||
<div class="FormBody">
|
||||
<wsp:SimpleMessageBox id="messageBox" runat="server" />
|
||||
|
||||
|
||||
<asp:GridView id="gvPolicy" runat="server" EnableViewState="true" AutoGenerateColumns="false"
|
||||
Width="100%" EmptyDataText="gvPolicy" CssSelectorClass="NormalGridView" OnRowCommand="gvPolicy_RowCommand" >
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Image ID="imgType" runat="server" Width="16px" Height="16px" ImageUrl='<%# GetTagType((int)Eval("ItemID")) %>' ImageAlign="AbsMiddle" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Tag">
|
||||
<ItemStyle Width="70%"></ItemStyle>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="linkcmdEdit" runat="server" CommandName="EditItem" AlternateText="Edit record" CommandArgument='<%# Eval("TagId") %>' Enabled='<%# ((int)Eval("ItemID") == PanelRequest.ItemID) %>' >
|
||||
<asp:Label id="lnkDisplayPolicy" runat="server" EnableViewState="true" ><%# PortalAntiXSS.Encode((string)Eval("TagName"))%></asp:Label>
|
||||
</asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:ImageButton ID="cmdEdit" runat="server" SkinID="EditSmall" CommandName="EditItem" CommandArgument='<%# Eval("TagId") %>' Visible='<%# ((int)Eval("ItemID") == PanelRequest.ItemID) %>' ></asp:ImageButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:ImageButton id="imgDelPolicy" runat="server" Text="Delete" SkinID="ExchangeDelete"
|
||||
CommandName="DeleteItem" CommandArgument='<%# Eval("TagId") %>'
|
||||
meta:resourcekey="cmdDelete" OnClientClick="return confirm('Are you sure you want to delete selected policy tag?')"
|
||||
Visible='<%# ((int)Eval("ItemID") == PanelRequest.ItemID) %>' >
|
||||
</asp:ImageButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<wsp:CollapsiblePanel id="secPolicy" runat="server"
|
||||
TargetControlID="Policy" meta:resourcekey="secPolicy" Text="Policy">
|
||||
</wsp:CollapsiblePanel>
|
||||
<asp:Panel ID="Policy" runat="server" Height="0" style="overflow:hidden;">
|
||||
<table>
|
||||
<tr>
|
||||
<td class="FormLabel200" align="right">
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="txtPolicy" runat="server" CssClass="TextBox200"
|
||||
ontextchanged="txtPolicy_TextChanged" ></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="valRequirePolicy" runat="server" meta:resourcekey="valRequirePolicy" ControlToValidate="txtPolicy"
|
||||
ErrorMessage="Enter policy tag name" ValidationGroup="CreatePolicy" Display="Dynamic" Text="*" SetFocusOnError="True"></asp:RequiredFieldValidator>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
</asp:Panel>
|
||||
|
||||
<wsp:CollapsiblePanel id="secPolicyFeatures" runat="server"
|
||||
TargetControlID="PolicyFeatures" meta:resourcekey="secPolicyFeatures" Text="Policy Tag Features">
|
||||
</wsp:CollapsiblePanel>
|
||||
<asp:Panel ID="PolicyFeatures" runat="server" Height="0" style="overflow:hidden;">
|
||||
<table>
|
||||
<tr>
|
||||
<td class="FormLabel200" align="right"><asp:Localize ID="locType" runat="server" meta:resourcekey="locType" Text="Type :"></asp:Localize></td>
|
||||
<td>
|
||||
<asp:DropDownList ID="ddTagType" runat="server"></asp:DropDownList>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="FormLabel200" align="right"><asp:Localize ID="locAgeLimitForRetention" runat="server" meta:resourcekey="locAgeLimitForRetention" Text="Age limit ror retention :"></asp:Localize></td>
|
||||
<td>
|
||||
<div class="Right">
|
||||
<uc1:QuotaEditor id="ageLimitForRetention" runat="server"
|
||||
QuotaTypeID="2"
|
||||
QuotaValue="0"
|
||||
ParentQuotaValue="-1"></uc1:QuotaEditor>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="FormLabel200" align="right"><asp:Localize ID="locRetentionAction" runat="server" meta:resourcekey="locRetentionAction" Text="Retention action :"></asp:Localize></td>
|
||||
<td>
|
||||
<asp:DropDownList ID="ddRetentionAction" runat="server"></asp:DropDownList>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
</asp:Panel>
|
||||
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="FormButtonsBarClean">
|
||||
<asp:Button ID="btnAddPolicy" runat="server" meta:resourcekey="btnAddPolicy"
|
||||
Text="Add New" CssClass="Button1" OnClick="btnAddPolicy_Click" />
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="FormButtonsBarClean">
|
||||
<asp:Button ID="btnUpdatePolicy" runat="server" meta:resourcekey="btnUpdatePolicy"
|
||||
Text="Update" CssClass="Button1" OnClick="btnUpdatePolicy_Click" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
|
||||
<asp:TextBox ID="txtStatus" runat="server" CssClass="TextBox400" MaxLength="128" ReadOnly="true"></asp:TextBox>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,238 @@
|
|||
// 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.IO;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Collections;
|
||||
using System.Xml;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.WebControls.WebParts;
|
||||
using System.Web.UI.HtmlControls;
|
||||
|
||||
using WebsitePanel.EnterpriseServer;
|
||||
using WebsitePanel.Providers.HostedSolution;
|
||||
|
||||
namespace WebsitePanel.Portal.ExchangeServer
|
||||
{
|
||||
public partial class ExchangeRetentionPolicyTag : WebsitePanelModuleBase
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
BindRetentionPolicy();
|
||||
|
||||
string[] types = Enum.GetNames(typeof(ExchangeRetentionPolicyTagType));
|
||||
|
||||
ddTagType.Items.Clear();
|
||||
for (int i = 0; i < types.Length; i++)
|
||||
ddTagType.Items.Add(new ListItem(types[i], i.ToString()));
|
||||
|
||||
string[] action = Enum.GetNames(typeof(ExchangeRetentionPolicyTagAction));
|
||||
|
||||
ddRetentionAction.Items.Clear();
|
||||
for (int i = 0; i < action.Length; i++)
|
||||
ddRetentionAction.Items.Add(new ListItem(action[i], i.ToString()));
|
||||
}
|
||||
|
||||
txtStatus.Visible = false;
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void BindRetentionPolicy()
|
||||
{
|
||||
WebsitePanel.Providers.HostedSolution.ExchangeRetentionPolicyTag[] list = ES.Services.ExchangeServer.GetExchangeRetentionPolicyTags(PanelRequest.ItemID);
|
||||
|
||||
gvPolicy.DataSource = list;
|
||||
gvPolicy.DataBind();
|
||||
|
||||
btnUpdatePolicy.Enabled = (string.IsNullOrEmpty(txtPolicy.Text)) ? false : true;
|
||||
}
|
||||
|
||||
|
||||
public void btnAddPolicy_Click(object sender, EventArgs e)
|
||||
{
|
||||
Page.Validate("CreatePolicy");
|
||||
|
||||
if (!Page.IsValid)
|
||||
return;
|
||||
|
||||
WebsitePanel.Providers.HostedSolution.ExchangeRetentionPolicyTag tag = new Providers.HostedSolution.ExchangeRetentionPolicyTag();
|
||||
tag.TagName = txtPolicy.Text;
|
||||
tag.TagType = Convert.ToInt32(ddTagType.SelectedValue);
|
||||
tag.AgeLimitForRetention = ageLimitForRetention.QuotaValue;
|
||||
tag.RetentionAction = Convert.ToInt32(ddRetentionAction.SelectedValue);
|
||||
|
||||
int result = ES.Services.ExchangeServer.AddExchangeRetentionPolicyTag(PanelRequest.ItemID, tag);
|
||||
|
||||
if (result < 0)
|
||||
{
|
||||
ShowResultMessage(result);
|
||||
return;
|
||||
}
|
||||
|
||||
BindRetentionPolicy();
|
||||
}
|
||||
|
||||
protected void gvPolicy_RowCommand(object sender, GridViewCommandEventArgs e)
|
||||
{
|
||||
int mailboxPlanId = Utils.ParseInt(e.CommandArgument.ToString(), 0);
|
||||
Providers.HostedSolution.ExchangeRetentionPolicyTag tag;
|
||||
|
||||
switch (e.CommandName)
|
||||
{
|
||||
case "DeleteItem":
|
||||
try
|
||||
{
|
||||
tag = ES.Services.ExchangeServer.GetExchangeRetentionPolicyTag(PanelRequest.ItemID, mailboxPlanId);
|
||||
|
||||
if (tag.ItemID != PanelRequest.ItemID)
|
||||
{
|
||||
ShowErrorMessage("EXCHANGE_UNABLE_USE_SYSTEMPLAN");
|
||||
BindRetentionPolicy();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
int result = ES.Services.ExchangeServer.DeleteExchangeRetentionPolicyTag(PanelRequest.ItemID, mailboxPlanId);
|
||||
if (result < 0)
|
||||
{
|
||||
ShowResultMessage(result);
|
||||
return;
|
||||
}
|
||||
|
||||
ViewState["PolicyID"] = null;
|
||||
|
||||
txtPolicy.Text = string.Empty;
|
||||
ageLimitForRetention.QuotaValue = 0;
|
||||
|
||||
btnUpdatePolicy.Enabled = (string.IsNullOrEmpty(txtPolicy.Text)) ? false : true;
|
||||
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
ShowErrorMessage("EXCHANGE_DELETE_MAILBOXPLAN");
|
||||
}
|
||||
|
||||
BindRetentionPolicy();
|
||||
break;
|
||||
|
||||
case "EditItem":
|
||||
ViewState["PolicyID"] = mailboxPlanId;
|
||||
|
||||
tag = ES.Services.ExchangeServer.GetExchangeRetentionPolicyTag(PanelRequest.ItemID, mailboxPlanId);
|
||||
|
||||
txtPolicy.Text = tag.TagName;
|
||||
Utils.SelectListItem(ddTagType, tag.TagType);
|
||||
ageLimitForRetention.QuotaValue = tag.AgeLimitForRetention;
|
||||
Utils.SelectListItem(ddRetentionAction, tag.RetentionAction);
|
||||
|
||||
btnUpdatePolicy.Enabled = (string.IsNullOrEmpty(txtPolicy.Text)) ? false : true;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void SaveSettings(UserSettings settings)
|
||||
{
|
||||
settings["PolicyID"] = "";
|
||||
}
|
||||
|
||||
|
||||
protected void btnUpdatePolicy_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
if (ViewState["PolicyID"] == null)
|
||||
return;
|
||||
|
||||
int mailboxPlanId = (int)ViewState["PolicyID"];
|
||||
Providers.HostedSolution.ExchangeRetentionPolicyTag tag;
|
||||
|
||||
tag = ES.Services.ExchangeServer.GetExchangeRetentionPolicyTag(PanelRequest.ItemID, mailboxPlanId);
|
||||
|
||||
if (tag.ItemID != PanelRequest.ItemID)
|
||||
{
|
||||
ShowErrorMessage("EXCHANGE_UNABLE_USE_SYSTEMPLAN");
|
||||
BindRetentionPolicy();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
tag.TagName = txtPolicy.Text;
|
||||
tag.TagType = Convert.ToInt32(ddTagType.SelectedValue);
|
||||
tag.AgeLimitForRetention = ageLimitForRetention.QuotaValue;
|
||||
tag.RetentionAction = Convert.ToInt32(ddRetentionAction.SelectedValue);
|
||||
|
||||
int result = ES.Services.ExchangeServer.UpdateExchangeRetentionPolicyTag(PanelRequest.ItemID, tag);
|
||||
|
||||
if (result < 0)
|
||||
{
|
||||
ShowErrorMessage("EXCHANGE_UPDATEPLANS");
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowSuccessMessage("EXCHANGE_UPDATEPLANS");
|
||||
}
|
||||
|
||||
BindRetentionPolicy();
|
||||
}
|
||||
|
||||
|
||||
protected void txtPolicy_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
btnUpdatePolicy.Enabled = (string.IsNullOrEmpty(txtPolicy.Text)) ? false : true;
|
||||
}
|
||||
|
||||
public string GetTagType(int ItemID)
|
||||
{
|
||||
string imgName = string.Empty;
|
||||
|
||||
if (ItemID == PanelRequest.ItemID)
|
||||
imgName = "admin_16.png";
|
||||
else
|
||||
imgName = "company24.png";
|
||||
|
||||
return GetThemedImage("Exchange/" + imgName);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,204 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebsitePanel.Portal.ExchangeServer {
|
||||
|
||||
|
||||
public partial class ExchangeRetentionPolicyTag {
|
||||
|
||||
/// <summary>
|
||||
/// breadcrumb control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Breadcrumb breadcrumb;
|
||||
|
||||
/// <summary>
|
||||
/// menu control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Menu menu;
|
||||
|
||||
/// <summary>
|
||||
/// Image1 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 Image1;
|
||||
|
||||
/// <summary>
|
||||
/// locTitle 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.Localize locTitle;
|
||||
|
||||
/// <summary>
|
||||
/// messageBox control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
|
||||
|
||||
/// <summary>
|
||||
/// gvPolicy 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.GridView gvPolicy;
|
||||
|
||||
/// <summary>
|
||||
/// secPolicy control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.CollapsiblePanel secPolicy;
|
||||
|
||||
/// <summary>
|
||||
/// Policy 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.Panel Policy;
|
||||
|
||||
/// <summary>
|
||||
/// txtPolicy 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.TextBox txtPolicy;
|
||||
|
||||
/// <summary>
|
||||
/// valRequirePolicy 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.RequiredFieldValidator valRequirePolicy;
|
||||
|
||||
/// <summary>
|
||||
/// secPolicyFeatures control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.CollapsiblePanel secPolicyFeatures;
|
||||
|
||||
/// <summary>
|
||||
/// PolicyFeatures 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.Panel PolicyFeatures;
|
||||
|
||||
/// <summary>
|
||||
/// locType 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.Localize locType;
|
||||
|
||||
/// <summary>
|
||||
/// ddTagType 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.DropDownList ddTagType;
|
||||
|
||||
/// <summary>
|
||||
/// locAgeLimitForRetention 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.Localize locAgeLimitForRetention;
|
||||
|
||||
/// <summary>
|
||||
/// ageLimitForRetention control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.QuotaEditor ageLimitForRetention;
|
||||
|
||||
/// <summary>
|
||||
/// locRetentionAction 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.Localize locRetentionAction;
|
||||
|
||||
/// <summary>
|
||||
/// ddRetentionAction 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.DropDownList ddRetentionAction;
|
||||
|
||||
/// <summary>
|
||||
/// btnAddPolicy 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.Button btnAddPolicy;
|
||||
|
||||
/// <summary>
|
||||
/// btnUpdatePolicy 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.Button btnUpdatePolicy;
|
||||
|
||||
/// <summary>
|
||||
/// txtStatus 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.TextBox txtStatus;
|
||||
}
|
||||
}
|
|
@ -234,6 +234,48 @@
|
|||
</tr>
|
||||
</asp:Panel>
|
||||
|
||||
<asp:Panel runat="server" ID="crm2013StatsPanel">
|
||||
<tr >
|
||||
<td class="OrgStatsGroup" width="100%" colspan="2">
|
||||
<asp:Localize ID="locCRM2013" runat="server" meta:resourcekey="locCRM2013"
|
||||
Text="CRM 2013"></asp:Localize>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="OrgStatsRow">
|
||||
<td align="right" nowrap>
|
||||
<asp:HyperLink ID="lnkProfessionalCRMUsers" runat="server" meta:resourcekey="lnkProfessionalCRMUsers" Text="Professional licenses :"></asp:HyperLink>
|
||||
</td>
|
||||
<td>
|
||||
<wsp:QuotaViewer ID="crmProfessionalUsersStats" QuotaTypeId="2" runat="server" DisplayGauge="true" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="OrgStatsRow">
|
||||
<td align="right" nowrap>
|
||||
<asp:HyperLink ID="lnkBasicCRMUsers" runat="server" meta:resourcekey="lnkBasicCRMUsers" Text="Basic licenses :"></asp:HyperLink>
|
||||
</td>
|
||||
<td>
|
||||
<wsp:QuotaViewer ID="crmBasicUsersStats" QuotaTypeId="2" runat="server" DisplayGauge="true" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="OrgStatsRow">
|
||||
<td align="right" nowrap>
|
||||
<asp:HyperLink ID="lnkEssentialCRMUsers" runat="server" meta:resourcekey="lnkEssentialCRMUsers" Text="Essential licenses :"></asp:HyperLink>
|
||||
</td>
|
||||
<td>
|
||||
<wsp:QuotaViewer ID="crmEssentialUsersStats" QuotaTypeId="2" runat="server" DisplayGauge="true" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="OrgStatsRow">
|
||||
<td align="right" nowrap>
|
||||
<asp:HyperLink ID="lnkCRM2013DBSize" runat="server" meta:resourcekey="lnkCRMDBSize" Text="Storage size (MB):"></asp:HyperLink>
|
||||
</td>
|
||||
<td>
|
||||
<wsp:QuotaViewer ID="crm2013DBSize" runat="server" QuotaTypeId="2" DisplayGauge="true" />
|
||||
</td>
|
||||
</tr>
|
||||
</asp:Panel>
|
||||
|
||||
|
||||
<asp:Panel runat="server" ID="enterpriseStorageStatsPanel">
|
||||
<tr>
|
||||
<td class="OrgStatsGroup" width="100%" colspan="2">
|
||||
|
|
|
@ -221,11 +221,26 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
|
||||
if (org.CrmOrganizationId != Guid.Empty)
|
||||
{
|
||||
crmStatsPanel.Visible = true;
|
||||
BindCRMStats(orgStats, tenantStats);
|
||||
|
||||
if (cntx.Groups.ContainsKey(ResourceGroups.HostedCRM2013))
|
||||
{
|
||||
crm2013StatsPanel.Visible = true;
|
||||
crmStatsPanel.Visible = false;
|
||||
BindCRM2013Stats(orgStats, tenantStats);
|
||||
}
|
||||
else if (cntx.Groups.ContainsKey(ResourceGroups.HostedCRM))
|
||||
{
|
||||
crmStatsPanel.Visible = true;
|
||||
crm2013StatsPanel.Visible = false;
|
||||
BindCRMStats(orgStats, tenantStats);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
crmStatsPanel.Visible = false;
|
||||
crm2013StatsPanel.Visible = false;
|
||||
}
|
||||
|
||||
|
||||
if (cntx.Groups.ContainsKey(ResourceGroups.EnterpriseStorage))
|
||||
|
@ -263,6 +278,30 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
crmDBSize.QuotaValue = Convert.ToInt32(stats.AllocatedCRMDiskSpace>0 ? stats.AllocatedCRMDiskSpace/(1024*1024) : -1);
|
||||
}
|
||||
|
||||
private void BindCRM2013Stats(OrganizationStatistics stats, OrganizationStatistics tenantStats)
|
||||
{
|
||||
lnkProfessionalCRMUsers.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "crmusers",
|
||||
"SpaceID=" + PanelSecurity.PackageId);
|
||||
|
||||
lnkBasicCRMUsers.NavigateUrl = lnkCRMUsers.NavigateUrl;
|
||||
lnkEssentialCRMUsers.NavigateUrl = lnkCRMUsers.NavigateUrl;
|
||||
|
||||
lnkCRM2013DBSize.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "crm_storage_settings",
|
||||
"SpaceID=" + PanelSecurity.PackageId);
|
||||
|
||||
crmProfessionalUsersStats.QuotaUsedValue = stats.CreatedProfessionalCRMUsers;
|
||||
crmProfessionalUsersStats.QuotaValue = stats.AllocatedProfessionalCRMUsers;
|
||||
|
||||
crmBasicUsersStats.QuotaUsedValue = stats.CreatedBasicCRMUsers;
|
||||
crmBasicUsersStats.QuotaValue = stats.AllocatedBasicCRMUsers;
|
||||
|
||||
crmEssentialUsersStats.QuotaUsedValue = stats.CreatedEssentialCRMUsers;
|
||||
crmEssentialUsersStats.QuotaValue = stats.AllocatedEssentialCRMUsers;
|
||||
|
||||
crm2013DBSize.QuotaUsedValue = Convert.ToInt32(stats.UsedCRMDiskSpace > 0 ? stats.UsedCRMDiskSpace / (1024 * 1024) : -1);
|
||||
crm2013DBSize.QuotaValue = Convert.ToInt32(stats.AllocatedCRMDiskSpace > 0 ? stats.AllocatedCRMDiskSpace / (1024 * 1024) : -1);
|
||||
}
|
||||
|
||||
private void BindOCSStats(OrganizationStatistics stats, OrganizationStatistics tenantStats)
|
||||
{
|
||||
ocsUsersStats.QuotaValue = stats.AllocatedOCSUsers;
|
||||
|
|
|
@ -571,6 +571,96 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.QuotaViewer crmDBSize;
|
||||
|
||||
/// <summary>
|
||||
/// crm2013StatsPanel 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.Panel crm2013StatsPanel;
|
||||
|
||||
/// <summary>
|
||||
/// locCRM2013 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.Localize locCRM2013;
|
||||
|
||||
/// <summary>
|
||||
/// lnkProfessionalCRMUsers 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.HyperLink lnkProfessionalCRMUsers;
|
||||
|
||||
/// <summary>
|
||||
/// crmProfessionalUsersStats control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.QuotaViewer crmProfessionalUsersStats;
|
||||
|
||||
/// <summary>
|
||||
/// lnkBasicCRMUsers 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.HyperLink lnkBasicCRMUsers;
|
||||
|
||||
/// <summary>
|
||||
/// crmBasicUsersStats control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.QuotaViewer crmBasicUsersStats;
|
||||
|
||||
/// <summary>
|
||||
/// lnkEssentialCRMUsers 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.HyperLink lnkEssentialCRMUsers;
|
||||
|
||||
/// <summary>
|
||||
/// crmEssentialUsersStats control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.QuotaViewer crmEssentialUsersStats;
|
||||
|
||||
/// <summary>
|
||||
/// lnkCRM2013DBSize 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.HyperLink lnkCRM2013DBSize;
|
||||
|
||||
/// <summary>
|
||||
/// crm2013DBSize control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.QuotaViewer crm2013DBSize;
|
||||
|
||||
/// <summary>
|
||||
/// enterpriseStorageStatsPanel control.
|
||||
/// </summary>
|
||||
|
|
|
@ -213,4 +213,16 @@
|
|||
<data name="Text.LyncPhoneNumbers" xml:space="preserve">
|
||||
<value>Phone Numbers</value>
|
||||
</data>
|
||||
<data name="Text.CRMGroup2013" xml:space="preserve">
|
||||
<value>CRM 2013</value>
|
||||
</data>
|
||||
<data name="Text.ArchivingMailboxes" xml:space="preserve">
|
||||
<value>Archiving Mailboxes</value>
|
||||
</data>
|
||||
<data name="Text.RetentionPolicy" xml:space="preserve">
|
||||
<value>Retention Policy</value>
|
||||
</data>
|
||||
<data name="Text.RetentionPolicyTag" xml:space="preserve">
|
||||
<value>Retention Policy Tag</value>
|
||||
</data>
|
||||
</root>
|
|
@ -1,2 +1,2 @@
|
|||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MailboxPlanSelector.ascx.cs" Inherits="WebsitePanel.Portal.ExchangeServer.UserControls.MailboxPlanSelector" %>
|
||||
<asp:DropDownList ID="ddlMailboxPlan" runat="server" CssClass="NormalTextBox"></asp:DropDownList>
|
||||
<asp:DropDownList ID="ddlMailboxPlan" runat="server" CssClass="NormalTextBox" OnSelectedIndexChanged="ddlMailboxPlan_SelectedIndexChanged"></asp:DropDownList>
|
|
@ -33,25 +33,33 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
{
|
||||
public partial class MailboxPlanSelector : WebsitePanelControlBase
|
||||
{
|
||||
private void UpdateMailboxPlanSelected()
|
||||
{
|
||||
foreach (ListItem li in ddlMailboxPlan.Items)
|
||||
{
|
||||
if (li.Value == mailboxPlanToSelect)
|
||||
{
|
||||
ddlMailboxPlan.ClearSelection();
|
||||
li.Selected = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private string mailboxPlanToSelect;
|
||||
}
|
||||
|
||||
private string mailboxPlanToSelect = null;
|
||||
|
||||
public string MailboxPlanId
|
||||
{
|
||||
|
||||
get { return ddlMailboxPlan.SelectedItem.Value; }
|
||||
set
|
||||
{
|
||||
mailboxPlanToSelect = value;
|
||||
foreach (ListItem li in ddlMailboxPlan.Items)
|
||||
{
|
||||
if (li.Value == value)
|
||||
{
|
||||
ddlMailboxPlan.ClearSelection();
|
||||
li.Selected = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
get {
|
||||
if (ddlMailboxPlan.SelectedItem != null)
|
||||
return ddlMailboxPlan.SelectedItem.Value;
|
||||
return mailboxPlanToSelect;
|
||||
}
|
||||
set
|
||||
{
|
||||
mailboxPlanToSelect = value;
|
||||
UpdateMailboxPlanSelected();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -70,6 +78,13 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
}
|
||||
}
|
||||
|
||||
private bool archiving = false;
|
||||
public bool Archiving
|
||||
{
|
||||
get { return archiving; }
|
||||
set { archiving = value; }
|
||||
}
|
||||
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
@ -79,9 +94,24 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
}
|
||||
}
|
||||
|
||||
protected void Page_PreRender(object sender, EventArgs e)
|
||||
{
|
||||
ddlMailboxPlan.AutoPostBack = (Changed!=null);
|
||||
}
|
||||
|
||||
private void BindMailboxPlans()
|
||||
{
|
||||
WebsitePanel.Providers.HostedSolution.ExchangeMailboxPlan[] plans = ES.Services.ExchangeServer.GetExchangeMailboxPlans(PanelRequest.ItemID);
|
||||
|
||||
WebsitePanel.Providers.HostedSolution.ExchangeMailboxPlan[] plans = ES.Services.ExchangeServer.GetExchangeMailboxPlans(PanelRequest.ItemID, Archiving);
|
||||
|
||||
if (AddNone)
|
||||
{
|
||||
ListItem li = new ListItem();
|
||||
li.Text = "None";
|
||||
li.Value = "-1";
|
||||
li.Selected = false;
|
||||
ddlMailboxPlan.Items.Add(li);
|
||||
}
|
||||
|
||||
foreach (WebsitePanel.Providers.HostedSolution.ExchangeMailboxPlan plan in plans)
|
||||
{
|
||||
|
@ -92,29 +122,17 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
ddlMailboxPlan.Items.Add(li);
|
||||
}
|
||||
|
||||
if (AddNone)
|
||||
UpdateMailboxPlanSelected();
|
||||
|
||||
}
|
||||
|
||||
public event EventHandler Changed = null;
|
||||
protected void ddlMailboxPlan_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Changed != null)
|
||||
{
|
||||
ListItem li = new ListItem();
|
||||
li.Text = "[None]";
|
||||
li.Value = "-1";
|
||||
li.Selected = false;
|
||||
ddlMailboxPlan.Items.Add(li);
|
||||
Changed(this, e);
|
||||
}
|
||||
|
||||
|
||||
if (!string.IsNullOrEmpty(mailboxPlanToSelect))
|
||||
{
|
||||
foreach (ListItem li in ddlMailboxPlan.Items)
|
||||
{
|
||||
if (li.Value == mailboxPlanToSelect)
|
||||
{
|
||||
ddlMailboxPlan.ClearSelection();
|
||||
li.Selected = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -120,6 +120,9 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
if (Utils.CheckQouta(Quotas.EXCHANGE2007_MAILBOXES, cntx))
|
||||
exchangeGroup.MenuItems.Add(CreateMenuItem("Mailboxes", "mailboxes"));
|
||||
|
||||
if (Utils.CheckQouta(Quotas.EXCHANGE2013_ALLOWARCHIVING, cntx))
|
||||
exchangeGroup.MenuItems.Add(CreateMenuItem("ArchivingMailboxes", "archivingmailboxes"));
|
||||
|
||||
if (Utils.CheckQouta(Quotas.EXCHANGE2007_CONTACTS, cntx))
|
||||
exchangeGroup.MenuItems.Add(CreateMenuItem("Contacts", "contacts"));
|
||||
|
||||
|
@ -137,6 +140,14 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
if (Utils.CheckQouta(Quotas.EXCHANGE2007_MAILBOXES, cntx))
|
||||
exchangeGroup.MenuItems.Add(CreateMenuItem("MailboxPlans", "mailboxplans"));
|
||||
|
||||
if (!hideItems)
|
||||
if (Utils.CheckQouta(Quotas.EXCHANGE2013_ALLOWARCHIVING, cntx))
|
||||
exchangeGroup.MenuItems.Add(CreateMenuItem("RetentionPolicy", "retentionpolicy"));
|
||||
|
||||
if (!hideItems)
|
||||
if (Utils.CheckQouta(Quotas.EXCHANGE2013_ALLOWARCHIVING, cntx))
|
||||
exchangeGroup.MenuItems.Add(CreateMenuItem("RetentionPolicyTag", "retentionpolicytag"));
|
||||
|
||||
if (!hideItems)
|
||||
if (Utils.CheckQouta(Quotas.EXCHANGE2007_MAILBOXES, cntx))
|
||||
exchangeGroup.MenuItems.Add(CreateMenuItem("ExchangeDomainNames", "domains"));
|
||||
|
@ -200,6 +211,19 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
|
||||
}
|
||||
|
||||
private void PrepareCRMMenu2013(PackageContext cntx, List<MenuGroup> groups, string imagePath)
|
||||
{
|
||||
MenuGroup crmGroup = new MenuGroup(GetLocalizedString("Text.CRMGroup2013"), imagePath + "crm_16.png");
|
||||
|
||||
crmGroup.MenuItems.Add(CreateMenuItem("CRMOrganization", "CRMOrganizationDetails"));
|
||||
crmGroup.MenuItems.Add(CreateMenuItem("CRMUsers", "CRMUsers"));
|
||||
crmGroup.MenuItems.Add(CreateMenuItem("StorageLimits", "crm_storage_settings"));
|
||||
|
||||
if (crmGroup.MenuItems.Count > 0)
|
||||
groups.Add(crmGroup);
|
||||
|
||||
}
|
||||
|
||||
private void PrepareBlackBerryMenu(PackageContext cntx, List<MenuGroup> groups, string imagePath)
|
||||
{
|
||||
MenuGroup bbGroup = new MenuGroup(GetLocalizedString("Text.BlackBerryGroup"), imagePath + "blackberry16.png");
|
||||
|
@ -292,7 +316,9 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
}
|
||||
|
||||
//CRM Menu
|
||||
if (cntx.Groups.ContainsKey(ResourceGroups.HostedCRM))
|
||||
if (cntx.Groups.ContainsKey(ResourceGroups.HostedCRM2013))
|
||||
PrepareCRMMenu2013(cntx, groups, imagePath);
|
||||
else if (cntx.Groups.ContainsKey(ResourceGroups.HostedCRM))
|
||||
PrepareCRMMenu(cntx, groups, imagePath);
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue