wsp-10106: Implement Exchange Tenant Disclaimer.

This commit is contained in:
dev_amdtel 2013-06-25 22:09:35 +04:00
parent eee5d732fb
commit 0ec87fc5f4
28 changed files with 11296 additions and 7215 deletions

View file

@ -0,0 +1,144 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="btnSave.OnClientClick" xml:space="preserve">
<value>ShowProgressDialog('Updating Disclaimer ...');</value>
</data>
<data name="btnSave.Text" xml:space="preserve">
<value>Save Changes</value>
</data>
<data name="FormComments.Text" xml:space="preserve">
<value />
</data>
<data name="locNotes.Text" xml:space="preserve">
<value>Text:</value>
</data>
<data name="locTitle.Text" xml:space="preserve">
<value>Edit Disclaimer</value>
</data>
<data name="Text.PageName" xml:space="preserve">
<value>Disclaimer</value>
</data>
<data name="valRequireDisplayName.ErrorMessage" xml:space="preserve">
<value>Enter Display Name</value>
</data>
<data name="valRequireDisplayName.Text" xml:space="preserve">
<value>*</value>
</data>
</root>

View file

@ -0,0 +1,156 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="btnCreateList.Text" xml:space="preserve">
<value>Create New Disclaimer</value>
</data>
<data name="cmdDelete.OnClientClick" xml:space="preserve">
<value>if(!confirm('Are you sure you want to delete this disclaimer?')) return false; else ShowProgressDialog('Deleting disclaimer list...');</value>
</data>
<data name="cmdDelete.Text" xml:space="preserve">
<value>Delete</value>
</data>
<data name="cmdDelete.ToolTip" xml:space="preserve">
<value>Delete Disclaimer</value>
</data>
<data name="cmdSearch.AlternateText" xml:space="preserve">
<value>Search</value>
</data>
<data name="ddlSearchColumnDisplayName.Text" xml:space="preserve">
<value>Display Name</value>
</data>
<data name="FormComments.Text" xml:space="preserve">
<value />
</data>
<data name="gvLists.Empty" xml:space="preserve">
<value>No disclaimer have been created. To create a new disclaimer click "Create New Disclaimer" button.</value>
</data>
<data name="gvListsDisplayName.Header" xml:space="preserve">
<value>Display Name</value>
</data>
<data name="locQuota.Text" xml:space="preserve">
<value>Disclaimer Created:</value>
</data>
<data name="locTitle.Text" xml:space="preserve">
<value>Disclaimers</value>
</data>
<data name="Text.PageName" xml:space="preserve">
<value>Disclaimers</value>
</data>
</root>

View file

@ -0,0 +1,56 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ExchangeDisclaimerGeneralSettings.ascx.cs" Inherits="WebsitePanel.Portal.ExchangeServer.ExchangeDisclaimerGeneralSettings" %>
<%@ 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" %>
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
<div id="ExchangeContainer">
<div class="Module">
<div class="Header">
<wsp:Breadcrumb id="breadcrumb" runat="server" PageName="Text.PageName" />
</div>
<div class="Left">
<wsp:Menu id="menu" runat="server" SelectedItem="dlists" />
</div>
<div class="Content">
<div class="Center">
<div class="Title">
<asp:Image ID="Image1" SkinID="ExchangeList48" runat="server" />
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Edit Distribution List"></asp:Localize>
-
<asp:Literal ID="litDisplayName" runat="server" Text="" />
</div>
<div class="FormBody">
<wsp:SimpleMessageBox id="messageBox" runat="server" />
<table>
<tr>
<td class="FormLabel150"><asp:Localize ID="locDisplayName" runat="server" meta:resourcekey="locDisplayName" Text="Display Name: *"></asp:Localize></td>
<td>
<asp:TextBox ID="txtDisplayName" runat="server" CssClass="HugeTextBox200" ValidationGroup="CreateMailbox"></asp:TextBox>
<asp:RequiredFieldValidator ID="valRequireDisplayName" runat="server" meta:resourcekey="valRequireDisplayName" ControlToValidate="txtDisplayName"
ErrorMessage="Enter Display Name" ValidationGroup="EditList" Display="Dynamic" Text="*" SetFocusOnError="True"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="FormLabel200"><asp:Localize ID="locNotes" runat="server" meta:resourcekey="locNotes" Text="Text:"></asp:Localize></td>
<td>
<asp:TextBox ID="txtNotes" runat="server" CssClass="TextBox200" Rows="4" TextMode="MultiLine"></asp:TextBox>
</td>
</tr>
</table>
<div class="FormFooterClean">
<asp:Button id="btnSave" runat="server" Text="Save Changes" CssClass="Button1" meta:resourcekey="btnSave" ValidationGroup="EditList" OnClick="btnSave_Click"></asp:Button>
<asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True" ShowSummary="False" ValidationGroup="EditList" />
</div>
</div>
</div>
</div>
</div>
</div>

