Approaches with mailbox plan changed: ServerAdmin and Reseller are able to
define global plans. The plans will accumulate through out the tree. Various UI optimizations Before defining global plans ensure you create a hosted organization for each reseller. Spaces -> Hosted Organization -> New Organization
This commit is contained in:
parent
a99d7f8edd
commit
3be20ebaa4
32 changed files with 1745 additions and 580 deletions
|
@ -136,7 +136,7 @@
|
|||
<value>POP3</value>
|
||||
</data>
|
||||
<data name="FormComments.Text" xml:space="preserve">
|
||||
<value><p> A Mailbox plan is a template that defines the characteristics of a mailbox </p> <p>The mailbox plan name needs to be unique. A mailbox plan cannot be modified. In case a mailbox needs a mailbox plan with another characteristics, a new mailbox plan needs to be created and assigned to the mailbox. A mailbox plan can only be deleted when the plan is not assigned to any mailboxes. </p></value>
|
||||
<value><p> A Mailbox plan is a template that defines the characteristics of a mailbox </p> <p>The mailbox plan name needs to be unique. A mailbox plan cannot be modified. In case a mailbox needs a mailbox plan with another characteristics, a new mailbox plan needs to be created and assigned to the mailbox. A mailbox plan can only be deleted when the plan is not assigned to any mailboxes. </p><p> Empty value indicates <b>'Unlimited'</b>, percentages have to be a value between 0 and 100 (a value of 0 can block the mailbox from sending and receiving email) </p> <p> Unllimited values can only be used when the hosting plan allows to do so</p></value>
|
||||
</data>
|
||||
<data name="locDays.Text" xml:space="preserve">
|
||||
<value>days</value>
|
||||
|
|
|
@ -139,7 +139,7 @@
|
|||
<value>Mailbox plan</value>
|
||||
</data>
|
||||
<data name="gvMailboxPlanDefault.Header" xml:space="preserve">
|
||||
<value>Default Mailbox plan</value>
|
||||
<value>Default</value>
|
||||
</data>
|
||||
<data name="gvMailboxPlans.Empty" xml:space="preserve">
|
||||
<value>No mailbox plans have been added yet. To add a new mailbox plan click "Add New Mailbox plan" button.</value>
|
||||
|
|
|
@ -101,25 +101,25 @@
|
|||
<tr>
|
||||
<td class="FormLabel200" align="right"><asp:Localize ID="locMailboxSize" runat="server" meta:resourcekey="locMailboxSize" Text="Mailbox size:"></asp:Localize></td>
|
||||
<td>
|
||||
<wsp:SizeBox id="mailboxSize" runat="server" ValidationGroup="CreateMailboxPlan" DisplayUnitsKB="false" DisplayUnitsMB="true" DisplayUnitsPct="false" RequireValidatorEnabled="true"/>
|
||||
<wsp:SizeBox id="mailboxSize" runat="server" ValidationGroup="CreateMailboxPlan" DisplayUnitsKB="false" DisplayUnitsMB="true" DisplayUnitsPct="false"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="FormLabel200" align="right"><asp:Localize ID="locMaxRecipients" runat="server" meta:resourcekey="locMaxRecipients" Text="Maximum Recipients:"></asp:Localize></td>
|
||||
<td>
|
||||
<wsp:SizeBox id="maxRecipients" runat="server" ValidationGroup="CreateMailboxPlan" DisplayUnitsKB="false" DisplayUnitsMB="false" DisplayUnitsPct="false" RequireValidatorEnabled="true"/>
|
||||
<wsp:SizeBox id="maxRecipients" runat="server" ValidationGroup="CreateMailboxPlan" DisplayUnitsKB="false" DisplayUnitsMB="false" DisplayUnitsPct="false"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="FormLabel200" align="right"><asp:Localize ID="locMaxSendMessageSizeKB" runat="server" meta:resourcekey="locMaxSendMessageSizeKB" Text="Maximum Send Message Size (Kb):"></asp:Localize></td>
|
||||
<td>
|
||||
<wsp:SizeBox id="maxSendMessageSizeKB" runat="server" ValidationGroup="CreateMailboxPlan" DisplayUnitsKB="true" DisplayUnitsMB="false" DisplayUnitsPct="false" RequireValidatorEnabled="true"/>
|
||||
<wsp:SizeBox id="maxSendMessageSizeKB" runat="server" ValidationGroup="CreateMailboxPlan" DisplayUnitsKB="true" DisplayUnitsMB="false" DisplayUnitsPct="false"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="FormLabel200" align="right"><asp:Localize ID="locMaxReceiveMessageSizeKB" runat="server" meta:resourcekey="locMaxReceiveMessageSizeKB" Text="Maximum Receive Message Size (Kb):"></asp:Localize></td>
|
||||
<td>
|
||||
<wsp:SizeBox id="maxReceiveMessageSizeKB" runat="server" ValidationGroup="CreateMailboxPlan" DisplayUnitsKB="true" DisplayUnitsMB="false" DisplayUnitsPct="false" RequireValidatorEnabled="true"/>
|
||||
<wsp:SizeBox id="maxReceiveMessageSizeKB" runat="server" ValidationGroup="CreateMailboxPlan" DisplayUnitsKB="true" DisplayUnitsMB="false" DisplayUnitsPct="false"/>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
|
|
@ -40,14 +40,20 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
|
||||
if (!IsPostBack)
|
||||
{
|
||||
PackageContext cntx = ES.Services.Packages.GetPackageContext(PanelSecurity.PackageId);
|
||||
|
||||
if (PanelRequest.GetInt("MailboxPlanId") != 0)
|
||||
{
|
||||
Providers.HostedSolution.ExchangeMailboxPlan plan = ES.Services.ExchangeServer.GetExchangeMailboxPlan(PanelRequest.ItemID, PanelRequest.GetInt("MailboxPlanId"));
|
||||
txtMailboxPlan.Text = plan.MailboxPlan;
|
||||
mailboxSize.ValueKB = plan.MailboxSizeMB;
|
||||
maxRecipients.ValueKB = plan.MaxRecipients;
|
||||
maxSendMessageSizeKB.ValueKB = plan.MaxSendMessageSizeKB;
|
||||
maxReceiveMessageSizeKB.ValueKB = plan.MaxReceiveMessageSizeKB;
|
||||
if (plan.MailboxSizeMB != -1)
|
||||
mailboxSize.ValueKB = plan.MailboxSizeMB;
|
||||
if (plan.MaxRecipients != -1)
|
||||
maxRecipients.ValueKB = plan.MaxRecipients;
|
||||
if (plan.MaxSendMessageSizeKB != -1)
|
||||
maxSendMessageSizeKB.ValueKB = plan.MaxSendMessageSizeKB;
|
||||
if (plan.MaxReceiveMessageSizeKB != -1)
|
||||
maxReceiveMessageSizeKB.ValueKB = plan.MaxReceiveMessageSizeKB;
|
||||
chkPOP3.Checked = plan.EnablePOP;
|
||||
chkIMAP.Checked = plan.EnableIMAP;
|
||||
chkOWA.Checked = plan.EnableOWA;
|
||||
|
@ -85,21 +91,47 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
}
|
||||
else
|
||||
{
|
||||
PackageContext cntx = ES.Services.Packages.GetPackageContext(PanelSecurity.PackageId);
|
||||
|
||||
if (cntx != null)
|
||||
{
|
||||
foreach (QuotaValueInfo quota in cntx.QuotasArray)
|
||||
{
|
||||
switch (quota.QuotaId)
|
||||
{
|
||||
case 77:
|
||||
if (quota.QuotaAllocatedValue != -1)
|
||||
{
|
||||
mailboxSize.RequireValidatorEnabled = true;
|
||||
}
|
||||
else
|
||||
mailboxSize.RequireValidatorEnabled = false;
|
||||
break;
|
||||
case 365:
|
||||
maxRecipients.ValueKB = quota.QuotaAllocatedValue;
|
||||
if (quota.QuotaAllocatedValue != -1)
|
||||
{
|
||||
maxRecipients.ValueKB = quota.QuotaAllocatedValue;
|
||||
maxRecipients.RequireValidatorEnabled = true;
|
||||
}
|
||||
else
|
||||
maxRecipients.RequireValidatorEnabled = false;
|
||||
break;
|
||||
case 366:
|
||||
maxSendMessageSizeKB.ValueKB = quota.QuotaAllocatedValue;
|
||||
if (quota.QuotaAllocatedValue != -1)
|
||||
{
|
||||
maxSendMessageSizeKB.ValueKB = quota.QuotaAllocatedValue;
|
||||
maxSendMessageSizeKB.RequireValidatorEnabled = true;
|
||||
}
|
||||
else
|
||||
maxSendMessageSizeKB.RequireValidatorEnabled = false;
|
||||
break;
|
||||
case 367:
|
||||
maxReceiveMessageSizeKB.ValueKB = quota.QuotaAllocatedValue;
|
||||
if (quota.QuotaAllocatedValue != -1)
|
||||
{
|
||||
maxReceiveMessageSizeKB.ValueKB = quota.QuotaAllocatedValue;
|
||||
maxReceiveMessageSizeKB.RequireValidatorEnabled = true;
|
||||
}
|
||||
else
|
||||
maxReceiveMessageSizeKB.RequireValidatorEnabled = false;
|
||||
break;
|
||||
case 83:
|
||||
chkPOP3.Checked = Convert.ToBoolean(quota.QuotaAllocatedValue);
|
||||
|
@ -123,6 +155,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
break;
|
||||
case 364:
|
||||
daysKeepDeletedItems.ValueDays = quota.QuotaAllocatedValue;
|
||||
daysKeepDeletedItems.RequireValidatorEnabled = true;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -149,13 +182,13 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
{
|
||||
Providers.HostedSolution.ExchangeMailboxPlan plan = new Providers.HostedSolution.ExchangeMailboxPlan();
|
||||
plan.MailboxPlan = txtMailboxPlan.Text;
|
||||
|
||||
plan.MailboxSizeMB = mailboxSize.ValueKB;
|
||||
if ((plan.MailboxSizeMB == 0)) plan.MailboxSizeMB = 1;
|
||||
|
||||
plan.IsDefault = false;
|
||||
plan.MaxRecipients = maxRecipients.ValueKB;
|
||||
plan.MaxSendMessageSizeKB = maxSendMessageSizeKB.ValueKB;
|
||||
plan.MaxReceiveMessageSizeKB = maxReceiveMessageSizeKB.ValueKB;
|
||||
plan.MaxReceiveMessageSizeKB = maxReceiveMessageSizeKB.ValueKB;
|
||||
plan.EnablePOP = chkPOP3.Checked;
|
||||
plan.EnableIMAP = chkIMAP.Checked;
|
||||
plan.EnableOWA = chkOWA.Checked;
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
<tr>
|
||||
<td class="FormLabel150"><asp:Localize ID="locQuota" runat="server" meta:resourcekey="locQuota" Text="Mailbox Size:"></asp:Localize></td>
|
||||
<td>
|
||||
<wsp:QuotaViewer ID="mailboxSize" runat="server" QuotaTypeId="2" /> MB
|
||||
<wsp:QuotaViewer ID="mailboxSize" runat="server" QuotaTypeId="2" DisplayGauge="true" /> MB
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
}
|
||||
|
||||
mailboxSize.QuotaUsedValue = Convert.ToInt32(stats.TotalSize / 1024 / 1024);
|
||||
mailboxSize.QuotaValue = (int)Math.Round((double)(stats.MaxSize / 1024 / 1024));
|
||||
mailboxSize.QuotaValue = (stats.MaxSize == -1) ? -1: (int)Math.Round((double)(stats.MaxSize / 1024 / 1024));
|
||||
|
||||
if ((account.AccountType == ExchangeAccountType.Equipment) | (account.AccountType == ExchangeAccountType.Room))
|
||||
secCalendarSettings.Visible = true;
|
||||
|
|
|
@ -34,6 +34,12 @@
|
|||
<asp:GridView ID="gvMailboxPlans" runat="server" AutoGenerateColumns="False" EnableViewState="true"
|
||||
Width="100%" EmptyDataText="gvMailboxPlans" CssSelectorClass="NormalGridView" OnRowCommand="gvMailboxPlan_RowCommand">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Image ID="img2" runat="server" Width="16px" Height="16px" ImageUrl='<%# GetPlanType((int)Eval("MailboxPlanType")) %>' ImageAlign="AbsMiddle" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="gvMailboxPlan">
|
||||
<ItemStyle Width="70%"></ItemStyle>
|
||||
<ItemTemplate>
|
||||
|
@ -50,11 +56,11 @@
|
|||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<asp:TemplateField >
|
||||
<ItemTemplate>
|
||||
<asp:ImageButton ID="imgDelMailboxPlan" runat="server" Text="Delete" SkinID="ExchangeDelete"
|
||||
CommandName="DeleteItem" CommandArgument='<%# Eval("MailboxPlanId") %>'
|
||||
meta:resourcekey="cmdDelete" OnClientClick="return confirm('Are you sure you want to delete selected mailbox plan?')"></asp:ImageButton>
|
||||
meta:resourcekey="cmdDelete" OnClientClick="return confirm('Are you sure you want to delete selected mailbox plan?')" ></asp:ImageButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
|
@ -85,7 +91,7 @@
|
|||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="txtStatus" runat="server" CssClass="TextBox200" MaxLength="128" ReadOnly="true"></asp:TextBox>
|
||||
<asp:TextBox ID="txtStatus" runat="server" CssClass="TextBox400" MaxLength="128" ReadOnly="true"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
|
@ -102,9 +102,19 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
if (e.CommandName == "DeleteItem")
|
||||
{
|
||||
int mailboxPlanId = Utils.ParseInt(e.CommandArgument.ToString(), 0);
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
ExchangeMailboxPlan plan = ES.Services.ExchangeServer.GetExchangeMailboxPlan(PanelRequest.ItemID, mailboxPlanId);
|
||||
|
||||
if (plan.MailboxPlanType > 0)
|
||||
{
|
||||
ShowErrorMessage("EXCHANGE_UNABLE_USE_SYSTEMPLAN");
|
||||
BindMailboxPlans();
|
||||
return;
|
||||
}
|
||||
|
||||
int result = ES.Services.ExchangeServer.DeleteExchangeMailboxPlan(PanelRequest.ItemID, mailboxPlanId);
|
||||
|
||||
if (result < 0)
|
||||
|
@ -112,6 +122,8 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
messageBox.ShowResultMessage(result);
|
||||
return;
|
||||
}
|
||||
else
|
||||
ShowSuccessMessage("REQUEST_COMPLETED_SUCCESFULLY");
|
||||
|
||||
}
|
||||
catch (Exception)
|
||||
|
@ -130,8 +142,20 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
|
||||
try
|
||||
{
|
||||
ExchangeMailboxPlan plan = ES.Services.ExchangeServer.GetExchangeMailboxPlan(PanelRequest.ItemID, mailboxPlanId);
|
||||
|
||||
if (plan.MailboxPlanType > 0)
|
||||
{
|
||||
ShowErrorMessage("EXCHANGE_UNABLE_USE_SYSTEMPLAN");
|
||||
BindMailboxPlans();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
ES.Services.ExchangeServer.SetOrganizationDefaultExchangeMailboxPlan(PanelRequest.ItemID, mailboxPlanId);
|
||||
|
||||
ShowSuccessMessage("REQUEST_COMPLETED_SUCCESFULLY");
|
||||
|
||||
// rebind domains
|
||||
BindMailboxPlans();
|
||||
}
|
||||
|
@ -167,6 +191,31 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
{
|
||||
ShowErrorMessage("EXCHANGE_FAILED_TO_STAMP", ex);
|
||||
}
|
||||
|
||||
BindMailboxPlans();
|
||||
}
|
||||
|
||||
|
||||
public string GetPlanType(int mailboxPlanType)
|
||||
{
|
||||
string imgName = string.Empty;
|
||||
|
||||
ExchangeMailboxPlanType planType = (ExchangeMailboxPlanType)mailboxPlanType;
|
||||
switch (planType)
|
||||
{
|
||||
case ExchangeMailboxPlanType.Reseller:
|
||||
imgName = "company24.png";
|
||||
break;
|
||||
case ExchangeMailboxPlanType.Administrator:
|
||||
imgName = "company24.png";
|
||||
break;
|
||||
default:
|
||||
imgName = "admin_16.png";
|
||||
break;
|
||||
}
|
||||
|
||||
return GetThemedImage("Exchange/" + imgName);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -1,33 +1,4 @@
|
|||
// Copyright (c) 2012, Outercurve Foundation.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// - Redistributions of source code must retain the above copyright notice, this
|
||||
// list of conditions and the following disclaimer.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
|
@ -36,13 +7,11 @@
|
|||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebsitePanel.Portal.ExchangeServer
|
||||
{
|
||||
|
||||
|
||||
public partial class ExchangeMailboxPlans
|
||||
{
|
||||
|
||||
namespace WebsitePanel.Portal.ExchangeServer {
|
||||
|
||||
|
||||
public partial class ExchangeMailboxPlans {
|
||||
|
||||
/// <summary>
|
||||
/// asyncTasks control.
|
||||
/// </summary>
|
||||
|
@ -51,7 +20,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// breadcrumb control.
|
||||
/// </summary>
|
||||
|
@ -60,7 +29,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
/// 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>
|
||||
|
@ -69,7 +38,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
/// 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>
|
||||
|
@ -78,7 +47,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
/// 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>
|
||||
|
@ -87,7 +56,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
/// 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>
|
||||
|
@ -96,7 +65,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnAddMailboxPlan control.
|
||||
/// </summary>
|
||||
|
@ -105,7 +74,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button btnAddMailboxPlan;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// gvMailboxPlans control.
|
||||
/// </summary>
|
||||
|
@ -114,7 +83,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.GridView gvMailboxPlans;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnSetDefaultMailboxPlan control.
|
||||
/// </summary>
|
||||
|
@ -123,7 +92,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button btnSetDefaultMailboxPlan;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// secMainTools control.
|
||||
/// </summary>
|
||||
|
@ -132,7 +101,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.CollapsiblePanel secMainTools;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ToolsPanel control.
|
||||
/// </summary>
|
||||
|
@ -141,7 +110,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Panel ToolsPanel;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// tblMaintenance control.
|
||||
/// </summary>
|
||||
|
@ -150,7 +119,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlTable tblMaintenance;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// lblSourcePlan control.
|
||||
/// </summary>
|
||||
|
@ -159,7 +128,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize lblSourcePlan;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// mailboxPlanSelectorSource control.
|
||||
/// </summary>
|
||||
|
@ -168,7 +137,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.MailboxPlanSelector mailboxPlanSelectorSource;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// lblTargetPlan control.
|
||||
/// </summary>
|
||||
|
@ -177,7 +146,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize lblTargetPlan;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// mailboxPlanSelectorTarget control.
|
||||
/// </summary>
|
||||
|
@ -186,7 +155,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.MailboxPlanSelector mailboxPlanSelectorTarget;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtStatus control.
|
||||
/// </summary>
|
||||
|
@ -195,7 +164,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtStatus;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnSave control.
|
||||
/// </summary>
|
||||
|
@ -204,7 +173,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button btnSave;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// FormComments control.
|
||||
/// </summary>
|
||||
|
|
|
@ -112,16 +112,16 @@
|
|||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="locKB.Text" xml:space="preserve">
|
||||
<value>KB</value>
|
||||
</data>
|
||||
<data name="valRequireCorrectNumber.ErrorMessage" xml:space="preserve">
|
||||
<value>Please enter correct number. The number should be positive. Empty value = "Unlimited".</value>
|
||||
<value>Please enter correct number. The number should be positive. Percentage should be between 0 and 100. Empty value = "Unlimited".</value>
|
||||
</data>
|
||||
<data name="valRequireCorrectNumber.Text" xml:space="preserve">
|
||||
<value />
|
||||
|
|
|
@ -41,7 +41,15 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
{
|
||||
public partial class DaysBox : System.Web.UI.UserControl
|
||||
{
|
||||
public string ValidationGroup
|
||||
int emptyValue = -1;
|
||||
|
||||
public int EmptyValue
|
||||
{
|
||||
get { return emptyValue; }
|
||||
set { emptyValue = value; }
|
||||
}
|
||||
|
||||
public string ValidationGroup
|
||||
{
|
||||
get { return valRequireCorrectNumber.ValidationGroup; }
|
||||
set { valRequireCorrectNumber.ValidationGroup = valRequireNumber.ValidationGroup = value; }
|
||||
|
@ -58,18 +66,25 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
}
|
||||
}
|
||||
|
||||
public bool RequireValidatorEnabled
|
||||
{
|
||||
get { return valRequireNumber.Enabled; }
|
||||
set { valRequireNumber.Enabled = value; }
|
||||
}
|
||||
|
||||
|
||||
public int ValueDays
|
||||
{
|
||||
get
|
||||
{
|
||||
string val = txtValue.Text.Trim();
|
||||
return Utils.ParseInt(val, 0);
|
||||
}
|
||||
set
|
||||
{
|
||||
txtValue.Text = value.ToString();
|
||||
}
|
||||
}
|
||||
get
|
||||
{
|
||||
string val = txtValue.Text.Trim();
|
||||
return val == "" ? emptyValue : Utils.ParseInt(val, 0);
|
||||
}
|
||||
set
|
||||
{
|
||||
txtValue.Text = value == emptyValue ? "" : value.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
|
|
@ -18,4 +18,4 @@
|
|||
<asp:RequiredFieldValidator ID="valRequireNumber" runat="server" meta:resourcekey="valRequireNumber" Enabled="false"
|
||||
ErrorMessage="Please enter value" ControlToValidate="txtValue" Display="None" SetFocusOnError="True"></asp:RequiredFieldValidator>
|
||||
<asp:RegularExpressionValidator ID="valRequireCorrectNumber" runat="server" meta:resourcekey="valRequireCorrectNumber"
|
||||
ErrorMessage="Enter correct number" ControlToValidate="txtValue" Display="None" ValidationExpression="[0-9]{0,15}" SetFocusOnError="True"></asp:RegularExpressionValidator>
|
||||
ErrorMessage="Enter correct number" ControlToValidate="txtValue" Display="None" SetFocusOnError="True"></asp:RegularExpressionValidator>
|
||||
|
|
|
@ -78,24 +78,38 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
public bool DisplayUnitsKB
|
||||
{
|
||||
get { return locKB.Visible; }
|
||||
set { locKB.Visible = value; }
|
||||
set {
|
||||
locKB.Visible = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool DisplayUnitsMB
|
||||
{
|
||||
get { return locMB.Visible; }
|
||||
set { locMB.Visible = value; }
|
||||
set {
|
||||
locMB.Visible = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool DisplayUnitsPct
|
||||
{
|
||||
get { return locPct.Visible; }
|
||||
set { locPct.Visible = value; }
|
||||
set {
|
||||
|
||||
locPct.Visible = value;
|
||||
}
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
if (locPct.Visible)
|
||||
{
|
||||
valRequireCorrectNumber.ValidationExpression = @"(^100)$|^([0-9]{1,2})$";
|
||||
}
|
||||
else
|
||||
valRequireCorrectNumber.ValidationExpression = @"[0-9]{0,15}";
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue