This commit is contained in:
Virtuworks 2014-04-13 16:13:29 -04:00
commit a515c9a68c
116 changed files with 198344 additions and 6475 deletions

View file

@ -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="btnSetDefaultMailboxPlan.Text" xml:space="preserve">
<value>Set Default Mailbox plan</value>
@ -226,7 +226,7 @@
<value>Restamp mailboxes</value>
</data>
<data name="btnUpdateMailboxPlan.Text" xml:space="preserve">
<value>Update Mailbox Plan</value>
<value>Update</value>
</data>
<data name="chkEnableLitigationHold.Text" xml:space="preserve">
<value>Enable Litigation Hold</value>

View file

@ -0,0 +1,138 @@
<?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>
</root>

View file

@ -53,6 +53,11 @@
<td><asp:DropDownList runat="server" ID="ddlCollation" /></td>
</tr>
<tr height="23px">
<td class="FormLabel150"><asp:Label runat="server" ID="lblBaseLanguage" meta:resourcekey="lblBaseLanguage" Text="Base Language"/></td>
<td><asp:DropDownList runat="server" ID="ddlBaseLanguage" /></td>
</tr>
</table>
<div class="FormFooterClean">
<asp:Button runat="server" meta:resourcekey="btnCreate" ID="btnCreate" CssClass="Button2" OnClick="btnCreate_Click" />

View file

@ -28,14 +28,59 @@
using System;
using System.Web.UI.WebControls;
using System.Globalization;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using WebsitePanel.Providers.Common;
using WebsitePanel.Providers.HostedSolution;
using WebsitePanel.Providers.ResultObjects;
using WebsitePanel.EnterpriseServer;
namespace WebsitePanel.Portal.CRM
{
public partial class CRMOrganizationDetails : WebsitePanelModuleBase
{
private StringDictionary ConvertArrayToDictionary(string[] settings)
{
StringDictionary r = new StringDictionary();
foreach (string setting in settings)
{
int idx = setting.IndexOf('=');
r.Add(setting.Substring(0, idx), setting.Substring(idx + 1));
}
return r;
}
private StringDictionary serviceSettings = null;
private StringDictionary ServiceSettings
{
get
{
if (serviceSettings != null)
return serviceSettings;
PackageInfo pi = PackagesHelper.GetCachedPackage(PanelSecurity.PackageId);
ServiceInfo[] si = ES.Services.Servers.GetServicesByServerIdGroupName(pi.ServerId, ResourceGroups.HostedCRM2013);
if (si.Length == 0) si = ES.Services.Servers.GetServicesByServerIdGroupName(pi.ServerId, ResourceGroups.HostedCRM);
if (si.Length > 0)
{
int serviceId = si[0].ServiceId;
string[] settings = ES.Services.Servers.GetServiceSettings(serviceId);
serviceSettings = ConvertArrayToDictionary(settings);
}
else
serviceSettings = new StringDictionary();
return serviceSettings;
}
}
private StringArrayResultObject BindCollations()
{
StringArrayResultObject res = ES.Services.CRM.GetCollation(PanelSecurity.PackageId);
@ -43,8 +88,10 @@ namespace WebsitePanel.Portal.CRM
{
ddlCollation.DataSource = res.Value;
ddlCollation.DataBind();
ddlCollation.SelectedValue = "Latin1_General_CI_AI";
Utils.SelectListItem(ddlCollation, "Latin1_General_CI_AI"); // default
Utils.SelectListItem(ddlCollation, ServiceSettings[Constants.Collation]);
}
return res;
}
@ -66,14 +113,34 @@ namespace WebsitePanel.Portal.CRM
}));
ddlCurrency.Items.Add(item);
}
ddlCurrency.SelectedValue = "USD|US Dollar|$|United States";
Utils.SelectListItem(ddlCurrency, "USD|US Dollar|$|United States"); // default
Utils.SelectListItem(ddlCurrency, ServiceSettings[Constants.Currency]);
}
return res;
}
private void BindBaseLanguage()
{
ddlBaseLanguage.Items.Clear();
int[] langPacksId = ES.Services.CRM.GetInstalledLanguagePacks(PanelSecurity.PackageId);
if (langPacksId != null)
{
foreach (int langId in langPacksId)
{
CultureInfo ci = CultureInfo.GetCultureInfo(langId);
ListItem item = new ListItem(ci.EnglishName, langId.ToString());
ddlBaseLanguage.Items.Add(item);
}
Utils.SelectListItem(ddlBaseLanguage, "1033"); // default
Utils.SelectListItem(ddlBaseLanguage, ServiceSettings[Constants.BaseLanguage]);
}
}
@ -82,6 +149,7 @@ namespace WebsitePanel.Portal.CRM
btnCreate.Visible = false;
ddlCollation.Enabled = false;
ddlCurrency.Enabled = false;
ddlBaseLanguage.Enabled = false;
administrator.Visible = false;
lblAdmin.Visible = true;
lblAdmin.Text = admin;
@ -89,7 +157,6 @@ namespace WebsitePanel.Portal.CRM
hlOrganizationPage.Visible = true;
hlOrganizationPage.NavigateUrl = org.CrmUrl;
hlOrganizationPage.Text = org.CrmUrl;
}
private void ShowOrganizationDetails()
@ -97,12 +164,12 @@ namespace WebsitePanel.Portal.CRM
btnCreate.Visible = true;
ddlCollation.Enabled = true;
ddlCurrency.Enabled = true;
ddlBaseLanguage.Enabled = true;
administrator.Visible = true;
lblAdmin.Visible = false;
btnDelete.Visible = false;
hlOrganizationPage.Visible = false;
}
@ -125,22 +192,20 @@ namespace WebsitePanel.Portal.CRM
return;
}
BindBaseLanguage();
Organization org = ES.Services.Organizations.GetOrganization(PanelRequest.ItemID);
lblCrmOrgId.Text = org.OrganizationId;
lblCrmOrgName.Text = org.Name;
if (!string.IsNullOrEmpty(org.CrmCurrency))//CRM organization
if (!string.IsNullOrEmpty(org.CrmCurrency)) //CRM organization
{
OrganizationUser admin =
ES.Services.Organizations.GetUserGeneralSettings(org.Id, org.CrmAdministratorId);
ddlCurrency.SelectedValue = org.CrmCurrency;
ddlCollation.SelectedValue = org.CrmCollation;
Utils.SelectListItem(ddlCurrency, org.CrmCurrency);
Utils.SelectListItem(ddlCollation, org.CrmCollation);
Utils.SelectListItem(ddlBaseLanguage, org.CrmLanguadgeCode);
ShowCrmOrganizationDetails(admin.DisplayName, org);
}
@ -172,13 +237,15 @@ namespace WebsitePanel.Portal.CRM
return;
}
int baseLanguage = 0;
int.TryParse(ddlBaseLanguage.SelectedValue, out baseLanguage);
EnterpriseServer.esCRM CRM = ES.Services.CRM;
CRM.Timeout = 7200000; //# Set longer timeout
OrganizationResult res = CRM.CreateOrganization(org.Id, cuurrencyData[0], cuurrencyData[1], cuurrencyData[2], cuurrencyData[3],
administrator.GetAccountId(), ddlCollation.SelectedValue);
administrator.GetAccountId(), ddlCollation.SelectedValue, baseLanguage);
messageBox.ShowMessage(res, "CreateCrmOrganization", "HostedCRM");
if (res.IsSuccess)

View file

@ -193,6 +193,24 @@ namespace WebsitePanel.Portal.CRM {
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddlCollation;
/// <summary>
/// lblBaseLanguage 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 lblBaseLanguage;
/// <summary>
/// ddlBaseLanguage 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 ddlBaseLanguage;
/// <summary>
/// btnCreate control.
/// </summary>

View file

@ -63,7 +63,11 @@ namespace WebsitePanel.Portal
Organization org = ES.Services.Organizations.GetOrganization(PanelRequest.ItemID);
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
int limitDBSize = cntx.Quotas[Quotas.CRM_MAXDATABASESIZE].QuotaAllocatedValue;
string quotaName = "";
if (cntx.Groups.ContainsKey(ResourceGroups.HostedCRM2013)) quotaName = Quotas.CRM2013_MAXDATABASESIZE;
else if (cntx.Groups.ContainsKey(ResourceGroups.HostedCRM)) quotaName = Quotas.CRM_MAXDATABASESIZE;
int limitDBSize = cntx.Quotas[quotaName].QuotaAllocatedValue;
//maxStorageSettingsValue.ParentQuotaValue = limitDBSize;
maxStorageSettingsValue.ParentQuotaValue = -1;
@ -86,7 +90,12 @@ namespace WebsitePanel.Portal
try
{
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
long limitSize = cntx.Quotas[Quotas.CRM_MAXDATABASESIZE].QuotaAllocatedValue;
string quotaName = "";
if (cntx.Groups.ContainsKey(ResourceGroups.HostedCRM2013)) quotaName = Quotas.CRM2013_MAXDATABASESIZE;
else if (cntx.Groups.ContainsKey(ResourceGroups.HostedCRM)) quotaName = Quotas.CRM_MAXDATABASESIZE;
long limitSize = cntx.Quotas[quotaName].QuotaAllocatedValue;
long maxSize = maxStorageSettingsValue.QuotaValue;

View file

@ -47,9 +47,6 @@
<td class="FormLabel150"><asp:Localize runat="server" meta:resourcekey="locLicenseType" Text="License Type:" /></td>
<td>
<asp:DropDownList ID="ddlLicenseType" runat="server" CssClass="NormalTextBox" AutoPostBack="false">
<asp:ListItem Value="0" meta:resourcekey="ddlLicenseTypeFull">Full</asp:ListItem>
<asp:ListItem Value="2" meta:resourcekey="ddlLicenseTypeLimited">Limited</asp:ListItem>
<asp:ListItem Value="22" meta:resourcekey="ddlLicenseTypeESS">ESS</asp:ListItem>
</asp:DropDownList>
</td>
</tr>

View file

@ -32,6 +32,7 @@ using System.Web.UI.WebControls;
using WebsitePanel.Providers.Common;
using WebsitePanel.Providers.HostedSolution;
using WebsitePanel.Providers.ResultObjects;
using WebsitePanel.EnterpriseServer;
namespace WebsitePanel.Portal.CRM
{
@ -41,6 +42,27 @@ namespace WebsitePanel.Portal.CRM
{
if (!IsPostBack)
{
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
if (cntx.Groups.ContainsKey(ResourceGroups.HostedCRM2013))
{
ddlLicenseType.Items.Add(new System.Web.UI.WebControls.ListItem(
GetSharedLocalizedString("HostedCRM.LicenseProfessional"), CRMUserLycenseTypes.PROFESSIONAL.ToString()));
ddlLicenseType.Items.Add(new System.Web.UI.WebControls.ListItem(
GetSharedLocalizedString("HostedCRM.LicenseBasic"), CRMUserLycenseTypes.BASIC.ToString()));
ddlLicenseType.Items.Add(new System.Web.UI.WebControls.ListItem(
GetSharedLocalizedString("HostedCRM.LicenseEssential"), CRMUserLycenseTypes.ESSENTIAL.ToString()));
}
else
{
ddlLicenseType.Items.Add(new System.Web.UI.WebControls.ListItem(
GetSharedLocalizedString("HostedCRM.LicenseFull"), CRMUserLycenseTypes.FULL.ToString()));
ddlLicenseType.Items.Add(new System.Web.UI.WebControls.ListItem(
GetSharedLocalizedString("HostedCRM.LicenseLimited"), CRMUserLycenseTypes.LIMITED.ToString()));
ddlLicenseType.Items.Add(new System.Web.UI.WebControls.ListItem(
GetSharedLocalizedString("HostedCRM.LicenseESS"), CRMUserLycenseTypes.ESS.ToString()));
}
try
{
OrganizationUser user =
@ -61,17 +83,7 @@ namespace WebsitePanel.Portal.CRM
int cALType = userResult.Value.CALType + ((int)userResult.Value.ClientAccessMode) * 10;
switch (cALType)
{
case 0 :
case 2 :
case 22:
ddlLicenseType.SelectedValue = cALType.ToString();
break;
default:
ddlLicenseType.SelectedIndex = 0;
break;
}
Utils.SelectListItem(ddlLicenseType, cALType);
}
else
{

View file

@ -73,33 +73,65 @@
</asp:ObjectDataSource>
<br />
<table>
<tr>
<td align="right" nowrap>
<asp:Localize ID="locQuota" runat="server" meta:resourcekey="locQuota" Text="Full licenses :"></asp:Localize>
</td>
<td>
<wsp:QuotaViewer ID="usersQuota" runat="server" QuotaTypeId="2" />
</td>
</tr>
<tr>
<td align="right" nowrap>
<asp:Localize ID="locLimitedQuota" runat="server" meta:resourcekey="locLimitedQuota" Text="Limited licenses :"></asp:Localize>
</td>
<td>
<wsp:QuotaViewer ID="limitedusersQuota" runat="server" QuotaTypeId="2" />
</td>
</tr>
<tr>
<td align="right" nowrap>
<asp:Localize ID="locESSQuota" runat="server" meta:resourcekey="locESSQuota" Text="ESS licenses :"></asp:Localize>
</td>
<td>
<wsp:QuotaViewer ID="essusersQuota" runat="server" QuotaTypeId="2" />
</td>
</tr>
</table>
<asp:Panel ID="CRM2011Panel" runat="server">
<table>
<tr>
<td align="right" nowrap>
<asp:Localize ID="locQuota" runat="server" meta:resourcekey="locQuota" Text="Full licenses :"></asp:Localize>
</td>
<td>
<wsp:QuotaViewer ID="usersQuota" runat="server" QuotaTypeId="2" />
</td>
</tr>
<tr>
<td align="right" nowrap>
<asp:Localize ID="locLimitedQuota" runat="server" meta:resourcekey="locLimitedQuota" Text="Limited licenses :"></asp:Localize>
</td>
<td>
<wsp:QuotaViewer ID="limitedusersQuota" runat="server" QuotaTypeId="2" />
</td>
</tr>
<tr>
<td align="right" nowrap>
<asp:Localize ID="locESSQuota" runat="server" meta:resourcekey="locESSQuota" Text="ESS licenses :"></asp:Localize>
</td>
<td>
<wsp:QuotaViewer ID="essusersQuota" runat="server" QuotaTypeId="2" />
</td>
</tr>
</table>
</asp:Panel>
<asp:Panel ID="CRM2013Panel" runat="server">
<table>
<tr>
<td align="right" nowrap>
<asp:Localize ID="Localize1" runat="server" meta:resourcekey="locQuota" Text="Professional licenses :"></asp:Localize>
</td>
<td>
<wsp:QuotaViewer ID="professionalusersQuota" runat="server" QuotaTypeId="2" />
</td>
</tr>
<tr>
<td align="right" nowrap>
<asp:Localize ID="locBasicQuota" runat="server" meta:resourcekey="locBasicQuota" Text="Basic licenses :"></asp:Localize>
</td>
<td>
<wsp:QuotaViewer ID="basicusersQuota" runat="server" QuotaTypeId="2" />
</td>
</tr>
<tr>
<td align="right" nowrap>
<asp:Localize ID="locEssentialQuota" runat="server" meta:resourcekey="locEssentialQuota" Text="Essential licenses :"></asp:Localize>
</td>
<td>
<wsp:QuotaViewer ID="essentialusersQuota" runat="server" QuotaTypeId="2" />
</td>
</tr>
</table>
</asp:Panel>
</div>
</div>
</div>

View file

@ -41,25 +41,42 @@ namespace WebsitePanel.Portal.CRM
{
messageBox.ShowErrorMessage("NOT_CRM_ORGANIZATION");
btnCreateUser.Enabled = false;
CRM2011Panel.Visible = false;
CRM2013Panel.Visible = false;
}
else
{
OrganizationStatistics stats = ES.Services.Organizations.GetOrganizationStatisticsByOrganization(PanelRequest.ItemID);
OrganizationStatistics tenantStats = ES.Services.Organizations.GetOrganizationStatistics(PanelRequest.ItemID);
int allocatedCrmUsers = stats.AllocatedCRMUsers;
int usedUsers = stats.CreatedCRMUsers;
usersQuota.QuotaUsedValue = usedUsers;
usersQuota.QuotaValue = allocatedCrmUsers;
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
if (cntx.Groups.ContainsKey(ResourceGroups.HostedCRM2013))
{
CRM2011Panel.Visible = false;
CRM2013Panel.Visible = true;
limitedusersQuota.QuotaUsedValue = stats.CreatedLimitedCRMUsers;
limitedusersQuota.QuotaValue = stats.AllocatedLimitedCRMUsers;
professionalusersQuota.QuotaUsedValue = stats.CreatedProfessionalCRMUsers;
professionalusersQuota.QuotaValue = stats.AllocatedProfessionalCRMUsers;
//if (stats.AllocatedCRMUsers != -1) usersQuota.QuotaAvailable = tenantStats.AllocatedCRMUsers - tenantStats.CreatedCRMUsers;
//if (stats.AllocatedLimitedCRMUsers != -1) limitedusersQuota.QuotaAvailable = tenantStats.AllocatedLimitedCRMUsers - tenantStats.CreatedLimitedCRMUsers;
basicusersQuota.QuotaUsedValue = stats.CreatedBasicCRMUsers;
basicusersQuota.QuotaValue = stats.AllocatedBasicCRMUsers;
essusersQuota.QuotaUsedValue = stats.CreatedESSCRMUsers;
essusersQuota.QuotaValue = stats.AllocatedESSCRMUsers;
essentialusersQuota.QuotaUsedValue = stats.CreatedEssentialCRMUsers;
essentialusersQuota.QuotaValue = stats.AllocatedEssentialCRMUsers;
}
else
{
CRM2011Panel.Visible = true;
CRM2013Panel.Visible = false;
usersQuota.QuotaUsedValue = stats.CreatedCRMUsers;
usersQuota.QuotaValue = stats.AllocatedCRMUsers;
limitedusersQuota.QuotaUsedValue = stats.CreatedLimitedCRMUsers;
limitedusersQuota.QuotaValue = stats.AllocatedLimitedCRMUsers;
essusersQuota.QuotaUsedValue = stats.CreatedESSCRMUsers;
essusersQuota.QuotaValue = stats.AllocatedESSCRMUsers;
}
}
}

View file

@ -148,6 +148,15 @@ namespace WebsitePanel.Portal.CRM {
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource odsAccountsPaged;
/// <summary>
/// CRM2011Panel 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 CRM2011Panel;
/// <summary>
/// locQuota control.
/// </summary>
@ -201,5 +210,68 @@ namespace WebsitePanel.Portal.CRM {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.QuotaViewer essusersQuota;
/// <summary>
/// CRM2013Panel 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 CRM2013Panel;
/// <summary>
/// Localize1 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 Localize1;
/// <summary>
/// professionalusersQuota control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.QuotaViewer professionalusersQuota;
/// <summary>
/// locBasicQuota 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 locBasicQuota;
/// <summary>
/// basicusersQuota control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.QuotaViewer basicusersQuota;
/// <summary>
/// locEssentialQuota 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 locEssentialQuota;
/// <summary>
/// essentialusersQuota control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.QuotaViewer essentialusersQuota;
}
}

View file

@ -37,9 +37,6 @@
<td class="FormLabel150"><asp:Localize runat="server" meta:resourcekey="locLicenseType" Text="License Type: *" /></td>
<td>
<asp:DropDownList ID="ddlLicenseType" runat="server" CssClass="NormalTextBox" AutoPostBack="false">
<asp:ListItem Value="0" meta:resourcekey="ddlLicenseTypeFull">Full</asp:ListItem>
<asp:ListItem Value="2" meta:resourcekey="ddlLicenseTypeLimited">Limited</asp:ListItem>
<asp:ListItem Value="22" meta:resourcekey="ddlLicenseTypeESS">ESS</asp:ListItem>
</asp:DropDownList>
</td>
</tr>

View file

@ -29,6 +29,7 @@
using System;
using WebsitePanel.Providers.HostedSolution;
using WebsitePanel.Providers.ResultObjects;
using WebsitePanel.EnterpriseServer;
namespace WebsitePanel.Portal.CRM
{
@ -38,6 +39,28 @@ namespace WebsitePanel.Portal.CRM
{
if (!IsPostBack)
{
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
if (cntx.Groups.ContainsKey(ResourceGroups.HostedCRM2013))
{
ddlLicenseType.Items.Add(new System.Web.UI.WebControls.ListItem(
GetSharedLocalizedString("HostedCRM.LicenseProfessional"), CRMUserLycenseTypes.PROFESSIONAL.ToString()));
ddlLicenseType.Items.Add(new System.Web.UI.WebControls.ListItem(
GetSharedLocalizedString("HostedCRM.LicenseBasic"), CRMUserLycenseTypes.BASIC.ToString()));
ddlLicenseType.Items.Add(new System.Web.UI.WebControls.ListItem(
GetSharedLocalizedString("HostedCRM.LicenseEssential"), CRMUserLycenseTypes.ESSENTIAL.ToString()));
}
else
{
ddlLicenseType.Items.Add(new System.Web.UI.WebControls.ListItem(
GetSharedLocalizedString("HostedCRM.LicenseFull"), CRMUserLycenseTypes.FULL.ToString()));
ddlLicenseType.Items.Add(new System.Web.UI.WebControls.ListItem(
GetSharedLocalizedString("HostedCRM.LicenseLimited"), CRMUserLycenseTypes.LIMITED.ToString()));
ddlLicenseType.Items.Add(new System.Web.UI.WebControls.ListItem(
GetSharedLocalizedString("HostedCRM.LicenseESS"), CRMUserLycenseTypes.ESS.ToString()));
}
try
{
CRMBusinessUnitsResult res =

View file

@ -49,6 +49,19 @@ namespace WebsitePanel.Portal
return result;
}
public static bool GetBool(string key)
{
return GetBool(key, false);
}
public static bool GetBool(string key, bool defaultValue)
{
bool result = defaultValue;
try { result = bool.Parse(HttpContext.Current.Request[key]); }
catch { /* do nothing */ }
return result;
}
public static int UserID
{
get { return GetInt("UserID"); }
@ -195,5 +208,10 @@ namespace WebsitePanel.Portal
{
get { return HttpContext.Current.Request["FolderID"] ?? ""; }
}
public static string Ctl
{
get { return HttpContext.Current.Request["ctl"] ?? ""; }
}
}
}

View file

@ -207,13 +207,16 @@ namespace WebsitePanel.Portal
public static void SelectListItem(ListControl ctrl, object value)
{
// unselect currently selected item
if (ctrl.SelectedIndex != -1)
ctrl.SelectedItem.Selected = false;
string val = (value != null) ? value.ToString() : "";
ListItem item = ctrl.Items.FindByValue(val);
if (item != null) item.Selected = true;
if (item != null)
{
// unselect currently selected item
if (ctrl.SelectedIndex != -1)
ctrl.SelectedItem.Selected = false;
item.Selected = true;
}
}
public static void SaveListControlState(ListControl ctrl)

View file

@ -65,20 +65,20 @@ namespace WebsitePanel.Portal
ExchangeAccountsPaged accounts;
public int GetExchangeAccountsPagedCount(int itemId, string accountTypes,
string filterColumn, string filterValue)
string filterColumn, string filterValue, bool archiving)
{
return accounts.RecordsCount;
}
public ExchangeAccount[] GetExchangeAccountsPaged(int itemId, string accountTypes,
string filterColumn, string filterValue,
int maximumRows, int startRowIndex, string sortColumn)
int maximumRows, int startRowIndex, string sortColumn, bool archiving)
{
if (!String.IsNullOrEmpty(filterValue))
filterValue = filterValue + "%";
accounts = ES.Services.ExchangeServer.GetAccountsPaged(itemId,
accountTypes, filterColumn, filterValue, sortColumn, startRowIndex, maximumRows);
accounts = ES.Services.ExchangeServer.GetAccountsPaged(itemId,
accountTypes, filterColumn, filterValue, sortColumn, startRowIndex, maximumRows, archiving);
return accounts.PageItems;
}

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>
&nbsp;<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">

View file

@ -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;
}
}
}
}

View file

@ -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>

View file

@ -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>

View file

@ -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);

