Fix archiving

This commit is contained in:
dev_amdtel 2014-04-22 18:39:33 +04:00
parent 10f216b713
commit ae91a18405
25 changed files with 702 additions and 304 deletions

View file

@ -5437,4 +5437,16 @@
<data name="Quota.Exchange2013.ArchivingStorage" xml:space="preserve">
<value>Archiving storage, MB</value>
</data>
<data name="Error.EXCHANGE_DELETE_RETENTIONPOLICY" xml:space="preserve">
<value>Unable to delete Retention policy.</value>
</data>
<data name="Error.EXCHANGE_UPDATERETENTIONPOLICY" xml:space="preserve">
<value>Retention policy update failed</value>
</data>
<data name="Success.EXCHANGE_DELETE_RETENTIONPOLICY" xml:space="preserve">
<value>Retention policy deleted.</value>
</data>
<data name="Success.EXCHANGE_UPDATERETENTIONPOLICY" xml:space="preserve">
<value>Retention policy updated</value>
</data>
</root>

View file

@ -246,4 +246,7 @@
<data name="lblLitigationHoldUrl.Text" xml:space="preserve">
<value>Litigation Hold Url:</value>
</data>
<data name="secRetentionPolicy.Text" xml:space="preserve">
<value>Retention policy</value>
</data>
</root>

View file

@ -165,4 +165,7 @@
<data name="locTitleRetentionPolicy.Text" xml:space="preserve">
<value>Retention Policy</value>
</data>
<data name="Text.PageRetentionPolicyName" xml:space="preserve">
<value>Retention policy</value>
</data>
</root>

View file

@ -37,6 +37,7 @@ using System.Web.UI.HtmlControls;
using WebsitePanel.EnterpriseServer;
using WebsitePanel.Providers.HostedSolution;
using WebsitePanel.Providers.ResultObjects;
using WebsitePanel.Providers.Common;
namespace WebsitePanel.Portal.ExchangeServer
{
@ -293,10 +294,10 @@ namespace WebsitePanel.Portal.ExchangeServer
foreach(ExchangeMailboxPlanRetentionPolicyTag tag in tags)
{
tag.MailboxPlanId = planId;
int result = ES.Services.ExchangeServer.AddExchangeMailboxPlanRetentionPolicyTag(PanelRequest.ItemID, tag);
if (result < 0)
IntResult result = ES.Services.ExchangeServer.AddExchangeMailboxPlanRetentionPolicyTag(PanelRequest.ItemID, tag);
if (!result.IsSuccess)
{
messageBox.ShowResultMessage(result);
messageBox.ShowMessage(result, "EXCHANGE_ADD_MAILBOXPLAN", null);
return;
}
}

View file

@ -4,6 +4,8 @@
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/PasswordControl.ascx" TagName="PasswordControl" TagPrefix="wsp" %>
<%@ Register Src="UserControls/EmailAddress.ascx" TagName="EmailAddress" TagPrefix="wsp" %>
<%@ Register Src="UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %>
<%@ Register Src="UserControls/Breadcrumb.ascx" TagName="Breadcrumb" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
<%@ Register Src="UserControls/MailboxPlanSelector.ascx" TagName="MailboxPlanSelector" TagPrefix="wsp" %>
@ -28,7 +30,11 @@
<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="mailboxes" />
</div>
<div class="Content">
<div class="Center">
@ -139,7 +145,7 @@
<wsp:MailboxPlanSelector ID="mailboxPlanSelector" runat="server" Archiving="false" />
</td>
</tr>
<tr>
<tr id="rowRetentionPolicy" runat="server">
<td class="FormLabel150">
<asp:Localize ID="locRetentionPolicyName" runat="server" meta:resourcekey="locRetentionPolicyName" Text="Retention policy Name: "></asp:Localize>
</td>

View file

@ -1,4 +1,4 @@
// Copyright (c) 2014, Outercurve Foundation.
// Copyright (c) 2012, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
@ -99,6 +99,8 @@ namespace WebsitePanel.Portal.ExchangeServer
rbMailboxType.Items.Add(new System.Web.UI.WebControls.ListItem(GetLocalizedString("EquipmentMailbox.Text"), "6"));
}
}
rowRetentionPolicy.Visible = Utils.CheckQouta(Quotas.EXCHANGE2013_ALLOWRETENTIONPOLICY, cntx);
}
}

