From f4c5e0a7ea6ea6d66a5870611177f5523d2f7da2 Mon Sep 17 00:00:00 2001 From: dev_amdtel Date: Mon, 22 Jul 2013 17:31:52 +0400 Subject: [PATCH] wsp-10027 Organization Users - Add "Member Of" Tab to allow management of Distribution Group Management Allow management and Display of Distribution Group Management. Tab "Member Of" added not only to the "Organization Users" but also to "Exchange Mailboxes" and "Exchange Distribution Lists". --- WebsitePanel/Sources/VersionInfo.vb | 30 +--- .../ExchangeServerProxy.cs | 31 ++++ .../ExchangeServerController.cs | 164 ++++++++++++++++++ .../esExchangeServer.asmx.cs | 19 ++ .../App_Data/WebsitePanel_Modules.config | 6 +- ...ExchangeDistributionListMemberOf.ascx.resx | 135 ++++++++++++++ .../ExchangeMailboxMemberOf.ascx.resx | 135 ++++++++++++++ .../OrganizationUserMemberOf.ascx.resx | 135 ++++++++++++++ .../ExchangeDisclaimerGeneralSettings.ascx | 1 - ...DisclaimerGeneralSettings.ascx.designer.cs | 122 +++++-------- .../ExchangeDisclaimers.ascx.cs | 2 +- .../ExchangeDistributionListMemberOf.ascx | 57 ++++++ .../ExchangeDistributionListMemberOf.ascx.cs | 114 ++++++++++++ ...eDistributionListMemberOf.ascx.designer.cs | 141 +++++++++++++++ .../ExchangeMailboxMemberOf.ascx | 60 +++++++ .../ExchangeMailboxMemberOf.ascx.cs | 110 ++++++++++++ .../ExchangeMailboxMemberOf.ascx.designer.cs | 141 +++++++++++++++ .../OrganizationUserMemberOf.ascx | 70 ++++++++ .../OrganizationUserMemberOf.ascx.cs | 109 ++++++++++++ .../OrganizationUserMemberOf.ascx.designer.cs | 150 ++++++++++++++++ .../DistributionListTabs.ascx.resx | 3 + .../App_LocalResources/MailboxTabs.ascx.resx | 3 + .../App_LocalResources/UserTabs.ascx.resx | 3 + .../UserControls/DistributionListTabs.ascx.cs | 8 + .../UserControls/MailboxTabs.ascx.cs | 6 +- .../UserControls/UserTabs.ascx.cs | 7 + .../WebsitePanel.Portal.Modules.csproj | 28 ++- 27 files changed, 1680 insertions(+), 110 deletions(-) create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeDistributionListMemberOf.ascx.resx create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeMailboxMemberOf.ascx.resx create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationUserMemberOf.ascx.resx create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDistributionListMemberOf.ascx create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDistributionListMemberOf.ascx.cs create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDistributionListMemberOf.ascx.designer.cs create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxMemberOf.ascx create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxMemberOf.ascx.cs create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxMemberOf.ascx.designer.cs create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserMemberOf.ascx create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserMemberOf.ascx.cs create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserMemberOf.ascx.designer.cs diff --git a/WebsitePanel/Sources/VersionInfo.vb b/WebsitePanel/Sources/VersionInfo.vb index b9674aab..6c033d5e 100644 --- a/WebsitePanel/Sources/VersionInfo.vb +++ b/WebsitePanel/Sources/VersionInfo.vb @@ -1,32 +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. - -'------------------------------------------------------------------------------ +'------------------------------------------------------------------------------ ' ' This code was generated by a tool. ' Runtime Version:4.0.30319.18033 diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ExchangeServerProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ExchangeServerProxy.cs index 71295d4e..c2434558 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ExchangeServerProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ExchangeServerProxy.cs @@ -5495,6 +5495,37 @@ namespace WebsitePanel.EnterpriseServer } } + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetDistributionListsByMember", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeAccount[] GetDistributionListsByMember(int itemId, int accountId) + { + object[] results = this.Invoke("GetDistributionListsByMember", new object[] { + itemId, + accountId}); + return ((ExchangeAccount[])(results[0])); + } + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddDistributionListMember", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int AddDistributionListMember(int itemId, string distributionListName, int memberId) + { + object[] results = this.Invoke("AddDistributionListMember", new object[] { + itemId, + distributionListName, + memberId}); + return ((int)(results[0])); + } + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteDistributionListMember", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DeleteDistributionListMember(int itemId, string distributionListName, int memberId) + { + object[] results = this.Invoke("DeleteDistributionListMember", new object[] { + itemId, + distributionListName, + memberId}); + return ((int)(results[0])); + } + + /// [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMobileDevices", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] public ExchangeMobileDevice[] GetMobileDevices(int itemId, int accountId) diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/ExchangeServer/ExchangeServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/ExchangeServer/ExchangeServerController.cs index c75be2e8..c15f832c 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/ExchangeServer/ExchangeServerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/ExchangeServer/ExchangeServerController.cs @@ -3952,6 +3952,170 @@ namespace WebsitePanel.EnterpriseServer return res; } + public static ExchangeAccount[] GetDistributionListsByMember(int itemId, int accountId) + { + #region Demo Mode + if (IsDemoMode) + { + return null; + } + #endregion + + // place log record + TaskManager.StartTask("EXCHANGE", "GET_DISTR_LIST_BYMEMBER"); + TaskManager.ItemId = itemId; + + List ret = new List(); + + try + { + // load organization + Organization org = GetOrganization(itemId); + if (org == null) + return null; + + int exchangeServiceId = GetExchangeServiceID(org.PackageId); + ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); + + // load account + ExchangeAccount account = GetAccount(itemId, accountId); + + List DistributionLists = GetAccounts(itemId, ExchangeAccountType.DistributionList); + foreach (ExchangeAccount DistributionAccount in DistributionLists) + { + ExchangeDistributionList DistributionList = exchange.GetDistributionListGeneralSettings(DistributionAccount.AccountName); + + foreach (ExchangeAccount member in DistributionList.MembersAccounts) + { + if (member.AccountName == account.AccountName) + { + ret.Add(DistributionAccount); + break; + } + + } + } + + return ret.ToArray(); + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + } + + public static int AddDistributionListMember(int itemId, string distributionListName, int memberId) + { + #region Demo Mode + if (IsDemoMode) + { + return 0; + } + #endregion + + // place log record + TaskManager.StartTask("EXCHANGE", "ADD_DISTR_LIST_MEMBER"); + TaskManager.ItemId = itemId; + + try + { + // load organization + Organization org = GetOrganization(itemId); + if (org == null) + return 0; + + // load account + ExchangeAccount memberAccount = GetAccount(itemId, memberId); + + int exchangeServiceId = GetExchangeServiceID(org.PackageId); + ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); + + ExchangeDistributionList distributionList = exchange.GetDistributionListGeneralSettings(distributionListName); + + List members = new List(); + foreach (ExchangeAccount member in distributionList.MembersAccounts) + members.Add(member.AccountName); + members.Add(memberAccount.AccountName); + + List addressLists = new List(); + addressLists.Add(org.GlobalAddressList); + addressLists.Add(org.AddressList); + + exchange.SetDistributionListGeneralSettings(distributionListName, distributionList.DisplayName, distributionList.HideFromAddressBook, distributionList.ManagerAccount.AccountName, + members.ToArray(), + distributionList.Notes, addressLists.ToArray()); + + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + + return 0; + } + + public static int DeleteDistributionListMember(int itemId, string distributionListName, int memberId) + { + #region Demo Mode + if (IsDemoMode) + { + return 0; + } + #endregion + + // place log record + TaskManager.StartTask("EXCHANGE", "DELETE_DISTR_LIST_MEMBER"); + TaskManager.ItemId = itemId; + + try + { + // load organization + Organization org = GetOrganization(itemId); + if (org == null) + return 0; + + // load account + ExchangeAccount memberAccount = GetAccount(itemId, memberId); + + int exchangeServiceId = GetExchangeServiceID(org.PackageId); + ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); + + ExchangeDistributionList distributionList = exchange.GetDistributionListGeneralSettings(distributionListName); + + List members = new List(); + foreach (ExchangeAccount member in distributionList.MembersAccounts) + if (member.AccountName != memberAccount.AccountName) members.Add(member.AccountName); + + List addressLists = new List(); + addressLists.Add(org.GlobalAddressList); + addressLists.Add(org.AddressList); + + exchange.SetDistributionListGeneralSettings(distributionListName, distributionList.DisplayName, distributionList.HideFromAddressBook, distributionList.ManagerAccount.AccountName, + members.ToArray(), + distributionList.Notes, addressLists.ToArray()); + + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + + return 0; + } + + #endregion #region Public Folders diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esExchangeServer.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esExchangeServer.asmx.cs index 8b5ddff7..0d43f107 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esExchangeServer.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esExchangeServer.asmx.cs @@ -470,6 +470,25 @@ namespace WebsitePanel.EnterpriseServer return ExchangeServerController.GetDistributionListPermissions(itemId, accountId); } + [WebMethod] + public ExchangeAccount[] GetDistributionListsByMember(int itemId, int accountId) + { + return ExchangeServerController.GetDistributionListsByMember(itemId, accountId); + } + + [WebMethod] + public int AddDistributionListMember(int itemId, string distributionListName, int memberId) + { + return ExchangeServerController.AddDistributionListMember(itemId, distributionListName, memberId); + } + + [WebMethod] + public int DeleteDistributionListMember(int itemId, string distributionListName, int memberId) + { + return ExchangeServerController.DeleteDistributionListMember(itemId, distributionListName, memberId); + } + + #endregion #region MobileDevice diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Modules.config b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Modules.config index 14931af0..63db8671 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Modules.config +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Modules.config @@ -473,7 +473,11 @@ - + + + + + diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeDistributionListMemberOf.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeDistributionListMemberOf.ascx.resx new file mode 100644 index 00000000..f4f15196 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeDistributionListMemberOf.ascx.resx @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ShowProgressDialog('Updating...'); + + + Save Changes + + + Edit Distribution List + + + General + + + Distribution Lists + + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeMailboxMemberOf.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeMailboxMemberOf.ascx.resx new file mode 100644 index 00000000..c243cc33 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeMailboxMemberOf.ascx.resx @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ShowProgressDialog('Updating...'); + + + Save Changes + + + Edit Mailbox + + + General + + + Mailboxes + + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationUserMemberOf.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationUserMemberOf.ascx.resx new file mode 100644 index 00000000..81ca9211 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationUserMemberOf.ascx.resx @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ShowProgressDialog('Updating...'); + + + Save Changes + + + Edit User + + + General + + + Users + + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDisclaimerGeneralSettings.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDisclaimerGeneralSettings.ascx index 3981e8f3..cdbf314c 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDisclaimerGeneralSettings.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDisclaimerGeneralSettings.ascx @@ -2,7 +2,6 @@ <%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %> <%@ Register Src="UserControls/AccountsList.ascx" TagName="AccountsList" TagPrefix="wsp" %> <%@ Register Src="UserControls/MailboxSelector.ascx" TagName="MailboxSelector" TagPrefix="wsp" %> -<%@ Register Src="UserControls/DistributionListTabs.ascx" TagName="DistributionListTabs" TagPrefix="wsp" %> <%@ Register Src="UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %> <%@ Register Src="UserControls/Breadcrumb.ascx" TagName="Breadcrumb" TagPrefix="wsp" %> <%@ Register TagPrefix="wsp" TagName="CollapsiblePanel" Src="../UserControls/CollapsiblePanel.ascx" %> diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDisclaimerGeneralSettings.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDisclaimerGeneralSettings.ascx.designer.cs index 1e599b49..accdff07 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDisclaimerGeneralSettings.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDisclaimerGeneralSettings.ascx.designer.cs @@ -1,38 +1,10 @@ -// 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. - //------------------------------------------------------------------------------ -// -// This code was generated by a tool. +// <àâòîìàòè÷åñêè ñîçäàâàåìîå> +// Ýòîò êîä ñîçäàí ïðîãðàììîé. // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// +// Èçìåíåíèÿ â ýòîì ôàéëå ìîãóò ïðèâåñòè ê íåïðàâèëüíîé ðàáîòå è áóäóò ïîòåðÿíû â ñëó÷àå +// ïîâòîðíîé ãåíåðàöèè êîäà. +// //------------------------------------------------------------------------------ namespace WebsitePanel.Portal.ExchangeServer { @@ -41,128 +13,128 @@ namespace WebsitePanel.Portal.ExchangeServer { public partial class ExchangeDisclaimerGeneralSettings { /// - /// asyncTasks control. + /// asyncTasks ýëåìåíò óïðàâëåíèÿ. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. /// protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks; /// - /// breadcrumb control. + /// breadcrumb ýëåìåíò óïðàâëåíèÿ. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. /// protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Breadcrumb breadcrumb; /// - /// menu control. + /// menu ýëåìåíò óïðàâëåíèÿ. /// /// - /// 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. + /// Image1 ýëåìåíò óïðàâëåíèÿ. /// /// - /// 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. + /// locTitle ýëåìåíò óïðàâëåíèÿ. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. /// protected global::System.Web.UI.WebControls.Localize locTitle; /// - /// litDisplayName control. + /// litDisplayName ýëåìåíò óïðàâëåíèÿ. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. /// protected global::System.Web.UI.WebControls.Literal litDisplayName; /// - /// messageBox control. + /// messageBox ýëåìåíò óïðàâëåíèÿ. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. /// protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox; /// - /// locDisplayName control. + /// locDisplayName ýëåìåíò óïðàâëåíèÿ. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. /// protected global::System.Web.UI.WebControls.Localize locDisplayName; /// - /// txtDisplayName control. + /// txtDisplayName ýëåìåíò óïðàâëåíèÿ. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. /// protected global::System.Web.UI.WebControls.TextBox txtDisplayName; /// - /// valRequireDisplayName control. + /// valRequireDisplayName ýëåìåíò óïðàâëåíèÿ. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. /// protected global::System.Web.UI.WebControls.RequiredFieldValidator valRequireDisplayName; /// - /// locNotes control. + /// locNotes ýëåìåíò óïðàâëåíèÿ. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. /// protected global::System.Web.UI.WebControls.Localize locNotes; /// - /// txtNotes control. + /// txtNotes ýëåìåíò óïðàâëåíèÿ. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. /// protected global::System.Web.UI.WebControls.TextBox txtNotes; /// - /// btnSave control. + /// btnSave ýëåìåíò óïðàâëåíèÿ. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. /// protected global::System.Web.UI.WebControls.Button btnSave; /// - /// ValidationSummary1 control. + /// ValidationSummary1 ýëåìåíò óïðàâëåíèÿ. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. /// protected global::System.Web.UI.WebControls.ValidationSummary ValidationSummary1; } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDisclaimers.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDisclaimers.ascx.cs index 392d69b8..363cd97d 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDisclaimers.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDisclaimers.ascx.cs @@ -96,7 +96,7 @@ namespace WebsitePanel.Portal.ExchangeServer { if (e.CommandName == "DeleteItem") { - // delete distribution list + int accountId = Utils.ParseInt(e.CommandArgument.ToString(), 0); try diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDistributionListMemberOf.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDistributionListMemberOf.ascx new file mode 100644 index 00000000..3ee22461 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDistributionListMemberOf.ascx @@ -0,0 +1,57 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ExchangeDistributionListMemberOf.ascx.cs" Inherits="WebsitePanel.Portal.ExchangeServer.ExchangeDistributionListMemberOf" %> +<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %> +<%@ Register Src="UserControls/AccountsList.ascx" TagName="AccountsList" TagPrefix="wsp" %> +<%@ Register Src="UserControls/MailboxSelector.ascx" TagName="MailboxSelector" TagPrefix="wsp" %> +<%@ Register Src="UserControls/DistributionListTabs.ascx" TagName="DistributionListTabs" TagPrefix="wsp" %> +<%@ Register Src="UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %> +<%@ Register Src="UserControls/Breadcrumb.ascx" TagName="Breadcrumb" TagPrefix="wsp" %> +<%@ Register TagPrefix="wsp" TagName="CollapsiblePanel" Src="../UserControls/CollapsiblePanel.ascx" %> +<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %> + + + +
+
+
+ +
+
+ +
+
+
+
+ + + - + +
+
+ + + + + + + + + + + + + + + +
+ + +
+
+
+
+
+
\ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDistributionListMemberOf.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDistributionListMemberOf.ascx.cs new file mode 100644 index 00000000..0a9340e4 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDistributionListMemberOf.ascx.cs @@ -0,0 +1,114 @@ +// 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. + +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Collections.Generic; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +using WebsitePanel.Providers.HostedSolution; +using WebsitePanel.EnterpriseServer; + +namespace WebsitePanel.Portal.ExchangeServer +{ + public partial class ExchangeDistributionListMemberOf : WebsitePanelModuleBase + { + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + BindSettings(); + } + + + } + + private void BindSettings() + { + try + { + // get settings + ExchangeDistributionList dlist = ES.Services.ExchangeServer.GetDistributionListGeneralSettings( + PanelRequest.ItemID, PanelRequest.AccountID); + + litDisplayName.Text = PortalAntiXSS.Encode(dlist.DisplayName); + + ExchangeAccount[] dLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID); + + distrlists.SetAccounts(dLists); + + } + catch (Exception ex) + { + messageBox.ShowErrorMessage("EXCHANGE_GET_DLIST_SETTINGS", ex); + } + } + + private void SaveSettings() + { + if (!Page.IsValid) + return; + + try + { + ExchangeAccount[] oldDistributionLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID); + List newDistributionLists = new List(distrlists.GetAccounts()); + foreach (ExchangeAccount oldlist in oldDistributionLists) + { + if (newDistributionLists.Contains(oldlist.AccountName)) + newDistributionLists.Remove(oldlist.AccountName); + else + ES.Services.ExchangeServer.DeleteDistributionListMember(PanelRequest.ItemID, oldlist.AccountName, PanelRequest.AccountID); + } + + foreach (string newlist in newDistributionLists) + ES.Services.ExchangeServer.AddDistributionListMember(PanelRequest.ItemID, newlist, PanelRequest.AccountID); + + messageBox.ShowSuccessMessage("EXCHANGE_UPDATE_DLIST_SETTINGS"); + BindSettings(); + } + catch (Exception ex) + { + messageBox.ShowErrorMessage("EXCHANGE_UPDATE_DLIST_SETTINGS", ex); + } + } + + protected void btnSave_Click(object sender, EventArgs e) + { + SaveSettings(); + } + + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDistributionListMemberOf.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDistributionListMemberOf.ascx.designer.cs new file mode 100644 index 00000000..3c50b37b --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDistributionListMemberOf.ascx.designer.cs @@ -0,0 +1,141 @@ +//------------------------------------------------------------------------------ +// <àâòîìàòè÷åñêè ñîçäàâàåìîå> +// Ýòîò êîä ñîçäàí ïðîãðàììîé. +// +// Èçìåíåíèÿ â ýòîì ôàéëå ìîãóò ïðèâåñòè ê íåïðàâèëüíîé ðàáîòå è áóäóò ïîòåðÿíû â ñëó÷àå +// ïîâòîðíîé ãåíåðàöèè êîäà. +// +//------------------------------------------------------------------------------ + +namespace WebsitePanel.Portal.ExchangeServer { + + + public partial class ExchangeDistributionListMemberOf { + + /// + /// asyncTasks ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks; + + /// + /// breadcrumb ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Breadcrumb breadcrumb; + + /// + /// menu ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Menu menu; + + /// + /// Image1 ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::System.Web.UI.WebControls.Image Image1; + + /// + /// locTitle ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::System.Web.UI.WebControls.Localize locTitle; + + /// + /// litDisplayName ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::System.Web.UI.WebControls.Literal litDisplayName; + + /// + /// tabs ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::WebsitePanel.Portal.ExchangeServer.UserControls.DistributionListTabs tabs; + + /// + /// messageBox ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox; + + /// + /// secDistributionLists ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::WebsitePanel.Portal.CollapsiblePanel secDistributionLists; + + /// + /// DistributionLists ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::System.Web.UI.WebControls.Panel DistributionLists; + + /// + /// GeneralUpdatePanel ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::System.Web.UI.UpdatePanel GeneralUpdatePanel; + + /// + /// distrlists ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::WebsitePanel.Portal.ExchangeServer.UserControls.AccountsList distrlists; + + /// + /// btnSave ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::System.Web.UI.WebControls.Button btnSave; + + /// + /// ValidationSummary1 ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::System.Web.UI.WebControls.ValidationSummary ValidationSummary1; + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxMemberOf.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxMemberOf.ascx new file mode 100644 index 00000000..aa56e6a5 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxMemberOf.ascx @@ -0,0 +1,60 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ExchangeMailboxMemberOf.ascx.cs" Inherits="WebsitePanel.Portal.ExchangeServer.ExchangeMailboxMemberOf" %> +<%@ Register Src="UserControls/CountrySelector.ascx" TagName="CountrySelector" TagPrefix="wsp" %> +<%@ Register Src="UserControls/AccountsList.ascx" TagName="AccountsList" TagPrefix="wsp" %> +<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %> +<%@ Register Src="UserControls/MailboxTabs.ascx" TagName="MailboxTabs" TagPrefix="wsp" %> +<%@ Register Src="UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %> +<%@ Register Src="UserControls/Breadcrumb.ascx" TagName="Breadcrumb" TagPrefix="wsp" %> +<%@ Register TagPrefix="wsp" TagName="CollapsiblePanel" Src="../UserControls/CollapsiblePanel.ascx" %> +<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %> +<%@ Register Src="UserControls/MailboxPlanSelector.ascx" TagName="MailboxPlanSelector" TagPrefix="wsp" %> +<%@ Register Src="../UserControls/QuotaViewer.ascx" TagName="QuotaViewer" TagPrefix="wsp" %> + + + +
+
+
+ +
+
+ +
+
+
+
+ + + - + +
+
+ + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
+
\ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxMemberOf.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxMemberOf.ascx.cs new file mode 100644 index 00000000..1dedb147 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxMemberOf.ascx.cs @@ -0,0 +1,110 @@ +// 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. + +using System; +using System.Collections.Generic; +using WebsitePanel.Providers.HostedSolution; +using WebsitePanel.EnterpriseServer; + +namespace WebsitePanel.Portal.ExchangeServer +{ + public partial class ExchangeMailboxMemberOf : WebsitePanelModuleBase + { + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId); + + BindSettings(); + + UserInfo user = UsersHelper.GetUser(PanelSecurity.EffectiveUserId); + + } + + } + + private void BindSettings() + { + try + { + // get settings + ExchangeMailbox mailbox = ES.Services.ExchangeServer.GetMailboxGeneralSettings(PanelRequest.ItemID, + PanelRequest.AccountID); + + // title + litDisplayName.Text = mailbox.DisplayName; + + ExchangeAccount[] dLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID); + + distrlists.SetAccounts(dLists); + + } + catch (Exception ex) + { + messageBox.ShowErrorMessage("EXCHANGE_GET_MAILBOX_SETTINGS", ex); + } + } + + private void SaveSettings() + { + if (!Page.IsValid) + return; + + try + { + ExchangeAccount[] oldDistributionLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID); + List newDistributionLists = new List(distrlists.GetAccounts()); + foreach (ExchangeAccount oldlist in oldDistributionLists) + { + if (newDistributionLists.Contains(oldlist.AccountName)) + newDistributionLists.Remove(oldlist.AccountName); + else + ES.Services.ExchangeServer.DeleteDistributionListMember(PanelRequest.ItemID, oldlist.AccountName, PanelRequest.AccountID); + } + + foreach (string newlist in newDistributionLists) + ES.Services.ExchangeServer.AddDistributionListMember(PanelRequest.ItemID, newlist, PanelRequest.AccountID); + + messageBox.ShowSuccessMessage("EXCHANGE_UPDATE_MAILBOX_SETTINGS"); + BindSettings(); + } + catch (Exception ex) + { + messageBox.ShowErrorMessage("EXCHANGE_UPDATE_MAILBOX_SETTINGS", ex); + } + } + + protected void btnSave_Click(object sender, EventArgs e) + { + SaveSettings(); + } + + + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxMemberOf.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxMemberOf.ascx.designer.cs new file mode 100644 index 00000000..ce00c4d0 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxMemberOf.ascx.designer.cs @@ -0,0 +1,141 @@ +//------------------------------------------------------------------------------ +// <àâòîìàòè÷åñêè ñîçäàâàåìîå> +// Ýòîò êîä ñîçäàí ïðîãðàììîé. +// +// Èçìåíåíèÿ â ýòîì ôàéëå ìîãóò ïðèâåñòè ê íåïðàâèëüíîé ðàáîòå è áóäóò ïîòåðÿíû â ñëó÷àå +// ïîâòîðíîé ãåíåðàöèè êîäà. +// +//------------------------------------------------------------------------------ + +namespace WebsitePanel.Portal.ExchangeServer { + + + public partial class ExchangeMailboxMemberOf { + + /// + /// asyncTasks ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks; + + /// + /// breadcrumb ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Breadcrumb breadcrumb; + + /// + /// menu ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Menu menu; + + /// + /// Image1 ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::System.Web.UI.WebControls.Image Image1; + + /// + /// locTitle ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::System.Web.UI.WebControls.Localize locTitle; + + /// + /// litDisplayName ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::System.Web.UI.WebControls.Literal litDisplayName; + + /// + /// tabs ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::WebsitePanel.Portal.ExchangeServer.UserControls.MailboxTabs tabs; + + /// + /// messageBox ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox; + + /// + /// secDistributionLists ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::WebsitePanel.Portal.CollapsiblePanel secDistributionLists; + + /// + /// DistributionLists ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::System.Web.UI.WebControls.Panel DistributionLists; + + /// + /// GeneralUpdatePanel ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::System.Web.UI.UpdatePanel GeneralUpdatePanel; + + /// + /// distrlists ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::WebsitePanel.Portal.ExchangeServer.UserControls.AccountsList distrlists; + + /// + /// btnSave ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::System.Web.UI.WebControls.Button btnSave; + + /// + /// ValidationSummary1 ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::System.Web.UI.WebControls.ValidationSummary ValidationSummary1; + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserMemberOf.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserMemberOf.ascx new file mode 100644 index 00000000..b2479926 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserMemberOf.ascx @@ -0,0 +1,70 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="OrganizationUserMemberOf.ascx.cs" Inherits="WebsitePanel.Portal.HostedSolution.UserMemberOf" %> +<%@ Register Src="UserControls/UserSelector.ascx" TagName="UserSelector" TagPrefix="wsp" %> +<%@ Register Src="UserControls/CountrySelector.ascx" TagName="CountrySelector" TagPrefix="wsp" %> +<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %> + +<%@ Register Src="../UserControls/PasswordControl.ascx" TagName="PasswordControl" TagPrefix="wsp" %> +<%@ Register Src="../UserControls/CollapsiblePanel.ascx" TagName="CollapsiblePanel" TagPrefix="wsp" %> +<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %> +<%@ Register Src="UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %> +<%@ Register Src="UserControls/Breadcrumb.ascx" TagName="Breadcrumb" TagPrefix="wsp" %> +<%@ Register Src="UserControls/EmailAddress.ascx" TagName="EmailAddress" TagPrefix="wsp" %> +<%@ Register Src="UserControls/AccountsList.ascx" TagName="AccountsList" TagPrefix="wsp" %> + + + +<%@ Register src="UserControls/UserTabs.ascx" tagname="UserTabs" tagprefix="uc1" %> +<%@ Register src="UserControls/MailboxTabs.ascx" tagname="MailboxTabs" tagprefix="uc1" %> + + + + + +
+
+
+ +
+
+ +
+
+
+
+ + + - + +
+ +
+ + + + + + + + + + + + + + + + +
+ + +
+
+
+
+
+
\ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserMemberOf.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserMemberOf.ascx.cs new file mode 100644 index 00000000..e105b864 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserMemberOf.ascx.cs @@ -0,0 +1,109 @@ +// 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. + +using System; +using System.Web.UI.WebControls; +using System.Collections.Generic; +using WebsitePanel.EnterpriseServer; +using WebsitePanel.Providers.HostedSolution; +using WebsitePanel.Providers.ResultObjects; + +namespace WebsitePanel.Portal.HostedSolution +{ + public partial class UserMemberOf : WebsitePanelModuleBase + { + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + BindSettings(); + + MailboxTabsId.Visible = (PanelRequest.Context == "Mailbox"); + UserTabsId.Visible = (PanelRequest.Context == "User"); + } + } + + private void BindSettings() + { + try + { + // get settings + ExchangeMailbox mailbox = ES.Services.ExchangeServer.GetMailboxGeneralSettings(PanelRequest.ItemID, + PanelRequest.AccountID); + + // title + litDisplayName.Text = mailbox.DisplayName; + + ExchangeAccount[] dLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID); + + distrlists.SetAccounts(dLists); + + } + catch (Exception ex) + { + messageBox.ShowErrorMessage("EXCHANGE_GET_MAILBOX_SETTINGS", ex); + } + } + + private void SaveSettings() + { + if (!Page.IsValid) + return; + + try + { + ExchangeAccount[] oldDistributionLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID); + List newDistributionLists = new List(distrlists.GetAccounts()); + foreach (ExchangeAccount oldlist in oldDistributionLists) + { + if (newDistributionLists.Contains(oldlist.AccountName)) + newDistributionLists.Remove(oldlist.AccountName); + else + ES.Services.ExchangeServer.DeleteDistributionListMember(PanelRequest.ItemID, oldlist.AccountName, PanelRequest.AccountID); + } + + foreach (string newlist in newDistributionLists) + ES.Services.ExchangeServer.AddDistributionListMember(PanelRequest.ItemID, newlist, PanelRequest.AccountID); + + messageBox.ShowSuccessMessage("EXCHANGE_UPDATE_MAILBOX_SETTINGS"); + BindSettings(); + } + catch (Exception ex) + { + messageBox.ShowErrorMessage("EXCHANGE_UPDATE_MAILBOX_SETTINGS", ex); + } + } + + protected void btnSave_Click(object sender, EventArgs e) + { + SaveSettings(); + } + + + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserMemberOf.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserMemberOf.ascx.designer.cs new file mode 100644 index 00000000..6efe22b7 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserMemberOf.ascx.designer.cs @@ -0,0 +1,150 @@ +//------------------------------------------------------------------------------ +// <àâòîìàòè÷åñêè ñîçäàâàåìîå> +// Ýòîò êîä ñîçäàí ïðîãðàììîé. +// +// Èçìåíåíèÿ â ýòîì ôàéëå ìîãóò ïðèâåñòè ê íåïðàâèëüíîé ðàáîòå è áóäóò ïîòåðÿíû â ñëó÷àå +// ïîâòîðíîé ãåíåðàöèè êîäà. +// +//------------------------------------------------------------------------------ + +namespace WebsitePanel.Portal.HostedSolution { + + + public partial class UserMemberOf { + + /// + /// asyncTasks ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks; + + /// + /// breadcrumb ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Breadcrumb breadcrumb; + + /// + /// menu ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Menu menu; + + /// + /// Image1 ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::System.Web.UI.WebControls.Image Image1; + + /// + /// locTitle ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::System.Web.UI.WebControls.Localize locTitle; + + /// + /// litDisplayName ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::System.Web.UI.WebControls.Literal litDisplayName; + + /// + /// UserTabsId ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::WebsitePanel.Portal.ExchangeServer.UserControls.UserTabs UserTabsId; + + /// + /// MailboxTabsId ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::WebsitePanel.Portal.ExchangeServer.UserControls.MailboxTabs MailboxTabsId; + + /// + /// messageBox ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox; + + /// + /// secDistributionLists ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::WebsitePanel.Portal.CollapsiblePanel secDistributionLists; + + /// + /// DistributionLists ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::System.Web.UI.WebControls.Panel DistributionLists; + + /// + /// GeneralUpdatePanel ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::System.Web.UI.UpdatePanel GeneralUpdatePanel; + + /// + /// distrlists ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::WebsitePanel.Portal.ExchangeServer.UserControls.AccountsList distrlists; + + /// + /// btnSave ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::System.Web.UI.WebControls.Button btnSave; + + /// + /// ValidationSummary1 ýëåìåíò óïðàâëåíèÿ. + /// + /// + /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. + /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// + protected global::System.Web.UI.WebControls.ValidationSummary ValidationSummary1; + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/DistributionListTabs.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/DistributionListTabs.ascx.resx index 431fe655..54222974 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/DistributionListTabs.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/DistributionListTabs.ascx.resx @@ -129,4 +129,7 @@ Permissions + + Member Of + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/MailboxTabs.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/MailboxTabs.ascx.resx index f994c831..ceab2564 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/MailboxTabs.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/MailboxTabs.ascx.resx @@ -144,4 +144,7 @@ Spam + + Member Of + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/UserTabs.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/UserTabs.ascx.resx index fe15515c..cd4207d0 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/UserTabs.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/UserTabs.ascx.resx @@ -129,4 +129,7 @@ Setup Instructions + + Member Of + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/DistributionListTabs.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/DistributionListTabs.ascx.cs index 9f2cd8b7..3dc73fc4 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/DistributionListTabs.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/DistributionListTabs.ascx.cs @@ -29,6 +29,9 @@ using System; using System.Collections.Generic; using WebsitePanel.Portal.Code.UserControls; +using WebsitePanel.WebPortal; +using WebsitePanel.EnterpriseServer; + namespace WebsitePanel.Portal.ExchangeServer.UserControls { @@ -54,6 +57,11 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls tabsList.Add(CreateTab("dlist_mailflow", "Tab.Mailflow")); tabsList.Add(CreateTab("dlist_permissions", "Tab.Permissions")); + PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId); + + if (Utils.CheckQouta(Quotas.EXCHANGE2007_DISTRIBUTIONLISTS, cntx)) + tabsList.Add(CreateTab("dlist_memberof", "Tab.MemberOf")); + // find selected menu item int idx = 0; foreach (Tab tab in tabsList) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/MailboxTabs.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/MailboxTabs.ascx.cs index fb43a86e..77e53f16 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/MailboxTabs.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/MailboxTabs.ascx.cs @@ -55,9 +55,10 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls UserInfo user = UsersHelper.GetUser(PanelSecurity.EffectiveUserId); + PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId); + if (user != null) { - PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId); if ((user.Role == UserRole.User) & (Utils.CheckQouta(Quotas.EXCHANGE2007_ISCONSUMER, cntx))) hideItems = true; } @@ -76,7 +77,8 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls if (!hideItems) tabsList.Add(CreateTab("mailbox_mobile", "Tab.Mobile")); //tabsList.Add(CreateTab("mailbddox_spam", "Tab.Spam")); - + if (Utils.CheckQouta(Quotas.EXCHANGE2007_DISTRIBUTIONLISTS, cntx)) + tabsList.Add(CreateTab("mailbox_memberof", "Tab.MemberOf")); // find selected menu item int idx = 0; diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/UserTabs.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/UserTabs.ascx.cs index da968986..cdedb8aa 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/UserTabs.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/UserTabs.ascx.cs @@ -29,6 +29,8 @@ using System; using System.Collections.Generic; using WebsitePanel.Portal.Code.UserControls; +using WebsitePanel.WebPortal; +using WebsitePanel.EnterpriseServer; namespace WebsitePanel.Portal.ExchangeServer.UserControls { @@ -55,6 +57,11 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls if (!string.IsNullOrEmpty(instructions)) tabsList.Add(CreateTab("organization_user_setup", "Tab.Setup")); + PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId); + + if (Utils.CheckQouta(Quotas.EXCHANGE2007_DISTRIBUTIONLISTS, cntx)) + tabsList.Add(CreateTab("user_memberof", "Tab.MemberOf")); + // find selected menu item int idx = 0; foreach (Tab tab in tabsList) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj index cc9bed4d..ee373e61 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj @@ -209,6 +209,18 @@ + + ExchangeDistributionListMemberOf.ascx + + + ExchangeDistributionListMemberOf.ascx + + + ExchangeMailboxMemberOf.ascx + + + ExchangeMailboxMemberOf.ascx + OrganizationAddDomainName.ascx ASPXCodeBehind @@ -237,6 +249,12 @@ ExchangeMailboxPlans.ascx + + OrganizationUserMemberOf.ascx + + + OrganizationUserMemberOf.ascx + AccountsListWithPermissions.ascx ASPXCodeBehind @@ -3861,11 +3879,14 @@ + + + @@ -5024,7 +5045,9 @@ - + + Designer + @@ -5043,6 +5066,9 @@ Designer + + + Designer