View file

@ -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>

View file

@ -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;">

View file

@ -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();
}
}
}

View file

@ -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>

View file

@ -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"

View file

@ -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();

View file

@ -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 />

View file

@ -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;
}
}
}

View file

@ -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>
&nbsp;<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>

View file

@ -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);
}
}
}

View file

@ -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;
}
}

View file

@ -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">

View file

@ -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;

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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;
}
}
}
}
}
}

View file

@ -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);

View file

@ -97,7 +97,7 @@ namespace WebsitePanel.Portal.UserControls
}
// bind controls
int max = quotaAllowed == -1 ? listExternalAddresses.Items.Count : quotaAllowed;
int max = quotaAllowed == -1 ? listExternalAddresses.Items.Count : Math.Min(quotaAllowed, listExternalAddresses.Items.Count);
txtExternalAddressesNumber.Text = max.ToString();
litMaxAddresses.Text = String.Format(GetLocalizedString("litMaxAddresses.Text"), max);

View file

@ -94,4 +94,20 @@
</td>
</tr>
<tr>
<td class="SubHead" width="200" nowrap>Default Currency</td>
<td><asp:DropDownList runat="server" ID="ddlCurrency"/></td>
</tr>
<tr>
<td class="SubHead" width="200" nowrap/>Default Collation</td>
<td><asp:DropDownList runat="server" ID="ddlCollation" /></td>
</tr>
<tr>
<td class="SubHead" width="200" nowrap>Default Base Language</td>
<td><asp:DropDownList runat="server" ID="ddlBaseLanguage" /></td>
</tr>
</table>

