This commit is contained in:
Virtuworks 2014-09-23 08:38:12 -04:00
commit ce6ab4dbdf
14 changed files with 127 additions and 48 deletions

View file

@ -79,7 +79,13 @@
<asp:Button runat="server" ID="btnDeleteData" meta:resourcekey="btnDeleteData" <asp:Button runat="server" ID="btnDeleteData" meta:resourcekey="btnDeleteData"
CssClass="Button1" onclick="btnDeleteData_Click" /> CssClass="Button1" onclick="btnDeleteData_Click" />
</div> </div>
<br />
<asp:Button runat="server" ID="btnSaveExit" Text="Save Changes and Exit" CssClass="Button1"
meta:resourcekey="btnSaveExit" OnClick="btnSaveExit_Click"></asp:Button>
</div> </div>
</div> </div>
</div> </div>

View file

@ -113,5 +113,13 @@ namespace WebsitePanel.Portal.BlackBerry
messageBox.ShowWarningMessage(CANNOT_DELETE_BLACKBERRY_DATA); messageBox.ShowWarningMessage(CANNOT_DELETE_BLACKBERRY_DATA);
} }
} }
protected void btnSaveExit_Click(object sender, EventArgs e)
{
Response.Redirect(PortalUtils.EditUrl("ItemID", PanelRequest.ItemID.ToString(),
"blackberry_users",
"SpaceID=" + PanelSecurity.PackageId));
}
} }
} }

View file

@ -201,5 +201,14 @@ namespace WebsitePanel.Portal.BlackBerry {
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Button btnDeleteData; protected global::System.Web.UI.WebControls.Button btnDeleteData;
/// <summary>
/// btnSaveExit 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 btnSaveExit;
} }
} }

View file

@ -68,4 +68,5 @@
</div> </div>
</div> </div>
</div> </div>
</div>
</div> </div>

View file

@ -16,20 +16,18 @@
<div id="ExchangeContainer"> <div id="ExchangeContainer">
<div class="Module"> <div class="Module">
<div class="Header">
<wsp:Breadcrumb id="breadcrumb" runat="server" PageName="Text.PageName" />
</div>
<div class="Left"> <div class="Left">
<wsp:Menu id="menu" runat="server" SelectedItem="storage_limits" /> </div>
</div>
<div class="Content"> <div class="Content">
<div class="Center"> <div class="Center">
<div class="Title"> <div class="Title">
<asp:Image ID="Image1" SkinID="ExchangeStorageConfig48" runat="server" /> <asp:Image ID="Image2" SkinID="CRMLogo" runat="server" />
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" ></asp:Localize> <asp:Localize ID="Localize1" runat="server" Text="CRM Organization"></asp:Localize>
</div> </div>
<div class="FormBody"> <div class="FormBody">
<wsp:SimpleMessageBox id="messageBox" runat="server" /> <wsp:SimpleMessageBox id="messageBox" runat="server" />
<wsp:CollapsiblePanel id="secStorageLimits" runat="server" <wsp:CollapsiblePanel id="secStorageLimits" runat="server"
TargetControlID="StorageLimits" meta:resourcekey="secStorageLimits" > TargetControlID="StorageLimits" meta:resourcekey="secStorageLimits" >

View file