View file

@ -0,0 +1,126 @@
// 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.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 ExchangeDisclaimerGeneralSettings : WebsitePanelModuleBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindSettings();
}
}
private void BindSettings()
{
try
{
if (PanelRequest.AccountID != 0)
{
// get settings
ExchangeDisclaimer disclaimer = ES.Services.ExchangeServer.GetExchangeDisclaimer(
PanelRequest.ItemID, PanelRequest.AccountID);
litDisplayName.Text = PortalAntiXSS.Encode(disclaimer.DisclaimerName);
// bind form
txtDisplayName.Text = disclaimer.DisclaimerName;
txtNotes.Text = disclaimer.DisclaimerText;
}
}
catch (Exception ex)
{
messageBox.ShowErrorMessage("EXCHANGE_GET_DISCLAIMER_SETTINGS", ex);
}
}
private void SaveSettings()
{
if (!Page.IsValid)
return;
try
{
int result = 0;
ExchangeDisclaimer disclaimer = new ExchangeDisclaimer();
disclaimer.DisclaimerName = txtDisplayName.Text;
disclaimer.DisclaimerText = txtNotes.Text;
if (PanelRequest.AccountID == 0)
{
int id = ES.Services.ExchangeServer.AddExchangeDisclaimer(PanelRequest.ItemID, disclaimer);
}
else
{
disclaimer.ExchangeDisclaimerId = PanelRequest.AccountID;
result = ES.Services.ExchangeServer.UpdateExchangeDisclaimer(
PanelRequest.ItemID, disclaimer);
}
if (result < 0)
{
messageBox.ShowResultMessage(result);
return;
}
litDisplayName.Text = PortalAntiXSS.Encode(txtDisplayName.Text);
messageBox.ShowSuccessMessage("EXCHANGE_UPDATE_DISCLAIMER_SETTINGS");
}
catch (Exception ex)
{
messageBox.ShowErrorMessage("EXCHANGE_UPDATE_DISCLAIMER_SETTINGS", ex);
}
}
protected void btnSave_Click(object sender, EventArgs e)
{
SaveSettings();
}
}
}

View file

@ -0,0 +1,141 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace WebsitePanel.Portal.ExchangeServer {
public partial class ExchangeDisclaimerGeneralSettings {
/// <summary>
/// asyncTasks control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks;
/// <summary>
/// breadcrumb control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Breadcrumb breadcrumb;
/// <summary>
/// menu control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Menu menu;
/// <summary>
/// Image1 control.
/// </summary>
/// <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>
/// litDisplayName 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.Literal litDisplayName;
/// <summary>
/// messageBox control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
/// <summary>
/// locDisplayName 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 locDisplayName;
/// <summary>
/// txtDisplayName 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.TextBox txtDisplayName;
/// <summary>
/// valRequireDisplayName 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.RequiredFieldValidator valRequireDisplayName;
/// <summary>
/// locNotes 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 locNotes;
/// <summary>
/// txtNotes 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.TextBox txtNotes;
/// <summary>
/// btnSave 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 btnSave;
/// <summary>
/// ValidationSummary1 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.ValidationSummary ValidationSummary1;
}
}

View file

@ -0,0 +1,86 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ExchangeDisclaimers.ascx.cs" Inherits="WebsitePanel.Portal.ExchangeServer.ExchangeDisclaimers" %>
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
<%@ Register Src="UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %>
<%@ Register Src="UserControls/Breadcrumb.ascx" TagName="Breadcrumb" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/QuotaViewer.ascx" TagName="QuotaViewer" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
<div id="ExchangeContainer">
<div class="Module">
<div class="Header">
<wsp:Breadcrumb id="breadcrumb" runat="server" PageName="Text.PageName" />
</div>
<div class="Left">
<wsp:Menu id="menu" runat="server" SelectedItem="dlists" />
</div>
<div class="Content">
<div class="Center">
<div class="Title">
<asp:Image ID="Image1" SkinID="ExchangeList48" runat="server" />
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Lists"></asp:Localize>
</div>
<div class="FormBody">
<wsp:SimpleMessageBox id="messageBox" runat="server" />
<div class="FormButtonsBarClean">
<div class="FormButtonsBarCleanLeft">
<asp:Button ID="btnCreateList" runat="server" meta:resourcekey="btnCreateList"
Text="Create New Distribution List" CssClass="Button1" OnClick="btnCreateList_Click" />
</div>
<div class="FormButtonsBarCleanRight">
<%--
<asp:Panel ID="SearchPanel" runat="server" DefaultButton="cmdSearch">
<asp:Localize ID="locSearch" runat="server" meta:resourcekey="locSearch" Visible="false"></asp:Localize>
<asp:DropDownList ID="ddlPageSize" runat="server" AutoPostBack="True"
onselectedindexchanged="ddlPageSize_SelectedIndexChanged">
<asp:ListItem>10</asp:ListItem>
<asp:ListItem Selected="True">20</asp:ListItem>
<asp:ListItem>50</asp:ListItem>
<asp:ListItem>100</asp:ListItem>
</asp:DropDownList>
<asp:DropDownList ID="ddlSearchColumn" runat="server" CssClass="NormalTextBox">
<asp:ListItem Value="DisplayName" meta:resourcekey="ddlSearchColumnDisplayName">DisplayName</asp:ListItem>
</asp:DropDownList><asp:TextBox ID="txtSearchValue" runat="server" CssClass="NormalTextBox" Width="100"></asp:TextBox><asp:ImageButton ID="cmdSearch" Runat="server" meta:resourcekey="cmdSearch" SkinID="SearchButton"
CausesValidation="false"/>
</asp:Panel>
--%>
</div>
</div>
<asp:GridView ID="gvLists" runat="server" AutoGenerateColumns="False" EnableViewState="true"
Width="100%" EmptyDataText="gvLists" CssSelectorClass="NormalGridView"
OnRowCommand="gvLists_RowCommand" AllowPaging="True" AllowSorting="True"
PageSize="20">
<Columns>
<asp:TemplateField HeaderText="gvListsDisplayName" SortExpression="DisplayName">
<ItemStyle Width="80%"></ItemStyle>
<ItemTemplate>
<asp:hyperlink id="lnk1" runat="server"
NavigateUrl='<%# GetListEditUrl(Eval("ExchangeDisclaimerId").ToString()) %>'>
<%# Eval("DisclaimerName")%>
</asp:hyperlink>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:ImageButton ID="cmdDelete" runat="server" Text="Delete" SkinID="ExchangeDelete"
CommandName="DeleteItem" CommandArgument='<%# Eval("ExchangeDisclaimerId") %>'
meta:resourcekey="cmdDelete" OnClientClick="return confirm('Remove this item?');"></asp:ImageButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<br />
<asp:Localize ID="locQuota" runat="server" meta:resourcekey="locQuota" Text="Total Distribution Lists Created:"></asp:Localize>
&nbsp;&nbsp;&nbsp;
<wsp:QuotaViewer ID="listsQuota" runat="server" QuotaTypeId="2" />
</div>
</div>
</div>
</div>
</div>

View file

@ -0,0 +1,137 @@
// 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.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 ExchangeDisclaimers : WebsitePanelModuleBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindDisclaimers();
BindStats();
}
}
ExchangeDisclaimer[] disclaimerList = null;
private void BindDisclaimers()
{
disclaimerList = ES.Services.ExchangeServer.GetExchangeDisclaimers(PanelRequest.ItemID);
gvLists.DataSource = disclaimerList;
gvLists.DataBind();
}
private void BindStats()
{
listsQuota.QuotaValue = -1;
if (disclaimerList!=null)
listsQuota.QuotaUsedValue = disclaimerList.Length;
}
protected void btnCreateList_Click(object sender, EventArgs e)
{
Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "disclaimers_settings",
"SpaceID=" + PanelSecurity.PackageId.ToString()));
}
public string GetListEditUrl(string accountId)
{
return EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "disclaimers_settings",
"AccountID=" + accountId,
"ItemID=" + PanelRequest.ItemID.ToString());
}
protected void odsAccountsPaged_Selected(object sender, ObjectDataSourceStatusEventArgs e)
{
if (e.Exception != null)
{
messageBox.ShowErrorMessage("EXCHANGE_DISCLAIMERS_LISTS", e.Exception);
e.ExceptionHandled = true;
}
}
protected void gvLists_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "DeleteItem")
{
// delete distribution list
int accountId = Utils.ParseInt(e.CommandArgument.ToString(), 0);
try
{
int result = ES.Services.ExchangeServer.DeleteExchangeDisclaimer(PanelRequest.ItemID, accountId);
if (result < 0)
{
messageBox.ShowResultMessage(result);
return;
}
// rebind grid
BindDisclaimers();
BindStats();
}
catch (Exception ex)
{
messageBox.ShowErrorMessage("EXCHANGE_DELETE_DISCLAIMER", ex);
}
}
}
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
//gvLists.PageSize = Convert.ToInt16(ddlPageSize.SelectedValue);
// rebind grid
BindDisclaimers();
// bind stats
BindStats();
}
}
}

View file

@ -0,0 +1,105 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace WebsitePanel.Portal.ExchangeServer {
public partial class ExchangeDisclaimers {
/// <summary>
/// asyncTasks control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks;
/// <summary>
/// breadcrumb control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Breadcrumb breadcrumb;
/// <summary>
/// menu control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Menu menu;
/// <summary>
/// Image1 control.
/// </summary>
/// <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>
/// messageBox control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
/// <summary>
/// btnCreateList 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 btnCreateList;
/// <summary>
/// gvLists 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.GridView gvLists;
/// <summary>
/// locQuota 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 locQuota;
/// <summary>
/// listsQuota control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.QuotaViewer listsQuota;
}
}

View file

@ -55,6 +55,12 @@
<td class="FormLabel150"><asp:Localize ID="Localize2" runat="server" meta:resourcekey="locMailboxplanName" Text="Mailbox plan: *"></asp:Localize></td>
<td>
<wsp:MailboxPlanSelector ID="mailboxPlanSelector" runat="server" />
</td>
</tr>
<tr>
<td class="FormLabel150"><asp:Localize ID="Localize1" runat="server" meta:resourcekey="locDisclaimer" Text="Disclaimer: "></asp:Localize></td>
<td>
<asp:DropDownList ID="ddDisclaimer" runat="server" />
</td>
</tr>
<tr>

View file

@ -38,6 +38,11 @@ namespace WebsitePanel.Portal.ExchangeServer
{
if (!IsPostBack)
{
ddDisclaimer.Items.Add(new System.Web.UI.WebControls.ListItem("None", "-1"));
ExchangeDisclaimer[] disclaimers = ES.Services.ExchangeServer.GetExchangeDisclaimers(PanelRequest.ItemID);
foreach (ExchangeDisclaimer disclaimer in disclaimers)
ddDisclaimer.Items.Add(new System.Web.UI.WebControls.ListItem(disclaimer.DisclaimerName, disclaimer.ExchangeDisclaimerId.ToString()));
BindSettings();
UserInfo user = UsersHelper.GetUser(PanelSecurity.EffectiveUserId);
@ -98,7 +103,7 @@ namespace WebsitePanel.Portal.ExchangeServer
}
mailboxSize.QuotaUsedValue = Convert.ToInt32(stats.TotalSize / 1024 / 1024);
mailboxSize.QuotaValue = (stats.MaxSize == -1) ? -1: (int)Math.Round((double)(stats.MaxSize / 1024 / 1024));
mailboxSize.QuotaValue = (stats.MaxSize == -1) ? -1 : (int)Math.Round((double)(stats.MaxSize / 1024 / 1024));
secCalendarSettings.Visible = ((account.AccountType == ExchangeAccountType.Equipment) | (account.AccountType == ExchangeAccountType.Room));
@ -107,7 +112,8 @@ namespace WebsitePanel.Portal.ExchangeServer
litigationHoldSpace.QuotaUsedValue = Convert.ToInt32(stats.LitigationHoldTotalSize / 1024 / 1024);
litigationHoldSpace.QuotaValue = (stats.LitigationHoldMaxSize == -1) ? -1 : (int)Math.Round((double)(stats.LitigationHoldMaxSize / 1024 / 1024));
int disclaimerId = ES.Services.ExchangeServer.GetExchangeAccountDisclaimerId(PanelRequest.ItemID, PanelRequest.AccountID);
ddDisclaimer.SelectedValue = disclaimerId.ToString();
}
catch (Exception ex)
@ -149,6 +155,10 @@ namespace WebsitePanel.Portal.ExchangeServer
}
}
int disclaimerId;
if (int.TryParse(ddDisclaimer.SelectedValue, out disclaimerId))
ES.Services.ExchangeServer.SetExchangeAccountDisclaimerId(PanelRequest.ItemID, PanelRequest.AccountID, disclaimerId);
messageBox.ShowSuccessMessage("EXCHANGE_UPDATE_MAILBOX_SETTINGS");
BindSettings();
}

View file

@ -1,31 +1,3 @@
// 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.
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
@ -175,6 +147,24 @@ namespace WebsitePanel.Portal.ExchangeServer {
/// </remarks>
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.MailboxPlanSelector mailboxPlanSelector;
/// <summary>
/// Localize1 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 Localize1;
/// <summary>
/// ddDisclaimer 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.DropDownList ddDisclaimer;
/// <summary>
/// locQuota control.
/// </summary>

View file

@ -126,6 +126,9 @@
<data name="Text.DistributionLists" xml:space="preserve">
<value>Distribution Lists</value>
</data>
<data name="Text.Disclaimers" xml:space="preserve">
<value>Disclaimers</value>
</data>
<data name="Text.DomainNames" xml:space="preserve">
<value>Domains</value>
</data>

View file

@ -32,9 +32,9 @@ using WebsitePanel.WebPortal;
using WebsitePanel.EnterpriseServer;
namespace WebsitePanel.Portal.ExchangeServer.UserControls
{
public partial class Menu : WebsitePanelControlBase
{
public partial class Menu : WebsitePanelControlBase
{
public class MenuGroup
{
private string text;
@ -56,7 +56,7 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
public string ImageUrl
{
get { return imageUrl; }
set { imageUrl = value;}
set { imageUrl = value; }
}
public MenuGroup(string text, string imageUrl)
@ -67,42 +67,42 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
}
}
public class MenuItem
{
{
private string url;
private string text;
private string key;
private string text;
private string key;
public string Url
{
get { return url; }
set { url = value; }
}
{
get { return url; }
set { url = value; }
}
public string Text
{
get { return text; }
set { text = value; }
}
public string Text
{
get { return text; }
set { text = value; }
}
public string Key
{
get { return key; }
set { key = value; }
}
public string Key
{
get { return key; }
set { key = value; }
}
}
}
private string selectedItem;
public string SelectedItem
{
get { return selectedItem; }
set { selectedItem = value; }
}
private string selectedItem;
public string SelectedItem
{
get { return selectedItem; }
set { selectedItem = value; }
}
private void PrepareExchangeMenu(PackageContext cntx, List<MenuGroup> groups, string imagePath)
{
bool hideItems = false;
@ -143,13 +143,16 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
if (!hideItems)
if (Utils.CheckQouta(Quotas.EXCHANGE2007_MAILBOXES, cntx))
exchangeGroup.MenuItems.Add(CreateMenuItem("StorageUsage", "storage_usage"));
exchangeGroup.MenuItems.Add(CreateMenuItem("StorageUsage", "storage_usage"));
if (!hideItems)
exchangeGroup.MenuItems.Add(CreateMenuItem("Disclaimers", "disclaimers"));
if (exchangeGroup.MenuItems.Count > 0)
groups.Add(exchangeGroup);
}
private void PrepareOrganizationMenu(PackageContext cntx, List<MenuGroup> groups, string imagePath)
{
bool hideItems = false;
@ -165,7 +168,7 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
if (!hideItems)
{
MenuGroup organizationGroup = new MenuGroup(GetLocalizedString("Text.OrganizationGroup"), imagePath + "company24.png");
if (Utils.CheckQouta(Quotas.EXCHANGE2007_MAILBOXES, cntx) == false)
{
if (Utils.CheckQouta(Quotas.ORGANIZATION_DOMAINS, cntx))
@ -177,7 +180,7 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
if (organizationGroup.MenuItems.Count > 0)
groups.Add(organizationGroup);
}
}
private void PrepareCRMMenu(PackageContext cntx, List<MenuGroup> groups, string imagePath)
@ -186,10 +189,10 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
crmGroup.MenuItems.Add(CreateMenuItem("CRMOrganization", "CRMOrganizationDetails"));
crmGroup.MenuItems.Add(CreateMenuItem("CRMUsers", "CRMUsers"));
if (crmGroup.MenuItems.Count > 0)
groups.Add(crmGroup);
}
private void PrepareBlackBerryMenu(PackageContext cntx, List<MenuGroup> groups, string imagePath)
@ -197,7 +200,7 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
MenuGroup bbGroup = new MenuGroup(GetLocalizedString("Text.BlackBerryGroup"), imagePath + "blackberry16.png");
bbGroup.MenuItems.Add(CreateMenuItem("BlackBerryUsers", "blackberry_users"));
if (bbGroup.MenuItems.Count > 0)
groups.Add(bbGroup);
@ -211,19 +214,19 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
sharepointGroup.MenuItems.Add(CreateMenuItem("SiteCollections", "sharepoint_sitecollections"));
sharepointGroup.MenuItems.Add(CreateMenuItem("StorageUsage", "sharepoint_storage_usage"));
sharepointGroup.MenuItems.Add(CreateMenuItem("StorageLimits", "sharepoint_storage_settings"));
groups.Add(sharepointGroup);
}
private void PrepareOCSMenu(PackageContext cntx, List<MenuGroup> groups, string imagePath)
{
MenuGroup ocsGroup =
new MenuGroup(GetLocalizedString("Text.OCSGroup"), imagePath + "ocs16.png");
ocsGroup.MenuItems.Add(CreateMenuItem("OCSUsers", "ocs_users"));
groups.Add(ocsGroup);
}
@ -243,18 +246,18 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
}
private List<MenuGroup> PrepareMenu()
{
{
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
List<MenuGroup> groups = new List<MenuGroup>();
string imagePath = String.Concat("~/", DefaultPage.THEMES_FOLDER, "/", Page.Theme, "/", "Images/Exchange", "/");
//Organization menu group;
if (cntx.Groups.ContainsKey(ResourceGroups.HostedOrganizations))
PrepareOrganizationMenu(cntx, groups, imagePath);
//Exchange menu group;
if (cntx.Groups.ContainsKey(ResourceGroups.Exchange))
PrepareExchangeMenu(cntx, groups, imagePath);
@ -262,11 +265,11 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
//BlackBerry Menu
if (cntx.Groups.ContainsKey(ResourceGroups.BlackBerry))
PrepareBlackBerryMenu(cntx, groups, imagePath);
//SharePoint menu group;
if (cntx.Groups.ContainsKey(ResourceGroups.HostedSharePoint))
{
PrepareSharePointMenu(cntx, groups, imagePath);
{
PrepareSharePointMenu(cntx, groups, imagePath);
}
//CRM Menu
@ -281,38 +284,38 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
//Lync Menu
if (cntx.Groups.ContainsKey(ResourceGroups.Lync))
PrepareLyncMenu(cntx, groups, imagePath);
return groups;
}
}
protected void Page_Load(object sender, EventArgs e)
{
{
List<MenuGroup> groups = PrepareMenu();
/*repMenu.SelectedIndex = -1;
for(int i = 0; i < items.Count; i++)
{
if (String.Compare(SelectedItem, items[i].Key, true) == 0)
{
repMenu.SelectedIndex = i;
break;
}
}*/
for(int i = 0; i < items.Count; i++)
{
if (String.Compare(SelectedItem, items[i].Key, true) == 0)
{
repMenu.SelectedIndex = i;
break;
}
}*/
// bind
// bind
repMenu.DataSource = groups;
repMenu.DataBind();
}
repMenu.DataBind();
}
private MenuItem CreateMenuItem(string text, string key)
{
MenuItem item = new MenuItem();
item.Key = key;
item.Text = GetLocalizedString("Text." + text);
item.Url = HostModule.EditUrl("ItemID", PanelRequest.ItemID.ToString(), key,
"SpaceID=" + PanelSecurity.PackageId);
return item;
}
}
private MenuItem CreateMenuItem(string text, string key)
{
MenuItem item = new MenuItem();
item.Key = key;
item.Text = GetLocalizedString("Text." + text);
item.Url = HostModule.EditUrl("ItemID", PanelRequest.ItemID.ToString(), key,
"SpaceID=" + PanelSecurity.PackageId);
return item;
}
}
}

View file

@ -255,6 +255,20 @@
<Compile Include="ExchangeServer\UserControls\UserTabs.ascx.designer.cs">
<DependentUpon>UserTabs.ascx</DependentUpon>
</Compile>
<Compile Include="ExchangeServer\ExchangeDisclaimers.ascx.cs">
<DependentUpon>ExchangeDisclaimers.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="ExchangeServer\ExchangeDisclaimers.ascx.designer.cs">
<DependentUpon>ExchangeDisclaimers.ascx</DependentUpon>
</Compile>
<Compile Include="ExchangeServer\ExchangeDisclaimerGeneralSettings.ascx.cs">
<DependentUpon>ExchangeDisclaimerGeneralSettings.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="ExchangeServer\ExchangeDisclaimerGeneralSettings.ascx.designer.cs">
<DependentUpon>ExchangeDisclaimerGeneralSettings.ascx</DependentUpon>
</Compile>
<Compile Include="Lync\LyncAddFederationDomain.ascx.cs">
<DependentUpon>LyncAddFederationDomain.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@ -3850,6 +3864,8 @@
<Content Include="ExchangeServer\OrganizationAddDomainName.ascx" />
<Content Include="ExchangeServer\OrganizationDomainNames.ascx" />
<Content Include="ExchangeServer\ExchangeAddMailboxPlan.ascx" />
<Content Include="ExchangeServer\ExchangeDisclaimers.ascx" />
<Content Include="ExchangeServer\ExchangeDisclaimerGeneralSettings.ascx" />
<Content Include="Lync\UserControls\LyncUserSettings.ascx" />
<Content Include="ProviderControls\CRM2011_Settings.ascx" />
<Content Include="ProviderControls\HeliconZoo_Settings.ascx" />
@ -5021,6 +5037,12 @@
<Content Include="UserControls\App_LocalResources\OrgIdPolicyEditor.ascx.resx" />
<None Include="Resources\Windows2008_Settings.ascx.resx" />
<Content Include="App_LocalResources\WebSitesHeliconZooControl.ascx.resx" />
<Content Include="ExchangeServer\App_LocalResources\ExchangeDisclaimers.ascx.resx">
<SubType>Designer</SubType>
</Content>
<Content Include="ExchangeServer\App_LocalResources\ExchangeDisclaimerGeneralSettings.ascx.resx">
<SubType>Designer</SubType>
</Content>
<EmbeddedResource Include="UserControls\App_LocalResources\EditDomainsList.ascx.resx">
<SubType>Designer</SubType>
</EmbeddedResource>