View file

@ -1,31 +1,3 @@
// 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.
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
@ -58,6 +30,24 @@ namespace WebsitePanel.Portal.ExchangeServer {
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divWrapper;
/// <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>
@ -337,6 +327,15 @@ namespace WebsitePanel.Portal.ExchangeServer {
/// </remarks>
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.MailboxPlanSelector mailboxPlanSelector;
/// <summary>
/// rowRetentionPolicy 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 rowRetentionPolicy;
/// <summary>
/// locRetentionPolicyName control.
/// </summary>

View file

@ -1,4 +1,4 @@
// Copyright (c) 2014, Outercurve Foundation.
// Copyright (c) 2012-2014, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
@ -80,6 +80,9 @@ namespace WebsitePanel.Portal.ExchangeServer
secLitigationHoldSettings.Visible = (Utils.CheckQouta(Quotas.EXCHANGE2007_ALLOWLITIGATIONHOLD, Cntx));
}
secRetentionPolicy.Visible = Utils.CheckQouta(Quotas.EXCHANGE2013_ALLOWRETENTIONPOLICY, cntx);
}
}

View file

@ -1,4 +1,4 @@
// Copyright (c) 2014, Outercurve Foundation.
// Copyright (c) 2012-2014, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
@ -47,6 +47,7 @@ namespace WebsitePanel.Portal.ExchangeServer
protected void Page_Load(object sender, EventArgs e)
{
locTitle.Text = RetentionPolicy ? GetLocalizedString("locTitleRetentionPolicy.Text") : GetLocalizedString("locTitle.Text");
breadcrumb.PageName = RetentionPolicy ? "Text.PageRetentionPolicyName" : "Text.PageName";
gvMailboxPlans.Columns[2].Visible = !RetentionPolicy;
btnSetDefaultMailboxPlan.Visible = !RetentionPolicy;

View file

@ -92,7 +92,7 @@
</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 class="FormLabel200" align="right"><asp:Localize ID="locAgeLimitForRetention" runat="server" meta:resourcekey="locAgeLimitForRetention" Text="Age limit for retention :"></asp:Localize></td>
<td>
<div class="Right">
<uc1:QuotaEditor id="ageLimitForRetention" runat="server"
@ -126,6 +126,11 @@
<asp:Button ID="btnUpdatePolicy" runat="server" meta:resourcekey="btnUpdatePolicy"
Text="Update" CssClass="Button1" OnClick="btnUpdatePolicy_Click" />
</td>
<td>
<div class="FormButtonsBarClean">
<asp:Button ID="btnCancelPolicy" runat="server" meta:resourcekey="btnCancelPolicy"
Text="Cancel" CssClass="Button1" OnClick="btnCancelPolicy_Click"/>
</td>
</tr>
</table>

View file

@ -47,6 +47,8 @@ using System.Web.UI.HtmlControls;
using WebsitePanel.EnterpriseServer;
using WebsitePanel.Providers.HostedSolution;
using WebsitePanel.Providers.Common;
using WebsitePanel.Providers.ResultObjects;
namespace WebsitePanel.Portal.ExchangeServer
{
@ -70,6 +72,8 @@ namespace WebsitePanel.Portal.ExchangeServer
ddRetentionAction.Items.Clear();
for (int i = 0; i < action.Length; i++)
ddRetentionAction.Items.Add(new ListItem(action[i], i.ToString()));
ClearEditValues();
}
txtStatus.Visible = false;
@ -83,8 +87,6 @@ namespace WebsitePanel.Portal.ExchangeServer
gvPolicy.DataSource = list;
gvPolicy.DataBind();
btnUpdatePolicy.Enabled = (string.IsNullOrEmpty(txtPolicy.Text)) ? false : true;
}
@ -101,15 +103,20 @@ namespace WebsitePanel.Portal.ExchangeServer
tag.AgeLimitForRetention = ageLimitForRetention.QuotaValue;
tag.RetentionAction = Convert.ToInt32(ddRetentionAction.SelectedValue);
int result = ES.Services.ExchangeServer.AddExchangeRetentionPolicyTag(PanelRequest.ItemID, tag);
IntResult result = ES.Services.ExchangeServer.AddExchangeRetentionPolicyTag(PanelRequest.ItemID, tag);
if (result < 0)
if (!result.IsSuccess)
{
ShowResultMessage(result);
messageBox.ShowMessage(result, "EXCHANGE_UPDATERETENTIONPOLICY", null);
return;
}
else
{
messageBox.ShowSuccessMessage("EXCHANGE_UPDATERETENTIONPOLICY");
}
BindRetentionPolicy();
ClearEditValues();
}
protected void gvPolicy_RowCommand(object sender, GridViewCommandEventArgs e)
@ -132,24 +139,25 @@ namespace WebsitePanel.Portal.ExchangeServer
}
int result = ES.Services.ExchangeServer.DeleteExchangeRetentionPolicyTag(PanelRequest.ItemID, mailboxPlanId);
if (result < 0)
ResultObject result = ES.Services.ExchangeServer.DeleteExchangeRetentionPolicyTag(PanelRequest.ItemID, mailboxPlanId);
if (!result.IsSuccess)
{
ShowResultMessage(result);
messageBox.ShowMessage(result, "EXCHANGE_DELETE_RETENTIONPOLICY", null);
return;
}
else
{
messageBox.ShowSuccessMessage("EXCHANGE_DELETE_RETENTIONPOLICY");
}
ViewState["PolicyID"] = null;
txtPolicy.Text = string.Empty;
ageLimitForRetention.QuotaValue = 0;
btnUpdatePolicy.Enabled = (string.IsNullOrEmpty(txtPolicy.Text)) ? false : true;
ClearEditValues();
}
catch (Exception)
{
ShowErrorMessage("EXCHANGE_DELETE_MAILBOXPLAN");
ShowErrorMessage("EXCHANGE_DELETE_RETENTIONPOLICY");
}
BindRetentionPolicy();
@ -165,7 +173,12 @@ namespace WebsitePanel.Portal.ExchangeServer
ageLimitForRetention.QuotaValue = tag.AgeLimitForRetention;
Utils.SelectListItem(ddRetentionAction, tag.RetentionAction);
btnUpdatePolicy.Enabled = (string.IsNullOrEmpty(txtPolicy.Text)) ? false : true;
btnUpdatePolicy.Enabled = true;
btnCancelPolicy.Enabled = true;
btnAddPolicy.Enabled = false;
ddTagType.Enabled = false;
break;
}
@ -202,15 +215,15 @@ namespace WebsitePanel.Portal.ExchangeServer
tag.AgeLimitForRetention = ageLimitForRetention.QuotaValue;
tag.RetentionAction = Convert.ToInt32(ddRetentionAction.SelectedValue);
int result = ES.Services.ExchangeServer.UpdateExchangeRetentionPolicyTag(PanelRequest.ItemID, tag);
ResultObject result = ES.Services.ExchangeServer.UpdateExchangeRetentionPolicyTag(PanelRequest.ItemID, tag);
if (result < 0)
if (!result.IsSuccess)
{
ShowErrorMessage("EXCHANGE_UPDATEPLANS");
messageBox.ShowMessage(result,"EXCHANGE_UPDATERETENTIONPOLICY", null);
}
else
{
ShowSuccessMessage("EXCHANGE_UPDATEPLANS");
messageBox.ShowSuccessMessage("EXCHANGE_UPDATERETENTIONPOLICY");
}
BindRetentionPolicy();
@ -234,5 +247,22 @@ namespace WebsitePanel.Portal.ExchangeServer
return GetThemedImage("Exchange/" + imgName);
}
protected void ClearEditValues()
{
txtPolicy.Text = string.Empty;
ageLimitForRetention.QuotaValue = 0;
ddTagType.Enabled = true;
btnAddPolicy.Enabled = true;
btnUpdatePolicy.Enabled = false;
btnCancelPolicy.Enabled = false;
}
protected void btnCancelPolicy_Click(object sender, EventArgs e)
{
ClearEditValues();
}
}
}

