Initial project's source code check-in.

This commit is contained in:
ptsurbeleu 2011-07-13 16:07:32 -07:00
commit b03b0b373f
4573 changed files with 981205 additions and 0 deletions

View file

@ -0,0 +1,135 @@
<?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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="breadcrumb.PageName" xml:space="preserve">
<value>Create OCS User</value>
</data>
<data name="btnCreate.Text" xml:space="preserve">
<value>Create</value>
</data>
<data name="FormComments.Text" xml:space="preserve">
<value>Select an existing Organization user and click the “Create” button to enable an individual user account for Office Communications Server.</value>
</data>
<data name="locDisplayName.Text" xml:space="preserve">
<value>Display name* :</value>
</data>
<data name="locTitle.Text" xml:space="preserve">
<value>Create OCS User</value>
</data>
</root>

View file

@ -0,0 +1,170 @@
<?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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="breadcrumb.PageName" xml:space="preserve">
<value>Edit OCS User</value>
</data>
<data name="btnSave.Text" xml:space="preserve">
<value>Save changes</value>
</data>
<data name="cbArchiveFederation.Text" xml:space="preserve">
<value>Archive federated IM conversations</value>
</data>
<data name="cbArchiveInternal.Text" xml:space="preserve">
<value>Archive internal IM conversations</value>
</data>
<data name="cbEnableFederation.Text" xml:space="preserve">
<value>Enable Federation</value>
</data>
<data name="cbEnablePresence.Text" xml:space="preserve">
<value>Enable enhanced presence</value>
</data>
<data name="cbEnablePublicConnectivity.Text" xml:space="preserve">
<value>Enable Public IM connectivity</value>
</data>
<data name="FormComments.Text" xml:space="preserve">
<value>&lt;p&gt;&lt;b&gt;Sign-in name&lt;/b&gt; specifies the Session Initiation Protocol (SIP) address that is currently registered for this user and will be used to route messages to and from the user. The sign-in name is in the form "sip:user@domain" and must be unique.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Federation&lt;/b&gt; specifies whether the user can communicate with users from other organizations that have an Office Communications Server deployment and a federated link.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Public IM connectivity&lt;/b&gt; specifies whether the user can communicate with users who are hosted on AOL, Yahoo!, or the MSN network of Internet services.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Archiving&lt;/b&gt; enables or disables archiving of IM conversations of the user. Archiving can be enabled independently for internal conversations and for conversations with users outside your organization.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Enhanced presence&lt;/b&gt; enables users to control their presence with more granularity. Enhanced presence enables users to create different presence categories and assign data items to the categories.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Note:&lt;/b&gt; Some settings cannot be configured for individual users depending on the Global Properties.&lt;/p&gt;</value>
</data>
<data name="locDisplayName.Text" xml:space="preserve">
<value>Display name:</value>
</data>
<data name="locEmail.Text" xml:space="preserve">
<value>Sign-in name:</value>
</data>
<data name="locNote.Text" xml:space="preserve">
<value>Note: Enhanced presence cannot be changed once it has been set.</value>
</data>
<data name="locTitle.Text" xml:space="preserve">
<value>Edit OCS User</value>
</data>
<data name="secArchiving.Text" xml:space="preserve">
<value>Archiving</value>
</data>
<data name="secFedaration.Text" xml:space="preserve">
<value>Federation</value>
</data>
<data name="secPresence.Text" xml:space="preserve">
<value>Presence</value>
</data>
</root>

View file