@ -1,4 +1,4 @@
// Copyright (c) 2012, Outercurve Foundation. // Copyright (c) 2014, Outercurve Foundation.
// All rights reserved. // All rights reserved.
// //
// Redistribution and use in source and binary forms, with or without modification, // Redistribution and use in source and binary forms, with or without modification,
@ -41,40 +41,22 @@ namespace WebsitePanel.Portal {
public partial class CRMStorageSettings { public partial class CRMStorageSettings {
/// <summary> /// <summary>
/// breadcrumb control. /// Image2 control.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Breadcrumb breadcrumb; protected global::System.Web.UI.WebControls.Image Image2;
/// <summary> /// <summary>
/// menu control. /// Localize1 control.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Menu menu; protected global::System.Web.UI.WebControls.Localize Localize1;
/// <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> /// <summary>
/// messageBox control. /// messageBox control.

View file

@ -74,7 +74,10 @@
</asp:GridView> </asp:GridView>
</div> </div>
<br /> <br />
<asp:Button runat="server" ID="btnUpdate" Text="Update" meta:resourcekey="btnUpdate" CssClass="Button1" onclick="btnUpdate_Click" /> <asp:Button runat="server" ID="btnUpdate" Text="Save Changes" meta:resourcekey="btnUpdate" CssClass="Button1" onclick="btnUpdate_Click" />
<asp:Button runat="server" ID="btnSaveExit" Text="Save Changes and Exit" CssClass="Button1"
meta:resourcekey="btnSaveExit" OnClick="btnSaveExit_Click"></asp:Button>
</div> </div>
<br /> <br />
</div> </div>

View file

@ -111,7 +111,7 @@ namespace WebsitePanel.Portal.CRM
} }
} }
protected void btnUpdate_Click(object sender, EventArgs e) protected bool SaveSettings()
{ {
try try
{ {
@ -143,13 +143,33 @@ namespace WebsitePanel.Portal.CRM
messageBox.ShowMessage(res, "UPDATE_CRM_USER_ROLES", "HostedCRM"); messageBox.ShowMessage(res, "UPDATE_CRM_USER_ROLES", "HostedCRM");
else else
messageBox.ShowMessage(res, "UPDATE_CRM_USER_ROLES", "HostedCRM"); messageBox.ShowMessage(res, "UPDATE_CRM_USER_ROLES", "HostedCRM");
return res.IsSuccess && res2.IsSuccess;
} }
catch(Exception ex) catch (Exception ex)
{ {
messageBox.ShowErrorMessage("UPDATE_CRM_USER_ROLES", ex); messageBox.ShowErrorMessage("UPDATE_CRM_USER_ROLES", ex);
return false;
}
}
protected void btnUpdate_Click(object sender, EventArgs e)
{
SaveSettings();
}
protected void btnSaveExit_Click(object sender, EventArgs e)
{
if (SaveSettings())
{
Response.Redirect(PortalUtils.EditUrl("ItemID", PanelRequest.ItemID.ToString(),
"CRMUsers",
"SpaceID=" + PanelSecurity.PackageId));
} }
} }
private void ActivateUser() private void ActivateUser()
{ {
ResultObject res = ES.Services.CRM.ChangeUserState(PanelRequest.ItemID, PanelRequest.AccountID, false); ResultObject res = ES.Services.CRM.ChangeUserState(PanelRequest.ItemID, PanelRequest.AccountID, false);

View file

@ -201,5 +201,14 @@ namespace WebsitePanel.Portal.CRM {
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Button btnUpdate; protected global::System.Web.UI.WebControls.Button btnUpdate;
/// <summary>
/// btnSaveExit 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 btnSaveExit;
} }
} }

View file

@ -87,8 +87,16 @@ namespace WebsitePanel.Portal.ExchangeServer
int.TryParse(mailboxPlanSelector.MailboxPlanId, out planId); int.TryParse(mailboxPlanSelector.MailboxPlanId, out planId);
ExchangeMailboxPlan plan = ES.Services.ExchangeServer.GetExchangeMailboxPlan(PanelRequest.ItemID, planId); ExchangeMailboxPlan plan = ES.Services.ExchangeServer.GetExchangeMailboxPlan(PanelRequest.ItemID, planId);
secArchiving.Visible = plan.EnableArchiving; if (plan != null)
secLitigationHoldSettings.Visible = plan.AllowLitigationHold && Utils.CheckQouta(Quotas.EXCHANGE2007_ALLOWLITIGATIONHOLD, Cntx); {
secArchiving.Visible = plan.EnableArchiving;
secLitigationHoldSettings.Visible = plan.AllowLitigationHold && Utils.CheckQouta(Quotas.EXCHANGE2007_ALLOWLITIGATIONHOLD, Cntx);
}
else
{
secArchiving.Visible = false;
secLitigationHoldSettings.Visible = false;
}
} }
private void BindSettings() private void BindSettings()

View file

@ -76,8 +76,10 @@
</asp:Panel> </asp:Panel>
<div class="FormFooterClean"> <div class="FormFooterClean">
<asp:Button runat="server" ID="btnSave" meta:resourcekey="btnSave" ValidationGroup="Validation1" <asp:Button runat="server" ID="btnSave" Text="Save Changes" meta:resourcekey="btnSave" ValidationGroup="Validation1"
CssClass="Button1" onclick="btnSave_Click" /> CssClass="Button1" onclick="btnSave_Click" />
<asp:Button runat="server" ID="btnSaveExit" Text="Save Changes and Exit" meta:resourcekey="btnSaveExit" ValidationGroup="Validation1"
CssClass="Button1" OnClick="btnSaveExit_Click"></asp:Button>
</div> </div>
</div> </div>
</div> </div>

View file