View file

@ -192,6 +192,15 @@ namespace WebsitePanel.Portal.ExchangeServer {
/// </remarks>
protected global::System.Web.UI.WebControls.Button btnUpdatePolicy;
/// <summary>
/// btnCancelPolicy 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 btnCancelPolicy;
/// <summary>
/// txtStatus control.
/// </summary>

View file

@ -1,4 +1,4 @@
// Copyright (c) 2014, Outercurve Foundation.
// Copyright (c) 2012-2014, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
@ -120,7 +120,7 @@ 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))
if (Utils.CheckQouta(Quotas.EXCHANGE2013_ALLOWRETENTIONPOLICY, cntx))
exchangeGroup.MenuItems.Add(CreateMenuItem("ArchivingMailboxes", "archivingmailboxes"));
if (Utils.CheckQouta(Quotas.EXCHANGE2007_CONTACTS, cntx))
@ -141,11 +141,11 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
exchangeGroup.MenuItems.Add(CreateMenuItem("MailboxPlans", "mailboxplans"));
if (!hideItems)
if (Utils.CheckQouta(Quotas.EXCHANGE2013_ALLOWARCHIVING, cntx))
if (Utils.CheckQouta(Quotas.EXCHANGE2013_ALLOWRETENTIONPOLICY, cntx))
exchangeGroup.MenuItems.Add(CreateMenuItem("RetentionPolicy", "retentionpolicy"));
if (!hideItems)
if (Utils.CheckQouta(Quotas.EXCHANGE2013_ALLOWARCHIVING, cntx))
if (Utils.CheckQouta(Quotas.EXCHANGE2013_ALLOWRETENTIONPOLICY, cntx))
exchangeGroup.MenuItems.Add(CreateMenuItem("RetentionPolicyTag", "retentionpolicytag"));
if (!hideItems)