@ -0,0 +1,149 @@
<?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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="breadcrumb.PageName" xml:space="preserve">
<value>OCS Users</value>
</data>
<data name="btnCreateUser.Text" xml:space="preserve">
<value>Create OCS User</value>
</data>
<data name="ddlSearchColumnDisplayName.Text" xml:space="preserve">
<value>Display name</value>
</data>
<data name="ddlSearchColumnEmail.Text" xml:space="preserve">
<value>Sign-in name</value>
</data>
<data name="FormComments.Text" xml:space="preserve">
<value>&lt;p&gt;Office Communications Server delivers streamlined communications to the users, including software-powered VoIP, Web and audio/video conferencing, and enterprise instant messaging.&lt;/p&gt;
&lt;p&gt;Click the “Create OCS User” button to enable an individual user account for Office Communications Server. &lt;/p&gt;
&lt;p&gt;If you delete an account in Office Communications Server, the account is no longer available for use with Office Communications Server unless you enable the account again. When you delete an account, all Office Communications Server settings for the account are lost, so you must configure the account again after enabling.&lt;/p&gt;</value>
</data>
<data name="gvUsersDisplayName.HeaderText" xml:space="preserve">
<value>Display name</value>
</data>
<data name="gvUsersEmail.HeaderText" xml:space="preserve">
<value>Sign-in name</value>
</data>
<data name="locTitle.Text" xml:space="preserve">
<value>OCS Users</value>
</data>
<data name="cmdDelete.OnClientClick" xml:space="preserve">
<value>return confirm('Are you sure you want to delete OCS User?');</value>
</data>
</root>

View file

@ -0,0 +1,53 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CreateOCSUser.ascx.cs" Inherits="WebsitePanel.Portal.OCS.CreateOCSUser" %>
<%@ Register Src="../ExchangeServer/UserControls/UserSelector.ascx" TagName="UserSelector"
TagPrefix="wsp" %>
<%@ Register Src="../ExchangeServer/UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %>
<%@ Register Src="../ExchangeServer/UserControls/Breadcrumb.ascx" TagName="Breadcrumb"
TagPrefix="wsp" %>
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox"
TagPrefix="wsp" %>
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport"
TagPrefix="wsp" %>
<%@ Register Src="../UserControls/QuotaViewer.ascx" TagName="QuotaViewer" TagPrefix="wsp" %>
<%@ Register src="../ExchangeServer/UserControls/MailboxSelector.ascx" tagname="MailboxSelector" tagprefix="uc1" %>
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server" />
<div id="ExchangeContainer">
<div class="Module">
<div class="Header">
<wsp:Breadcrumb id="breadcrumb" runat="server" PageName="Text.PageName" meta:resourcekey="breadcrumb" />
</div>
<div class="Left">
<wsp:Menu id="menu" runat="server" />
</div>
<div class="Content">
<div class="Center">
<div class="Title">
<asp:Image ID="Image1" SkinID="OCSLogo" runat="server" />
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle"></asp:Localize>
</div>
<div class="FormBody">
<wsp:SimpleMessageBox id="messageBox" runat="server" />
<table id="ExistingUserTable" runat="server" width="100%">
<tr>
<td class="FormLabel150"><asp:Localize ID="Localize1" runat="server" meta:resourcekey="locDisplayName" Text="Display Name: *"></asp:Localize></td>
<td>
<wsp:UserSelector ID="userSelector" runat="server" IncludeMailboxes="true" />
</td>
</tr>
</table>
<div class="FormFooterClean">
<asp:Button id="btnCreate" runat="server"
CssClass="Button1" meta:resourcekey="btnCreate"
onclick="btnCreate_Click" ></asp:Button>
</div>
</div>
</div>
<div class="Right">
<asp:Localize ID="FormComments" runat="server" meta:resourcekey="FormComments"></asp:Localize>
</div>
</div>
</div>
</div>

View file

@ -0,0 +1,58 @@
// Copyright (c) 2011, 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 WebsitePanel.Providers.ResultObjects;
namespace WebsitePanel.Portal.OCS
{
public partial class CreateOCSUser : WebsitePanelModuleBase
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnCreate_Click(object sender, EventArgs e)
{
int accountId = userSelector.GetAccountId();
OCSUserResult res = ES.Services.OCS.CreateOCSUser(PanelRequest.ItemID, accountId);
if (res.IsSuccess && res.ErrorCodes.Count == 0)
{
Response.Redirect(EditUrl("AccountID", accountId.ToString(), "edit_ocs_user",
"SpaceID=" + PanelSecurity.PackageId,
"ItemID=" + PanelRequest.ItemID,
"InstanceID=" + res.Value.InstanceId));
}
else
{
messageBox.ShowMessage(res, "CREATE_OCS_USER", "OCS");
}
}
}
}

View file