@ -120,10 +120,10 @@ namespace WebsitePanel.Portal.Lync
Utils.SelectListItem(ddlPhoneNumber, lyncUser.LineUri); Utils.SelectListItem(ddlPhoneNumber, lyncUser.LineUri);
} }
protected void btnSave_Click(object sender, EventArgs e) protected bool SaveSettings()
{ {
if (!Page.IsValid) if (!Page.IsValid)
return; return false;
try try
{ {
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId); PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
@ -132,7 +132,7 @@ namespace WebsitePanel.Portal.Lync
string lineUri = ""; string lineUri = "";
if ((enterpriseVoiceQuota) & (ddlPhoneNumber.Items.Count != 0)) lineUri = ddlPhoneNumber.SelectedItem.Text + ":" + tbPin.Text; if ((enterpriseVoiceQuota) & (ddlPhoneNumber.Items.Count != 0)) lineUri = ddlPhoneNumber.SelectedItem.Text + ":" + tbPin.Text;
LyncUserResult res = ES.Services.Lync.SetUserLyncPlan(PanelRequest.ItemID, PanelRequest.AccountID, Convert.ToInt32(planSelector.planId)); LyncUserResult res = ES.Services.Lync.SetUserLyncPlan(PanelRequest.ItemID, PanelRequest.AccountID, Convert.ToInt32(planSelector.planId));
if (res.IsSuccess && res.ErrorCodes.Count == 0) if (res.IsSuccess && res.ErrorCodes.Count == 0)
{ {
res = ES.Services.Lync.SetLyncUserGeneralSettings(PanelRequest.ItemID, PanelRequest.AccountID, lyncUserSettings.sipAddress, lineUri); res = ES.Services.Lync.SetLyncUserGeneralSettings(PanelRequest.ItemID, PanelRequest.AccountID, lyncUserSettings.sipAddress, lineUri);
@ -141,15 +141,36 @@ namespace WebsitePanel.Portal.Lync
if (res.IsSuccess && res.ErrorCodes.Count == 0) if (res.IsSuccess && res.ErrorCodes.Count == 0)
{ {
messageBox.ShowSuccessMessage("UPDATE_LYNC_USER"); messageBox.ShowSuccessMessage("UPDATE_LYNC_USER");
return; return true;
} }
else else
{
messageBox.ShowMessage(res, "UPDATE_LYNC_USER", "LYNC"); messageBox.ShowMessage(res, "UPDATE_LYNC_USER", "LYNC");
return false;
}
} }
catch(Exception ex) catch (Exception ex)
{ {
messageBox.ShowErrorMessage("UPDATE_LYNC_USER", ex); messageBox.ShowErrorMessage("UPDATE_LYNC_USER", ex);
return false;
} }
} }
protected void btnSave_Click(object sender, EventArgs e)
{
SaveSettings();
}
protected void btnSaveExit_Click(object sender, EventArgs e)
{
if (SaveSettings())
{
Response.Redirect(PortalUtils.EditUrl("ItemID", PanelRequest.ItemID.ToString(),
"lync_users",
"SpaceID=" + PanelSecurity.PackageId));
}
}
} }
} }

View file

@ -201,5 +201,14 @@ namespace WebsitePanel.Portal.Lync {
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Button btnSave; protected global::System.Web.UI.WebControls.Button btnSave;
/// <summary>
/// btnSaveExit 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 btnSaveExit;
} }
} }

View file

@ -142,13 +142,16 @@ namespace WebsitePanel.Portal.SkinControls
ModuleControl control = null; ModuleControl control = null;
if (!String.IsNullOrEmpty(ctrlKey) && definition.Controls.ContainsKey(ctrlKey)) if (!String.IsNullOrEmpty(ctrlKey) && definition.Controls.ContainsKey(ctrlKey))
control = definition.Controls[ctrlKey]; control = definition.Controls[ctrlKey];
if (!String.IsNullOrEmpty(control.Src)) if (control != null)
{ {
lnkOrgCurPage.Text = PortalUtils.GetLocalizedString(DM_FOLDER_VIRTUAL_PATH + control.Src, PAGE_NANE_KEY); if (!String.IsNullOrEmpty(control.Src))
lnkOrgCurPage.NavigateUrl = PortalUtils.EditUrl( {
"ItemID", PanelRequest.ItemID.ToString(), ctrlKey, lnkOrgCurPage.Text = PortalUtils.GetLocalizedString(DM_FOLDER_VIRTUAL_PATH + control.Src, PAGE_NANE_KEY);
"SpaceID=" + PanelSecurity.PackageId.ToString()); lnkOrgCurPage.NavigateUrl = PortalUtils.EditUrl(
"ItemID", PanelRequest.ItemID.ToString(), ctrlKey,
"SpaceID=" + PanelSecurity.PackageId.ToString());
}
} }
} }
} }