View file

@ -1,4 +1,4 @@
// Copyright (c) 2014, Outercurve Foundation.
// Copyright (c) 2012, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
@ -47,6 +47,8 @@ using System.Web.UI.HtmlControls;
using WebsitePanel.EnterpriseServer;
using WebsitePanel.Providers.HostedSolution;
using WebsitePanel.Providers.ResultObjects;
using WebsitePanel.Providers.Common;
namespace WebsitePanel.Portal
{
@ -64,6 +66,8 @@ namespace WebsitePanel.Portal
public void BindSettings(UserSettings settings)
{
secMailboxPlan.Text = RetentionPolicy ? GetLocalizedString("secRetentionPolicy.Text") : GetLocalizedString("secMailboxPlan.Text");
BindMailboxPlans();
txtStatus.Visible = false;
@ -497,9 +501,12 @@ namespace WebsitePanel.Portal
else
{
if (RetentionPolicy)
SaveTags(orgs[0].Id, mailboxPlanId);
messageBox.ShowSuccessMessage("EXCHANGE_UPDATEPLANS");
{
if (SaveTags(orgs[0].Id, mailboxPlanId))
messageBox.ShowSuccessMessage("EXCHANGE_UPDATEPLANS");
}
else
messageBox.ShowSuccessMessage("EXCHANGE_UPDATEPLANS");
}
}
@ -684,11 +691,19 @@ namespace WebsitePanel.Portal
}
}
protected void SaveTags(int ItemId, int planId)
protected bool SaveTags(int ItemId, int planId)
{
ExchangeMailboxPlanRetentionPolicyTag[] currenttags = ES.Services.ExchangeServer.GetExchangeMailboxPlanRetentionPolicyTags(planId);
foreach (ExchangeMailboxPlanRetentionPolicyTag tag in currenttags)
ES.Services.ExchangeServer.DeleteExchangeMailboxPlanRetentionPolicyTag(ItemId, planId, tag.PlanTagID);
{
ResultObject res = ES.Services.ExchangeServer.DeleteExchangeMailboxPlanRetentionPolicyTag(ItemId, planId, tag.PlanTagID);
if (!res.IsSuccess)
{
messageBox.ShowMessage(res, "EXCHANGE_UPDATEPLANS", null);
return false;
}
}
List<ExchangeMailboxPlanRetentionPolicyTag> tags = ViewState["Tags"] as List<ExchangeMailboxPlanRetentionPolicyTag>;
if (tags != null)
@ -696,15 +711,17 @@ namespace WebsitePanel.Portal
foreach (ExchangeMailboxPlanRetentionPolicyTag tag in tags)
{
tag.MailboxPlanId = planId;
int result = ES.Services.ExchangeServer.AddExchangeMailboxPlanRetentionPolicyTag(ItemId, tag);
if (result < 0)
IntResult res = ES.Services.ExchangeServer.AddExchangeMailboxPlanRetentionPolicyTag(ItemId, tag);
if (!res.IsSuccess)
{
messageBox.ShowResultMessage(result);
return;
messageBox.ShowMessage(res, "EXCHANGE_UPDATEPLANS", null);
return false;
}
}
}
return true;
}
}