@ -0,0 +1,115 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.3053
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace WebsitePanel.Portal.OCS {
public partial class CreateOCSUser {
/// <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>
/// ExistingUserTable control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTable ExistingUserTable;
/// <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>
/// userSelector 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.UserSelector userSelector;
/// <summary>
/// btnCreate 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 btnCreate;
/// <summary>
/// FormComments 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 FormComments;
}
}

View file

@ -0,0 +1,94 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="EditOCSUser.ascx.cs" Inherits="WebsitePanel.Portal.OCS.EditOCSUser" %>
<%@ Register Src="../ExchangeServer/UserControls/UserSelector.ascx" TagName="UserSelector"
TagPrefix="wsp" %>
<%@ Register Src="../ExchangeServer/UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %>
<%@ Register Src="../ExchangeServer/UserControls/Breadcrumb.ascx" TagName="Breadcrumb"
TagPrefix="wsp" %>
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox"
TagPrefix="wsp" %>
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport"
TagPrefix="wsp" %>
<%@ Register Src="../UserControls/QuotaViewer.ascx" TagName="QuotaViewer" TagPrefix="wsp" %>
<%@ Register src="../ExchangeServer/UserControls/MailboxSelector.ascx" tagname="MailboxSelector" tagprefix="uc1" %>
<%@ Register TagPrefix="wsp" TagName="CollapsiblePanel" Src="../UserControls/CollapsiblePanel.ascx" %>
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server" />
<div id="ExchangeContainer">
<div class="Module">
<div class="Header">
<wsp:Breadcrumb id="breadcrumb" runat="server" PageName="Text.PageName" meta:resourcekey="breadcrumb" />
</div>
<div class="Left">
<wsp:Menu id="menu" runat="server" />
</div>
<div class="Content">
<div class="Center">
<div class="Title">
<asp:Image ID="Image1" SkinID="OCSLogo" runat="server" />
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle"></asp:Localize>
-
<asp:Literal ID="litDisplayName" runat="server" Text="John Smith" />
</div>
<div class="FormBody">
<wsp:SimpleMessageBox id="messageBox" runat="server" />
<table>
<tr>
<td>
<asp:Localize runat="server" ID="locDisplayName" meta:resourcekey="locDisplayName" />
</td>
<td class="Huge">
<asp:Label runat="server" ID="lblDisplayName" />
</td>
</tr>
<tr>
<td>
<asp:Localize runat="server" ID="locEmail" meta:resourcekey="locEmail"/>
</td>
<td class="Huge">
<asp:Label runat="server" ID="lblSIP" />
</td>
</tr>
</table>
<wsp:CollapsiblePanel id="secFedaration" runat="server"
TargetControlID="pnlFedaration" meta:resourcekey="secFedaration" Text="Company Information"/>
<asp:Panel runat="server" ID="pnlFedaration" >
<asp:CheckBox runat="server" ID="cbEnableFederation" meta:resourcekey="cbEnableFederation"/><br/>
<asp:CheckBox runat="server" ID="cbEnablePublicConnectivity" meta:resourcekey="cbEnablePublicConnectivity"/>
</asp:Panel>
<br />
<wsp:CollapsiblePanel id="secArchiving" runat="server"
TargetControlID="pnlArchiving" meta:resourcekey="secArchiving" Text="Company Information"/>
<asp:Panel runat="server" ID="pnlArchiving" >
<asp:CheckBox runat="server" ID="cbArchiveInternal" meta:resourcekey="cbArchiveInternal"/><br/>
<asp:CheckBox runat="server" ID="cbArchiveFederation" meta:resourcekey="cbArchiveFederation"/>
</asp:Panel>
<br />
<wsp:CollapsiblePanel id="secPresence" runat="server"
TargetControlID="pnlPresence" meta:resourcekey="secPresence" Text="Company Information"/>
<asp:Panel runat="server" ID="pnlPresence" >
<asp:CheckBox runat="server" ID="cbEnablePresence" meta:resourcekey="cbEnablePresence"/><br/>
<asp:Localize runat="server" ID="locNote" meta:resourcekey="locNote"/>
</asp:Panel>
<div class="FormFooterClean">
<asp:Button runat="server" ID="btnSave" meta:resourcekey="btnSave"
CssClass="Button1" onclick="btnSave_Click" />
</div>
</div>
</div>
<div class="Right">
<asp:Localize ID="FormComments" runat="server" meta:resourcekey="FormComments"></asp:Localize>
</div>
</div>
</div>
</div>

