diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxPlans.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxPlans.ascx.cs
index 3cf6d8d0..14e02ee2 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxPlans.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxPlans.ascx.cs
@@ -41,8 +41,9 @@ namespace WebsitePanel.Portal.ExchangeServer
{
// bind mailboxplans
BindMailboxPlans();
- }
+ txtStatus.Visible = false;
+ }
}
public string GetMailboxPlanDisplayUrl(string MailboxPlanId)
@@ -65,6 +66,9 @@ namespace WebsitePanel.Portal.ExchangeServer
{
btnSetDefaultMailboxPlan.Enabled = false;
}
+
+ btnSave.Enabled = (gvMailboxPlans.Rows.Count >= 1);
+
}
public string IsChecked(bool val)
@@ -122,5 +126,31 @@ namespace WebsitePanel.Portal.ExchangeServer
ShowErrorMessage("EXCHANGE_SET_DEFAULT_MAILBOXPLAN", ex);
}
}
+
+ protected void btnSave_Click(object sender, EventArgs e)
+ {
+ txtStatus.Visible = true;
+
+ try
+ {
+ ExchangeAccount[] Accounts = ES.Services.ExchangeServer.GetExchangeAccountByMailboxPlanId(PanelRequest.ItemID, Convert.ToInt32(mailboxPlanSelectorSource.MailboxPlanId));
+
+ foreach (ExchangeAccount a in Accounts)
+ {
+ txtStatus.Text = "Completed";
+ int result = ES.Services.ExchangeServer.SetExchangeMailboxPlan(PanelRequest.ItemID, a.AccountId, Convert.ToInt32(mailboxPlanSelectorTarget.MailboxPlanId));
+ if (result < 0)
+ {
+ txtStatus.Text = "Error: " + a.AccountName;
+ break;
+ }
+ }
+
+ }
+ catch (Exception ex)
+ {
+ ShowErrorMessage("EXCHANGE_FAILED_TO_STAMP", ex);
+ }
+ }
}
}
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxPlans.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxPlans.ascx.designer.cs
index cd76a5ae..653e7beb 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxPlans.ascx.designer.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxPlans.ascx.designer.cs
@@ -7,11 +7,13 @@
//
//------------------------------------------------------------------------------
-namespace WebsitePanel.Portal.ExchangeServer {
-
-
- public partial class ExchangeMailboxPlans {
-
+namespace WebsitePanel.Portal.ExchangeServer
+{
+
+
+ public partial class ExchangeMailboxPlans
+ {
+
///
/// asyncTasks control.
///
@@ -20,7 +22,7 @@ namespace WebsitePanel.Portal.ExchangeServer {
/// To modify move field declaration from designer file to code-behind file.
///
protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks;
-
+
///
/// breadcrumb control.
///
@@ -29,7 +31,7 @@ namespace WebsitePanel.Portal.ExchangeServer {
/// To modify move field declaration from designer file to code-behind file.
///
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Breadcrumb breadcrumb;
-
+
///
/// menu control.
///
@@ -38,7 +40,7 @@ namespace WebsitePanel.Portal.ExchangeServer {
/// To modify move field declaration from designer file to code-behind file.
///
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Menu menu;
-
+
///
/// Image1 control.
///
@@ -47,7 +49,7 @@ namespace WebsitePanel.Portal.ExchangeServer {
/// To modify move field declaration from designer file to code-behind file.
///
protected global::System.Web.UI.WebControls.Image Image1;
-
+
///
/// locTitle control.
///
@@ -56,7 +58,7 @@ namespace WebsitePanel.Portal.ExchangeServer {
/// To modify move field declaration from designer file to code-behind file.
///
protected global::System.Web.UI.WebControls.Localize locTitle;
-
+
///
/// messageBox control.
///
@@ -65,7 +67,7 @@ namespace WebsitePanel.Portal.ExchangeServer {
/// To modify move field declaration from designer file to code-behind file.
///
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
-
+
///
/// btnAddMailboxPlan control.
///
@@ -74,7 +76,7 @@ namespace WebsitePanel.Portal.ExchangeServer {
/// To modify move field declaration from designer file to code-behind file.
///
protected global::System.Web.UI.WebControls.Button btnAddMailboxPlan;
-
+
///
/// gvMailboxPlans control.
///
@@ -83,7 +85,7 @@ namespace WebsitePanel.Portal.ExchangeServer {
/// To modify move field declaration from designer file to code-behind file.
///
protected global::System.Web.UI.WebControls.GridView gvMailboxPlans;
-
+
///
/// btnSetDefaultMailboxPlan control.
///
@@ -92,7 +94,88 @@ namespace WebsitePanel.Portal.ExchangeServer {
/// To modify move field declaration from designer file to code-behind file.
///
protected global::System.Web.UI.WebControls.Button btnSetDefaultMailboxPlan;
-
+
+ ///
+ /// secMainTools control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.CollapsiblePanel secMainTools;
+
+ ///
+ /// ToolsPanel control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel ToolsPanel;
+
+ ///
+ /// tblMaintenance control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlTable tblMaintenance;
+
+ ///
+ /// lblSourcePlan control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Localize lblSourcePlan;
+
+ ///
+ /// mailboxPlanSelectorSource control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.ExchangeServer.UserControls.MailboxPlanSelector mailboxPlanSelectorSource;
+
+ ///
+ /// lblTargetPlan control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Localize lblTargetPlan;
+
+ ///
+ /// mailboxPlanSelectorTarget control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.ExchangeServer.UserControls.MailboxPlanSelector mailboxPlanSelectorTarget;
+
+ ///
+ /// txtStatus control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtStatus;
+
+ ///
+ /// btnSave control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnSave;
+
///
/// FormComments control.
///
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/MailboxPlanSelector.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/MailboxPlanSelector.ascx
index 9718d6b2..5b5fb121 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/MailboxPlanSelector.ascx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/MailboxPlanSelector.ascx
@@ -1,3 +1,2 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MailboxPlanSelector.ascx.cs" Inherits="WebsitePanel.Portal.ExchangeServer.UserControls.MailboxPlanSelector" %>
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/MailboxPlanSelector.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/MailboxPlanSelector.ascx.cs
index b2cdfbd3..77ca867b 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/MailboxPlanSelector.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/MailboxPlanSelector.ascx.cs
@@ -35,6 +35,7 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
{
private string mailboxPlanToSelect;
+ private bool addNone;
public string MailboxPlanId
{
@@ -55,6 +56,13 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
}
}
+ public bool AddNone
+ {
+ get { return ViewState["AddNone"] != null ? (bool)ViewState["AddNone"] : false; }
+ set { ViewState["AddNone"] = value; }
+ }
+
+
public int MailboxPlansCount
{
get
@@ -85,21 +93,29 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
ddlMailboxPlan.Items.Add(li);
}
- foreach (ListItem li in ddlMailboxPlan.Items)
+ if (AddNone)
{
- if (li.Value == mailboxPlanToSelect)
+ ListItem li = new ListItem();
+ li.Text = "[None]";
+ li.Value = "-1";
+ li.Selected = false;
+ ddlMailboxPlan.Items.Add(li);
+ }
+
+
+ if (!string.IsNullOrEmpty(mailboxPlanToSelect))
+ {
+ foreach (ListItem li in ddlMailboxPlan.Items)
{
- ddlMailboxPlan.ClearSelection();
- li.Selected = true;
- break;
+ if (li.Value == mailboxPlanToSelect)
+ {
+ ddlMailboxPlan.ClearSelection();
+ li.Selected = true;
+ break;
+ }
}
}
}
-
- protected void ddlMailboxPlan_SelectedIndexChanged(object sender, EventArgs e)
- {
-
- }
}
}
\ No newline at end of file
diff --git a/WebsitePanel/Sources/generate_es_proxies.bat b/WebsitePanel/Sources/generate_es_proxies.bat
index 4cc292b7..d190a83a 100644
--- a/WebsitePanel/Sources/generate_es_proxies.bat
+++ b/WebsitePanel/Sources/generate_es_proxies.bat
@@ -2,5 +2,5 @@ SET WSDL="C:\Program Files (x86)\Microsoft WSE\v3.0\Tools\WseWsdl3.exe"
SET WSE_CLEAN=..\Tools\WseClean.exe
SET SERVER_URL=http://localhost:9005
-%WSDL% %SERVER_URL%/esLync.asmx /out:.\WebsitePanel.EnterpriseServer.Client\LyncProxy.cs /namespace:WebsitePanel.EnterpriseServer /type:webClient
-%WSE_CLEAN% .\WebsitePanel.EnterpriseServer.Client\LyncProxy.cs
+%WSDL% %SERVER_URL%/esExchangeServer.asmx /out:.\WebsitePanel.EnterpriseServer.Client\ExchangeServerProxy.cs /namespace:WebsitePanel.EnterpriseServer /type:webClient
+%WSE_CLEAN% .\WebsitePanel.EnterpriseServer.Client\ExchangeServerProxy.cs