View file

@ -27,8 +27,12 @@
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Web.UI.WebControls;
using System.Globalization;
using WebsitePanel.EnterpriseServer;
using WebsitePanel.Providers.Common;
using WebsitePanel.Providers.ResultObjects;
using WebsitePanel.Providers.HostedSolution;
namespace WebsitePanel.Portal.ProviderControls
{
@ -60,8 +64,54 @@ namespace WebsitePanel.Portal.ProviderControls
int selectedAddressid = FindAddressByText(settings[Constants.CRMWebsiteIP]);
ddlCrmIpAddress.AddressId = (selectedAddressid > 0) ? selectedAddressid : 0;
ddlSchema.SelectedValue = settings[Constants.UrlSchema];
Utils.SelectListItem(ddlSchema, settings[Constants.UrlSchema]);
// Collation
StringArrayResultObject res = ES.Services.CRM.GetCollationByServiceId(PanelRequest.ServiceId);
if (res.IsSuccess)
{
ddlCollation.DataSource = res.Value;
ddlCollation.DataBind();
Utils.SelectListItem(ddlCollation, "Latin1_General_CI_AI"); // default
}
Utils.SelectListItem(ddlCollation, settings[Constants.Collation]);
// Currency
ddlCurrency.Items.Clear();
CurrencyArrayResultObject cres = ES.Services.CRM.GetCurrencyByServiceId(PanelRequest.ServiceId);
if (cres.IsSuccess)
{
foreach (Currency currency in cres.Value)
{
ListItem item = new ListItem(string.Format("{0} ({1})",
currency.RegionName, currency.CurrencyName),
string.Join("|",
new string[]
{
currency.CurrencyCode, currency.CurrencyName,
currency.CurrencySymbol, currency.RegionName
}));
ddlCurrency.Items.Add(item);
}
Utils.SelectListItem(ddlCurrency, "USD|US Dollar|$|United States"); // default
}
Utils.SelectListItem(ddlCurrency, settings[Constants.Currency]);
// Base Language
ddlBaseLanguage.Items.Clear();
int[] langPacksId = ES.Services.CRM.GetInstalledLanguagePacksByServiceId(PanelRequest.ServiceId);
if (langPacksId != null)
{
foreach (int langId in langPacksId)
{
CultureInfo ci = CultureInfo.GetCultureInfo(langId);
ListItem item = new ListItem(ci.EnglishName, langId.ToString());
ddlBaseLanguage.Items.Add(item);
}
Utils.SelectListItem(ddlBaseLanguage, "1033"); // default
}
Utils.SelectListItem(ddlBaseLanguage, settings[Constants.BaseLanguage]);
}
public void SaveSettings(System.Collections.Specialized.StringDictionary settings)
@ -97,6 +147,11 @@ namespace WebsitePanel.Portal.ProviderControls
}
settings[Constants.UrlSchema] = ddlSchema.SelectedValue;
settings[Constants.Collation] = ddlCollation.SelectedValue;
settings[Constants.Currency] = ddlCurrency.SelectedValue;
settings[Constants.BaseLanguage] = ddlBaseLanguage.SelectedValue;
}
private static int FindAddressByText(string address)

View file

@ -35,7 +35,6 @@
// </auto-generated>
//------------------------------------------------------------------------------
namespace WebsitePanel.Portal.ProviderControls {
@ -166,5 +165,32 @@ namespace WebsitePanel.Portal.ProviderControls {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtPassword;
/// <summary>
/// ddlCurrency 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 ddlCurrency;
/// <summary>
/// ddlCollation 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 ddlCollation;
/// <summary>
/// ddlBaseLanguage 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 ddlBaseLanguage;
}
}

View file

@ -40,6 +40,17 @@
</td>
</tr>
<tr>
<td class="SubHead" runat="server" id="archivingGroup" width="200" nowrap>
<asp:Localize ID="locArchivingDatabase" runat="server" meta:resourcekey="locArchivingDatabase"
Text="Archiving Database Name:"></asp:Localize>
</td>
<td>
<asp:TextBox ID="txtArchivingDatabase" runat="server" Width="200px"></asp:TextBox>
</td>
</tr>
<tr>
<td class="SubHead">
<asp:Localize ID="locKeepDeletedItems" runat="server" meta:resourcekey="locKeepDeletedItems"

View file

@ -93,6 +93,8 @@ namespace WebsitePanel.Portal.ProviderControls
locMailboxDAG.Visible = false;
powershellUrl1.Visible = powershellUrl2.Visible = false;
archivingGroup.Visible = false;
break;
case EXCHANGE2010SP2_PROVIDER_ID:
@ -104,6 +106,8 @@ namespace WebsitePanel.Portal.ProviderControls
locMailboxDatabase.Visible = false;
powershellUrl1.Visible = powershellUrl2.Visible = false;
archivingGroup.Visible = false;
break;
case EXCHANGE2013_PROVIDER_ID:
@ -115,6 +119,8 @@ namespace WebsitePanel.Portal.ProviderControls
locMailboxDatabase.Visible = false;
powershellUrl1.Visible = powershellUrl2.Visible = true;
archivingGroup.Visible = true;
break;
default:
@ -123,6 +129,8 @@ namespace WebsitePanel.Portal.ProviderControls
clusteredMailboxServer.Visible = true;
txtMailboxClusterName.Text = settings["MailboxCluster"];
locMailboxDAG.Visible = false;
archivingGroup.Visible = false;
break;
}
}
@ -153,6 +161,8 @@ namespace WebsitePanel.Portal.ProviderControls
txtPublicFolderServer.Text = settings["PublicFolderServer"];
txtPowerShellUrl.Text = settings["PowerShellUrl"];
txtArchivingDatabase.Text = settings["ArchivingDatabase"];
UpdateHubTransportsGrid();
UpdateClientAccessGrid();
@ -179,6 +189,9 @@ namespace WebsitePanel.Portal.ProviderControls
settings["StorageGroup"] = txtStorageGroup.Text;
settings["PowerShellUrl"] = txtPowerShellUrl.Text;
settings["ArchivingDatabase"] = txtArchivingDatabase.Text;
}
public void BindExchangeServices(DropDownList ddl, bool isHubservice)

View file