View file

@ -0,0 +1,113 @@
// Copyright (c) 2011, 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 WebsitePanel.EnterpriseServer;
using WebsitePanel.Providers.HostedSolution;
namespace WebsitePanel.Portal.OCS
{
public partial class EditOCSUser : WebsitePanelModuleBase
{
public const string UPDATE_OCS_USER = "UPDATE_OCS_USER";
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
BindItems();
}
private void BindItems()
{
OCSUser user =
ES.Services.OCS.GetUserGeneralSettings(PanelRequest.ItemID, PanelRequest.InstanceID);
if (user != null)
{
lblDisplayName.Text = user.DisplayName;
lblSIP.Text = user.PrimaryUri;
litDisplayName.Text = user.DisplayName;
cbEnableFederation.Checked = user.EnabledForFederation;
cbEnablePublicConnectivity.Checked = user.EnabledForPublicIMConectivity;
cbArchiveInternal.Checked = user.ArchiveInternalCommunications;
cbArchiveFederation.Checked = user.ArchiveFederatedCommunications;
cbEnablePresence.Checked = user.EnabledForEnhancedPresence;
cbEnablePresence.Enabled = !user.EnabledForEnhancedPresence;
}
Organization org = ES.Services.Organizations.GetOrganization(PanelRequest.ItemID);
if (org != null)
{
cbEnableFederation.Visible = PackagesHelper.CheckGroupQuotaEnabled(org.PackageId,
ResourceGroups.OCS,
Quotas.OCS_Federation);
cbEnablePublicConnectivity.Visible = PackagesHelper.CheckGroupQuotaEnabled(org.PackageId,
ResourceGroups.OCS,
Quotas.
OCS_PublicIMConnectivity);
cbArchiveInternal.Visible = PackagesHelper.CheckGroupQuotaEnabled(org.PackageId,
ResourceGroups.OCS,
Quotas.OCS_ArchiveIMConversation);
cbArchiveFederation.Visible = PackagesHelper.CheckGroupQuotaEnabled(org.PackageId,
ResourceGroups.OCS,
Quotas.
OCS_ArchiveFederatedIMConversation);
cbEnablePresence.Visible = PackagesHelper.CheckGroupQuotaEnabled(org.PackageId,
ResourceGroups.OCS,
Quotas.OCS_PresenceAllowed);
locNote.Visible = cbEnablePresence.Visible;
secFedaration.Visible = cbEnableFederation.Visible || cbEnablePublicConnectivity.Visible;
secArchiving.Visible = cbArchiveInternal.Visible || cbArchiveFederation.Visible;
secPresence.Visible = cbEnablePresence.Visible;
}
}
protected void btnSave_Click(object sender, EventArgs e)
{
try
{
ES.Services.OCS.SetUserGeneralSettings(PanelRequest.ItemID, PanelRequest.InstanceID, cbEnableFederation.Checked, cbEnablePublicConnectivity.Checked, cbArchiveInternal.Checked, cbArchiveFederation.Checked,
cbEnablePresence.Enabled && cbEnablePresence.Checked);
messageBox.ShowSuccessMessage(UPDATE_OCS_USER);
}
catch(Exception ex)
{
messageBox.ShowErrorMessage(UPDATE_OCS_USER, ex);
}
}
}
}

View file

@ -0,0 +1,241 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.3053
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace WebsitePanel.Portal.OCS {
public partial class EditOCSUser {
/// <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>
/// lblDisplayName 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.Label lblDisplayName;
/// <summary>
/// locEmail 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 locEmail;
/// <summary>
/// lblSIP 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.Label lblSIP;
/// <summary>
/// secFedaration control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secFedaration;
/// <summary>
/// pnlFedaration 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.Panel pnlFedaration;
/// <summary>
/// cbEnableFederation 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.CheckBox cbEnableFederation;
/// <summary>
/// cbEnablePublicConnectivity 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.CheckBox cbEnablePublicConnectivity;
/// <summary>
/// secArchiving control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secArchiving;
/// <summary>
/// pnlArchiving 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.Panel pnlArchiving;
/// <summary>
/// cbArchiveInternal 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.CheckBox cbArchiveInternal;
/// <summary>
/// cbArchiveFederation 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.CheckBox cbArchiveFederation;
/// <summary>
/// secPresence control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secPresence;
/// <summary>
/// pnlPresence 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.Panel pnlPresence;
/// <summary>
/// cbEnablePresence 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.CheckBox cbEnablePresence;
/// <summary>
/// locNote 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 locNote;
/// <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>
/// FormComments 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 FormComments;
}
}

View file

@ -0,0 +1,92 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="OCSUsers.ascx.cs" Inherits="WebsitePanel.Portal.OCS.OCSUsers" %>
<%@ Register Src="../ExchangeServer/UserControls/UserSelector.ascx" TagName="UserSelector"
TagPrefix="wsp" %>
<%@ Register Src="../ExchangeServer/UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %>
<%@ Register Src="../ExchangeServer/UserControls/Breadcrumb.ascx" TagName="Breadcrumb"
TagPrefix="wsp" %>
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox"
TagPrefix="wsp" %>
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport"
TagPrefix="wsp" %>
<%@ Register Src="../UserControls/QuotaViewer.ascx" TagName="QuotaViewer" TagPrefix="wsp" %>
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server" />
<div id="ExchangeContainer">
<div class="Module">
<div class="Header">
<wsp:Breadcrumb id="breadcrumb" runat="server" meta:resourcekey="breadcrumb" PageName="Text.PageName" />
</div>
<div class="Left">
<wsp:Menu id="menu" runat="server" SelectedItem="storage_usage" />
</div>
<div class="Content">
<div class="Center">
<div class="Title">
<asp:Image ID="Image1" SkinID="OCSLogo" runat="server" />
<asp:Localize ID="locTitle" meta:resourcekey="locTitle" runat="server" Text=""></asp:Localize>
</div>
<div class="FormBody">
<wsp:SimpleMessageBox id="messageBox" runat="server" />
<div class="FormButtonsBarClean">
<div class="FormButtonsBarCleanLeft">
<asp:Button ID="btnCreateUser" runat="server" meta:resourcekey="btnCreateUser" Text="Create New User"
CssClass="Button1" OnClick="btnCreateUser_Click" />
</div>
<div class="FormButtonsBarCleanRight">
<asp:Panel ID="SearchPanel" runat="server" DefaultButton="cmdSearch">
<asp:DropDownList ID="ddlSearchColumn" runat="server" CssClass="NormalTextBox">
<asp:ListItem Value="DisplayName" meta:resourcekey="ddlSearchColumnDisplayName">DisplayName</asp:ListItem>
<asp:ListItem Value="PrimaryEmailAddress" meta:resourcekey="ddlSearchColumnEmail">Email</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>
<div class="FormButtonsBarCleanRight">
<asp:GridView ID="gvUsers" runat="server" AutoGenerateColumns="False" EnableViewState="true"
Width="100%" CssSelectorClass="NormalGridView" DataSourceID="odsAccountsPaged"
meta:resourcekey="gvUsers" AllowPaging="true" AllowSorting="true" OnRowCommand="gvUsers_RowCommand">
<Columns>
<asp:TemplateField HeaderText="gvUsersDisplayName" meta:resourcekey="gvUsersDisplayName"
SortExpression="DisplayName">
<ItemStyle Width="50%"></ItemStyle>
<ItemTemplate>
<asp:Image ID="img1" runat="server" ImageUrl='<%# GetAccountImage() %>' ImageAlign="AbsMiddle" />
<asp:HyperLink ID="lnk1" runat="server" NavigateUrl='<%# GetUserEditUrl(Eval("AccountId").ToString(), Eval("InstanceId").ToString()) %>'>
<%# Eval("DisplayName") %>
</asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="gvUsersEmail" meta:resourcekey="gvUsersEmail" DataField="PrimaryEmailAddress"
SortExpression="PrimaryEmailAddress" ItemStyle-Width="50%" />
<asp:TemplateField>
<ItemTemplate>
<asp:ImageButton ID="cmdDelete" runat="server" Text="Delete" SkinID="ExchangeDelete"
CommandName="DeleteItem" CommandArgument='<%# Eval("InstanceID") %>' meta:resourcekey="cmdDelete"
OnClientClick="return confirm('Remove this item?');"></asp:ImageButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:ObjectDataSource ID="odsAccountsPaged" runat="server" EnablePaging="True" SelectCountMethod="GetOCSUsersPagedCount"
SelectMethod="GetOCSUsersPaged" SortParameterName="sortColumn" TypeName="WebsitePanel.Portal.OCSHelper">
<SelectParameters>
<asp:QueryStringParameter Name="itemId" QueryStringField="ItemID" DefaultValue="0" />
<asp:ControlParameter Name="filterColumn" ControlID="ddlSearchColumn" PropertyName="SelectedValue" />
<asp:ControlParameter Name="filterValue" ControlID="txtSearchValue" PropertyName="Text" />
</SelectParameters>
</asp:ObjectDataSource>
<br />
<asp:Localize ID="locQuota" runat="server" meta:resourcekey="locQuota" Text="Total Users Created:"></asp:Localize>
&nbsp;&nbsp;&nbsp;
<wsp:QuotaViewer ID="usersQuota" runat="server" QuotaTypeId="2" />
</div>
</div>
</div>
<div class="Right">
<asp:Localize ID="FormComments" runat="server" meta:resourcekey="FormComments"></asp:Localize>
</div>
</div>
</div>
</div>

View file

@ -0,0 +1,101 @@
// Copyright (c) 2011, 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 WebsitePanel.Providers.Common;
using WebsitePanel.Providers.HostedSolution;
namespace WebsitePanel.Portal.OCS
{
public partial class OCSUsers : WebsitePanelModuleBase
{
protected void Page_Load(object sender, EventArgs e)
{
BindStats();
}
private void BindStats()
{
OrganizationStatistics stats = ES.Services.Organizations.GetOrganizationStatistics(PanelRequest.ItemID);
int allocatedOCSUsers = stats.AllocatedOCSUsers;
int usedUsers = stats.CreatedOCSUsers;
usersQuota.QuotaUsedValue = usedUsers;
usersQuota.QuotaValue = allocatedOCSUsers;
}
protected void btnCreateUser_Click(object sender, EventArgs e)
{
Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "create_new_ocs_user",
"SpaceID=" + PanelSecurity.PackageId));
}
public string GetAccountImage()
{
return GetThemedImage("Exchange/admin_16.png");
}
public string GetUserEditUrl(string accountId, string instanceId)
{
return EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "edit_ocs_user",
"AccountID=" + accountId,
"ItemID=" + PanelRequest.ItemID,
"InstanceID=" + instanceId);
}
protected void odsAccountsPaged_Selected(object sender, System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs e)
{
}
protected void gvUsers_RowCommand(object sender, System.Web.UI.WebControls.GridViewCommandEventArgs e)
{
if (e.CommandName == "DeleteItem")
{
try
{
ResultObject res = ES.Services.OCS.DeleteOCSUser(PanelRequest.ItemID, e.CommandArgument.ToString());
messageBox.ShowMessage(res, "DELETE_OCS_USER", "OCS");
// rebind grid
gvUsers.DataBind();
BindStats();
}
catch (Exception ex)
{
messageBox.ShowErrorMessage("DELETE_OCS_USERS", ex);
}
}
}
}
}

View file

@ -0,0 +1,160 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.3053
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace WebsitePanel.Portal.OCS {
public partial class OCSUsers {
/// <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>
/// btnCreateUser 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 btnCreateUser;
/// <summary>
/// SearchPanel 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.Panel SearchPanel;
/// <summary>
/// ddlSearchColumn 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 ddlSearchColumn;
/// <summary>
/// txtSearchValue 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 txtSearchValue;
/// <summary>
/// cmdSearch 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.ImageButton cmdSearch;
/// <summary>
/// gvUsers 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 gvUsers;
/// <summary>
/// odsAccountsPaged 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.ObjectDataSource odsAccountsPaged;
/// <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>
/// usersQuota control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.QuotaViewer usersQuota;
/// <summary>
/// FormComments 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 FormComments;
}
}