View file

@ -65,7 +65,7 @@
</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 class="FormLabel200" align="right"><asp:Localize ID="locAgeLimitForRetention" runat="server" meta:resourcekey="locAgeLimitForRetention" Text="Age limit for retention :"></asp:Localize></td>
<td>
<div class="Right">
<uc1:QuotaEditor id="ageLimitForRetention" runat="server"

View file

@ -47,6 +47,8 @@ using System.Web.UI.HtmlControls;
using WebsitePanel.EnterpriseServer;
using WebsitePanel.Providers.HostedSolution;
using WebsitePanel.Providers.Common;
using WebsitePanel.Providers.ResultObjects;
namespace WebsitePanel.Portal
{
@ -136,13 +138,17 @@ namespace WebsitePanel.Portal
if ((orgs != null) & (orgs.GetLength(0) > 0))
{
int result = ES.Services.ExchangeServer.AddExchangeRetentionPolicyTag(orgs[0].Id, tag);
IntResult result = ES.Services.ExchangeServer.AddExchangeRetentionPolicyTag(orgs[0].Id, tag);
if (result < 0)
if (!result.IsSuccess)
{
messageBox.ShowResultMessage(result);
messageBox.ShowMessage(result, "EXCHANGE_UPDATEPLANS", null);
return;
}
else
{
messageBox.ShowSuccessMessage("EXCHANGE_UPDATEPLANS");
}
}
BindRetentionPolicy();
@ -185,12 +191,16 @@ namespace WebsitePanel.Portal
}
int result = ES.Services.ExchangeServer.DeleteExchangeRetentionPolicyTag(orgs[0].Id, mailboxPlanId);
if (result < 0)
ResultObject result = ES.Services.ExchangeServer.DeleteExchangeRetentionPolicyTag(orgs[0].Id, mailboxPlanId);
if (!result.IsSuccess)
{
messageBox.ShowResultMessage(result);
messageBox.ShowMessage(result, "EXCHANGE_DELETE_RETENTIONPOLICY", null);
return;
}
else
{
messageBox.ShowSuccessMessage("EXCHANGE_DELETE_RETENTIONPOLICY");
}
ViewState["PolicyID"] = null;
@ -202,7 +212,7 @@ namespace WebsitePanel.Portal
}
catch (Exception)
{
messageBox.ShowErrorMessage("EXCHANGE_DELETE_MAILBOXPLAN");
messageBox.ShowErrorMessage("EXCHANGE_DELETE_RETENTIONPOLICY");
}
BindRetentionPolicy();
@ -288,11 +298,11 @@ namespace WebsitePanel.Portal
if ((orgs != null) & (orgs.GetLength(0) > 0))
{
int result = ES.Services.ExchangeServer.UpdateExchangeRetentionPolicyTag(orgs[0].Id, tag);
ResultObject result = ES.Services.ExchangeServer.UpdateExchangeRetentionPolicyTag(orgs[0].Id, tag);
if (result < 0)
if (!result.IsSuccess)
{
messageBox.ShowErrorMessage("EXCHANGE_UPDATEPLANS");
messageBox.ShowMessage(result, "EXCHANGE_UPDATEPLANS", null);
}
else
{