@ -139,6 +139,33 @@ namespace WebsitePanel.Portal.ProviderControls {
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtMailboxDatabase;
/// <summary>
/// archivingGroup 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.HtmlTableCell archivingGroup;
/// <summary>
/// locArchivingDatabase 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 locArchivingDatabase;
/// <summary>
/// txtArchivingDatabase 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 txtArchivingDatabase;
/// <summary>
/// locKeepDeletedItems control.
/// </summary>

View file

@ -12,7 +12,7 @@
<asp:GridView id="gvMailboxPlans" runat="server" EnableViewState="true" AutoGenerateColumns="false"
Width="100%" EmptyDataText="gvMailboxPlans" CssSelectorClass="NormalGridView" OnRowCommand="gvMailboxPlan_RowCommand" >
<Columns>
<asp:TemplateField HeaderText="gvMailboxPlanEdit">
<asp:TemplateField HeaderText="Edit">
<ItemTemplate>
<asp:ImageButton ID="cmdEdit" runat="server" SkinID="EditSmall" CommandName="EditItem" AlternateText="Edit record" CommandArgument='<%# Eval("MailboxPlanId") %>' ></asp:ImageButton>
</ItemTemplate>
@ -22,7 +22,7 @@
<asp:Image ID="img2" runat="server" Width="16px" Height="16px" ImageUrl='<%# GetPlanType((int)Eval("MailboxPlanType")) %>' ImageAlign="AbsMiddle" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="gvMailboxPlan">
<asp:TemplateField HeaderText="Policy">
<ItemStyle Width="70%"></ItemStyle>
<ItemTemplate>
<asp:Label id="lnkDisplayMailboxPlan" runat="server" EnableViewState="true" ><%# PortalAntiXSS.Encode((string)Eval("MailboxPlan"))%></asp:Label>
@ -103,6 +103,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>
@ -261,13 +266,13 @@
<td>
<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>
</td>
<td>
<div class="FormButtonsBarClean">
<asp:Button ID="btnUpdateMailboxPlan" runat="server" meta:resourcekey="btnUpdateMailboxPlan"
Text="Update Mailboxplan" CssClass="Button1" OnClick="btnUpdateMailboxPlan_Click" />
Text="Update" CssClass="Button1" OnClick="btnUpdateMailboxPlan_Click" />
</td>
</tr>
</table>

View file

@ -53,11 +53,27 @@ namespace WebsitePanel.Portal
public partial class SettingsExchangeMailboxPlansPolicy : WebsitePanelControlBase, IUserSettingsEditorControl
{
private bool RetentionPolicy
{
get
{
return Request["SettingsName"].ToLower().Contains("retentionpolicy");
}
}
public void BindSettings(UserSettings settings)
{
BindMailboxPlans();
txtStatus.Visible = false;
secMailboxFeatures.Visible = !RetentionPolicy;
secMailboxGeneral.Visible = !RetentionPolicy;
gvMailboxPlans.Columns[4].Visible = !RetentionPolicy;
gvMailboxPlans.Columns[5].Visible = !RetentionPolicy;
}
@ -81,7 +97,7 @@ namespace WebsitePanel.Portal
if ((orgs != null) & (orgs.GetLength(0) > 0))
{
ExchangeMailboxPlan[] list = ES.Services.ExchangeServer.GetExchangeMailboxPlans(orgs[0].Id);
ExchangeMailboxPlan[] list = ES.Services.ExchangeServer.GetExchangeMailboxPlans(orgs[0].Id, RetentionPolicy);
gvMailboxPlans.DataSource = list;
gvMailboxPlans.DataBind();
@ -125,8 +141,11 @@ namespace WebsitePanel.Portal
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.EnableArchiving = chkEnableArchiving.Checked;
plan.Archiving = RetentionPolicy;
if (PanelSecurity.SelectedUser.Role == UserRole.Administrator)
plan.MailboxPlanType = (int)ExchangeMailboxPlanType.Administrator;
@ -231,7 +250,7 @@ namespace WebsitePanel.Portal
txtLitigationHoldMsg.Text = string.Empty;
txtLitigationHoldUrl.Text = string.Empty;
chkEnableArchiving.Checked = false;
btnUpdateMailboxPlan.Enabled = (string.IsNullOrEmpty(txtMailboxPlan.Text)) ? false : true;
@ -285,6 +304,8 @@ namespace WebsitePanel.Portal
recoverableItemsWarning.ValueKB = plan.RecoverableItemsWarningPct;
txtLitigationHoldMsg.Text = plan.LitigationHoldMsg;
txtLitigationHoldUrl.Text = plan.LitigationHoldUrl;
chkEnableArchiving.Checked = plan.EnableArchiving;
btnUpdateMailboxPlan.Enabled = (string.IsNullOrEmpty(txtMailboxPlan.Text)) ? false : true;
@ -392,8 +413,11 @@ namespace WebsitePanel.Portal
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.EnableArchiving = chkEnableArchiving.Checked;
plan.Archiving = RetentionPolicy;
if (PanelSecurity.SelectedUser.Role == UserRole.Administrator)
plan.MailboxPlanType = (int)ExchangeMailboxPlanType.Administrator;
@ -470,7 +494,7 @@ namespace WebsitePanel.Portal
foreach (ExchangeAccount a in Accounts)
{
txtStatus.Text = "Completed";
int result = ES.Services.ExchangeServer.SetExchangeMailboxPlan(org.Id, a.AccountId, destinationMailboxPlanId);
int result = ES.Services.ExchangeServer.SetExchangeMailboxPlan(org.Id, a.AccountId, destinationMailboxPlanId, a.ArchivingMailboxPlanId);
if (result < 0)
{
BindMailboxPlans();

View file

@ -138,6 +138,15 @@ namespace WebsitePanel.Portal {
/// </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>

View file

@ -0,0 +1,109 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SettingsExchangeRetentionPolicyTag.ascx.cs" Inherits="WebsitePanel.Portal.SettingsExchangeRetentionPolicyTag" %>
<%@ Register Src="ExchangeServer/UserControls/SizeBox.ascx" TagName="SizeBox" TagPrefix="wsp" %>
<%@ Register Src="ExchangeServer/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" %>
<%@ Import Namespace="WebsitePanel.Portal" %>
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
<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 HeaderText="Edit">
<ItemTemplate>
<asp:ImageButton ID="cmdEdit" runat="server" SkinID="EditSmall" CommandName="EditItem" AlternateText="Edit record" CommandArgument='<%# Eval("TagId") %>' ></asp:ImageButton>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Tag">
<ItemStyle Width="70%"></ItemStyle>
<ItemTemplate>
<asp:Label id="lnkDisplayPolicy" runat="server" EnableViewState="true" ><%# PortalAntiXSS.Encode((string)Eval("TagName"))%></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
&nbsp;<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 />
<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>

View file

@ -0,0 +1,314 @@
// 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
{
public partial class SettingsExchangeRetentionPolicyTag : WebsitePanelControlBase, IUserSettingsEditorControl
{
public void BindSettings(UserSettings settings)
{
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()
{
Providers.HostedSolution.Organization[] orgs = null;
if (PanelSecurity.SelectedUserId != 1)
{
PackageInfo[] Packages = ES.Services.Packages.GetPackages(PanelSecurity.SelectedUserId);
if ((Packages != null) & (Packages.GetLength(0) > 0))
{
orgs = ES.Services.ExchangeServer.GetExchangeOrganizations(Packages[0].PackageId, false);
}
}
else
{
orgs = ES.Services.ExchangeServer.GetExchangeOrganizations(1, false);
}
if ((orgs != null) & (orgs.GetLength(0) > 0))
{
ExchangeRetentionPolicyTag[] list = ES.Services.ExchangeServer.GetExchangeRetentionPolicyTags(orgs[0].Id);
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;
ExchangeRetentionPolicyTag tag = new ExchangeRetentionPolicyTag();
tag.TagName = txtPolicy.Text;
tag.TagType = Convert.ToInt32(ddTagType.SelectedValue);
tag.AgeLimitForRetention = ageLimitForRetention.QuotaValue;
tag.RetentionAction = Convert.ToInt32(ddRetentionAction.SelectedValue);
Providers.HostedSolution.Organization[] orgs = null;
if (PanelSecurity.SelectedUserId != 1)
{
PackageInfo[] Packages = ES.Services.Packages.GetPackages(PanelSecurity.SelectedUserId);
if ((Packages != null) & (Packages.GetLength(0) > 0))
{
orgs = ES.Services.ExchangeServer.GetExchangeOrganizations(Packages[0].PackageId, false);
}
}
else
{
orgs = ES.Services.ExchangeServer.GetExchangeOrganizations(1, false);
}
if ((orgs != null) & (orgs.GetLength(0) > 0))
{
int result = ES.Services.ExchangeServer.AddExchangeRetentionPolicyTag(orgs[0].Id, tag);
if (result < 0)
{
messageBox.ShowResultMessage(result);
return;
}
}
BindRetentionPolicy();
}
protected void gvPolicy_RowCommand(object sender, GridViewCommandEventArgs e)
{
int mailboxPlanId = Utils.ParseInt(e.CommandArgument.ToString(), 0);
Providers.HostedSolution.Organization[] orgs = null;
Providers.HostedSolution.ExchangeRetentionPolicyTag tag;
switch (e.CommandName)
{
case "DeleteItem":
try
{
if (PanelSecurity.SelectedUserId != 1)
{
PackageInfo[] Packages = ES.Services.Packages.GetPackages(PanelSecurity.SelectedUserId);
if ((Packages != null) & (Packages.GetLength(0) > 0))
{
orgs = ES.Services.ExchangeServer.GetExchangeOrganizations(Packages[0].PackageId, false);
}
}
else
{
orgs = ES.Services.ExchangeServer.GetExchangeOrganizations(1, false);
}
tag = ES.Services.ExchangeServer.GetExchangeRetentionPolicyTag(orgs[0].Id, mailboxPlanId);
if (tag.ItemID != orgs[0].Id)
{
messageBox.ShowErrorMessage("EXCHANGE_UNABLE_USE_SYSTEMPLAN");
BindRetentionPolicy();
return;
}
int result = ES.Services.ExchangeServer.DeleteExchangeRetentionPolicyTag(orgs[0].Id, mailboxPlanId);
if (result < 0)
{
messageBox.ShowResultMessage(result);
return;
}
ViewState["PolicyID"] = null;
txtPolicy.Text = string.Empty;
ageLimitForRetention.QuotaValue = 0;
btnUpdatePolicy.Enabled = (string.IsNullOrEmpty(txtPolicy.Text)) ? false : true;
}
catch (Exception)
{
messageBox.ShowErrorMessage("EXCHANGE_DELETE_MAILBOXPLAN");
}
BindRetentionPolicy();
break;
case "EditItem":
ViewState["PolicyID"] = mailboxPlanId;
if (PanelSecurity.SelectedUserId != 1)
{
PackageInfo[] Packages = ES.Services.Packages.GetPackages(PanelSecurity.SelectedUserId);
if ((Packages != null) & (Packages.GetLength(0) > 0))
{
orgs = ES.Services.ExchangeServer.GetExchangeOrganizations(Packages[0].PackageId, false);
}
}
else
{
orgs = ES.Services.ExchangeServer.GetExchangeOrganizations(1, false);
}
tag = ES.Services.ExchangeServer.GetExchangeRetentionPolicyTag(orgs[0].Id, 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.Organization[] orgs = null;
Providers.HostedSolution.ExchangeRetentionPolicyTag tag;
if (PanelSecurity.SelectedUserId != 1)
{
PackageInfo[] Packages = ES.Services.Packages.GetPackages(PanelSecurity.SelectedUserId);
if ((Packages != null) & (Packages.GetLength(0) > 0))
{
orgs = ES.Services.ExchangeServer.GetExchangeOrganizations(Packages[0].PackageId, false);
}
}
else
{
orgs = ES.Services.ExchangeServer.GetExchangeOrganizations(1, false);
}
tag = ES.Services.ExchangeServer.GetExchangeRetentionPolicyTag(orgs[0].Id, mailboxPlanId);
if (tag.ItemID != orgs[0].Id)
{
messageBox.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);
if ((orgs != null) & (orgs.GetLength(0) > 0))
{
int result = ES.Services.ExchangeServer.UpdateExchangeRetentionPolicyTag(orgs[0].Id, tag);
if (result < 0)
{
messageBox.ShowErrorMessage("EXCHANGE_UPDATEPLANS");
}
else
{
messageBox.ShowSuccessMessage("EXCHANGE_UPDATEPLANS");
}
}
BindRetentionPolicy();
}
protected void txtPolicy_TextChanged(object sender, EventArgs e)
{
btnUpdatePolicy.Enabled = (string.IsNullOrEmpty(txtPolicy.Text)) ? false : true;
}
}
}

View file

@ -0,0 +1,177 @@
//------------------------------------------------------------------------------
// <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 {
public partial class SettingsExchangeRetentionPolicyTag {
/// <summary>
/// asyncTasks control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks;
/// <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;
}
}

View file

@ -13,6 +13,14 @@
<asp:HyperLink ID="lnkExchangeMailboxPlansPolicy" runat="server" meta:resourcekey="lnkExchangeMailboxPlansPolicy"
Text="Global Exchange Mailbox Plans" NavigateUrl='<%# GetSettingsLink("ExchangeMailboxPlansPolicy", "SettingsExchangeMailboxPlansPolicy") %>'></asp:HyperLink>
</li>
<li>
<asp:HyperLink ID="lnkExchangeRetentionPolicy" runat="server" meta:resourcekey="lnkExchangeRetentionPolicy"
Text="Global Retention Policy" NavigateUrl='<%# GetSettingsLink("RetentionPolicy", "SettingsExchangeMailboxPlansPolicy") %>'></asp:HyperLink>
</li>
<li>
<asp:HyperLink ID="lnkExchangeRetentionPolicyTag" runat="server" meta:resourcekey="lnkExchangeRetentionPolicyTag"
Text="Global Retention Policy Tag" NavigateUrl='<%# GetSettingsLink("RetentionPolicyTag", "SettingsExchangeRetentionPolicyTag") %>'></asp:HyperLink>
</li>
<li>
<asp:HyperLink ID="lnkLyncUserPlansPolicy" runat="server" meta:resourcekey="lnkLyncUserPlansPolicy"

View file

@ -68,6 +68,24 @@ namespace WebsitePanel.Portal {
/// </remarks>
protected global::System.Web.UI.WebControls.HyperLink lnkExchangeMailboxPlansPolicy;
/// <summary>
/// lnkExchangeRetentionPolicy 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 lnkExchangeRetentionPolicy;
/// <summary>
/// lnkExchangeRetentionPolicyTag 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 lnkExchangeRetentionPolicyTag;
/// <summary>
/// lnkLyncUserPlansPolicy control.
/// </summary>

View file

@ -210,6 +210,13 @@
<Compile Include="Code\ReportingServices\IResourceStorage.cs" />
<Compile Include="Code\ReportingServices\ReportingServicesUtils.cs" />
<Compile Include="Code\UserControls\Tab.cs" />
<Compile Include="CRM\CRMStorageSettings.ascx.cs">
<DependentUpon>CRMStorageSettings.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="CRM\CRMStorageSettings.ascx.designer.cs">
<DependentUpon>CRMStorageSettings.ascx</DependentUpon>
</Compile>
<Compile Include="ExchangeServer\EnterpriseStorageFolderGeneralSettings.ascx.cs">
<DependentUpon>EnterpriseStorageFolderGeneralSettings.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@ -308,6 +315,13 @@
<Compile Include="ExchangeServer\OrganizationUserMemberOf.ascx.designer.cs">
<DependentUpon>OrganizationUserMemberOf.ascx</DependentUpon>
</Compile>
<Compile Include="ExchangeServer\ExchangeRetentionPolicyTag.ascx.cs">
<DependentUpon>ExchangeRetentionPolicyTag.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="ExchangeServer\ExchangeRetentionPolicyTag.ascx.designer.cs">
<DependentUpon>ExchangeRetentionPolicyTag.ascx</DependentUpon>
</Compile>
<Compile Include="ExchangeServer\UserControls\AccountsListWithPermissions.ascx.cs">
<DependentUpon>AccountsListWithPermissions.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@ -536,6 +550,13 @@
<DependentUpon>NotifyOverusedDatabases.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="SettingsExchangeRetentionPolicyTag.ascx.cs">
<DependentUpon>SettingsExchangeRetentionPolicyTag.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="SettingsExchangeRetentionPolicyTag.ascx.designer.cs">
<DependentUpon>SettingsExchangeRetentionPolicyTag.ascx</DependentUpon>
</Compile>
<Compile Include="SettingsExchangeMailboxPlansPolicy.ascx.cs">
<DependentUpon>SettingsExchangeMailboxPlansPolicy.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@ -4051,6 +4072,7 @@
</ItemGroup>
<ItemGroup>
<Content Include="ApplyEnableHardQuotaFeature.ascx" />
<Content Include="CRM\CRMStorageSettings.ascx" />
<Content Include="ExchangeServer\EnterpriseStorageFolderGeneralSettings.ascx" />
<Content Include="ExchangeServer\EnterpriseStorageCreateFolder.ascx" />
<Content Include="ExchangeServer\EnterpriseStorageFolders.ascx" />
@ -4066,6 +4088,7 @@
<Content Include="ExchangeServer\OrganizationSecurityGroupGeneralSettings.ascx" />
<Content Include="ExchangeServer\OrganizationSecurityGroups.ascx" />
<Content Include="ExchangeServer\OrganizationUserMemberOf.ascx" />
<Content Include="ExchangeServer\ExchangeRetentionPolicyTag.ascx" />
<Content Include="ExchangeServer\UserControls\EnterpriseStoragePermissions.ascx" />
<Content Include="ExchangeServer\UserControls\GroupsList.ascx" />
<Content Include="ExchangeServer\UserControls\SecurityGroupTabs.ascx" />
@ -4098,9 +4121,11 @@
<Content Include="ProviderControls\hMailServer5_Settings.ascx" />
<Content Include="ProviderControls\Lync_Settings.ascx" />
<Content Include="ScheduleTaskControls\NotifyOverusedDatabases.ascx" />
<Content Include="SettingsExchangeRetentionPolicyTag.ascx" />
<Content Include="SettingsExchangeMailboxPlansPolicy.ascx" />
<Content Include="SettingsLyncUserPlansPolicy.ascx" />
<Content Include="SkinControls\SpaceOrganizationsSelector.ascx" />
<Content Include="SettingsExchangeRetentionPolicyTag.ascx" />
<Content Include="UserControls\EditFeedsList.ascx" />
<Content Include="UserControls\OrgIdPolicyEditor.ascx" />
<Content Include="UserControls\OrgPolicyEditor.ascx" />
@ -5307,6 +5332,8 @@
<SubType>Designer</SubType>
</Content>
<Content Include="App_LocalResources\OrganizationMenu.ascx.resx" />
<Content Include="App_LocalResources\SettingsExchangeRetentionPolicyTag.ascx.resx" />
<Content Include="ExchangeServer\App_LocalResources\ExchangeRetentionPolicyTag.ascx.resx" />
<EmbeddedResource Include="UserControls\App_LocalResources\EditDomainsList.ascx.resx">
<SubType>Designer</SubType>
</EmbeddedResource>