From 8994a8961186802025d77a8f56cec8a749c8871f Mon Sep 17 00:00:00 2001 From: dev_amdtel Date: Mon, 22 Sep 2014 14:40:58 +0400 Subject: [PATCH 1/3] CRM fix --- .../CRM/CRMOrganizationDetails.ascx | 1 + .../WebsitePanel/CRM/CRMStorageSettings.ascx | 12 ++++---- .../CRM/CRMStorageSettings.ascx.designer.cs | 28 ++++--------------- .../SkinControls/UserSpaceBreadcrumb.ascx.cs | 15 ++++++---- 4 files changed, 20 insertions(+), 36 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/CRM/CRMOrganizationDetails.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/CRM/CRMOrganizationDetails.ascx index 59a9ee9a..7506e532 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/CRM/CRMOrganizationDetails.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/CRM/CRMOrganizationDetails.ascx @@ -68,4 +68,5 @@ + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/CRM/CRMStorageSettings.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/CRM/CRMStorageSettings.ascx index abd05874..e8295116 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/CRM/CRMStorageSettings.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/CRM/CRMStorageSettings.ascx @@ -16,20 +16,18 @@
-
- -
- -
+
- - + +
+ + diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/CRM/CRMStorageSettings.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/CRM/CRMStorageSettings.ascx.designer.cs index 8a2ab7c2..c4567469 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/CRM/CRMStorageSettings.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/CRM/CRMStorageSettings.ascx.designer.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2012, Outercurve Foundation. +// Copyright (c) 2014, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -41,40 +41,22 @@ namespace WebsitePanel.Portal { public partial class CRMStorageSettings { /// - /// breadcrumb control. + /// Image2 control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Breadcrumb breadcrumb; + protected global::System.Web.UI.WebControls.Image Image2; /// - /// menu control. + /// Localize1 control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Menu menu; - - /// - /// Image1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Image Image1; - - /// - /// locTitle control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Localize locTitle; + protected global::System.Web.UI.WebControls.Localize Localize1; /// /// messageBox control. diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SkinControls/UserSpaceBreadcrumb.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SkinControls/UserSpaceBreadcrumb.ascx.cs index fd95d81b..fd3241e3 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SkinControls/UserSpaceBreadcrumb.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SkinControls/UserSpaceBreadcrumb.ascx.cs @@ -142,13 +142,16 @@ namespace WebsitePanel.Portal.SkinControls ModuleControl control = null; if (!String.IsNullOrEmpty(ctrlKey) && definition.Controls.ContainsKey(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); - lnkOrgCurPage.NavigateUrl = PortalUtils.EditUrl( - "ItemID", PanelRequest.ItemID.ToString(), ctrlKey, - "SpaceID=" + PanelSecurity.PackageId.ToString()); + if (!String.IsNullOrEmpty(control.Src)) + { + lnkOrgCurPage.Text = PortalUtils.GetLocalizedString(DM_FOLDER_VIRTUAL_PATH + control.Src, PAGE_NANE_KEY); + lnkOrgCurPage.NavigateUrl = PortalUtils.EditUrl( + "ItemID", PanelRequest.ItemID.ToString(), ctrlKey, + "SpaceID=" + PanelSecurity.PackageId.ToString()); + } } } } From cf0092bc9f0be16990024f335c028f8f89b9a49b Mon Sep 17 00:00:00 2001 From: dev_amdtel Date: Mon, 22 Sep 2014 17:00:52 +0400 Subject: [PATCH 2/3] Exchange fix --- .../ExchangeMailboxGeneralSettings.ascx.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx.cs index b1b1b90d..3559990d 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx.cs @@ -87,8 +87,16 @@ namespace WebsitePanel.Portal.ExchangeServer int.TryParse(mailboxPlanSelector.MailboxPlanId, out planId); ExchangeMailboxPlan plan = ES.Services.ExchangeServer.GetExchangeMailboxPlan(PanelRequest.ItemID, planId); - secArchiving.Visible = plan.EnableArchiving; - secLitigationHoldSettings.Visible = plan.AllowLitigationHold && Utils.CheckQouta(Quotas.EXCHANGE2007_ALLOWLITIGATIONHOLD, Cntx); + if (plan != null) + { + secArchiving.Visible = plan.EnableArchiving; + secLitigationHoldSettings.Visible = plan.AllowLitigationHold && Utils.CheckQouta(Quotas.EXCHANGE2007_ALLOWLITIGATIONHOLD, Cntx); + } + else + { + secArchiving.Visible = false; + secLitigationHoldSettings.Visible = false; + } } private void BindSettings() From 87638b08dd869d0787006675aa05ae8540c370e4 Mon Sep 17 00:00:00 2001 From: dev_amdtel Date: Mon, 22 Sep 2014 23:18:12 +0400 Subject: [PATCH 3/3] New Button "Save Changes and Exit" in Lync, Blackberry, CRM edit user --- .../BlackBerry/EditBlackBerryUser.ascx | 8 ++++- .../BlackBerry/EditBlackBerryUser.ascx.cs | 8 +++++ .../EditBlackBerryUser.ascx.designer.cs | 9 ++++++ .../WebsitePanel/CRM/CRMUserRoles.ascx | 5 ++- .../WebsitePanel/CRM/CRMUserRoles.ascx.cs | 24 ++++++++++++-- .../CRM/CRMUserRoles.ascx.designer.cs | 9 ++++++ .../WebsitePanel/Lync/LyncEditUser.ascx | 4 ++- .../WebsitePanel/Lync/LyncEditUser.ascx.cs | 31 ++++++++++++++++--- .../Lync/LyncEditUser.ascx.designer.cs | 9 ++++++ 9 files changed, 97 insertions(+), 10 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/BlackBerry/EditBlackBerryUser.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/BlackBerry/EditBlackBerryUser.ascx index cf471fd5..a8656d0d 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/BlackBerry/EditBlackBerryUser.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/BlackBerry/EditBlackBerryUser.ascx @@ -79,7 +79,13 @@ -
+
+ + +
+ +
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/BlackBerry/EditBlackBerryUser.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/BlackBerry/EditBlackBerryUser.ascx.cs index 75009c70..e2ebccb7 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/BlackBerry/EditBlackBerryUser.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/BlackBerry/EditBlackBerryUser.ascx.cs @@ -113,5 +113,13 @@ namespace WebsitePanel.Portal.BlackBerry 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)); + } + } } \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/BlackBerry/EditBlackBerryUser.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/BlackBerry/EditBlackBerryUser.ascx.designer.cs index f5a8990f..0c2cd62b 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/BlackBerry/EditBlackBerryUser.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/BlackBerry/EditBlackBerryUser.ascx.designer.cs @@ -201,5 +201,14 @@ namespace WebsitePanel.Portal.BlackBerry { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Button btnDeleteData; + + /// + /// btnSaveExit control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button btnSaveExit; } } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/CRM/CRMUserRoles.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/CRM/CRMUserRoles.ascx index c459e1e0..48e4eb9b 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/CRM/CRMUserRoles.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/CRM/CRMUserRoles.ascx @@ -74,7 +74,10 @@
- + + +
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/CRM/CRMUserRoles.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/CRM/CRMUserRoles.ascx.cs index 42d8e322..3b0dce88 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/CRM/CRMUserRoles.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/CRM/CRMUserRoles.ascx.cs @@ -111,7 +111,7 @@ namespace WebsitePanel.Portal.CRM } } - protected void btnUpdate_Click(object sender, EventArgs e) + protected bool SaveSettings() { try { @@ -143,13 +143,33 @@ namespace WebsitePanel.Portal.CRM messageBox.ShowMessage(res, "UPDATE_CRM_USER_ROLES", "HostedCRM"); else 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); + 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() { ResultObject res = ES.Services.CRM.ChangeUserState(PanelRequest.ItemID, PanelRequest.AccountID, false); diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/CRM/CRMUserRoles.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/CRM/CRMUserRoles.ascx.designer.cs index daf2a410..5f239716 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/CRM/CRMUserRoles.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/CRM/CRMUserRoles.ascx.designer.cs @@ -201,5 +201,14 @@ namespace WebsitePanel.Portal.CRM { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Button btnUpdate; + + /// + /// btnSaveExit control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button btnSaveExit; } } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncEditUser.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncEditUser.ascx index 4fe26b8b..03bc7e38 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncEditUser.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncEditUser.ascx @@ -76,8 +76,10 @@
- +
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncEditUser.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncEditUser.ascx.cs index 35caed3c..33301c5f 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncEditUser.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncEditUser.ascx.cs @@ -120,10 +120,10 @@ namespace WebsitePanel.Portal.Lync Utils.SelectListItem(ddlPhoneNumber, lyncUser.LineUri); } - protected void btnSave_Click(object sender, EventArgs e) + protected bool SaveSettings() { if (!Page.IsValid) - return; + return false; try { PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId); @@ -132,7 +132,7 @@ namespace WebsitePanel.Portal.Lync string lineUri = ""; 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) { 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) { messageBox.ShowSuccessMessage("UPDATE_LYNC_USER"); - return; + return true; } else + { messageBox.ShowMessage(res, "UPDATE_LYNC_USER", "LYNC"); + return false; + } } - catch(Exception ex) + catch (Exception 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)); + } + } + + } } \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncEditUser.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncEditUser.ascx.designer.cs index ab351ec6..b693419b 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncEditUser.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncEditUser.ascx.designer.cs @@ -201,5 +201,14 @@ namespace WebsitePanel.Portal.Lync { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Button btnSave; + + /// + /// btnSaveExit control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button btnSaveExit; } }