Merge commit

This commit is contained in:
robvde 2015-02-06 06:46:08 +08:00
commit 71ea83b859
306 changed files with 20481 additions and 7981 deletions

View file

@ -249,4 +249,7 @@
<data name="secRetentionPolicy.Text" xml:space="preserve">
<value>Retention policy</value>
</data>
<data name="lblDefaultMailboxPlan.Text" xml:space="preserve">
<value>Default</value>
</data>
</root>

View file

@ -207,4 +207,7 @@
<data name="lblEnterpriseStorage.Text" xml:space="preserve">
<value>Enterprise Storage, MB:</value>
</data>
<data name="lblDeletedUsers.Text" xml:space="preserve">
<value>Deleted Users:</value>
</data>
</root>

View file

@ -261,4 +261,7 @@
<data name="Text.RDSServers" xml:space="preserve">
<value>RDS Servers</value>
</data>
<data name="Text.DeletedUsers" xml:space="preserve">
<value>Deleted Users</value>
</data>
</root>

View file

@ -46,7 +46,7 @@ namespace WebsitePanel.Portal
/// <summary>
/// Summary description for Utils.
/// </summary
public class Utils
public static class Utils
{
public const string ModuleName = "WebsitePanel";
@ -327,5 +327,22 @@ namespace WebsitePanel.Portal
var idn = new IdnMapping();
return idn.GetAscii(domainName);
}
/// <summary>
/// Adds the specified parameter to the Query String.
/// </summary>
/// <param name="url"></param>
/// <param name="paramName">Name of the parameter to add.</param>
/// <param name="paramValue">Value for the parameter to add.</param>
/// <returns>Url with added parameter.</returns>
public static Uri AddParameter(this Uri url, string paramName, string paramValue)
{
var uriBuilder = new UriBuilder(url);
var query = HttpUtility.ParseQueryString(uriBuilder.Query);
query[paramName] = paramValue;
uriBuilder.Query = query.ToString();
return new Uri(uriBuilder.ToString());
}
}
}

View file

@ -95,6 +95,30 @@ namespace WebsitePanel.Portal
return users.PageUsers;
}
OrganizationDeletedUsersPaged deletedUsers;
public int GetOrganizationDeletedUsersPagedCount(int itemId,
string filterColumn, string filterValue)
{
return deletedUsers.RecordsCount;
}
public OrganizationDeletedUser[] GetOrganizationDeletedUsersPaged(int itemId,
string filterColumn, string filterValue,
int maximumRows, int startRowIndex, string sortColumn)
{
if (!String.IsNullOrEmpty(filterValue))
filterValue = filterValue + "%";
if (maximumRows == 0)
{
maximumRows = Int32.MaxValue;
}
deletedUsers = ES.Services.Organizations.GetOrganizationDeletedUsersPaged(itemId, filterColumn, filterValue, sortColumn, startRowIndex, maximumRows);
return deletedUsers.PageDeletedUsers;
}
#endregion
#region Security Groups

View file

@ -28,12 +28,14 @@
using System;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Caching;
using WebsitePanel.EnterpriseServer;
using System.Collections;
namespace WebsitePanel.Portal
{
@ -162,6 +164,33 @@ namespace WebsitePanel.Portal
return ES.Services.Packages.GetRawMyPackages(PanelSecurity.SelectedUserId);
}
public Hashtable GetMyPackages(int index, int PackagesPerPage)
{
Hashtable ret = new Hashtable();
DataTable table = ES.Services.Packages.GetRawMyPackages(PanelSecurity.SelectedUserId).Tables[0];
if(table.Rows.Count > 0) {
System.Collections.Generic.IEnumerable<DataRow> dr = table.AsEnumerable().Skip(PackagesPerPage * index - PackagesPerPage).Take(PackagesPerPage);
DataSet set = new DataSet();
set.Tables.Add(dr.CopyToDataTable());
ret.Add("DataSet", set);
ret.Add("RowCount", table.Rows.Count);
}
return ret;
}
public DataSet GetMyPackage(int packageid) {
DataSet ret = new DataSet();
DataTable table = ES.Services.Packages.GetRawMyPackages(PanelSecurity.SelectedUserId).Tables[0];
if(table.Rows.Count > 0) {
DataTable t = table.Select("PackageID = " + packageid).CopyToDataTable();
ret.Tables.Add(t);
}
return ret;
}
#region Packages Paged ODS Methods
DataSet dsPackagesPaged;

View file

@ -10,7 +10,7 @@
<div class="FormBody">
<p id="DomainPanel" runat="server" style="padding: 15px 0 15px 5px;">
<wsp:DomainControl ID="DomainName" runat="server" RequiredEnabled="True" ValidationGroup="Domain" OnTextChanged="DomainName_TextChanged"></wsp:DomainControl>
<wsp:DomainControl ID="DomainName" runat="server" RequiredEnabled="True" ValidationGroup="Domain"></wsp:DomainControl>
</p>
<wsp:CollapsiblePanel id="OptionsPanelHeader" runat="server"

View file

@ -158,7 +158,10 @@ namespace WebsitePanel.Portal
// allow sub-domains
AllowSubDomainsPanel.Visible = (type == DomainType.Domain) && PanelSecurity.EffectiveUser.Role != UserRole.User;
CheckForCorrectIdnDomainUsage(DomainName.Text);
if (IsPostBack)
{
CheckForCorrectIdnDomainUsage(DomainName.Text);
}
}
private DomainType GetDomainType(string typeName)
@ -279,10 +282,5 @@ namespace WebsitePanel.Portal
return true;
}
protected void DomainName_TextChanged(object sender, DomainControl.DomainNameEventArgs e)
{
CheckForCorrectIdnDomainUsage(e.DomainName);
}
}
}

View file

@ -222,4 +222,7 @@
<data name="secMailboxPlanArchiving.Text" xml:space="preserve">
<value>Retention policy</value>
</data>
<data name="chkEnableForceArchiveDeletion" xml:space="preserve">
<value>Force Archive on Mailbox Deletion</value>
</data>
</root>

View file

@ -0,0 +1,231 @@
<?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="chkDisable.Text" xml:space="preserve">
<value>Disable User</value>
</data>
<data name="chkLocked.Text" xml:space="preserve">
<value>Account is locked out</value>
</data>
<data name="locAddress.Text" xml:space="preserve">
<value>Address:</value>
</data>
<data name="locBusinessPhone.Text" xml:space="preserve">
<value>Business Phone:</value>
</data>
<data name="locCity.Text" xml:space="preserve">
<value>City:</value>
</data>
<data name="locCompany.Text" xml:space="preserve">
<value>Company:</value>
</data>
<data name="locCountry.Text" xml:space="preserve">
<value>Country/Region:</value>
</data>
<data name="locDepartment.Text" xml:space="preserve">
<value>Department:</value>
</data>
<data name="locDisplayName.Text" xml:space="preserve">
<value>Display Name: *</value>
</data>
<data name="locExternalEmailAddress.Text" xml:space="preserve">
<value>External e-mail:</value>
</data>
<data name="locFax.Text" xml:space="preserve">
<value>Fax:</value>
</data>
<data name="locFirstName.Text" xml:space="preserve">
<value>First Name:</value>
</data>
<data name="locHomePhone.Text" xml:space="preserve">
<value>Home Phone:</value>
</data>
<data name="locInitials.Text" xml:space="preserve">
<value>Initials:</value>
</data>
<data name="locJobTitle.Text" xml:space="preserve">
<value>Job Title:</value>
</data>
<data name="locLastName.Text" xml:space="preserve">
<value>Last Name:</value>
</data>
<data name="locManager.Text" xml:space="preserve">
<value>Manager:</value>
</data>
<data name="locMobilePhone.Text" xml:space="preserve">
<value>Mobile Phone:</value>
</data>
<data name="locNotes.Text" xml:space="preserve">
<value>Notes:</value>
</data>
<data name="locOffice.Text" xml:space="preserve">
<value>Office:</value>
</data>
<data name="locPager.Text" xml:space="preserve">
<value>Pager:</value>
</data>
<data name="locState.Text" xml:space="preserve">
<value>State/Province:</value>
</data>
<data name="locSubscriberNumber.Text" xml:space="preserve">
<value>Account Number:</value>
</data>
<data name="locTitle.Text" xml:space="preserve">
<value>Deleted User</value>
</data>
<data name="locUserDomainName.Text" xml:space="preserve">
<value>User Domain Name:</value>
</data>
<data name="locWebPage.Text" xml:space="preserve">
<value>Web Page:</value>
</data>
<data name="locZip.Text" xml:space="preserve">
<value>Zip/Postal Code:</value>
</data>
<data name="secAddressInfo.Text" xml:space="preserve">
<value>Address</value>
</data>
<data name="secAdvanced.Text" xml:space="preserve">
<value>Advanced</value>
</data>
<data name="secCompanyInfo.Text" xml:space="preserve">
<value>Company Information</value>
</data>
<data name="secContactInfo.Text" xml:space="preserve">
<value>Contact Information</value>
</data>
<data name="Text.PageName" xml:space="preserve">
<value>Deleted User</value>
</data>
<data name="lblUserPrincipalName" xml:space="preserve">
<value>Login Name:</value>
</data>
<data name="chkInherit.Text" xml:space="preserve">
<value>Update Services</value>
</data>
<data name="locServiceLevel.Text" xml:space="preserve">
<value>Service Level:</value>
</data>
<data name="locVIPUser.Text" xml:space="preserve">
<value>VIP:</value>
</data>
<data name="secServiceLevels.Text" xml:space="preserve">
<value>Service Level Information</value>
</data>
</root>

View file

@ -0,0 +1,129 @@
<?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="locTitle.Text" xml:space="preserve">
<value>Deleted User </value>
</data>
<data name="secGeneral.Text" xml:space="preserve">
<value>General</value>
</data>
<data name="Text.PageName" xml:space="preserve">
<value>Deleted User</value>
</data>
</root>

View file

@ -0,0 +1,180 @@
<?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="cmdDelete.OnClientClick" xml:space="preserve">
<value>if(!confirm('Are you sure you want to delete this user?')) return false; else ShowProgressDialog('Deleting user...');</value>
</data>
<data name="cmdDelete.Text" xml:space="preserve">
<value>Delete</value>
</data>
<data name="cmdDelete.ToolTip" xml:space="preserve">
<value>Delete User</value>
</data>
<data name="cmdSearch.AlternateText" xml:space="preserve">
<value>Search</value>
</data>
<data name="ddlSearchColumnAccountName.Text" xml:space="preserve">
<value>Domain Account</value>
</data>
<data name="ddlSearchColumnDisplayName.Text" xml:space="preserve">
<value>Display Name</value>
</data>
<data name="ddlSearchColumnEmail.Text" xml:space="preserve">
<value>E-mail Address</value>
</data>
<data name="ddlSearchColumnSubscriberNumber" xml:space="preserve">
<value>Account Number</value>
</data>
<data name="gvSubscriberNumber.Header" xml:space="preserve">
<value>Subscriber</value>
</data>
<data name="gvDeletedUsers.Empty" xml:space="preserve">
<value>No users have been deleted.</value>
</data>
<data name="gvDeletedUsersDisplayName.Header" xml:space="preserve">
<value>Display Name</value>
</data>
<data name="gvDeletedUsersEmail.Header" xml:space="preserve">
<value>Primary E-mail Address</value>
</data>
<data name="locQuota.Text" xml:space="preserve">
<value>Total Deleted Users in this Organization:</value>
</data>
<data name="locTitle.Text" xml:space="preserve">
<value>Deleted Users</value>
</data>
<data name="Text.PageName" xml:space="preserve">
<value>Deleted Users</value>
</data>
<data name="locTenantAvailable.Text" xml:space="preserve">
<value>Available Deleted Users for this Tenant:</value>
</data>
<data name="locTenantQuota.Text" xml:space="preserve">
<value>Total Deleted Users for this Tenant:</value>
</data>
<data name="ddlSearchColumnUserPrincipalName.Text" xml:space="preserve">
<value>Login</value>
</data>
<data name="gvDeletedUsersLogin.Header" xml:space="preserve">
<value>Login</value>
</data>
<data name="gvServiceLevel.Header" xml:space="preserve">
<value>Service Level</value>
</data>
</root>

View file

@ -222,4 +222,19 @@
<data name="locServiceLevels.Text" xml:space="preserve">
<value>Service Levels</value>
</data>
<data name="lnkDeletedUsers.Text" xml:space="preserve">
<value>Deleted Users:</value>
</data>
<data name="locRemoteDesktop.Text" xml:space="preserve">
<value>Remote Desktop</value>
</data>
<data name="lnkRdsServers.Text" xml:space="preserve">
<value>RDS Servers</value>
</data>
<data name="lnkRdsCollections.Text" xml:space="preserve">
<value>RDS Collections</value>
</data>
<data name="lnkRdsUsers.Text" xml:space="preserve">
<value>RDS Users</value>
</data>
</root>

View file

@ -120,7 +120,7 @@
<data name="btnCreateUser.Text" xml:space="preserve">
<value>Create New User</value>
</data>
<data name="cmdDelete.OnClientClick" xml:space="preserve">
<data name="cmdDelete1.OnClientClick" xml:space="preserve">
<value>if(!confirm('Are you sure you want to delete this user?')) return false; else ShowProgressDialog('Deleting user...');</value>
</data>
<data name="cmdDelete.Text" xml:space="preserve">
@ -183,4 +183,22 @@
<data name="gvServiceLevel.Header" xml:space="preserve">
<value>Service Level</value>
</data>
<data name="btnCancel.Text" xml:space="preserve">
<value>Cancel</value>
</data>
<data name="btnDelete.OnClientClick" xml:space="preserve">
<value>ShowProgressDialog('Deleting user...');</value>
</data>
<data name="btnDelete.Text" xml:space="preserve">
<value>Delete</value>
</data>
<data name="chkEnableForceArchiveMailbox.Text" xml:space="preserve">
<value>Archive Mailboxes</value>
</data>
<data name="headerDeleteUser.Text" xml:space="preserve">
<value>Delete User</value>
</data>
<data name="litDeleteUser.text" xml:space="preserve">
<value>Are you sure you want to delete this user?</value>
</data>
</root>

View file

@ -248,7 +248,11 @@
<wsp:SizeBox id="archiveWarningQuota" runat="server" DisplayUnitsKB="false" DisplayUnitsMB="false" DisplayUnitsPct="true" RequireValidatorEnabled="true"/>
</td>
</tr>
<tr>
<td class="FormLabel200" colspan="2">
<asp:CheckBox ID="chkEnableForceArchiveDeletion" runat="server" meta:resourcekey="chkEnableForceArchiveDeletion" Text="Force Archive on Mailbox Deletion"></asp:CheckBox>
</td>
</tr>
</table>
<br />
</asp:Panel>

View file

@ -123,7 +123,7 @@ namespace WebsitePanel.Portal.ExchangeServer
chkEnableArchiving.Checked = plan.EnableArchiving;
archiveQuota.QuotaValue = plan.ArchiveSizeMB;
archiveWarningQuota.ValueKB = plan.ArchiveWarningPct;
chkEnableForceArchiveDeletion.Checked = plan.EnableForceArchiveDeletion;
}
locTitle.Text = plan.MailboxPlan;
@ -315,11 +315,13 @@ namespace WebsitePanel.Portal.ExchangeServer
plan.LitigationHoldUrl = txtLitigationHoldUrl.Text.Trim();
plan.EnableArchiving = chkEnableArchiving.Checked;
plan.ArchiveSizeMB = archiveQuota.QuotaValue;
plan.ArchiveWarningPct = archiveWarningQuota.ValueKB;
if ((plan.ArchiveWarningPct == 0)) plan.ArchiveWarningPct = 100;
if ((plan.ArchiveWarningPct == 0))
{
plan.ArchiveWarningPct = 100;
}
plan.EnableForceArchiveDeletion = chkEnableForceArchiveDeletion.Checked;
}
int planId = ES.Services.ExchangeServer.AddExchangeMailboxPlan(PanelRequest.ItemID,

View file

@ -562,6 +562,15 @@ namespace WebsitePanel.Portal.ExchangeServer {
/// </remarks>
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.SizeBox archiveWarningQuota;
/// <summary>
/// chkEnableForceArchiveDeletion 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 chkEnableForceArchiveDeletion;
/// <summary>
/// secRetentionPolicyTags control.
/// </summary>

View file

@ -0,0 +1,317 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="OrganizationDeletedUserGeneralSettings.ascx.cs" Inherits="WebsitePanel.Portal.HostedSolution.DeletedUserGeneralSettings" %>
<%@ Register Src="UserControls/UserSelector.ascx" TagName="UserSelector" TagPrefix="wsp" %>
<%@ Register Src="UserControls/CountrySelector.ascx" TagName="CountrySelector" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/PasswordControl.ascx" TagName="PasswordControl" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/CollapsiblePanel.ascx" TagName="CollapsiblePanel" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
<%@ Register Src="UserControls/EmailAddress.ascx" TagName="EmailAddress" TagPrefix="wsp" %>
<%@ Register src="UserControls/DeletedUserTabs.ascx" tagname="UserTabs" tagprefix="uc1" %>
<%@ Register src="UserControls/MailboxTabs.ascx" tagname="MailboxTabs" tagprefix="uc1" %>
<%@ Register Src="../UserControls/ItemButtonPanel.ascx" TagName="ItemButtonPanel" TagPrefix="wsp" %>
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
<div id="ExchangeContainer">
<div class="Module">
<div class="Left">
</div>
<div class="Content">
<div class="Center">
<div class="Title">
<asp:Image ID="Image1" SkinID="OrganizationUser48" runat="server" />
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Deleted User"></asp:Localize>
-
<asp:Literal ID="litDisplayName" runat="server" Text="John Smith" />
<asp:Image ID="imgVipUser" SkinID="VipUser16" runat="server" tooltip="VIP user" Visible="false"/>
<asp:Label ID="litServiceLevel" runat="server" style="float:right;padding-right:8px;" Visible="false"></asp:Label>
</div>
<div class="FormBody">
<uc1:UserTabs ID="UserTabsId" runat="server" SelectedTab="view_deleted_user" />
<uc1:MailboxTabs ID="MailboxTabsId" runat="server" SelectedTab="view_deleted_user" />
<wsp:SimpleMessageBox id="messageBox" runat="server" />
<table>
<tr>
<td class="FormLabel150">
<asp:Localize ID="locUserPrincipalName" runat="server" meta:resourcekey="locUserPrincipalName" Text="Login Name:" />
</td>
<td>
<asp:Label runat="server" ID="lblUserPrincipalName" />
</td>
<td>
<asp:CheckBox ID="chkInherit" runat="server" meta:resourcekey="chkInherit" Text="Services inherit Login Name" checked="true" Enabled="false" />
</td>
</tr>
<tr>
<td class="FormLabel150">
<asp:Localize ID="locDisplayName" runat="server" meta:resourcekey="locDisplayName" Text="Display Name: *" />
</td>
<td>
<asp:Label ID="lblDisplayName" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td>
</td>
<td>
<br />
<asp:CheckBox ID="chkDisable" runat="server" meta:resourcekey="chkDisable" Text="Disable User" Enabled="false"/>
<br />
<asp:CheckBox ID="chkLocked" runat="server" meta:resourcekey="chkLocked" Text="Lock User" Enabled="false"/>
<br />
</td>
</tr>
<tr>
<td class="FormLabel150">
<asp:Localize ID="locFirstName" runat="server" meta:resourcekey="locFirstName" Text="First Name:" />
</td>
<td>
<asp:label ID="lblFirstName" runat="server"></asp:label>
&nbsp;
<asp:Localize ID="locInitials" runat="server" meta:resourcekey="locInitials" Text="Initials:" />
<asp:Label ID="lblInitials" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td class="FormLabel150">
<asp:Localize ID="locLastName" runat="server" meta:resourcekey="locLastName" Text="Last Name:" />
</td>
<td>
<asp:Label ID="lblLastName" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td class="FormLabel150" valign="top">
<asp:Localize ID="locSubscriberNumber" runat="server" meta:resourcekey="locSubscriberNumber" />
</td>
<td>
<asp:Label runat="server" ID="lblSubscriberNumber" />
</td>
</tr>
<tr>
<td class="FormLabel150" valign="top">
<asp:Localize ID="locExternalEmailAddress" runat="server" meta:resourcekey="locExternalEmailAddress" />
</td>
<td><asp:Label runat="server" ID="lblExternalEmailAddress" />
</td>
</tr>
</table>
<table>
<tr>
<td class="FormLabel150">
<asp:Localize ID="locNotes" runat="server" meta:resourcekey="locNotes" Text="Notes:" />
</td>
<td>
<asp:Label ID="lblNotes" runat="server" />
</td>
</tr>
</table>
<wsp:CollapsiblePanel id="secServiceLevels" runat="server" IsCollapsed="true"
TargetControlID="ServiceLevels" meta:resourcekey="secServiceLevels" Text="Service Level Information">
</wsp:CollapsiblePanel>
<asp:Panel ID="ServiceLevels" runat="server" Height="0" style="overflow:hidden;">
<table>
<tr>
<td class="FormLabel150">
<asp:Localize ID="locServiceLevel" runat="server" meta:resourcekey="locServiceLevel" Text="Service Level:" />
</td>
<td>
<asp:Label ID="lblServiceLevel" runat="server" />
</td>
</tr>
<tr>
<td class="FormLabel150">
<asp:Localize ID="locVIPUser" runat="server" meta:resourcekey="locVIPUser" Text="VIP:" />
</td>
<td>
<asp:CheckBox ID="chkVIP" runat="server" Enabled="false" />
</td>
</tr>
</table>
</asp:Panel>
<wsp:CollapsiblePanel id="secCompanyInfo" runat="server" IsCollapsed="true"
TargetControlID="CompanyInfo" meta:resourcekey="secCompanyInfo" Text="Company Information">
</wsp:CollapsiblePanel>
<asp:Panel ID="CompanyInfo" runat="server" Height="0" style="overflow:hidden;">
<table>
<tr>
<td class="FormLabel150">
<asp:Localize ID="locJobTitle" runat="server" meta:resourcekey="locJobTitle" Text="Job Title:" />
</td>
<td>
<asp:Label ID="lblJobTitle" runat="server" />
</td>
</tr>
<tr>
<td class="FormLabel150">
<asp:Localize ID="locCompany" runat="server" meta:resourcekey="locCompany" Text="Company:" />
</td>
<td>
<asp:Label ID="lblCompany" runat="server" />
</td>
</tr>
<tr>
<td class="FormLabel150">
<asp:Localize ID="locDepartment" runat="server" meta:resourcekey="locDepartment" Text="Department:" />
</td>
<td>
<asp:Label ID="lblDepartment" runat="server" />
</td>
</tr>
<tr>
<td class="FormLabel150">
<asp:Localize ID="locOffice" runat="server" meta:resourcekey="locOffice" Text="Office:" />
</td>
<td>
<asp:Label ID="lblOffice" runat="server" />
</td>
</tr>
<tr>
<td class="FormLabel150">
<asp:Localize ID="locManager" runat="server" meta:resourcekey="locManager" Text="Manager:" />
</td>
<td>
<asp:Label ID="lblManager" runat="server" />
</td>
</tr>
</table>
</asp:Panel>
<wsp:CollapsiblePanel id="secContactInfo" runat="server" IsCollapsed="true"
TargetControlID="ContactInfo" meta:resourcekey="secContactInfo" Text="Contact Information">
</wsp:CollapsiblePanel>
<asp:Panel ID="ContactInfo" runat="server" Height="0" style="overflow:hidden;">
<table>
<tr>
<td class="FormLabel150">
<asp:Localize ID="locBusinessPhone" runat="server" meta:resourcekey="locBusinessPhone" Text="Business Phone:" />
</td>
<td>
<asp:Label ID="lblBusinessPhone" runat="server" />
</td>
</tr>
<tr>
<td class="FormLabel150">
<asp:Localize ID="locFax" runat="server" meta:resourcekey="locFax" Text="Fax:" />
</td>
<td>
<asp:Label ID="lblFax" runat="server" />
</td>
</tr>
<tr>
<td class="FormLabel150">
<asp:Localize ID="locHomePhone" runat="server" meta:resourcekey="locHomePhone" Text="Home Phone:" />
</td>
<td>
<asp:Label ID="lblHomePhone" runat="server" />
</td>
</tr>
<tr>
<td class="FormLabel150">
<asp:Localize ID="locMobilePhone" runat="server" meta:resourcekey="locMobilePhone" Text="Mobile Phone:" />
<td>
<asp:Label ID="lblMobilePhone" runat="server" />
</td>
</tr>
<tr>
<td class="FormLabel150">
<asp:Localize ID="locPager" runat="server" meta:resourcekey="locPager" Text="Pager:" />
<td>
<asp:Label ID="lblPager" runat="server" />
</td>
</tr>
<tr>
<td class="FormLabel150">
<asp:Localize ID="locWebPage" runat="server" meta:resourcekey="locWebPage" Text="Web Page:" />
</td>
<td>
<asp:Label ID="lblWebPage" runat="server" />
</td>
</tr>
</table>
</asp:Panel>
<wsp:CollapsiblePanel id="secAddressInfo" runat="server" IsCollapsed="true"
TargetControlID="AddressInfo" meta:resourcekey="secAddressInfo" Text="Address">
</wsp:CollapsiblePanel>
<asp:Panel ID="AddressInfo" runat="server" Height="0" style="overflow:hidden;">
<table>
<tr>
<td class="FormLabel150">
<asp:Localize ID="locAddress" runat="server" meta:resourcekey="locAddress" Text="Street Address:" />
</td>
<td>
<asp:Label ID="lblAddress" runat="server" />
</td>
</tr>
<tr>
<td class="FormLabel150">
<asp:Localize ID="locCity" runat="server" meta:resourcekey="locCity" Text="City:" />
</td>
<td>
<asp:Label ID="lblCity" runat="server" />
</td>
</tr>
<tr>
<td class="FormLabel150">
<asp:Localize ID="locState" runat="server" meta:resourcekey="locState" Text="State/Province:" />
</td>
<td>
<asp:Label ID="lblState" runat="server" />
</td>
</tr>
<tr>
<td class="FormLabel150">
<asp:Localize ID="locZip" runat="server" meta:resourcekey="locZip" Text="Zip/Postal Code:" />
</td>
<td>
<asp:Label ID="lblZip" runat="server" />
</td>
</tr>
<tr>
<td class="FormLabel150">
<asp:Localize ID="locCountry" runat="server" meta:resourcekey="locCountry" Text="Country/Region:" />
</td>
<td>
<asp:Label id="lblCountry" runat="server" />
</td>
</tr>
</table>
</asp:Panel>
<wsp:CollapsiblePanel id="secAdvanced" runat="server" IsCollapsed="true"
TargetControlID="AdvancedInfo" meta:resourcekey="secAdvanced" Text="Advanced">
</wsp:CollapsiblePanel>
<asp:Panel ID="AdvancedInfo" runat="server" Height="0" style="overflow:hidden;">
<table>
<tr>
<td class="FormLabel150">
<asp:Localize ID="locUserDomainName" runat="server" meta:resourcekey="locUserDomainName" Text="User Domain Name:" />
</td>
<td>
<asp:Label runat="server" ID="lblUserDomainName" />
</td>
</tr>
</table>
</asp:Panel>
</div>
</div>
</div>
</div>
</div>

View file

@ -0,0 +1,199 @@
// Copyright (c) 2014, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.UI.WebControls;
using WebsitePanel.EnterpriseServer;
using WebsitePanel.EnterpriseServer.Base.HostedSolution;
using WebsitePanel.Providers.HostedSolution;
using WebsitePanel.Providers.ResultObjects;
namespace WebsitePanel.Portal.HostedSolution
{
public partial class DeletedUserGeneralSettings : WebsitePanelModuleBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindServiceLevels();
BindSettings();
MailboxTabsId.Visible = (PanelRequest.Context == "Mailbox");
UserTabsId.Visible = (PanelRequest.Context == "User");
}
}
private void BindSettings()
{
try
{
// get settings
OrganizationUser user = ES.Services.Organizations.GetUserGeneralSettings(PanelRequest.ItemID,
PanelRequest.AccountID);
litDisplayName.Text = PortalAntiXSS.Encode(user.DisplayName);
lblUserDomainName.Text = user.DomainUserName;
// bind form
lblDisplayName.Text = user.DisplayName;
chkDisable.Checked = user.Disabled;
lblFirstName.Text = user.FirstName;
lblInitials.Text = user.Initials;
lblLastName.Text = user.LastName;
lblJobTitle.Text = user.JobTitle;
lblCompany.Text = user.Company;
lblDepartment.Text = user.Department;
lblOffice.Text = user.Office;
if (user.Manager != null)
{
lblManager.Text = user.Manager.DisplayName;
}
lblBusinessPhone.Text = user.BusinessPhone;
lblFax.Text = user.Fax;
lblHomePhone.Text = user.HomePhone;
lblMobilePhone.Text = user.MobilePhone;
lblPager.Text = user.Pager;
lblWebPage.Text = user.WebPage;
lblAddress.Text = user.Address;
lblCity.Text = user.City;
lblState.Text = user.State;
lblZip.Text = user.Zip;
lblCountry.Text = user.Country;
lblNotes.Text = user.Notes;
lblExternalEmailAddress.Text = user.ExternalEmail;
lblExternalEmailAddress.Enabled = user.AccountType == ExchangeAccountType.User;
lblUserDomainName.Text = user.DomainUserName;
lblSubscriberNumber.Text = user.SubscriberNumber;
lblUserPrincipalName.Text = user.UserPrincipalName;
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
if (cntx.Quotas.ContainsKey(Quotas.EXCHANGE2007_ISCONSUMER))
{
if (cntx.Quotas[Quotas.EXCHANGE2007_ISCONSUMER].QuotaAllocatedValue != 1)
{
locSubscriberNumber.Visible = false;
lblSubscriberNumber.Visible = false;
}
}
if (user.LevelId > 0 && secServiceLevels.Visible)
{
secServiceLevels.IsCollapsed = false;
ServiceLevel serviceLevel = ES.Services.Organizations.GetSupportServiceLevel(user.LevelId);
litServiceLevel.Visible = true;
litServiceLevel.Text = serviceLevel.LevelName;
litServiceLevel.ToolTip = serviceLevel.LevelDescription;
lblServiceLevel.Text = serviceLevel.LevelName;
}
chkVIP.Checked = user.IsVIP && secServiceLevels.Visible;
imgVipUser.Visible = user.IsVIP && secServiceLevels.Visible;
if (cntx.Quotas.ContainsKey(Quotas.ORGANIZATION_ALLOWCHANGEUPN))
{
if (cntx.Quotas[Quotas.ORGANIZATION_ALLOWCHANGEUPN].QuotaAllocatedValue != 1)
{
chkInherit.Visible = false;
}
else
{
chkInherit.Visible = true;
}
}
if (user.Locked)
chkLocked.Enabled = true;
else
chkLocked.Enabled = false;
chkLocked.Checked = user.Locked;
}
catch (Exception ex)
{
messageBox.ShowErrorMessage("ORGANIZATION_GET_USER_SETTINGS", ex);
}
}
private void BindServiceLevels()
{
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
if (cntx.Groups.ContainsKey(ResourceGroups.ServiceLevels))
{
List<ServiceLevel> enabledServiceLevels = new List<ServiceLevel>();
foreach (var quota in cntx.Quotas.Where(x => x.Key.Contains(Quotas.SERVICE_LEVELS)))
{
foreach (var serviceLevel in ES.Services.Organizations.GetSupportServiceLevels())
{
if (quota.Key.Replace(Quotas.SERVICE_LEVELS, "") == serviceLevel.LevelName && CheckServiceLevelQuota(quota.Value))
{
enabledServiceLevels.Add(serviceLevel);
}
}
}
secServiceLevels.Visible = true;
}
else
{
secServiceLevels.Visible = false;
}
}
private bool CheckServiceLevelQuota(QuotaValueInfo quota)
{
if (quota.QuotaAllocatedValue != -1)
{
return quota.QuotaAllocatedValue > quota.QuotaUsedValue;
}
return true;
}
}
}

View file

@ -0,0 +1,699 @@
//------------------------------------------------------------------------------
// <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.HostedSolution {
public partial class DeletedUserGeneralSettings {
/// <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>
/// 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>
/// imgVipUser 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 imgVipUser;
/// <summary>
/// litServiceLevel 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 litServiceLevel;
/// <summary>
/// UserTabsId 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.DeletedUserTabs UserTabsId;
/// <summary>
/// MailboxTabsId 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.MailboxTabs MailboxTabsId;
/// <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>
/// locUserPrincipalName 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 locUserPrincipalName;
/// <summary>
/// lblUserPrincipalName 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 lblUserPrincipalName;
/// <summary>
/// chkInherit 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 chkInherit;
/// <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>
/// chkDisable 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 chkDisable;
/// <summary>
/// chkLocked 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 chkLocked;
/// <summary>
/// locFirstName 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 locFirstName;
/// <summary>
/// lblFirstName 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 lblFirstName;
/// <summary>
/// locInitials 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 locInitials;
/// <summary>
/// lblInitials 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 lblInitials;
/// <summary>
/// locLastName 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 locLastName;
/// <summary>
/// lblLastName 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 lblLastName;
/// <summary>
/// locSubscriberNumber 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 locSubscriberNumber;
/// <summary>
/// lblSubscriberNumber 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 lblSubscriberNumber;
/// <summary>
/// locExternalEmailAddress 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 locExternalEmailAddress;
/// <summary>
/// lblExternalEmailAddress 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 lblExternalEmailAddress;
/// <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>
/// lblNotes 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 lblNotes;
/// <summary>
/// secServiceLevels control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secServiceLevels;
/// <summary>
/// ServiceLevels 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 ServiceLevels;
/// <summary>
/// locServiceLevel 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 locServiceLevel;
/// <summary>
/// lblServiceLevel 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 lblServiceLevel;
/// <summary>
/// locVIPUser 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 locVIPUser;
/// <summary>
/// chkVIP 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 chkVIP;
/// <summary>
/// secCompanyInfo control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secCompanyInfo;
/// <summary>
/// CompanyInfo 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 CompanyInfo;
/// <summary>
/// locJobTitle 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 locJobTitle;
/// <summary>
/// lblJobTitle 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 lblJobTitle;
/// <summary>
/// locCompany 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 locCompany;
/// <summary>
/// lblCompany 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 lblCompany;
/// <summary>
/// locDepartment 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 locDepartment;
/// <summary>
/// lblDepartment 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 lblDepartment;
/// <summary>
/// locOffice 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 locOffice;
/// <summary>
/// lblOffice 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 lblOffice;
/// <summary>
/// locManager 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 locManager;
/// <summary>
/// lblManager 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 lblManager;
/// <summary>
/// secContactInfo control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secContactInfo;
/// <summary>
/// ContactInfo 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 ContactInfo;
/// <summary>
/// locBusinessPhone 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 locBusinessPhone;
/// <summary>
/// lblBusinessPhone 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 lblBusinessPhone;
/// <summary>
/// locFax 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 locFax;
/// <summary>
/// lblFax 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 lblFax;
/// <summary>
/// locHomePhone 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 locHomePhone;
/// <summary>
/// lblHomePhone 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 lblHomePhone;
/// <summary>
/// locMobilePhone 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 locMobilePhone;
/// <summary>
/// lblMobilePhone 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 lblMobilePhone;
/// <summary>
/// locPager 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 locPager;
/// <summary>
/// lblPager 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 lblPager;
/// <summary>
/// locWebPage 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 locWebPage;
/// <summary>
/// lblWebPage 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 lblWebPage;
/// <summary>
/// secAddressInfo control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secAddressInfo;
/// <summary>
/// AddressInfo 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 AddressInfo;
/// <summary>
/// locAddress 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 locAddress;
/// <summary>
/// lblAddress 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 lblAddress;
/// <summary>
/// locCity 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 locCity;
/// <summary>
/// lblCity 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 lblCity;
/// <summary>
/// locState 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 locState;
/// <summary>
/// lblState 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 lblState;
/// <summary>
/// locZip 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 locZip;
/// <summary>
/// lblZip 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 lblZip;
/// <summary>
/// locCountry 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 locCountry;
/// <summary>
/// lblCountry 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 lblCountry;
/// <summary>
/// secAdvanced control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secAdvanced;
/// <summary>
/// AdvancedInfo 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 AdvancedInfo;
/// <summary>
/// locUserDomainName 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 locUserDomainName;
/// <summary>
/// lblUserDomainName 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 lblUserDomainName;
}
}

View file

@ -0,0 +1,61 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="OrganizationDeletedUserMemberOf.ascx.cs" Inherits="WebsitePanel.Portal.HostedSolution.DeletedUserMemberOf" %>
<%@ Register Src="UserControls/UserSelector.ascx" TagName="UserSelector" TagPrefix="wsp" %>
<%@ Register Src="UserControls/CountrySelector.ascx" TagName="CountrySelector" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/PasswordControl.ascx" TagName="PasswordControl" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/CollapsiblePanel.ascx" TagName="CollapsiblePanel" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
<%@ Register Src="UserControls/EmailAddress.ascx" TagName="EmailAddress" TagPrefix="wsp" %>
<%@ Register Src="UserControls/AccountsList.ascx" TagName="AccountsList" TagPrefix="wsp" %>
<%@ Register Src="UserControls/GroupsList.ascx" TagName="GroupsList" TagPrefix="wsp" %>
<%@ Register src="UserControls/DeletedUserTabs.ascx" tagname="UserTabs" tagprefix="uc1" %>
<%@ Register src="UserControls/MailboxTabs.ascx" tagname="MailboxTabs" tagprefix="uc1" %>
<%@ Register Src="../UserControls/ItemButtonPanel.ascx" TagName="ItemButtonPanel" TagPrefix="wsp" %>
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
<div id="ExchangeContainer">
<div class="Module">
<div class="Left">
</div>
<div class="Content">
<div class="Center">
<div class="Title">
<asp:Image ID="Image1" SkinID="OrganizationUser48" runat="server" />
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Edit User"></asp:Localize>
-
<asp:Literal ID="litDisplayName" runat="server" Text="John Smith" />
</div>
<div class="FormBody">
<uc1:UserTabs ID="UserTabsId" runat="server" SelectedTab="deleted_user_memberof" />
<uc1:MailboxTabs ID="MailboxTabsId" runat="server" SelectedTab="deleted_user_memberof" />
<wsp:SimpleMessageBox id="messageBox" runat="server" />
<wsp:CollapsiblePanel id="secGroups" runat="server" TargetControlID="GroupsPanel" meta:resourcekey="secGroups" Text="Groups"></wsp:CollapsiblePanel>
<asp:Panel ID="GroupsPanel" runat="server" Height="0" style="overflow:hidden;">
<asp:UpdatePanel ID="GeneralUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
<ContentTemplate>
<wsp:AccountsList id="groups" runat="server"
Disabled="true"
MailboxesEnabled="false"
EnableMailboxOnly="true"
ContactsEnabled="false"
DistributionListsEnabled="true"
SecurityGroupsEnabled="true" />
</ContentTemplate>
</asp:UpdatePanel>
</asp:Panel>
</div>
</div>
</div>
</div>
</div>

View file

@ -0,0 +1,132 @@
// Copyright (c) 2014, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Web.UI.WebControls;
using System.Collections.Generic;
using WebsitePanel.EnterpriseServer;
using WebsitePanel.Providers.HostedSolution;
using WebsitePanel.Providers.ResultObjects;
namespace WebsitePanel.Portal.HostedSolution
{
public partial class DeletedUserMemberOf : WebsitePanelModuleBase
{
protected PackageContext cntx;
protected PackageContext Cntx
{
get
{
if (cntx == null)
{
cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
}
return cntx;
}
}
protected bool EnableDistributionLists
{
get
{
return Cntx.Groups.ContainsKey(ResourceGroups.Exchange) & Utils.CheckQouta(Quotas.EXCHANGE2007_DISTRIBUTIONLISTS, Cntx);
}
}
protected bool EnableSecurityGroups
{
get
{
return Utils.CheckQouta(Quotas.ORGANIZATION_SECURITYGROUPS, Cntx);
}
}
protected void Page_Load(object sender, EventArgs e)
{
groups.DistributionListsEnabled = EnableDistributionLists;
groups.SecurityGroupsEnabled = EnableSecurityGroups;
if (!IsPostBack)
{
BindSettings();
MailboxTabsId.Visible = (PanelRequest.Context == "Mailbox");
UserTabsId.Visible = (PanelRequest.Context == "User");
}
}
private void BindSettings()
{
try
{
// get settings
OrganizationUser user = ES.Services.Organizations.GetUserGeneralSettings(PanelRequest.ItemID, PanelRequest.AccountID);
groups.DistributionListsEnabled = EnableDistributionLists && (user.AccountType == ExchangeAccountType.Mailbox
|| user.AccountType == ExchangeAccountType.Room
|| user.AccountType == ExchangeAccountType.Equipment);
litDisplayName.Text = user.DisplayName;
List<ExchangeAccount> groupsList = new List<ExchangeAccount>();
if (EnableDistributionLists)
{
//Distribution Lists
ExchangeAccount[] dLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
foreach (ExchangeAccount distList in dLists)
{
groupsList.Add(distList);
}
}
if (EnableSecurityGroups)
{
//Security Groups
ExchangeAccount[] securGroups = ES.Services.Organizations.GetSecurityGroupsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
foreach (ExchangeAccount secGroup in securGroups)
{
groupsList.Add(secGroup);
}
}
groups.SetAccounts(groupsList.ToArray());
}
catch (Exception ex)
{
messageBox.ShowErrorMessage("ORGANIZATION_GET_USER_SETTINGS", ex);
}
}
}
}

View file

@ -0,0 +1,114 @@
//------------------------------------------------------------------------------
// <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.HostedSolution {
public partial class DeletedUserMemberOf {
/// <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>
/// 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>
/// UserTabsId 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.DeletedUserTabs UserTabsId;
/// <summary>
/// MailboxTabsId 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.MailboxTabs MailboxTabsId;
/// <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>
/// secGroups control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secGroups;
/// <summary>
/// GroupsPanel 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 GroupsPanel;
/// <summary>
/// GeneralUpdatePanel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.UpdatePanel GeneralUpdatePanel;
/// <summary>
/// groups 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.AccountsList groups;
}
}

View file

@ -0,0 +1,119 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="OrganizationDeletedUsers.ascx.cs" Inherits="WebsitePanel.Portal.HostedSolution.OrganizationDeletedUsers" %>
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" 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="Left">
</div>
<div class="Content">
<div class="Center">
<div class="Title">
<asp:Image ID="Image1" SkinID="OrganizationUser48" runat="server" />
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Users"></asp:Localize>
</div>
<div class="FormBody">
<wsp:SimpleMessageBox id="messageBox" runat="server" />
<div class="FormButtonsBarClean">
<div class="FormButtonsBarCleanRight">
<asp:Panel ID="SearchPanel" runat="server" DefaultButton="cmdSearch">
<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:ListItem Value="PrimaryEmailAddress" meta:resourcekey="ddlSearchColumnEmail">Email</asp:ListItem>
<asp:ListItem Value="AccountName" meta:resourcekey="ddlSearchColumnAccountName">AccountName</asp:ListItem>
<asp:ListItem Value="SubscriberNumber" meta:resourcekey="ddlSearchColumnSubscriberNumber">Account Number</asp:ListItem>
<asp:ListItem Value="UserPrincipalName" meta:resourcekey="ddlSearchColumnUserPrincipalName">Login</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="gvDeletedUsers" runat="server" AutoGenerateColumns="False" EnableViewState="true"
Width="100%" EmptyDataText="gvDeletedUsers" CssSelectorClass="NormalGridView"
OnRowCommand="gvDeletedUsers_RowCommand" AllowPaging="True" AllowSorting="True"
DataSourceID="odsAccountsPaged" PageSize="20">
<Columns>
<asp:TemplateField HeaderText="gvDeletedUsersDisplayName" SortExpression="DisplayName">
<ItemStyle Width="25%"></ItemStyle>
<ItemTemplate>
<asp:Image ID="img1" runat="server" ImageUrl='<%# GetAccountImage((int)Eval("OriginAT"),(bool)Eval("User.IsVIP")) %>' ImageAlign="AbsMiddle"/>
<asp:hyperlink id="lnk1" runat="server"
NavigateUrl='<%# GetUserEditUrl(Eval("AccountId").ToString()) %>'>
<%# Eval("User.DisplayName") %>
</asp:hyperlink>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="gvDeletedUsersLogin" DataField="User.UserPrincipalName" SortExpression="UserPrincipalName" ItemStyle-Width="25%" />
<asp:TemplateField HeaderText="gvServiceLevel">
<ItemStyle Width="25%"></ItemStyle>
<ItemTemplate>
<asp:Label id="lbServLevel" runat="server" ToolTip = '<%# GetServiceLevel((int)Eval("User.LevelId")).LevelDescription%>'>
<%# GetServiceLevel((int)Eval("User.LevelId")).LevelName%>
</asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="gvDeletedUsersEmail" DataField="User.PrimaryEmailAddress" SortExpression="PrimaryEmailAddress" ItemStyle-Width="25%" />
<asp:BoundField HeaderText="gvSubscriberNumber" DataField="User.SubscriberNumber" ItemStyle-Width="20%" />
<asp:TemplateField ItemStyle-Wrap="False">
<ItemTemplate>
<asp:ImageButton ID="Image2" runat="server" Width="16px" Height="16px" ToolTip="Mail" ImageUrl='<%# GetMailImage((int)Eval("OriginAT")) %>' CommandName="OpenMailProperties" CommandArgument='<%# Eval("AccountId") %>' Enabled=<%# EnableMailImageButton((int)Eval("OriginAT")) %>/>
<asp:ImageButton ID="Image3" runat="server" Width="16px" Height="16px" ToolTip="UC" ImageUrl='<%# GetOCSImage((bool)Eval("User.IsOCSUser"),(bool)Eval("User.IsLyncUser")) %>' CommandName="OpenUCProperties" CommandArgument='<%# GetOCSArgument((int)Eval("AccountId"),(bool)Eval("User.IsOCSUser"),(bool)Eval("User.IsLyncUser")) %>' Enabled=<%# EnableOCSImageButton((bool)Eval("User.IsOCSUser"),(bool)Eval("User.IsLyncUser")) %>/>
<asp:ImageButton ID="Image4" runat="server" Width="16px" Height="16px" ToolTip="BlackBerry" ImageUrl='<%# GetBlackBerryImage((bool)Eval("User.IsBlackBerryUser")) %>' CommandName="OpenBlackBerryProperties" CommandArgument='<%# Eval("AccountId") %>' Enabled=<%# EnableBlackBerryImageButton((bool)Eval("User.IsBlackBerryUser")) %>/>
<asp:Image ID="Image5" runat="server" Width="16px" Height="16px" ToolTip="CRM" ImageUrl='<%# GetCRMImage((Guid)Eval("User.CrmUserId")) %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:HyperLink ID="lnkDownload" runat="server" Visible='<%# !(bool)Eval("IsArchiveEmpty") %>'
NavigateUrl='<%# (bool)Eval("IsArchiveEmpty") ? "#" : GetDownloadLink((string)Eval("StoragePath"),(string)Eval("FolderName"),(string)Eval("FileName")) %>'>
<%# Eval("FileName") %>
</asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:ImageButton ID="cmdDelete" runat="server" Text="Delete" SkinID="ExchangeDelete"
CommandName="DeleteItem" CommandArgument='<%# Eval("AccountId") %>'
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="GetOrganizationDeletedUsersPagedCount"
SelectMethod="GetOrganizationDeletedUsersPaged"
SortParameterName="sortColumn"
TypeName="WebsitePanel.Portal.OrganizationsHelper"
OnSelected="odsAccountsPaged_Selected">
<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 />
<div>
<asp:Localize ID="locQuota" runat="server" meta:resourcekey="locQuota" Text="Total Users Created:"></asp:Localize>
&nbsp;&nbsp;&nbsp;
<wsp:QuotaViewer ID="deletedUsersQuota" runat="server" QuotaTypeId="2" />
</div>
</div>
</div>
</div>
</div>
</div>

View file

@ -0,0 +1,345 @@
// Copyright (c) 2014, 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 SMB SAAS Systems Inc. nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.UI.WebControls;
using WebsitePanel.Providers.HostedSolution;
using WebsitePanel.EnterpriseServer;
using WebsitePanel.EnterpriseServer.Base.HostedSolution;
using System.IO;
namespace WebsitePanel.Portal.HostedSolution
{
public partial class OrganizationDeletedUsers : WebsitePanelModuleBase
{
private ServiceLevel[] ServiceLevels;
private PackageContext cntx;
protected void Page_Load(object sender, EventArgs e)
{
string downloadFile = Request["DownloadFile"];
if (downloadFile != null)
{
// download file
Response.Clear();
Response.AddHeader("Content-Disposition", "attachment; filename=" + Path.GetFileName(downloadFile));
Response.ContentType = "application/octet-stream";
int FILE_BUFFER_LENGTH = 5000000;
byte[] buffer = null;
int offset = 0;
do
{
try
{
// read remote content
buffer = ES.Services.Organizations.GetArchiveFileBinaryChunk(PanelSecurity.PackageId, downloadFile, offset, FILE_BUFFER_LENGTH);
}
catch (Exception ex)
{
messageBox.ShowErrorMessage("ARCHIVE_FILE_READ_FILE", ex);
break;
}
// write to stream
Response.BinaryWrite(buffer);
offset += FILE_BUFFER_LENGTH;
}
while (buffer.Length == FILE_BUFFER_LENGTH);
Response.End();
}
cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
if (!IsPostBack)
{
BindStats();
}
BindServiceLevels();
gvDeletedUsers.Columns[3].Visible = cntx.Groups.ContainsKey(ResourceGroups.ServiceLevels);
}
private void BindServiceLevels()
{
ServiceLevels = ES.Services.Organizations.GetSupportServiceLevels();
}
private void BindStats()
{
// quota values
OrganizationStatistics stats = ES.Services.Organizations.GetOrganizationStatisticsByOrganization(PanelRequest.ItemID);
OrganizationStatistics tenantStats = ES.Services.Organizations.GetOrganizationStatistics(PanelRequest.ItemID);
deletedUsersQuota.QuotaUsedValue = stats.DeletedUsers;
deletedUsersQuota.QuotaValue = stats.AllocatedDeletedUsers;
if (stats.AllocatedUsers != -1) deletedUsersQuota.QuotaAvailable = tenantStats.AllocatedDeletedUsers - tenantStats.DeletedUsers;
}
public string GetUserEditUrl(string accountId)
{
return EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "view_deleted_user",
"AccountID=" + accountId,
"ItemID=" + PanelRequest.ItemID,
"Context=User");
}
protected void odsAccountsPaged_Selected(object sender, ObjectDataSourceStatusEventArgs e)
{
if (e.Exception != null)
{
messageBox.ShowErrorMessage("ORGANZATION_GET_USERS", e.Exception);
e.ExceptionHandled = true;
}
}
protected void gvDeletedUsers_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "DeleteItem")
{
// delete user
int accountId = Utils.ParseInt(e.CommandArgument.ToString(), 0);
try
{
int result = ES.Services.Organizations.DeleteUser(PanelRequest.ItemID, accountId);
if (result < 0)
{
messageBox.ShowResultMessage(result);
return;
}
// rebind grid
gvDeletedUsers.DataBind();
// bind stats
BindStats();
}
catch (Exception ex)
{
messageBox.ShowErrorMessage("ORGANIZATIONS_DELETE_USERS", ex);
}
}
if (e.CommandName == "OpenMailProperties")
{
int accountId = Utils.ParseInt(e.CommandArgument.ToString(), 0);
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "mailbox_settings",
"AccountID=" + accountId,
"ItemID=" + PanelRequest.ItemID));
}
if (e.CommandName == "OpenBlackBerryProperties")
{
int accountId = Utils.ParseInt(e.CommandArgument.ToString(), 0);
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "edit_blackberry_user",
"AccountID=" + accountId,
"ItemID=" + PanelRequest.ItemID));
}
if (e.CommandName == "OpenCRMProperties")
{
int accountId = Utils.ParseInt(e.CommandArgument.ToString(), 0);
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "mailbox_settings",
"AccountID=" + accountId,
"ItemID=" + PanelRequest.ItemID));
}
if (e.CommandName == "OpenUCProperties")
{
string[] Tmp = e.CommandArgument.ToString().Split('|');
int accountId = Utils.ParseInt(Tmp[0], 0);
if (Tmp[1] == "True")
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "edit_ocs_user",
"AccountID=" + accountId,
"ItemID=" + PanelRequest.ItemID));
else
if (Tmp[2] == "True")
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "edit_lync_user",
"AccountID=" + accountId,
"ItemID=" + PanelRequest.ItemID));
}
}
public string GetAccountImage(int accountTypeId, bool vip)
{
string imgName = string.Empty;
ExchangeAccountType accountType = (ExchangeAccountType)accountTypeId;
switch (accountType)
{
case ExchangeAccountType.Room:
imgName = "room_16.gif";
break;
case ExchangeAccountType.Equipment:
imgName = "equipment_16.gif";
break;
default:
imgName = "admin_16.png";
break;
}
if (vip && cntx.Groups.ContainsKey(ResourceGroups.ServiceLevels)) imgName = "vip_user_16.png";
return GetThemedImage("Exchange/" + imgName);
}
public string GetMailImage(int accountTypeId)
{
string imgName = "exchange24.png";
ExchangeAccountType accountType = (ExchangeAccountType)accountTypeId;
if (accountType == ExchangeAccountType.User)
imgName = "blank16.gif";
return GetThemedImage("Exchange/" + imgName);
}
public string GetOCSImage(bool IsOCSUser, bool IsLyncUser)
{
string imgName = "blank16.gif";
if (IsLyncUser)
imgName = "lync16.png";
else
if ((IsOCSUser))
imgName = "ocs16.png";
return GetThemedImage("Exchange/" + imgName);
}
public string GetBlackBerryImage(bool IsBlackBerryUser)
{
string imgName = "blank16.gif";
if (IsBlackBerryUser)
imgName = "blackberry16.png";
return GetThemedImage("Exchange/" + imgName);
}
public string GetCRMImage(Guid CrmUserId)
{
string imgName = "blank16.gif";
if (CrmUserId != Guid.Empty)
imgName = "crm_16.png";
return GetThemedImage("Exchange/" + imgName);
}
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
gvDeletedUsers.PageSize = Convert.ToInt16(ddlPageSize.SelectedValue);
// rebind grid
gvDeletedUsers.DataBind();
// bind stats
BindStats();
}
public bool EnableMailImageButton(int accountTypeId)
{
bool imgName = true;
ExchangeAccountType accountType = (ExchangeAccountType)accountTypeId;
if (accountType == ExchangeAccountType.User)
imgName = false;
return imgName;
}
public bool EnableOCSImageButton(bool IsOCSUser, bool IsLyncUser)
{
bool imgName = false;
if (IsLyncUser)
imgName = true;
else
if ((IsOCSUser))
imgName = true;
return imgName;
}
public bool EnableBlackBerryImageButton(bool IsBlackBerryUser)
{
bool imgName = false;
if (IsBlackBerryUser)
imgName = true;
return imgName;
}
public string GetOCSArgument(int accountID, bool IsOCS, bool IsLync)
{
return accountID.ToString() + "|" + IsOCS.ToString() + "|" + IsLync.ToString();
}
public ServiceLevel GetServiceLevel(int levelId)
{
ServiceLevel serviceLevel = ServiceLevels.Where(x => x.LevelId == levelId).DefaultIfEmpty(new ServiceLevel { LevelName = "", LevelDescription = "" }).FirstOrDefault();
bool enable = !string.IsNullOrEmpty(serviceLevel.LevelName);
enable = enable ? cntx.Quotas.ContainsKey(Quotas.SERVICE_LEVELS + serviceLevel.LevelName) : false;
enable = enable ? cntx.Quotas[Quotas.SERVICE_LEVELS + serviceLevel.LevelName].QuotaAllocatedValue != 0 : false;
if (!enable)
{
serviceLevel.LevelName = "";
serviceLevel.LevelDescription = "";
}
return serviceLevel;
}
public string GetDownloadLink(string storagePath, string folderName, string fileName)
{
return NavigateURL(PortalUtils.SPACE_ID_PARAM,
PanelSecurity.PackageId.ToString(),
"ctl=" + PanelRequest.Ctl,
"ItemID=" + PanelRequest.ItemID,
"mid=" + this.ModuleID,
"DownloadFile=" + Server.UrlEncode(Path.Combine(storagePath, folderName, fileName)));
}
}
}

View file

@ -0,0 +1,132 @@
//------------------------------------------------------------------------------
// <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.HostedSolution {
public partial class OrganizationDeletedUsers {
/// <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>
/// 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>
/// 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>
/// ddlPageSize 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 ddlPageSize;
/// <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>
/// gvDeletedUsers 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 gvDeletedUsers;
/// <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>
/// deletedUsersQuota control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.QuotaViewer deletedUsersQuota;
}
}

View file

@ -65,6 +65,14 @@
<wsp:QuotaViewer ID="userStats" QuotaTypeId="2" runat="server" DisplayGauge="true" />
</td>
</tr>
<tr class="OrgStatsRow">
<td class="OrgStatsQuota" nowrap>
<asp:HyperLink ID="lnkDeletedUsers" runat="server" meta:resourcekey="lnkDeletedUsers"></asp:HyperLink>
</td>
<td>
<wsp:QuotaViewer ID="deletedUserStats" QuotaTypeId="2" runat="server" DisplayGauge="true" />
</td>
</tr>
<tr class="OrgStatsRow" id="securGroupsStat" runat="server">
<td class="OrgStatsQuota" nowrap >
<asp:HyperLink ID="lnkGroups" runat="server" meta:resourcekey="lnkGroups" Text="Groups:"></asp:HyperLink>
@ -341,6 +349,38 @@
</td>
</tr>
</asp:Panel>
<asp:Panel runat="server" ID="remoteDesktopStatsPanel">
<tr>
<td class="OrgStatsGroup" width="100%" colspan="2">
<asp:Localize ID="locRemoteDesktop" runat="server" meta:resourcekey="locRemoteDesktop" ></asp:Localize>
</td>
</tr>
<tr class="OrgStatsRow">
<td class="OrgStatsQuota" nowrap>
<asp:HyperLink ID="lnkRdsServers" runat="server" meta:resourcekey="lnkRdsServers" />
</td>
<td>
<wsp:QuotaViewer ID="rdsServers" QuotaTypeId="2" runat="server" DisplayGauge="true" />
</td>
</tr>
<tr class="OrgStatsRow">
<td class="OrgStatsQuota" nowrap>
<asp:HyperLink ID="lnkRdsCollections" runat="server" meta:resourcekey="lnkRdsCollections" />
</td>
<td>
<wsp:QuotaViewer ID="rdsCollections" QuotaTypeId="2" runat="server" DisplayGauge="true" />
</td>
</tr>
<tr class="OrgStatsRow">
<td class="OrgStatsQuota" nowrap>
<asp:HyperLink ID="lnkRdsUsers" runat="server" meta:resourcekey="lnkRdsUsers" />
</td>
<td>
<wsp:QuotaViewer ID="rdsUsers" QuotaTypeId="2" runat="server" DisplayGauge="true" />
</td>
</tr>
</asp:Panel>
</table>
</div>

View file

@ -189,7 +189,13 @@ namespace WebsitePanel.Portal.ExchangeServer
userStats.QuotaUsedValue = orgStats.CreatedUsers;
userStats.QuotaValue = orgStats.AllocatedUsers;
if (orgStats.AllocatedUsers != -1) userStats.QuotaAvailable = tenantStats.AllocatedUsers - tenantStats.CreatedUsers;
if (orgStats.AllocatedUsers != -1)
userStats.QuotaAvailable = tenantStats.AllocatedUsers - tenantStats.CreatedUsers;
deletedUserStats.QuotaUsedValue = orgStats.DeletedUsers;
deletedUserStats.QuotaValue = orgStats.AllocatedDeletedUsers;
if (orgStats.AllocatedDeletedUsers != -1)
userStats.QuotaAvailable = tenantStats.AllocatedDeletedUsers - tenantStats.DeletedUsers;
lnkDomains.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "domains",
"SpaceID=" + PanelSecurity.PackageId);
@ -197,6 +203,9 @@ namespace WebsitePanel.Portal.ExchangeServer
lnkUsers.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "users",
"SpaceID=" + PanelSecurity.PackageId);
lnkDeletedUsers.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "deleted_users",
"SpaceID=" + PanelSecurity.PackageId);
if (Utils.CheckQouta(Quotas.ORGANIZATION_SECURITYGROUPS, cntx))
{
securGroupsStat.Visible = true;
@ -305,6 +314,16 @@ namespace WebsitePanel.Portal.ExchangeServer
}
else
serviceLevelsStatsPanel.Visible = false;
if (cntx.Groups.ContainsKey(ResourceGroups.RDS))
{
remoteDesktopStatsPanel.Visible = true;
BindRemoteDesktopStats(orgStats, tenantStats);
}
else
{
remoteDesktopStatsPanel.Visible = false;
}
}
private void BindCRMStats(OrganizationStatistics stats, OrganizationStatistics tenantStats)
@ -447,5 +466,34 @@ namespace WebsitePanel.Portal.ExchangeServer
}
}
private void BindRemoteDesktopStats(OrganizationStatistics stats, OrganizationStatistics tenantStats)
{
rdsServers.QuotaValue = stats.AllocatedRdsServers;
rdsServers.QuotaUsedValue = stats.CreatedRdsServers;
if (stats.AllocatedRdsServers != -1)
{
rdsServers.QuotaAvailable = tenantStats.AllocatedRdsServers - tenantStats.CreatedRdsServers;
}
rdsCollections.QuotaValue = stats.AllocatedRdsCollections;
rdsCollections.QuotaUsedValue = stats.CreatedRdsCollections;
if (stats.AllocatedRdsCollections != -1)
{
rdsCollections.QuotaAvailable = tenantStats.AllocatedRdsCollections - tenantStats.CreatedRdsCollections;
}
rdsUsers.QuotaValue = stats.AllocatedRdsUsers;
rdsUsers.QuotaUsedValue = stats.CreatedRdsUsers;
if (stats.AllocatedRdsCollections != -1)
{
rdsUsers.QuotaAvailable = tenantStats.AllocatedRdsUsers - tenantStats.CreatedRdsUsers;
}
lnkRdsServers.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "rds_collections", "SpaceID=" + PanelSecurity.PackageId);
lnkRdsCollections.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "rds_collections", "SpaceID=" + PanelSecurity.PackageId);
lnkRdsUsers.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "rds_collections", "SpaceID=" + PanelSecurity.PackageId);
}
}
}

View file

@ -1,31 +1,3 @@
// Copyright (c) 2015, 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.
@ -166,6 +138,24 @@ namespace WebsitePanel.Portal.ExchangeServer {
/// </remarks>
protected global::WebsitePanel.Portal.QuotaViewer userStats;
/// <summary>
/// lnkDeletedUsers 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.HyperLink lnkDeletedUsers;
/// <summary>
/// deletedUserStats control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.QuotaViewer deletedUserStats;
/// <summary>
/// securGroupsStat control.
/// </summary>
@ -822,5 +812,77 @@ namespace WebsitePanel.Portal.ExchangeServer {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locServiceLevels;
/// <summary>
/// remoteDesktopStatsPanel 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 remoteDesktopStatsPanel;
/// <summary>
/// locRemoteDesktop 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 locRemoteDesktop;
/// <summary>
/// lnkRdsServers 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.HyperLink lnkRdsServers;
/// <summary>
/// rdsServers control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.QuotaViewer rdsServers;
/// <summary>
/// lnkRdsCollections 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.HyperLink lnkRdsCollections;
/// <summary>
/// rdsCollections control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.QuotaViewer rdsCollections;
/// <summary>
/// lnkRdsUsers 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.HyperLink lnkRdsUsers;
/// <summary>
/// rdsUsers control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.QuotaViewer rdsUsers;
}
}

View file

@ -0,0 +1,255 @@
<?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="buttonPanel.OnSaveClientClick" xml:space="preserve">
<value>ShowProgressDialog('Updating user settings...');</value>
</data>
<data name="chkDisable.Text" xml:space="preserve">
<value>Disable User</value>
</data>
<data name="chkLocked.Text" xml:space="preserve">
<value>Account is locked out</value>
</data>
<data name="chkSetPassword.Text" xml:space="preserve">
<value>Set Password</value>
</data>
<data name="HSFormComments.Text" xml:space="preserve">
<value />
</data>
<data name="locAddress.Text" xml:space="preserve">
<value>Address:</value>
</data>
<data name="locBusinessPhone.Text" xml:space="preserve">
<value>Business Phone:</value>
</data>
<data name="locCity.Text" xml:space="preserve">
<value>City:</value>
</data>
<data name="locCompany.Text" xml:space="preserve">
<value>Company:</value>
</data>
<data name="locCountry.Text" xml:space="preserve">
<value>Country/Region:</value>
</data>
<data name="locDepartment.Text" xml:space="preserve">
<value>Department:</value>
</data>
<data name="locDisplayName.Text" xml:space="preserve">
<value>Display Name: *</value>
</data>
<data name="locExternalEmailAddress.Text" xml:space="preserve">
<value>External e-mail:</value>
</data>
<data name="locFax.Text" xml:space="preserve">
<value>Fax:</value>
</data>
<data name="locFirstName.Text" xml:space="preserve">
<value>First Name:</value>
</data>
<data name="locHomePhone.Text" xml:space="preserve">
<value>Home Phone:</value>
</data>
<data name="locInitials.Text" xml:space="preserve">
<value>Initials:</value>
</data>
<data name="locJobTitle.Text" xml:space="preserve">
<value>Job Title:</value>
</data>
<data name="locLastName.Text" xml:space="preserve">
<value>Last Name:</value>
</data>
<data name="locManager.Text" xml:space="preserve">
<value>Manager:</value>
</data>
<data name="locMobilePhone.Text" xml:space="preserve">
<value>Mobile Phone:</value>
</data>
<data name="locNotes.Text" xml:space="preserve">
<value>Notes:</value>
</data>
<data name="locOffice.Text" xml:space="preserve">
<value>Office:</value>
</data>
<data name="locPager.Text" xml:space="preserve">
<value>Pager:</value>
</data>
<data name="locPassword.Text" xml:space="preserve">
<value>Password:</value>
</data>
<data name="locState.Text" xml:space="preserve">
<value>State/Province:</value>
</data>
<data name="locSubscriberNumber.Text" xml:space="preserve">
<value>Account Number:</value>
</data>
<data name="locTitle.Text" xml:space="preserve">
<value>Edit User</value>
</data>
<data name="locUserDomainName.Text" xml:space="preserve">
<value>User Domain Name:</value>
</data>
<data name="locWebPage.Text" xml:space="preserve">
<value>Web Page:</value>
</data>
<data name="locZip.Text" xml:space="preserve">
<value>Zip/Postal Code:</value>
</data>
<data name="secAddressInfo.Text" xml:space="preserve">
<value>Address</value>
</data>
<data name="secAdvanced.Text" xml:space="preserve">
<value>Advanced</value>
</data>
<data name="secCompanyInfo.Text" xml:space="preserve">
<value>Company Information</value>
</data>
<data name="secContactInfo.Text" xml:space="preserve">
<value>Contact Information</value>
</data>
<data name="Text.PageName" xml:space="preserve">
<value>User</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>
<data name="lblUserPrincipalName" xml:space="preserve">
<value>Login Name:</value>
</data>
<data name="btnSetUserPassword.Text" xml:space="preserve">
<value>Set Password</value>
</data>
<data name="btnSetUserPrincipalName.Text" xml:space="preserve">
<value>Set Login Name</value>
</data>
<data name="chkInherit.Text" xml:space="preserve">
<value>Update Services</value>
</data>
<data name="locServiceLevel.Text" xml:space="preserve">
<value>Service Level:</value>
</data>
<data name="locVIPUser.Text" xml:space="preserve">
<value>VIP:</value>
</data>
<data name="secServiceLevels.Text" xml:space="preserve">
<value>Service Level Information</value>
</data>
</root>

View file

@ -0,0 +1,129 @@
<?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="locTitle.Text" xml:space="preserve">
<value>Edit User </value>
</data>
<data name="secGeneral.Text" xml:space="preserve">
<value>General</value>
</data>
<data name="Text.PageName" xml:space="preserve">
<value>Users</value>
</data>
</root>

View file

@ -46,68 +46,107 @@
</asp:Panel>
</div>
</div>
<asp:GridView ID="gvUsers" runat="server" AutoGenerateColumns="False" EnableViewState="true"
Width="100%" EmptyDataText="gvUsers" CssSelectorClass="NormalGridView"
OnRowCommand="gvUsers_RowCommand" AllowPaging="True" AllowSorting="True"
DataSourceID="odsAccountsPaged" PageSize="20">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:Image ID="img2" runat="server" Width="16px" Height="16px" ImageUrl='<%# GetStateImage((bool)Eval("Locked"),(bool)Eval("Disabled")) %>' ImageAlign="AbsMiddle" />
</ItemTemplate>
</asp:TemplateField>
<asp:Panel ID="UsersPanel" runat="server">
<asp:UpdatePanel ID="UsersUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
<ContentTemplate>
<asp:GridView ID="gvUsers" runat="server" AutoGenerateColumns="False" EnableViewState="true"
Width="100%" EmptyDataText="gvUsers" CssSelectorClass="NormalGridView" DataKeyNames="AccountId,AccountType"
OnRowCommand="gvUsers_RowCommand" AllowPaging="True" AllowSorting="True"
DataSourceID="odsAccountsPaged" PageSize="20">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:Image ID="img2" runat="server" Width="16px" Height="16px" ImageUrl='<%# GetStateImage((bool)Eval("Locked"),(bool)Eval("Disabled")) %>' ImageAlign="AbsMiddle" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="gvUsersDisplayName" SortExpression="DisplayName">
<ItemStyle Width="25%"></ItemStyle>
<ItemTemplate>
<asp:Image ID="img1" runat="server" ImageUrl='<%# GetAccountImage((int)Eval("AccountType"),(bool)Eval("IsVIP")) %>' ImageAlign="AbsMiddle"/>
<asp:hyperlink id="lnk1" runat="server"
NavigateUrl='<%# GetUserEditUrl(Eval("AccountId").ToString()) %>'>
<%# Eval("DisplayName") %>
</asp:hyperlink>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="gvUsersLogin" DataField="UserPrincipalName" SortExpression="UserPrincipalName" ItemStyle-Width="25%" />
<asp:TemplateField HeaderText="gvServiceLevel">
<ItemStyle Width="25%"></ItemStyle>
<ItemTemplate>
<asp:Label id="lbServLevel" runat="server" ToolTip = '<%# GetServiceLevel((int)Eval("LevelId")).LevelDescription%>'>
<%# GetServiceLevel((int)Eval("LevelId")).LevelName%>
</asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="gvUsersEmail" DataField="PrimaryEmailAddress" SortExpression="PrimaryEmailAddress" ItemStyle-Width="25%" />
<asp:BoundField HeaderText="gvSubscriberNumber" DataField="SubscriberNumber" ItemStyle-Width="20%" />
<asp:TemplateField ItemStyle-Wrap="False">
<ItemTemplate>
<asp:ImageButton ID="Image2" runat="server" Width="16px" Height="16px" ToolTip="Mail" ImageUrl='<%# GetMailImage((int)Eval("AccountType")) %>' CommandName="OpenMailProperties" CommandArgument='<%# Eval("AccountId") %>' Enabled=<%# EnableMailImageButton((int)Eval("AccountType")) %>/>
<asp:ImageButton ID="Image3" runat="server" Width="16px" Height="16px" ToolTip="UC" ImageUrl='<%# GetOCSImage((bool)Eval("IsOCSUser"),(bool)Eval("IsLyncUser")) %>' CommandName="OpenUCProperties" CommandArgument='<%# GetOCSArgument((int)Eval("AccountId"),(bool)Eval("IsOCSUser"),(bool)Eval("IsLyncUser")) %>' Enabled=<%# EnableOCSImageButton((bool)Eval("IsOCSUser"),(bool)Eval("IsLyncUser")) %>/>
<asp:ImageButton ID="Image4" runat="server" Width="16px" Height="16px" ToolTip="BlackBerry" ImageUrl='<%# GetBlackBerryImage((bool)Eval("IsBlackBerryUser")) %>' CommandName="OpenBlackBerryProperties" CommandArgument='<%# Eval("AccountId") %>' Enabled=<%# EnableBlackBerryImageButton((bool)Eval("IsBlackBerryUser")) %>/>
<asp:Image ID="Image5" runat="server" Width="16px" Height="16px" ToolTip="CRM" ImageUrl='<%# GetCRMImage((Guid)Eval("CrmUserId")) %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:ImageButton ID="cmdDelete" runat="server" Text="Delete" SkinID="ExchangeDelete"
CommandName="DeleteItem" CommandArgument='<%# Eval("AccountId") %>'
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="GetOrganizationUsersPagedCount"
SelectMethod="GetOrganizationUsersPaged"
SortParameterName="sortColumn"
TypeName="WebsitePanel.Portal.OrganizationsHelper"
OnSelected="odsAccountsPaged_Selected">
<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>
<asp:TemplateField HeaderText="gvUsersDisplayName" SortExpression="DisplayName">
<ItemStyle Width="25%"></ItemStyle>
<ItemTemplate>
<asp:Image ID="img1" runat="server" ImageUrl='<%# GetAccountImage((int)Eval("AccountType"),(bool)Eval("IsVIP")) %>' ImageAlign="AbsMiddle"/>
<asp:hyperlink id="lnk1" runat="server"
NavigateUrl='<%# GetUserEditUrl(Eval("AccountId").ToString()) %>'>
<%# Eval("DisplayName") %>
</asp:hyperlink>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="gvUsersLogin" DataField="UserPrincipalName" SortExpression="UserPrincipalName" ItemStyle-Width="25%" />
<asp:TemplateField HeaderText="gvServiceLevel">
<ItemStyle Width="25%"></ItemStyle>
<ItemTemplate>
<asp:Label id="lbServLevel" runat="server" ToolTip = '<%# GetServiceLevel((int)Eval("LevelId")).LevelDescription%>'>
<%# GetServiceLevel((int)Eval("LevelId")).LevelName%>
</asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="gvUsersEmail" DataField="PrimaryEmailAddress" SortExpression="PrimaryEmailAddress" ItemStyle-Width="25%" />
<asp:BoundField HeaderText="gvSubscriberNumber" DataField="SubscriberNumber" ItemStyle-Width="20%" />
<asp:TemplateField ItemStyle-Wrap="False">
<ItemTemplate>
<asp:ImageButton ID="Image2" runat="server" Width="16px" Height="16px" ToolTip="Mail" ImageUrl='<%# GetMailImage((int)Eval("AccountType")) %>' CommandName="OpenMailProperties" CommandArgument='<%# Eval("AccountId") %>' Enabled=<%# EnableMailImageButton((int)Eval("AccountType")) %>/>
<asp:ImageButton ID="Image3" runat="server" Width="16px" Height="16px" ToolTip="UC" ImageUrl='<%# GetOCSImage((bool)Eval("IsOCSUser"),(bool)Eval("IsLyncUser")) %>' CommandName="OpenUCProperties" CommandArgument='<%# GetOCSArgument((int)Eval("AccountId"),(bool)Eval("IsOCSUser"),(bool)Eval("IsLyncUser")) %>' Enabled=<%# EnableOCSImageButton((bool)Eval("IsOCSUser"),(bool)Eval("IsLyncUser")) %>/>
<asp:ImageButton ID="Image4" runat="server" Width="16px" Height="16px" ToolTip="BlackBerry" ImageUrl='<%# GetBlackBerryImage((bool)Eval("IsBlackBerryUser")) %>' CommandName="OpenBlackBerryProperties" CommandArgument='<%# Eval("AccountId") %>' Enabled=<%# EnableBlackBerryImageButton((bool)Eval("IsBlackBerryUser")) %>/>
<asp:Image ID="Image5" runat="server" Width="16px" Height="16px" ToolTip="CRM" ImageUrl='<%# GetCRMImage((Guid)Eval("CrmUserId")) %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:ImageButton ID="cmdDelete" runat="server" Text="Delete" SkinID="ExchangeDelete" CommandName="DeleteItem"
CommandArgument='<%# Container.DataItemIndex %>' meta:resourcekey="cmdDelete"></asp:ImageButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:ObjectDataSource ID="odsAccountsPaged" runat="server" EnablePaging="True"
SelectCountMethod="GetOrganizationUsersPagedCount"
SelectMethod="GetOrganizationUsersPaged"
SortParameterName="sortColumn"
TypeName="WebsitePanel.Portal.OrganizationsHelper"
OnSelected="odsAccountsPaged_Selected">
<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>
<asp:Panel ID="DeleteUserPanel" runat="server" CssClass="Popup" style="display:none">
<table class="Popup-Header" cellpadding="0" cellspacing="0">
<tr>
<td class="Popup-HeaderLeft"></td>
<td class="Popup-HeaderTitle">
<asp:Localize ID="headerDeleteUser" runat="server" meta:resourcekey="headerDeleteUser"></asp:Localize>
</td>
<td class="Popup-HeaderRight"></td>
</tr>
</table>
<div class="Popup-Content">
<div class="Popup-Body">
<br />
<asp:UpdatePanel ID="DeleteUserUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
<ContentTemplate>
<asp:HiddenField ID="hdAccountId" runat="server" Value="0" />
<asp:Literal ID="litDeleteUser" runat="server" meta:resourcekey="litDeleteUser"></asp:Literal>
<br />
<asp:CheckBox ID="chkEnableForceArchiveMailbox" runat="server" meta:resourcekey="chkEnableForceArchiveMailbox" Visible="false" Checked="false" />
</ContentTemplate>
</asp:UpdatePanel>
<br />
</div>
<div class="FormFooter">
<asp:Button ID="btnDeleteUser" runat="server" CssClass="Button1" meta:resourcekey="btnDelete" Text="Delete" OnClientClick="return ShowProgressDialog('Deleting user...');" OnClick="btnDelete_Click" />
<asp:Button ID="btnCancelDelete" runat="server" CssClass="Button1" meta:resourcekey="btnCancel" Text="Cancel" CausesValidation="false" />
</div>
</div>
</asp:Panel>
<asp:Button ID="btnDeleteUserFake" runat="server" style="display:none;" />
<ajaxToolkit:ModalPopupExtender ID="DeleteUserModal" runat="server" TargetControlID="btnDeleteUserFake" EnableViewState="true"
PopupControlID="DeleteUserPanel" BackgroundCssClass="modalBackground" DropShadow="false" CancelControlID="btnCancelDelete" />
</ContentTemplate>
<triggers>
<asp:PostBackTrigger ControlID="btnDeleteUser" />
</triggers>
</asp:UpdatePanel>
</asp:Panel>
<br />
<div>
<asp:Localize ID="locQuota" runat="server" meta:resourcekey="locQuota" Text="Total Users Created:"></asp:Localize>
@ -127,7 +166,6 @@
</div>
</ItemTemplate>
</asp:Repeater>
</div>
</div>
</div>

View file

@ -130,28 +130,30 @@ namespace WebsitePanel.Portal.HostedSolution
{
if (e.CommandName == "DeleteItem")
{
// delete user
int accountId = Utils.ParseInt(e.CommandArgument.ToString(), 0);
int rowIndex = Utils.ParseInt(e.CommandArgument.ToString(), 0);
try
var accountId = Utils.ParseInt(gvUsers.DataKeys[rowIndex][0], 0);
var accountType = (ExchangeAccountType)gvUsers.DataKeys[rowIndex][1];
if (Utils.CheckQouta(Quotas.ORGANIZATION_DELETED_USERS, cntx) && accountType != ExchangeAccountType.User)
{
int result = ES.Services.Organizations.DeleteUser(PanelRequest.ItemID, accountId);
if (result < 0)
{
messageBox.ShowResultMessage(result);
return;
}
chkEnableForceArchiveMailbox.Visible = true;
// rebind grid
gvUsers.DataBind();
var account = ES.Services.ExchangeServer.GetAccount(PanelRequest.ItemID, accountId);
var mailboxPlan = ES.Services.ExchangeServer.GetExchangeMailboxPlan(PanelRequest.ItemID, account.MailboxPlanId);
// bind stats
BindStats();
chkEnableForceArchiveMailbox.Checked = mailboxPlan.EnableForceArchiveDeletion;
chkEnableForceArchiveMailbox.Enabled = !mailboxPlan.EnableForceArchiveDeletion;
}
catch (Exception ex)
else
{
messageBox.ShowErrorMessage("ORGANIZATIONS_DELETE_USERS", ex);
chkEnableForceArchiveMailbox.Visible = false;
}
hdAccountId.Value = accountId.ToString();
DeleteUserModal.Show();
}
if (e.CommandName == "OpenMailProperties")
@ -195,13 +197,9 @@ namespace WebsitePanel.Portal.HostedSolution
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "edit_lync_user",
"AccountID=" + accountId,
"ItemID=" + PanelRequest.ItemID));
}
}
public string GetAccountImage(int accountTypeId, bool vip)
{
string imgName = string.Empty;
@ -354,5 +352,41 @@ namespace WebsitePanel.Portal.HostedSolution
return serviceLevel;
}
protected void btnDelete_Click(object sender, EventArgs e)
{
DeleteUserModal.Hide();
// delete user
try
{
int result = 0;
if (Utils.CheckQouta(Quotas.ORGANIZATION_DELETED_USERS, cntx))
{
result = ES.Services.Organizations.SetDeletedUser(PanelRequest.ItemID, int.Parse(hdAccountId.Value), chkEnableForceArchiveMailbox.Checked);
}
else
{
result = ES.Services.Organizations.DeleteUser(PanelRequest.ItemID, int.Parse(hdAccountId.Value));
}
if (result < 0)
{
messageBox.ShowResultMessage(result);
return;
}
// rebind grid
gvUsers.DataBind();
// bind stats
BindStats();
}
catch (Exception ex)
{
messageBox.ShowErrorMessage("ORGANIZATIONS_DELETE_USERS", ex);
}
}
}
}

View file

@ -130,6 +130,24 @@ namespace WebsitePanel.Portal.HostedSolution {
/// </remarks>
protected global::System.Web.UI.WebControls.ImageButton cmdSearch;
/// <summary>
/// UsersPanel 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 UsersPanel;
/// <summary>
/// UsersUpdatePanel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.UpdatePanel UsersUpdatePanel;
/// <summary>
/// gvUsers control.
/// </summary>
@ -148,6 +166,96 @@ namespace WebsitePanel.Portal.HostedSolution {
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource odsAccountsPaged;
/// <summary>
/// DeleteUserPanel 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 DeleteUserPanel;
/// <summary>
/// headerDeleteUser 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 headerDeleteUser;
/// <summary>
/// DeleteUserUpdatePanel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.UpdatePanel DeleteUserUpdatePanel;
/// <summary>
/// hdAccountId 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.HiddenField hdAccountId;
/// <summary>
/// litDeleteUser 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 litDeleteUser;
/// <summary>
/// chkEnableForceArchiveMailbox 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 chkEnableForceArchiveMailbox;
/// <summary>
/// btnDeleteUser 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 btnDeleteUser;
/// <summary>
/// btnCancelDelete 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 btnCancelDelete;
/// <summary>
/// btnDeleteUserFake 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 btnDeleteUserFake;
/// <summary>
/// DeleteUserModal control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::AjaxControlToolkit.ModalPopupExtender DeleteUserModal;
/// <summary>
/// locQuota control.
/// </summary>

View file

@ -44,6 +44,12 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
Unselected
}
public bool Disabled
{
get { return ViewState["Disabled"] != null ? (bool)ViewState["Disabled"] : false; }
set { ViewState["Disabled"] = value; }
}
public bool EnableMailboxOnly
{
get {return ViewState["EnableMailboxOnly"] != null ? (bool)ViewState["EnableMailboxOnly"]: false; }
@ -116,6 +122,11 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
// toggle controls
if (!IsPostBack)
{
if (Disabled)
{
btnAdd.Visible = btnDelete.Visible = gvAccounts.Columns[0].Visible = false;
}
chkIncludeMailboxes.Visible = chkIncludeRooms.Visible = chkIncludeEquipment.Visible = MailboxesEnabled;
chkIncludeMailboxes.Checked = chkIncludeRooms.Checked = chkIncludeEquipment.Checked = MailboxesEnabled;

View file

@ -0,0 +1,132 @@
<?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="Tab.Advanced" xml:space="preserve">
<value>Advanced</value>
</data>
<data name="Tab.General" xml:space="preserve">
<value>General</value>
</data>
<data name="Tab.Settings" xml:space="preserve">
<value>Settings</value>
</data>
<data name="Tab.MemberOf" xml:space="preserve">
<value>Member Of</value>
</data>
</root>

View file

@ -225,4 +225,7 @@
<data name="Text.RetentionPolicyTag" xml:space="preserve">
<value>Retention Policy Tag</value>
</data>
<data name="Text.DeletedUsers" xml:space="preserve">
<value>Deleted Users</value>
</data>
</root>

View file

@ -0,0 +1,27 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="DeletedUserTabs.ascx.cs" Inherits="WebsitePanel.Portal.ExchangeServer.UserControls.DeletedUserTabs" %>
<table width="100%" cellpadding="0" cellspacing="1">
<tr>
<td class="Tabs">
<asp:DataList ID="dlTabs" runat="server" RepeatDirection="Horizontal"
RepeatLayout="Flow" EnableViewState="false" RepeatColumns="6" SeparatorStyle-CssClass="Separator" SeparatorStyle-Height="22px" >
<ItemStyle Wrap="False" />
<ItemTemplate >
<asp:HyperLink ID="lnkTab" runat="server" CssClass="Tab" NavigateUrl='<%# Eval("Url") %>'>
<%# Eval("Name") %>
</asp:HyperLink>
</ItemTemplate>
<SelectedItemStyle Wrap="False" />
<SelectedItemTemplate>
<asp:HyperLink ID="lnkSelTab" runat="server" CssClass="ActiveTab" NavigateUrl='<%# Eval("Url") %>'>
<%# Eval("Name") %>
</asp:HyperLink>
</SelectedItemTemplate>
<SeparatorTemplate>
&nbsp;
</SeparatorTemplate>
</asp:DataList>
</td>
</tr>
</table>
<br />

View file

@ -0,0 +1,100 @@
// Copyright (c) 2014, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using WebsitePanel.Portal.Code.UserControls;
using WebsitePanel.WebPortal;
using WebsitePanel.EnterpriseServer;
using WebsitePanel.Providers.HostedSolution;
namespace WebsitePanel.Portal.ExchangeServer.UserControls
{
public partial class DeletedUserTabs : WebsitePanelControlBase
{
private string selectedTab;
public string SelectedTab
{
get { return selectedTab; }
set { selectedTab = value; }
}
protected void Page_Load(object sender, EventArgs e)
{
BindTabs();
}
private void BindTabs()
{
List<Tab> tabsList = new List<Tab>();
tabsList.Add(CreateTab("view_deleted_user", "Tab.General"));
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
bool bSuccess = Utils.CheckQouta(Quotas.ORGANIZATION_SECURITYGROUPS, cntx);
if (!bSuccess)
{
// get user settings
OrganizationUser user = ES.Services.Organizations.GetUserGeneralSettings(PanelRequest.ItemID, PanelRequest.AccountID);
bSuccess = (Utils.CheckQouta(Quotas.EXCHANGE2007_DISTRIBUTIONLISTS, cntx)
&& (user.AccountType == ExchangeAccountType.Mailbox
|| user.AccountType == ExchangeAccountType.Room
|| user.AccountType == ExchangeAccountType.Equipment));
}
if (bSuccess)
{
tabsList.Add(CreateTab("deleted_user_memberof", "Tab.MemberOf"));
}
// find selected menu item
int idx = 0;
foreach (Tab tab in tabsList)
{
if (String.Compare(tab.Id, SelectedTab, true) == 0)
break;
idx++;
}
dlTabs.SelectedIndex = idx;
dlTabs.DataSource = tabsList;
dlTabs.DataBind();
}
private Tab CreateTab(string id, string text)
{
return new Tab(id, GetLocalizedString(text),
HostModule.EditUrl("AccountID", PanelRequest.AccountID.ToString(), id,
"SpaceID=" + PanelSecurity.PackageId.ToString(),
"ItemID=" + PanelRequest.ItemID.ToString(),
"Context=User"));
}
}
}

View file

@ -0,0 +1,24 @@
//------------------------------------------------------------------------------
// <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.UserControls {
public partial class DeletedUserTabs {
/// <summary>
/// dlTabs 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.DataList dlTabs;
}
}

View file

@ -186,9 +186,13 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
if (Utils.CheckQouta(Quotas.ORGANIZATION_DOMAINS, cntx))
organizationGroup.MenuItems.Add(CreateMenuItem("DomainNames", "org_domains"));
}
if (Utils.CheckQouta(Quotas.ORGANIZATION_USERS, cntx))
organizationGroup.MenuItems.Add(CreateMenuItem("Users", "users"));
if (Utils.CheckQouta(Quotas.ORGANIZATION_DELETED_USERS, cntx))
organizationGroup.MenuItems.Add(CreateMenuItem("DeletedUsers", "deleted_users"));
if (Utils.CheckQouta(Quotas.ORGANIZATION_SECURITYGROUPS, cntx))
organizationGroup.MenuItems.Add(CreateMenuItem("SecurityGroups", "secur_groups"));

View file

@ -40,7 +40,7 @@ namespace WebsitePanel.Portal
{
public partial class FileManager : WebsitePanelModuleBase
{
public static string ALLOWED_EDIT_EXTENSIONS = ".txt,.htm,.html,.php,.pl,.sql,.cs,.vb,.ascx,.aspx,.inc,.asp,.config,.xml,.xsl,.xslt,.xsd,.master,.htaccess,.htpasswd,.cshtml,.vbhtml,.ini,.config";
public static string ALLOWED_EDIT_EXTENSIONS = ".txt,.htm,.html,.cfc,.cfml,.cfm,.php,.pl,.sql,.cs,.vb,.ascx,.aspx,.inc,.asp,.config,.xml,.xsl,.xslt,.xsd,.master,.htaccess,.htpasswd,.cshtml,.vbhtml,.ini,.config";
protected void Page_Load(object sender, EventArgs e)
{

View file

@ -51,7 +51,7 @@
</asp:TemplateField>
<asp:TemplateField SortExpression="ExternalIP" HeaderText="gvIPAddressesExternalIP">
<ItemTemplate>
<asp:hyperlink NavigateUrl='<%# EditUrl("AddressID", DataBinder.Eval(Container.DataItem, "AddressID").ToString(), "edit_ip") %>' runat="server" ID="Hyperlink2">
<asp:hyperlink NavigateUrl='<%# EditUrl("AddressID", DataBinder.Eval(Container.DataItem, "AddressID").ToString(), "edit_ip", "ReturnUrl=" + GetReturnUrl()) %>' runat="server" ID="Hyperlink2">
<%# Eval("ExternalIP") %>
</asp:hyperlink>
</ItemTemplate>

View file

@ -45,6 +45,8 @@ namespace WebsitePanel.Portal
gvIPAddresses.PageSize = UsersHelper.GetDisplayItemsPerPage();
ddlItemsPerPage.SelectedValue = gvIPAddresses.PageSize.ToString();
gvIPAddresses.PageIndex = PageIndex;
// pool
if (!String.IsNullOrEmpty(PanelRequest.PoolId))
ddlPools.SelectedValue = PanelRequest.PoolId;
@ -69,6 +71,7 @@ namespace WebsitePanel.Portal
bool vps = ddlPools.SelectedIndex > 1;
gvIPAddresses.Columns[3].Visible = vps;
}
protected void odsIPAddresses_Selected(object sender, ObjectDataSourceStatusEventArgs e)
{
if (e.Exception != null)
@ -84,10 +87,23 @@ namespace WebsitePanel.Portal
return PortalUtils.GetSpaceHomePageUrl(spaceId);
}
public string GetReturnUrl()
{
var returnUrl = Request.Url.AddParameter("Page", gvIPAddresses.PageIndex.ToString());
return Uri.EscapeDataString("~" + returnUrl.PathAndQuery);
}
public int PageIndex
{
get
{
return PanelRequest.GetInt("Page", 0);
}
}
protected void btnAddItem_Click(object sender, EventArgs e)
{
Response.Redirect(EditUrl("PoolID", ddlPools.SelectedValue, "add_ip"), true);
Response.Redirect(EditUrl("PoolID", ddlPools.SelectedValue, "add_ip", "ReturnUrl=" + GetReturnUrl()), true);
}
protected void ddlItemsPerPage_SelectedIndexChanged(object sender, EventArgs e)

View file

@ -149,7 +149,14 @@ namespace WebsitePanel.Portal
private void RedirectBack()
{
Response.Redirect(NavigateURL("PoolID", ddlPools.SelectedValue));
var returnUrl = Request["ReturnUrl"];
if (string.IsNullOrEmpty(returnUrl))
{
returnUrl = NavigateURL("PoolID", ddlPools.SelectedValue);
}
Response.Redirect(returnUrl);
}
protected void ddlPools_SelectedIndexChanged(object sender, EventArgs e)

View file

@ -107,7 +107,14 @@ namespace WebsitePanel.Portal
private void RedirectBack()
{
Response.Redirect(NavigateURL("PoolID", ddlPools.SelectedValue));
var returnUrl = Request["ReturnUrl"];
if (string.IsNullOrEmpty(returnUrl))
{
returnUrl = NavigateURL("PoolID", ddlPools.SelectedValue);
}
Response.Redirect(returnUrl);
}
protected void btnUpdate_Click(object sender, EventArgs e)

View file

@ -112,10 +112,10 @@
<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>
<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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="lblPrimaryDomainController.Text" xml:space="preserve">
<value>Preferred Domain Controller:</value>
@ -135,4 +135,7 @@
<data name="listItemAppendOrgId.Text" xml:space="preserve">
<value>Append OrgID</value>
</data>
<data name="lblArchiveStorageSpace.Text" xml:space="preserve">
<value>Archive Storage Path:</value>
</data>
</root>

View file

@ -32,4 +32,8 @@
</asp:DropDownList>
</td>
</tr>
<tr>
<td class="SubHead" nowrap="true"><asp:Label runat="server" ID="Label2" meta:resourcekey="lblArchiveStorageSpace" /></td>
<td><asp:TextBox runat="server" ID="txtArchiveStorageSpace" MaxLength="100" Width="200px" /></td>
</tr>
</table>

View file

@ -36,6 +36,7 @@ namespace WebsitePanel.Portal.ProviderControls
public const string PrimaryDomainController = "PrimaryDomainController";
public const string TemporyDomainName = "TempDomain";
public const string UserNameFormat = "UserNameFormat";
public const string ArchiveStoragePath = "ArchiveStoragePath";
protected void Page_Load(object sender, EventArgs e)
{
@ -53,6 +54,8 @@ namespace WebsitePanel.Portal.ProviderControls
UserNameFormatDropDown.SelectedValue =
UserNameFormatDropDown.Items.FindByText(settings[UserNameFormat]).Value;
}
txtArchiveStorageSpace.Text = settings[ArchiveStoragePath];
}
public void SaveSettings(System.Collections.Specialized.StringDictionary settings)
@ -61,6 +64,7 @@ namespace WebsitePanel.Portal.ProviderControls
settings[PrimaryDomainController] = txtPrimaryDomainController.Text.Trim();
settings[TemporyDomainName] = txtTemporyDomainName.Text.Trim();
settings[UserNameFormat] = UserNameFormatDropDown.SelectedItem.Text;
settings[ArchiveStoragePath] = txtArchiveStorageSpace.Text.Trim();
}
}
}

View file

@ -120,5 +120,23 @@ namespace WebsitePanel.Portal.ProviderControls {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList UserNameFormatDropDown;
/// <summary>
/// Label2 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 Label2;
/// <summary>
/// txtArchiveStorageSpace 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 txtArchiveStorageSpace;
}
}

View file

@ -121,7 +121,7 @@
<value>ShowProgressDialog('Adding RDS Server ...');</value>
</data>
<data name="btnSave.Text" xml:space="preserve">
<value>Save</value>
<value>Create</value>
</data>
<data name="FormComments.Text" xml:space="preserve">
<value />

View file

@ -1,64 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 1.3
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">1.3</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1">this is my long string</data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
[base64 mime encoded serialized .NET Framework object]
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
[base64 mime encoded string representing a byte array form of the .NET Framework object]
</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.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.
-->
<!--
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">
@ -127,13 +127,13 @@
<value />
</data>
<data name="Text.PageName" xml:space="preserve">
<value>Edit RDS Application</value>
<value>Edit RDS Collection</value>
</data>
<data name="locTitle.Text" xml:space="preserve">
<value>Edit RDS Application</value>
<value>Edit RDS Collection</value>
</data>
<data name="locCollectionName.Text" xml:space="preserve">
<value>Application Name:</value>
<value>Collection Name:</value>
</data>
<data name="gvRDSServerName.Header" xml:space="preserve">
<value>Server Name</value>
@ -141,4 +141,16 @@
<data name="gvRDSServers.Empty" xml:space="preserve">
<value>No RDS Servers have been added yet. To add a new RDS Servers click "Add RDS Server" button.</value>
</data>
<data name="locApplicationName.Text" xml:space="preserve">
<value>Application Name:</value>
</data>
<data name="secRdsApplicationUsers.Text" xml:space="preserve">
<value>Users</value>
</data>
<data name="secRdsApplicationEdit.Text" xml:space="preserve">
<value />
</data>
<data name="locLblApplicationName" xml:space="preserve">
<value>Application Name</value>
</data>
</root>

View file

@ -121,7 +121,7 @@
<value>ShowProgressDialog('Adding RDS Server ...');</value>
</data>
<data name="btnSave.Text" xml:space="preserve">
<value>Save</value>
<value>Save Changes</value>
</data>
<data name="FormComments.Text" xml:space="preserve">
<value />
@ -141,4 +141,10 @@
<data name="gvRDSServers.Empty" xml:space="preserve">
<value>No RDS Servers have been added yet. To add a new RDS Servers click "Add RDS Server" button.</value>
</data>
<data name="btnSaveExit.Text" xml:space="preserve">
<value>Save Changes and Exit</value>
</data>
<data name="secRdsServers.Text" xml:space="preserve">
<value>RDS Servers</value>
</data>
</root>

View file

@ -127,7 +127,7 @@
<value />
</data>
<data name="Text.PageName" xml:space="preserve">
<value>Edit RDS Collection</value>
<value>RDS Apps</value>
</data>
<data name="locTitle.Text" xml:space="preserve">
<value>Edit RDS Collection</value>
@ -141,4 +141,7 @@
<data name="gvRDSServers.Empty" xml:space="preserve">
<value>No RDS Servers have been added yet. To add a new RDS Servers click "Add RDS Server" button.</value>
</data>
<data name="secRdsApplications.Text" xml:space="preserve">
<value>Remote Applications</value>
</data>
</root>

View file

@ -0,0 +1,159 @@
<?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="locActiveSessionLimit.Text" xml:space="preserve">
<value>Active session limit:</value>
</data>
<data name="locCollectionBroken.Text" xml:space="preserve">
<value>When session limit is reached or connection is broken:</value>
</data>
<data name="locDisconnectedSessionLimit.Text" xml:space="preserve">
<value>End a disconneted session:</value>
</data>
<data name="locEnableRedirection.Text" xml:space="preserve">
<value>Enable redirection for the following:</value>
</data>
<data name="locIdleSessionLimit.Text" xml:space="preserve">
<value>Idle session limit:</value>
</data>
<data name="locMonitors.Text" xml:space="preserve">
<value>Monitors</value>
</data>
<data name="locMonitorsNumber.Text" xml:space="preserve">
<value>Maximum number of redirected monitors:</value>
</data>
<data name="locPrinters.Text" xml:space="preserve">
<value>Printers</value>
</data>
<data name="locSessionLimitHeader.Text" xml:space="preserve">
<value>Set RD Session Host server timeout and reconnection settings for the session collection.</value>
</data>
<data name="locTempFolder.Text" xml:space="preserve">
<value>Temporary folder settings:</value>
</data>
<data name="locTitle.Text" xml:space="preserve">
<value>Edit RDS Collection Settings</value>
</data>
<data name="secRdsClientSettings.Text" xml:space="preserve">
<value>Client Settings</value>
</data>
<data name="secRdsSessionSettings.Text" xml:space="preserve">
<value>Session Settings</value>
</data>
</root>

View file

@ -141,4 +141,7 @@
<data name="gvRDSServers.Empty" xml:space="preserve">
<value>No RDS Servers have been added yet. To add a new RDS Servers click "Add RDS Server" button.</value>
</data>
<data name="secRdsUsers.Text" xml:space="preserve">
<value>RDS Users</value>
</data>
</root>

View file

@ -0,0 +1,153 @@
<?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="gvHostServer.HeaderText" xml:space="preserve">
<value>Host Server</value>
</data>
<data name="gvRDSUserSessions.Empty" xml:space="preserve">
<value>No user sessions.</value>
</data>
<data name="gvSessionState.HeaderText" xml:space="preserve">
<value>Session State</value>
</data>
<data name="gvUserName.HeaderText" xml:space="preserve">
<value>User Name</value>
</data>
<data name="locTitle" xml:space="preserve">
<value>Edit RDS Collection</value>
</data>
<data name="secRdsUserSessions" xml:space="preserve">
<value>RDS User Sessions</value>
</data>
<data name="Text.PageName" xml:space="preserve">
<value>RDS User Sessions</value>
</data>
<data name="cmdLogOff.OnClientClick" xml:space="preserve">
<value>if(!confirm('Are you sure you want to log off user?')) return false; else ShowProgressDialog('Logging off user...');</value>
</data>
<data name="cmdLogOff.Text" xml:space="preserve">
<value>Log Off</value>
</data>
<data name="cmdLogOff.ToolTip" xml:space="preserve">
<value>Log Off</value>
</data>
<data name="btnRefresh.Text" xml:space="preserve">
<value>Refresh</value>
</data>
</root>

View file

@ -45,10 +45,10 @@
OnRowCommand="gvRDSCollections_RowCommand" AllowPaging="True" AllowSorting="True"
DataSourceID="odsRDSCollectionsPaged" PageSize="20">
<Columns>
<asp:TemplateField HeaderText="gvCollectionName" SortExpression="Name">
<asp:TemplateField HeaderText="gvCollectionName" SortExpression="DisplayName">
<ItemStyle Width="40%"></ItemStyle>
<ItemTemplate>
<asp:hyperlink id="lnkCollectionName" meta:resourcekey="lnkApps" runat="server" NavigateUrl='<%# GetCollectionEditUrl(Eval("Id").ToString()) %>'><%# Eval("Name").ToString() %></asp:hyperlink>
<asp:hyperlink id="lnkCollectionName" meta:resourcekey="lnkApps" runat="server" NavigateUrl='<%# GetCollectionEditUrl(Eval("Id").ToString()) %>'><%# Eval("DisplayName").ToString() %></asp:hyperlink>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="gvServer">
@ -58,11 +58,7 @@
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:hyperlink id="lnkApps" meta:resourcekey="lnkApps" runat="server" NavigateUrl='<%# GetCollectionAppsEditUrl(Eval("Id").ToString()) %>'>Applications</asp:hyperlink>
|
<asp:hyperlink id="lnkUsers" meta:resourcekey="lnkUsers" runat="server" NavigateUrl='<%# GetCollectionUsersEditUrl(Eval("Id").ToString()) %>'>Users</asp:hyperlink>
|
<ItemTemplate>
<asp:LinkButton ID="lnkRemove" runat="server" Text="Remove"
CommandName="DeleteItem" CommandArgument='<%# Eval("Id") %>'
meta:resourcekey="cmdDelete" OnClientClick="return confirm('Are you sure you want to remove selected rds collection?')"></asp:LinkButton>

View file

@ -45,6 +45,12 @@ namespace WebsitePanel.Portal.RDS
if (!IsPostBack)
{
}
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
if (cntx.Quotas.ContainsKey(Quotas.RDS_COLLECTIONS))
{
btnAddCollection.Enabled = (!(cntx.Quotas[Quotas.RDS_COLLECTIONS].QuotaAllocatedValue <= gvRDSCollections.Rows.Count) || (cntx.Quotas[Quotas.RDS_COLLECTIONS].QuotaAllocatedValue == -1));
}
}
public string GetServerName(string collectionId)
@ -98,20 +104,6 @@ namespace WebsitePanel.Portal.RDS
gvRDSCollections.DataBind();
}
public string GetCollectionAppsEditUrl(string collectionId)
{
return EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "rds_collection_edit_apps",
"CollectionId=" + collectionId,
"ItemID=" + PanelRequest.ItemID);
}
public string GetCollectionUsersEditUrl(string collectionId)
{
return EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "rds_collection_edit_users",
"CollectionId=" + collectionId,
"ItemID=" + PanelRequest.ItemID);
}
public string GetCollectionEditUrl(string collectionId)
{
return EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "rds_edit_collection", "CollectionId=" + collectionId, "ItemID=" + PanelRequest.ItemID);

View file

@ -1,31 +1,3 @@
// Copyright (c) 2015, 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.

View file

@ -23,7 +23,7 @@
<tr>
<td class="FormLabel150" style="width: 100px;"><asp:Localize ID="locCollectionName" runat="server" meta:resourcekey="locCollectionName" Text="Collection Name"></asp:Localize></td>
<td>
<asp:TextBox ID="txtCollectionName" runat="server" CssClass="NormalTextBox" />
<asp:TextBox ID="txtCollectionName" runat="server" CssClass="TextBox300" />
<asp:RequiredFieldValidator ID="valCollectionName" runat="server" ErrorMessage="*" ControlToValidate="txtCollectionName" ValidationGroup="SaveRDSCollection"></asp:RequiredFieldValidator>
</td>
</tr>

View file

@ -62,9 +62,9 @@ namespace WebsitePanel.Portal.RDS
return;
}
RdsCollection collection = new RdsCollection{ Name = txtCollectionName.Text, Servers = servers.GetServers(), Description = "" };
ES.Services.RDS.AddRdsCollection(PanelRequest.ItemID, collection);
Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "rds_collections", "SpaceID=" + PanelSecurity.PackageId));
RdsCollection collection = new RdsCollection{ Name = txtCollectionName.Text, DisplayName = txtCollectionName.Text, Servers = servers.GetServers(), Description = "" };
int collectionId = ES.Services.RDS.AddRdsCollection(PanelRequest.ItemID, collection);
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "rds_edit_collection", "CollectionId=" + collectionId, "ItemID=" + PanelRequest.ItemID));
}
catch (Exception ex)
{

View file

@ -1,31 +1,3 @@
// Copyright (c) 2015, 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.

View file

@ -2,6 +2,9 @@
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
<%@ Register Src="UserControls/RDSCollectionUsers.ascx" TagName="CollectionUsers" TagPrefix="wsp"%>
<%@ Register Src="UserControls/RDSCollectionTabs.ascx" TagName="CollectionTabs" TagPrefix="wsp" %>
<%@ Register TagPrefix="wsp" TagName="CollapsiblePanel" Src="../UserControls/CollapsiblePanel.ascx" %>
<%@ Register Src="../UserControls/ItemButtonPanel.ascx" TagName="ItemButtonPanel" TagPrefix="wsp" %>
<script type="text/javascript" src="/JavaScript/jquery.min.js?v=1.4.4"></script>
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
@ -12,34 +15,50 @@
</div>
<div class="Content">
<div class="Center">
<div class="Title">
<div class="Title">
<asp:Image ID="imgEditRDSCollection" SkinID="EnterpriseStorageSpace48" runat="server" />
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Edit RDS Application"></asp:Localize>
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Edit RDS Collection"></asp:Localize>
-
<asp:Literal ID="litCollectionName" runat="server" Text="" />
</div>
<div class="FormContentRDS">
<wsp:SimpleMessageBox id="messageBox" runat="server" />
<table>
<tr>
<td class="FormLabel150" style="width: 100px;"><asp:Localize ID="locApplicationName" runat="server" meta:resourcekey="locApplicationName" Text="Collection Name:"></asp:Localize></td>
<td class="FormLabel150">
<asp:Localize ID="locCName" runat="server" Text="" />
</td>
</tr>
</table>
<fieldset id="UsersPanel" runat="server">
<legend><asp:Localize ID="locUsersSection" runat="server" meta:resourcekey="locUsersSection" Text="Users"></asp:Localize></legend>
<wsp:SimpleMessageBox id="SimpleMessageBox1" runat="server" />
<wsp:CollectionTabs id="tabs" runat="server" SelectedTab="rds_collection_edit_apps" />
<wsp:CollapsiblePanel id="secRdsApplicationEdit" runat="server"
TargetControlID="panelRdsApplicationEdit" meta:resourcekey="secRdsApplicationEdit" Text="">
</wsp:CollapsiblePanel>
<asp:Panel runat="server" ID="panelRdsApplicationEdit">
<div style="padding: 10px;">
<table>
<tr>
<td class="FormLabel150" style="width: 150px;">
<asp:Localize ID="locLblApplicationName" runat="server" meta:resourcekey="locLblApplicationName" Text="Application Name"/>
</td>
<td>
<asp:TextBox ID="txtApplicationName" runat="server" CssClass="TextBox300" />
<asp:RequiredFieldValidator ID="valApplicationName" runat="server" ErrorMessage="*" ControlToValidate="txtApplicationName" ValidationGroup="SaveRDSCollection"/>
</td>
</tr>
</table>
</div>
</asp:Panel>
<wsp:CollapsiblePanel id="secRdsApplicationUsers" runat="server"
TargetControlID="panelRdsApplicationUsers" meta:resourcekey="secRdsApplicationUsers" Text="">
</wsp:CollapsiblePanel>
<asp:Panel runat="server" ID="panelRdsApplicationUsers">
<div style="padding: 10px;">
<wsp:CollectionUsers id="users" runat="server" />
</div>
</fieldset>
<div class="FormFooter">
<asp:Button id="btnSave" runat="server" Text="Save" CssClass="Button1" meta:resourcekey="btnSave" ValidationGroup="SaveRDSCollectoin" OnClick="btnSave_Click"></asp:Button>
<asp:ValidationSummary ID="valSummary" runat="server" ShowMessageBox="True" ShowSummary="False" ValidationGroup="SaveRDSCollectoin" />
</div>
</div>
</div>
</asp:Panel>
<div class="FormFooterClean">
<wsp:ItemButtonPanel id="buttonPanel" runat="server" ValidationGroup="SaveRDSCollection"
OnSaveClick="btnSave_Click" OnSaveExitClick="btnSaveExit_Click" />
</div>
</div>
</div>
</div>
</div>

View file

@ -44,16 +44,38 @@ namespace WebsitePanel.Portal.RDS
{
var collection = ES.Services.RDS.GetRdsCollection(PanelRequest.CollectionID);
var applications = ES.Services.RDS.GetCollectionRemoteApplications(PanelRequest.ItemID, collection.Name);
var remoteApp = applications.Where(x => x.DisplayName.Equals(PanelRequest.ApplicationID, StringComparison.CurrentCultureIgnoreCase)).FirstOrDefault();
var collectionUsers = ES.Services.RDS.GetRdsCollectionUsers(PanelRequest.CollectionID);
var remoteApp = applications.Where(x => x.Alias.Equals(PanelRequest.ApplicationID, StringComparison.CurrentCultureIgnoreCase)).FirstOrDefault();
var organizationUsers = ES.Services.Organizations.GetOrganizationUsersPaged(PanelRequest.ItemID, null, null, null, 0, Int32.MaxValue).PageUsers;
var applicationUsers = ES.Services.RDS.GetApplicationUsers(PanelRequest.ItemID, PanelRequest.CollectionID, remoteApp);
locCName.Text = collection.Name;
litCollectionName.Text = collection.Name;
txtApplicationName.Text = remoteApp.DisplayName;
var remoteAppUsers = organizationUsers.Where(x => applicationUsers.Contains(x.DomainUserName));
users.SetUsers(collectionUsers.Where(x => applicationUsers.Contains(x.SamAccountName)).ToArray());
users.SetUsers(remoteAppUsers.ToArray());
}
}
private bool SaveApplicationUsers()
{
try
{
var collection = ES.Services.RDS.GetRdsCollection(PanelRequest.CollectionID);
var applications = ES.Services.RDS.GetCollectionRemoteApplications(PanelRequest.ItemID, collection.Name);
var remoteApp = applications.Where(x => x.Alias.Equals(PanelRequest.ApplicationID, StringComparison.CurrentCultureIgnoreCase)).FirstOrDefault();
remoteApp.DisplayName = txtApplicationName.Text;
ES.Services.RDS.SetApplicationUsers(PanelRequest.ItemID, PanelRequest.CollectionID, remoteApp, users.GetUsers().Select(x => x.AccountName).ToArray());
}
catch (Exception ex)
{
ShowErrorMessage("REMOTEAPPUSERS_NOT_UPDATED", ex);
return false;
}
return true;
}
protected void btnSave_Click(object sender, EventArgs e)
{
if (!Page.IsValid)
@ -61,17 +83,19 @@ namespace WebsitePanel.Portal.RDS
return;
}
try
{
var collection = ES.Services.RDS.GetRdsCollection(PanelRequest.CollectionID);
var applications = ES.Services.RDS.GetCollectionRemoteApplications(PanelRequest.ItemID, collection.Name);
var remoteApp = applications.Where(x => x.DisplayName.Equals(PanelRequest.ApplicationID, StringComparison.CurrentCultureIgnoreCase)).FirstOrDefault();
ES.Services.RDS.SetApplicationUsers(PanelRequest.ItemID, PanelRequest.CollectionID, remoteApp, users.GetUsers().Select(x => x.AccountName).ToArray());
SaveApplicationUsers();
}
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "rds_collection_edit_apps", "CollectionId=" + PanelRequest.CollectionID, "ItemID=" + PanelRequest.ItemID));
}
catch (Exception)
protected void btnSaveExit_Click(object sender, EventArgs e)
{
if (!Page.IsValid)
{
return;
}
if (SaveApplicationUsers())
{
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "rds_collection_edit_apps", "CollectionId=" + PanelRequest.CollectionID, "ItemID=" + PanelRequest.ItemID));
}
}
}

View file

@ -1,31 +1,3 @@
// Copyright (c) 2015, 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.
@ -68,49 +40,94 @@ namespace WebsitePanel.Portal.RDS {
protected global::System.Web.UI.WebControls.Localize locTitle;
/// <summary>
/// messageBox control.
/// litCollectionName 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;
protected global::System.Web.UI.WebControls.Literal litCollectionName;
/// <summary>
/// locApplicationName control.
/// SimpleMessageBox1 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 locApplicationName;
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox SimpleMessageBox1;
/// <summary>
/// locCName control.
/// tabs 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 locCName;
protected global::WebsitePanel.Portal.RDS.UserControls.RdsServerTabs tabs;
/// <summary>
/// UsersPanel control.
/// secRdsApplicationEdit 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.HtmlGenericControl UsersPanel;
protected global::WebsitePanel.Portal.CollapsiblePanel secRdsApplicationEdit;
/// <summary>
/// locUsersSection control.
/// panelRdsApplicationEdit 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 locUsersSection;
protected global::System.Web.UI.WebControls.Panel panelRdsApplicationEdit;
/// <summary>
/// locLblApplicationName 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 locLblApplicationName;
/// <summary>
/// txtApplicationName 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 txtApplicationName;
/// <summary>
/// valApplicationName 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 valApplicationName;
/// <summary>
/// secRdsApplicationUsers control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secRdsApplicationUsers;
/// <summary>
/// panelRdsApplicationUsers 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 panelRdsApplicationUsers;
/// <summary>
/// users control.
@ -122,21 +139,12 @@ namespace WebsitePanel.Portal.RDS {
protected global::WebsitePanel.Portal.RDS.UserControls.RDSCollectionUsers users;
/// <summary>
/// btnSave control.
/// buttonPanel 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>
/// valSummary 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 valSummary;
protected global::WebsitePanel.Portal.ItemButtonPanel buttonPanel;
}
}

View file

@ -2,6 +2,9 @@
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
<%@ Register Src="UserControls/RDSCollectionServers.ascx" TagName="CollectionServers" TagPrefix="wsp"%>
<%@ Register Src="UserControls/RDSCollectionTabs.ascx" TagName="CollectionTabs" TagPrefix="wsp" %>
<%@ Register TagPrefix="wsp" TagName="CollapsiblePanel" Src="../UserControls/CollapsiblePanel.ascx" %>
<%@ Register Src="../UserControls/ItemButtonPanel.ascx" TagName="ItemButtonPanel" TagPrefix="wsp" %>
<script type="text/javascript" src="/JavaScript/jquery.min.js?v=1.4.4"></script>
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
@ -15,20 +18,26 @@
<div class="Title">
<asp:Image ID="imgAddRDSServer" SkinID="AddRDSServer48" runat="server" />
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Add Server To Organization"></asp:Localize>
-
<asp:Literal ID="litCollectionName" runat="server" Text="" />
</div>
<div class="FormContentRDS">
<wsp:SimpleMessageBox id="messageBox" runat="server" />
<fieldset id="RDSServersPanel" runat="server">
<legend><asp:Localize ID="locRDSServersSection" runat="server" meta:resourcekey="locRDSServersSection" Text="RDS Servers"></asp:Localize></legend>
<div class="FormBody">
<wsp:CollectionTabs id="tabs" runat="server" SelectedTab="rds_edit_collection" />
<wsp:SimpleMessageBox id="messageBox" runat="server" />
<wsp:CollapsiblePanel id="secRdsServers" runat="server"
TargetControlID="panelRdsServers" meta:resourcekey="secRdsServers" Text="">
</wsp:CollapsiblePanel>
<asp:Panel runat="server" ID="panelRdsServers">
<div style="padding: 10px;">
<wsp:CollectionServers id="servers" runat="server" />
</div>
</fieldset>
<div class="FormFooter">
<asp:Button id="btnSave" runat="server" Text="Save" CssClass="Button1" meta:resourcekey="btnSave" OnClick="btnSave_Click" ValidationGroup="SaveRDSCollection"></asp:Button>
</div>
</div>
</asp:Panel>
<div class="FormFooterClean">
<wsp:ItemButtonPanel id="buttonPanel" runat="server" ValidationGroup="SaveRDSCollection"
OnSaveClick="btnSave_Click" OnSaveExitClick="btnSaveExit_Click" />
</div>
</div>
</div>
</div>

View file

@ -40,7 +40,36 @@ namespace WebsitePanel.Portal.RDS
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
var collection = ES.Services.RDS.GetRdsCollection(PanelRequest.CollectionID);
litCollectionName.Text = collection.DisplayName;
}
}
private bool SaveRdsServers()
{
try
{
if (servers.GetServers().Count < 1)
{
messageBox.ShowErrorMessage("RDS_CREATE_COLLECTION_RDSSERVER_REQUAIRED");
return false;
}
RdsCollection collection = ES.Services.RDS.GetRdsCollection(PanelRequest.CollectionID);
collection.Servers = servers.GetServers();
ES.Services.RDS.EditRdsCollection(PanelRequest.ItemID, collection);
}
catch(Exception ex)
{
messageBox.ShowErrorMessage(ex.Message);
return false;
}
return true;
}
protected void btnSave_Click(object sender, EventArgs e)
@ -48,23 +77,18 @@ namespace WebsitePanel.Portal.RDS
if (!Page.IsValid)
return;
try
SaveRdsServers();
}
protected void btnSaveExit_Click(object sender, EventArgs e)
{
if (!Page.IsValid)
return;
if (SaveRdsServers())
{
if (servers.GetServers().Count < 1)
{
messageBox.ShowErrorMessage("RDS_CREATE_COLLECTION_RDSSERVER_REQUAIRED");
return;
}
RdsCollection collection = ES.Services.RDS.GetRdsCollection(PanelRequest.CollectionID);
collection.Servers = servers.GetServers();
ES.Services.RDS.EditRdsCollection(PanelRequest.ItemID, collection);
Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "rds_collections",
"SpaceID=" + PanelSecurity.PackageId));
Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "rds_collections", "SpaceID=" + PanelSecurity.PackageId));
}
catch { }
}
}
}

View file

@ -1,31 +1,3 @@
// Copyright (c) 2015, 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.
@ -67,6 +39,24 @@ namespace WebsitePanel.Portal.RDS {
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locTitle;
/// <summary>
/// litCollectionName 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 litCollectionName;
/// <summary>
/// tabs control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.RDS.UserControls.RdsServerTabs tabs;
/// <summary>
/// messageBox control.
/// </summary>
@ -77,22 +67,22 @@ namespace WebsitePanel.Portal.RDS {
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
/// <summary>
/// RDSServersPanel control.
/// secRdsServers 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.HtmlGenericControl RDSServersPanel;
protected global::WebsitePanel.Portal.CollapsiblePanel secRdsServers;
/// <summary>
/// locRDSServersSection control.
/// panelRdsServers 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 locRDSServersSection;
protected global::System.Web.UI.WebControls.Panel panelRdsServers;
/// <summary>
/// servers control.
@ -104,12 +94,12 @@ namespace WebsitePanel.Portal.RDS {
protected global::WebsitePanel.Portal.RDS.UserControls.RDSCollectionServers servers;
/// <summary>
/// btnSave control.
/// buttonPanel 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;
protected global::WebsitePanel.Portal.ItemButtonPanel buttonPanel;
}
}

View file

@ -2,6 +2,9 @@
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
<%@ Register Src="UserControls/RDSCollectionApps.ascx" TagName="CollectionApps" TagPrefix="wsp"%>
<%@ Register Src="UserControls/RDSCollectionTabs.ascx" TagName="CollectionTabs" TagPrefix="wsp" %>
<%@ Register TagPrefix="wsp" TagName="CollapsiblePanel" Src="../UserControls/CollapsiblePanel.ascx" %>
<%@ Register Src="../UserControls/ItemButtonPanel.ascx" TagName="ItemButtonPanel" TagPrefix="wsp" %>
<script type="text/javascript" src="/JavaScript/jquery.min.js?v=1.4.4"></script>
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
@ -15,30 +18,26 @@
<div class="Title">
<asp:Image ID="imgEditRDSCollection" SkinID="EnterpriseStorageSpace48" runat="server" />
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Edit RDS Collection"></asp:Localize>
-
<asp:Literal ID="litCollectionName" runat="server" Text="" />
</div>
<div class="FormContentRDS">
<wsp:SimpleMessageBox id="messageBox" runat="server" />
<div class="FormBody">
<wsp:CollectionTabs id="tabs" runat="server" SelectedTab="rds_collection_edit_apps" />
<wsp:SimpleMessageBox id="messageBox" runat="server" />
<table>
<tr>
<td class="FormLabel150" style="width: 100px;"><asp:Localize ID="locCollectionName" runat="server" meta:resourcekey="locCollectionName" Text="Collection Name"></asp:Localize></td>
<td class="FormLabel150">
<asp:Localize ID="locCName" runat="server" Text="RDS Collection 1" />
</td>
</tr>
</table>
<fieldset id="RemoteAppsPanel" runat="server">
<legend><asp:Localize ID="locRemoteAppsSection" runat="server" meta:resourcekey="locRemoteAppsSection" Text="Remote Applications"></asp:Localize></legend>
<wsp:CollapsiblePanel id="secRdsApplications" runat="server"
TargetControlID="panelRdsApplications" meta:resourcekey="secRdsApplications" Text="">
</wsp:CollapsiblePanel>
<asp:Panel runat="server" ID="panelRdsApplications">
<div style="padding: 10px;">
<wsp:CollectionApps id="remoreApps" runat="server" />
</div>
</fieldset>
<div class="FormFooter">
<asp:Button id="btnSave" runat="server" Text="Save Changes" CssClass="Button1" meta:resourcekey="btnSave" ValidationGroup="SaveRDSCollectoin" OnClick="btnSave_Click"></asp:Button>
<asp:ValidationSummary ID="valSummary" runat="server" ShowMessageBox="True" ShowSummary="False" ValidationGroup="SaveRDSCollectoin" />
</div>
</div>
</asp:Panel>
<div class="FormFooterClean">
<wsp:ItemButtonPanel id="buttonPanel" runat="server" ValidationGroup="SaveRDSCollection"
OnSaveClick="btnSave_Click" OnSaveExitClick="btnSaveExit_Click" />
</div>
</div>
</div>
</div>

View file

@ -37,8 +37,7 @@ using WebsitePanel.Providers.RemoteDesktopServices;
namespace WebsitePanel.Portal.RDS
{
public partial class RDSEditCollectionApps : WebsitePanelModuleBase
{
{
protected void Page_Load(object sender, EventArgs e)
{
remoreApps.Module = Module;
@ -47,25 +46,48 @@ namespace WebsitePanel.Portal.RDS
{
RdsCollection collection = ES.Services.RDS.GetRdsCollection(PanelRequest.CollectionID);
var collectionApps = ES.Services.RDS.GetCollectionRemoteApplications(PanelRequest.ItemID, collection.Name);
locCName.Text = collection.Name;
litCollectionName.Text = collection.DisplayName;
remoreApps.SetApps(collectionApps);
}
}
private bool SaveRemoteApplications()
{
try
{
ES.Services.RDS.SetRemoteApplicationsToRdsCollection(PanelRequest.ItemID, PanelRequest.CollectionID, remoreApps.GetApps());
}
catch (Exception ex)
{
messageBox.ShowErrorMessage(ex.Message);
return false;
}
return true;
}
protected void btnSave_Click(object sender, EventArgs e)
{
if (!Page.IsValid)
return;
try
{
ES.Services.RDS.SetRemoteApplicationsToRdsCollection(PanelRequest.ItemID, PanelRequest.CollectionID, remoreApps.GetApps());
Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "rds_collections",
"SpaceID=" + PanelSecurity.PackageId));
return;
}
SaveRemoteApplications();
}
protected void btnSaveExit_Click(object sender, EventArgs e)
{
if (!Page.IsValid)
{
return;
}
if (SaveRemoteApplications())
{
Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "rds_collections", "SpaceID=" + PanelSecurity.PackageId));
}
catch (Exception ex) { }
}
}
}

View file

@ -1,31 +1,3 @@
// Copyright (c) 2015, 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.
@ -67,6 +39,24 @@ namespace WebsitePanel.Portal.RDS {
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locTitle;
/// <summary>
/// litCollectionName 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 litCollectionName;
/// <summary>
/// tabs control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.RDS.UserControls.RdsServerTabs tabs;
/// <summary>
/// messageBox control.
/// </summary>
@ -77,40 +67,22 @@ namespace WebsitePanel.Portal.RDS {
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
/// <summary>
/// locCollectionName control.
/// secRdsApplications 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 locCollectionName;
protected global::WebsitePanel.Portal.CollapsiblePanel secRdsApplications;
/// <summary>
/// locCName control.
/// panelRdsApplications 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 locCName;
/// <summary>
/// RemoteAppsPanel 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.HtmlGenericControl RemoteAppsPanel;
/// <summary>
/// locRemoteAppsSection 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 locRemoteAppsSection;
protected global::System.Web.UI.WebControls.Panel panelRdsApplications;
/// <summary>
/// remoreApps control.
@ -122,21 +94,12 @@ namespace WebsitePanel.Portal.RDS {
protected global::WebsitePanel.Portal.RDS.UserControls.RDSCollectionApps remoreApps;
/// <summary>
/// btnSave control.
/// buttonPanel 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>
/// valSummary 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 valSummary;
protected global::WebsitePanel.Portal.ItemButtonPanel buttonPanel;
}
}

View file

@ -0,0 +1,186 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RDSEditCollectionSettings.ascx.cs" Inherits="WebsitePanel.Portal.RDS.RDSEditCollectionSettings" %>
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
<%@ Register Src="UserControls/RDSCollectionApps.ascx" TagName="CollectionApps" TagPrefix="wsp"%>
<%@ Register Src="UserControls/RDSCollectionTabs.ascx" TagName="CollectionTabs" TagPrefix="wsp" %>
<%@ Register Src="UserControls/RDSSessionLimit.ascx" TagName="SessionLimit" TagPrefix="wsp" %>
<%@ Register TagPrefix="wsp" TagName="CollapsiblePanel" Src="../UserControls/CollapsiblePanel.ascx" %>
<%@ Register Src="../UserControls/ItemButtonPanel.ascx" TagName="ItemButtonPanel" TagPrefix="wsp" %>
<script type="text/javascript" src="/JavaScript/jquery.min.js?v=1.4.4"></script>
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
<div id="ExchangeContainer">
<div class="Module">
<div class="Left">
</div>
<div class="Content">
<div class="Center">
<div class="Title">
<asp:Image ID="imgEditRDSCollection" SkinID="EnterpriseStorageSpace48" runat="server" />
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Edit RDS Collection Settings"></asp:Localize>
-
<asp:Literal ID="litCollectionName" runat="server" Text="" />
</div>
<div class="FormBody">
<wsp:CollectionTabs id="tabs" runat="server" SelectedTab="rds_edit_collection_settings" />
<wsp:SimpleMessageBox id="messageBox" runat="server" />
<wsp:CollapsiblePanel id="secRdsSessionSettings" runat="server"
TargetControlID="panelRdsSessionSettings" meta:resourcekey="secRdsSessionSettings" Text="">
</wsp:CollapsiblePanel>
<asp:Panel runat="server" ID="panelRdsSessionSettings">
<div style="padding: 10px;">
<table>
<tr>
<td class="FormLabel260" colspan="3" style="width:auto;"><asp:Localize ID="locSessionLimitHeader" runat="server" meta:resourcekey="locSessionLimitHeader" Text=""></asp:Localize></td>
</tr>
<tr>
<td class="Label" style="width:260px;" colspan="2"><asp:Localize ID="locDisconnectedSessionLimit" runat="server" meta:resourcekey="locDisconnectedSessionLimit" Text=""></asp:Localize></td>
<td style="width:250px;">
<wsp:SessionLimit ID="slDisconnectedSessionLimit" runat="server" />
</td>
</tr>
<tr>
<td class="Label" style="width:260px;" colspan="2"><asp:Localize ID="locActiveSessionLimit" runat="server" meta:resourcekey="locActiveSessionLimit" Text=""></asp:Localize></td>
<td>
<wsp:SessionLimit ID="slActiveSessionLimit" runat="server"/>
</td>
</tr>
<tr>
<td class="Label" style="width:260px;" colspan="2"><asp:Localize ID="locIdleSessionLimit" runat="server" meta:resourcekey="locIdleSessionLimit" Text=""></asp:Localize></td>
<td>
<wsp:SessionLimit ID="slIdleSessionLimit" runat="server"/>
</td>
</tr>
</table>
<br />
<table>
<tr>
<td class="FormLabel260" colspan="2" style="width:auto;"><asp:Localize ID="locCollectionBroken" runat="server" meta:resourcekey="locCollectionBroken" Text=""></asp:Localize></td>
</tr>
<tr>
<td colspan="2">
<asp:RadioButton ID="chDisconnect" GroupName="collectionBroken" runat="server" Text="Disconnect from the session"/>
</td>
</tr>
<tr>
<td style="width:20px;"></td>
<td>
<asp:CheckBox ID="chAutomaticReconnection" Text="Enable automatic reconnection" runat="server"/>
</td>
</tr>
<tr>
<td colspan="2">
<asp:RadioButton ID="chEndSession" GroupName="collectionBroken" runat="server" Text="End the session"/>
</td>
</tr>
</table>
<br />
<table>
<tr>
<td class="FormLabel260" colspan="2" style="width:auto;"><asp:Localize ID="locTempFolder" runat="server" meta:resourcekey="locTempFolder" Text=""></asp:Localize></td>
</tr>
<tr>
<td>
<asp:CheckBox id="chDeleteOnExit" runat="server" Text="Delete temporary folders on exit"/>
</td>
</tr>
<tr>
<td>
<asp:CheckBox ID="chUseFolders" Text="Use temporary folders per session" runat="server"/>
</td>
</tr>
</table>
</div>
</asp:Panel>
<wsp:CollapsiblePanel id="secRdsClientSettings" runat="server"
TargetControlID="panelRdsClientSettings" meta:resourcekey="secRdsClientSettings" Text="">
</wsp:CollapsiblePanel>
<asp:Panel runat="server" ID="panelRdsClientSettings">
<div style="padding: 10px;">
<table>
<tr>
<td class="FormLabel260" colspan="2" style="width:auto;"><asp:Localize ID="locEnableRedirection" runat="server" meta:resourcekey="locEnableRedirection" Text=""></asp:Localize></td>
</tr>
<tr>
<td>
<asp:CheckBox ID="chAudioVideo" Text="Audio and video playback" runat="server"/>
</td>
</tr>
<tr>
<td>
<asp:CheckBox ID="chAudioRecording" Text="Audio recording" runat="server"/>
</td>
</tr>
<tr>
<td>
<asp:CheckBox ID="chSmartCards" Text="Smart cards" runat="server"/>
</td>
</tr>
<tr>
<td>
<asp:CheckBox ID="chPlugPlay" Text="Plug and play devices" runat="server"/>
</td>
</tr>
<tr>
<td>
<asp:CheckBox ID="chDrives" Text="Drives" runat="server"/>
</td>
</tr>
<tr>
<td>
<asp:CheckBox ID="chClipboard" Text="Clipboard" runat="server"/>
</td>
</tr>
</table>
<br />
<table>
<tr>
<td class="FormLabel260" colspan="2" style="width:auto;"><asp:Localize ID="locPrinters" runat="server" meta:resourcekey="locPrinters" Text=""></asp:Localize></td>
</tr>
<tr>
<td colspan="2">
<asp:CheckBox ID="chPrinterRedirection" Text="Allow client printer redirection" runat="server"/>
</td>
</tr>
<tr>
<td style="width:20px;"></td>
<td>
<asp:CheckBox ID="chDefaultDevice" Text="Use the client default printing device" runat="server"/>
</td>
</tr>
<tr>
<td style="width:20px;"></td>
<td>
<asp:CheckBox ID="chEasyPrint" Text="Use the Remote Desktop Easy Print print driver first " runat="server"/>
</td>
</tr>
</table>
<br />
<table>
<tr>
<td class="FormLabel260" colspan="2" style="width:auto;"><asp:Localize ID="locMonitors" runat="server" meta:resourcekey="locMonitors" Text=""></asp:Localize></td>
</tr>
<tr>
<td class="Label" style="width:260px;"><asp:Localize ID="locMonitorsNumber" runat="server" meta:resourcekey="locMonitorsNumber" Text=""></asp:Localize></td>
<td style="width:250px;">
<asp:TextBox ID="tbMonitorsNumber" runat="server" CssClass="NormalTextBox" />
</td>
</tr>
</table>
</div>
</asp:Panel>
<div class="FormFooterClean">
<wsp:ItemButtonPanel id="buttonPanel" runat="server" ValidationGroup="SaveRDSCollection"
OnSaveClick="btnSave_Click" OnSaveExitClick="btnSaveExit_Click" />
</div>
</div>
</div>
</div>
</div>
</div>

View file

@ -0,0 +1,228 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebsitePanel.Providers.RemoteDesktopServices;
namespace WebsitePanel.Portal.RDS
{
public partial class RDSEditCollectionSettings : WebsitePanelModuleBase
{
protected void Page_Load(object sender, EventArgs e)
{
WriteScriptBlock();
if (!IsPostBack)
{
RdsCollection collection = ES.Services.RDS.GetRdsCollection(PanelRequest.CollectionID);
RdsCollectionSettings settings = ES.Services.RDS.GetRdsCollectionSettings(PanelRequest.CollectionID);
collection.Settings = settings;
if (collection.Settings == null)
{
collection.Settings = new RdsCollectionSettings
{
DisconnectedSessionLimitMin = 0,
ActiveSessionLimitMin = 0,
IdleSessionLimitMin = 0,
BrokenConnectionAction = BrokenConnectionActionValues.Disconnect.ToString(),
AutomaticReconnectionEnabled = true,
TemporaryFoldersDeletedOnExit = true,
TemporaryFoldersPerSession = true,
ClientDeviceRedirectionOptions = string.Join(",", new List<string>
{
ClientDeviceRedirectionOptionValues.AudioVideoPlayBack.ToString(),
ClientDeviceRedirectionOptionValues.AudioRecording.ToString(),
ClientDeviceRedirectionOptionValues.SmartCard.ToString(),
ClientDeviceRedirectionOptionValues.Clipboard.ToString(),
ClientDeviceRedirectionOptionValues.Drive.ToString(),
ClientDeviceRedirectionOptionValues.PlugAndPlayDevice.ToString()
}.ToArray()),
ClientPrinterRedirected = true,
ClientPrinterAsDefault = true,
RDEasyPrintDriverEnabled = true,
MaxRedirectedMonitors = 16
};
}
litCollectionName.Text = collection.DisplayName;
BindControls(collection);
}
}
private void BindControls(RdsCollection collection)
{
slDisconnectedSessionLimit.SelectedLimit = collection.Settings.DisconnectedSessionLimitMin;
slActiveSessionLimit.SelectedLimit = collection.Settings.ActiveSessionLimitMin;
slIdleSessionLimit.SelectedLimit = collection.Settings.IdleSessionLimitMin;
if (collection.Settings.BrokenConnectionAction == BrokenConnectionActionValues.Disconnect.ToString())
{
chDisconnect.Checked = true;
chAutomaticReconnection.Enabled = true;
}
else
{
chEndSession.Checked = true;
chAutomaticReconnection.Enabled = false;
}
chAutomaticReconnection.Checked = collection.Settings.AutomaticReconnectionEnabled;
chDeleteOnExit.Checked = collection.Settings.TemporaryFoldersDeletedOnExit;
chUseFolders.Checked = collection.Settings.TemporaryFoldersPerSession;
if (collection.Settings.ClientDeviceRedirectionOptions != null)
{
chAudioVideo.Checked = collection.Settings.ClientDeviceRedirectionOptions.Contains(ClientDeviceRedirectionOptionValues.AudioVideoPlayBack.ToString());
chAudioRecording.Checked = collection.Settings.ClientDeviceRedirectionOptions.Contains(ClientDeviceRedirectionOptionValues.AudioRecording.ToString());
chDrives.Checked = collection.Settings.ClientDeviceRedirectionOptions.Contains(ClientDeviceRedirectionOptionValues.Drive.ToString());
chSmartCards.Checked = collection.Settings.ClientDeviceRedirectionOptions.Contains(ClientDeviceRedirectionOptionValues.SmartCard.ToString());
chPlugPlay.Checked = collection.Settings.ClientDeviceRedirectionOptions.Contains(ClientDeviceRedirectionOptionValues.PlugAndPlayDevice.ToString());
chClipboard.Checked = collection.Settings.ClientDeviceRedirectionOptions.Contains(ClientDeviceRedirectionOptionValues.Clipboard.ToString());
}
chPrinterRedirection.Checked = collection.Settings.ClientPrinterRedirected;
chDefaultDevice.Checked = collection.Settings.ClientPrinterAsDefault;
chDefaultDevice.Enabled = collection.Settings.ClientPrinterRedirected;
chEasyPrint.Checked = collection.Settings.RDEasyPrintDriverEnabled;
chEasyPrint.Enabled = collection.Settings.ClientPrinterRedirected;
tbMonitorsNumber.Text = collection.Settings.MaxRedirectedMonitors.ToString();
}
private bool EditCollectionSettings()
{
try
{
RdsCollection collection = ES.Services.RDS.GetRdsCollection(PanelRequest.CollectionID);
collection.Settings.RdsCollectionId = collection.Id;
collection.Settings = GetSettings(collection.Settings);
ES.Services.RDS.EditRdsCollectionSettings(PanelRequest.ItemID, collection);
}
catch (Exception ex)
{
ShowErrorMessage("RDSCOLLECTIONSETTINGS_NOT_UPDATES", ex);
return false;
}
return true;
}
private RdsCollectionSettings GetSettings(RdsCollectionSettings settings)
{
settings.DisconnectedSessionLimitMin = slDisconnectedSessionLimit.SelectedLimit;
settings.ActiveSessionLimitMin = slActiveSessionLimit.SelectedLimit;
settings.IdleSessionLimitMin = slIdleSessionLimit.SelectedLimit;
settings.AutomaticReconnectionEnabled = chAutomaticReconnection.Checked;
if (chDisconnect.Checked)
{
settings.BrokenConnectionAction = BrokenConnectionActionValues.Disconnect.ToString();
}
else
{
settings.BrokenConnectionAction = BrokenConnectionActionValues.LogOff.ToString();
}
settings.TemporaryFoldersDeletedOnExit = chDeleteOnExit.Checked;
settings.TemporaryFoldersPerSession = chUseFolders.Checked;
settings.ClientPrinterRedirected = chPrinterRedirection.Checked;
settings.ClientPrinterAsDefault = chDefaultDevice.Checked;
settings.RDEasyPrintDriverEnabled = chEasyPrint.Checked;
settings.MaxRedirectedMonitors = Convert.ToInt32(tbMonitorsNumber.Text);
List<string> redirectionOptions = new List<string>();
if (chAudioVideo.Checked)
{
redirectionOptions.Add(ClientDeviceRedirectionOptionValues.AudioVideoPlayBack.ToString());
}
if (chAudioRecording.Checked)
{
redirectionOptions.Add(ClientDeviceRedirectionOptionValues.AudioRecording.ToString());
}
if (chSmartCards.Checked)
{
redirectionOptions.Add(ClientDeviceRedirectionOptionValues.SmartCard.ToString());
}
if (chPlugPlay.Checked)
{
redirectionOptions.Add(ClientDeviceRedirectionOptionValues.PlugAndPlayDevice.ToString());
}
if (chDrives.Checked)
{
redirectionOptions.Add(ClientDeviceRedirectionOptionValues.Drive.ToString());
}
if (chClipboard.Checked)
{
redirectionOptions.Add(ClientDeviceRedirectionOptionValues.Clipboard.ToString());
}
settings.ClientDeviceRedirectionOptions = string.Join(",", redirectionOptions.ToArray());
return settings;
}
protected void btnSave_Click(object sender, EventArgs e)
{
if (!Page.IsValid)
{
return;
}
EditCollectionSettings();
}
protected void btnSaveExit_Click(object sender, EventArgs e)
{
if (!Page.IsValid)
{
return;
}
if (EditCollectionSettings())
{
Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "rds_collections", "SpaceID=" + PanelSecurity.PackageId));
}
}
protected override void OnPreRender(EventArgs e)
{
chPrinterRedirection.Attributes["onclick"] = String.Format("TogglePrinterCheckboxes('{0}', '{1}', '{2}');", chPrinterRedirection.ClientID, chDefaultDevice.ClientID, chEasyPrint.ClientID);
chDisconnect.Attributes["onclick"] = String.Format("EnableReconnectionCheckbox('{0}', true);", chAutomaticReconnection.ClientID);
chEndSession.Attributes["onclick"] = String.Format("EnableReconnectionCheckbox('{0}', false);", chAutomaticReconnection.ClientID);
base.OnPreRender(e);
}
private void WriteScriptBlock()
{
string scriptKey = "RdsSettingsScript";
if (!Page.ClientScript.IsClientScriptBlockRegistered(scriptKey))
{
Page.ClientScript.RegisterClientScriptBlock(GetType(), scriptKey, @"<script language='javascript' type='text/javascript'>
function TogglePrinterCheckboxes(chkId, chDefaultId, chEasyId)
{
var chPrinter = document.getElementById(chkId);
var chDefaultDevice = document.getElementById(chDefaultId);
chDefaultDevice.disabled = !chPrinter.checked;
var chEasyPrint = document.getElementById(chEasyId);
chEasyPrint.disabled = !chPrinter.checked;
}
function EnableReconnectionCheckbox(checkBoxId, enabled)
{
var checkBox = document.getElementById(checkBoxId);
checkBox.disabled = !enabled;
}
</script>");
}
}
}
}

View file

@ -0,0 +1,366 @@
//------------------------------------------------------------------------------
// <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.RDS {
public partial class RDSEditCollectionSettings {
/// <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>
/// imgEditRDSCollection 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 imgEditRDSCollection;
/// <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>
/// litCollectionName 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 litCollectionName;
/// <summary>
/// tabs control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.RDS.UserControls.RdsServerTabs tabs;
/// <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>
/// secRdsSessionSettings control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secRdsSessionSettings;
/// <summary>
/// panelRdsSessionSettings 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 panelRdsSessionSettings;
/// <summary>
/// locSessionLimitHeader 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 locSessionLimitHeader;
/// <summary>
/// locDisconnectedSessionLimit 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 locDisconnectedSessionLimit;
/// <summary>
/// slDisconnectedSessionLimit control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.RDS.UserControls.RDSSessionLimit slDisconnectedSessionLimit;
/// <summary>
/// locActiveSessionLimit 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 locActiveSessionLimit;
/// <summary>
/// slActiveSessionLimit control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.RDS.UserControls.RDSSessionLimit slActiveSessionLimit;
/// <summary>
/// locIdleSessionLimit 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 locIdleSessionLimit;
/// <summary>
/// slIdleSessionLimit control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.RDS.UserControls.RDSSessionLimit slIdleSessionLimit;
/// <summary>
/// locCollectionBroken 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 locCollectionBroken;
/// <summary>
/// chDisconnect 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.RadioButton chDisconnect;
/// <summary>
/// chAutomaticReconnection 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 chAutomaticReconnection;
/// <summary>
/// chEndSession 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.RadioButton chEndSession;
/// <summary>
/// locTempFolder 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 locTempFolder;
/// <summary>
/// chDeleteOnExit 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 chDeleteOnExit;
/// <summary>
/// chUseFolders 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 chUseFolders;
/// <summary>
/// secRdsClientSettings control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secRdsClientSettings;
/// <summary>
/// panelRdsClientSettings 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 panelRdsClientSettings;
/// <summary>
/// locEnableRedirection 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 locEnableRedirection;
/// <summary>
/// chAudioVideo 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 chAudioVideo;
/// <summary>
/// chAudioRecording 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 chAudioRecording;
/// <summary>
/// chSmartCards 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 chSmartCards;
/// <summary>
/// chPlugPlay 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 chPlugPlay;
/// <summary>
/// chDrives 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 chDrives;
/// <summary>
/// chClipboard 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 chClipboard;
/// <summary>
/// locPrinters 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 locPrinters;
/// <summary>
/// chPrinterRedirection 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 chPrinterRedirection;
/// <summary>
/// chDefaultDevice 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 chDefaultDevice;
/// <summary>
/// chEasyPrint 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 chEasyPrint;
/// <summary>
/// locMonitors 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 locMonitors;
/// <summary>
/// locMonitorsNumber 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 locMonitorsNumber;
/// <summary>
/// tbMonitorsNumber 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 tbMonitorsNumber;
/// <summary>
/// buttonPanel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.ItemButtonPanel buttonPanel;
}
}

View file

@ -2,6 +2,9 @@
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
<%@ Register Src="UserControls/RDSCollectionUsers.ascx" TagName="CollectionUsers" TagPrefix="wsp"%>
<%@ Register Src="UserControls/RDSCollectionTabs.ascx" TagName="CollectionTabs" TagPrefix="wsp" %>
<%@ Register TagPrefix="wsp" TagName="CollapsiblePanel" Src="../UserControls/CollapsiblePanel.ascx" %>
<%@ Register Src="../UserControls/ItemButtonPanel.ascx" TagName="ItemButtonPanel" TagPrefix="wsp" %>
<script type="text/javascript" src="/JavaScript/jquery.min.js?v=1.4.4"></script>
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
@ -15,30 +18,26 @@
<div class="Title">
<asp:Image ID="imgEditRDSCollection" SkinID="EnterpriseStorageSpace48" runat="server" />
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Edit RDS Collection"></asp:Localize>
-
<asp:Literal ID="litCollectionName" runat="server" Text="" />
</div>
<div class="FormContentRDS">
<wsp:SimpleMessageBox id="messageBox" runat="server" />
<table>
<tr>
<td class="FormLabel150" style="width: 100px;"><asp:Localize ID="locCollectionName" runat="server" meta:resourcekey="locCollectionName" Text="Collection Name:"></asp:Localize></td>
<td class="FormLabel150">
<asp:Localize ID="locCName" runat="server" Text="RDS Collection 1" />
</td>
</tr>
</table>
<fieldset id="UsersPanel" runat="server">
<legend><asp:Localize ID="locUsersSection" runat="server" meta:resourcekey="locUsersSection" Text="Users"></asp:Localize></legend>
<wsp:CollectionTabs id="tabs" runat="server" SelectedTab="rds_collection_edit_users" />
<wsp:CollapsiblePanel id="secRdsUsers" runat="server"
TargetControlID="panelRdsUsers" meta:resourcekey="secRdsUsers" Text="">
</wsp:CollapsiblePanel>
<asp:Panel runat="server" ID="panelRdsUsers">
<div style="padding: 10px;">
<wsp:CollectionUsers id="users" runat="server" />
</div>
</fieldset>
<div class="FormFooter">
<asp:Button id="btnSave" runat="server" Text="Save" CssClass="Button1" meta:resourcekey="btnSave" ValidationGroup="SaveRDSCollectoin" OnClick="btnSave_Click"></asp:Button>
<asp:ValidationSummary ID="valSummary" runat="server" ShowMessageBox="True" ShowSummary="False" ValidationGroup="SaveRDSCollectoin" />
</div>
</div>
</asp:Panel>
<div class="FormFooterClean">
<wsp:ItemButtonPanel id="buttonPanel" runat="server" ValidationGroup="SaveRDSCollection"
OnSaveClick="btnSave_Click" OnSaveExitClick="btnSaveExit_Click" />
</div>
</div>
</div>
</div>

View file

@ -44,25 +44,48 @@ namespace WebsitePanel.Portal.RDS
{
var collectionUsers = ES.Services.RDS.GetRdsCollectionUsers(PanelRequest.CollectionID);
var collection = ES.Services.RDS.GetRdsCollection(PanelRequest.CollectionID);
locCName.Text = collection.Name;
litCollectionName.Text = collection.DisplayName;
users.SetUsers(collectionUsers);
}
}
private bool SaveRdsUsers()
{
try
{
ES.Services.RDS.SetUsersToRdsCollection(PanelRequest.ItemID, PanelRequest.CollectionID, users.GetUsers());
}
catch (Exception ex)
{
messageBox.ShowErrorMessage(ex.Message);
return false;
}
return true;
}
protected void btnSave_Click(object sender, EventArgs e)
{
if (!Page.IsValid)
return;
try
{
ES.Services.RDS.SetUsersToRdsCollection(PanelRequest.ItemID, PanelRequest.CollectionID, users.GetUsers());
Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "rds_collections",
"SpaceID=" + PanelSecurity.PackageId));
return;
}
SaveRdsUsers();
}
protected void btnSaveExit_Click(object sender, EventArgs e)
{
if (!Page.IsValid)
{
return;
}
if (SaveRdsUsers())
{
Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "rds_collections", "SpaceID=" + PanelSecurity.PackageId));
}
catch(Exception ex) { }
}
}
}

View file

@ -1,31 +1,3 @@
// Copyright (c) 2015, 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.
@ -67,6 +39,15 @@ namespace WebsitePanel.Portal.RDS {
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locTitle;
/// <summary>
/// litCollectionName 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 litCollectionName;
/// <summary>
/// messageBox control.
/// </summary>
@ -77,40 +58,31 @@ namespace WebsitePanel.Portal.RDS {
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
/// <summary>
/// locCollectionName control.
/// tabs 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 locCollectionName;
protected global::WebsitePanel.Portal.RDS.UserControls.RdsServerTabs tabs;
/// <summary>
/// locCName control.
/// secRdsUsers 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 locCName;
protected global::WebsitePanel.Portal.CollapsiblePanel secRdsUsers;
/// <summary>
/// UsersPanel control.
/// panelRdsUsers 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.HtmlGenericControl UsersPanel;
/// <summary>
/// locUsersSection 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 locUsersSection;
protected global::System.Web.UI.WebControls.Panel panelRdsUsers;
/// <summary>
/// users control.
@ -122,21 +94,12 @@ namespace WebsitePanel.Portal.RDS {
protected global::WebsitePanel.Portal.RDS.UserControls.RDSCollectionUsers users;
/// <summary>
/// btnSave control.
/// buttonPanel 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>
/// valSummary 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 valSummary;
protected global::WebsitePanel.Portal.ItemButtonPanel buttonPanel;
}
}

View file

@ -0,0 +1,81 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RDSUserSessions.ascx.cs" Inherits="WebsitePanel.Portal.RDS.RDSUserSessions" %>
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
<%@ Register Src="UserControls/RDSCollectionTabs.ascx" TagName="CollectionTabs" TagPrefix="wsp" %>
<%@ Register TagPrefix="wsp" TagName="CollapsiblePanel" Src="../UserControls/CollapsiblePanel.ascx" %>
<%@ Register Src="../UserControls/ItemButtonPanel.ascx" TagName="ItemButtonPanel" TagPrefix="wsp" %>
<script type="text/javascript" src="/JavaScript/jquery.min.js?v=1.4.4"></script>
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
<div id="ExchangeContainer">
<div class="Module">
<div class="Left">
</div>
<div class="Content">
<div class="Center">
<div class="Title">
<asp:Image ID="imgEditRDSCollection" SkinID="EnterpriseStorageSpace48" runat="server" />
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Edit RDS Collection"></asp:Localize>
-
<asp:Literal ID="litCollectionName" runat="server" Text="" />
</div>
<div class="FormBody">
<wsp:CollectionTabs id="tabs" runat="server" SelectedTab="rds_collection_user_sessions" />
<wsp:SimpleMessageBox id="messageBox" runat="server" />
<asp:UpdatePanel ID="RDAppsUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
<ContentTemplate>
<div class="FormButtonsBarCleanRight">
<div class="FormButtonsBarClean">
<asp:Button ID="btnRefresh" runat="server" Text="Refresh" CssClass="Button1" OnClick="btnRefresh_Click" OnClientClick="ShowProgressDialog('Loading'); return true;" meta:resourcekey="btnRefresh" />
</div>
</div>
<wsp:CollapsiblePanel id="secRdsUserSessions" runat="server"
TargetControlID="panelRdsUserSessions" meta:resourcekey="secRdsUserSessions" Text="">
</wsp:CollapsiblePanel>
<asp:Panel runat="server" ID="panelRdsUserSessions">
<div style="padding: 10px;">
<asp:GridView ID="gvRDSUserSessions" runat="server" AutoGenerateColumns="False" EnableViewState="true"
Width="100%" EmptyDataText="gvRDSUserSessions" CssSelectorClass="NormalGridView"
OnRowCommand="gvRDSCollections_RowCommand" AllowPaging="True" AllowSorting="True">
<Columns>
<asp:TemplateField meta:resourcekey="gvUserName" HeaderText="gvUserName">
<ItemStyle Width="30%" Wrap="false"/>
<ItemTemplate>
<asp:Literal ID="litUserName" runat="server" Text='<%# Eval("UserName") %>'/>
<asp:HiddenField ID="hfUnifiedSessionId" runat="server" Value='<%# Eval("UnifiedSessionId") %>'/>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField meta:resourcekey="gvHostServer" HeaderText="gvHostServer">
<ItemStyle Width="30%" Wrap="false"/>
<ItemTemplate>
<asp:Literal ID="litHostServer" runat="server" Text='<%# Eval("HostServer") %>'/>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField meta:resourcekey="gvSessionState" HeaderText="gvSessionState">
<ItemStyle Width="30%" Wrap="false"/>
<ItemTemplate>
<asp:Literal ID="litSessionState" runat="server" Text='<%# Eval("SessionState") %>'/>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton ID="lnkLogOff" runat="server" Text="Log Off" CommandName="LogOff" CommandArgument='<%# Eval("UnifiedSessionId") + ";" + Eval("HostServer") %>'
meta:resourcekey="cmdLogOff" OnClientClick="return confirm('Are you sure you want to log off selected user?')"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</asp:Panel>
<div class="FormFooterClean">
<wsp:ItemButtonPanel id="buttonPanel" runat="server" ValidationGroup="SaveRDSCollection"
OnSaveClick="btnSave_Click" OnSaveExitClick="btnSaveExit_Click" />
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</div>
</div>
</div>

View file

@ -0,0 +1,105 @@
using AjaxControlToolkit;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebsitePanel.Providers.RemoteDesktopServices;
namespace WebsitePanel.Portal.RDS
{
public partial class RDSUserSessions : WebsitePanelModuleBase
{
protected void Page_Load(object sender, EventArgs e)
{
buttonPanel.ButtonSaveVisible = false;
if (!IsPostBack)
{
var collection = ES.Services.RDS.GetRdsCollection(PanelRequest.CollectionID);
litCollectionName.Text = collection.DisplayName;
BindGrid();
}
}
protected void gvRDSCollections_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "LogOff")
{
var arguments = e.CommandArgument.ToString().Split(';');
string unifiedSessionId = arguments[0];
string hostServer = arguments[1];
try
{
ES.Services.RDS.LogOffRdsUser(PanelRequest.ItemID, unifiedSessionId, hostServer);
BindGrid();
((ModalPopupExtender)asyncTasks.FindControl("ModalPopupProperties")).Hide();
}
catch (Exception ex)
{
ShowErrorMessage("REMOTE_DESKTOP_SERVICES_LOG_OFF_USER", ex);
}
}
}
protected void btnSave_Click(object sender, EventArgs e)
{
if (!Page.IsValid)
{
return;
}
BindGrid();
}
protected void btnSaveExit_Click(object sender, EventArgs e)
{
if (!Page.IsValid)
{
return;
}
Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "rds_collections", "SpaceID=" + PanelSecurity.PackageId));
}
protected void btnRefresh_Click(object sender, EventArgs e)
{
if (!Page.IsValid)
{
return;
}
BindGrid();
((ModalPopupExtender)asyncTasks.FindControl("ModalPopupProperties")).Hide();
}
private void BindGrid()
{
var userSessions = new List<RdsUserSession>();
try
{
userSessions = ES.Services.RDS.GetRdsUserSessions(PanelRequest.CollectionID).ToList();
}
catch(Exception ex)
{
ShowErrorMessage("REMOTE_DESKTOP_SERVICES_USER_SESSIONS", ex);
}
foreach(var userSession in userSessions)
{
var states = userSession.SessionState.Split('_');
if (states.Length == 2)
{
userSession.SessionState = states[1];
}
}
gvRDSUserSessions.DataSource = userSessions;
gvRDSUserSessions.DataBind();
}
}
}

View file

@ -0,0 +1,123 @@
//------------------------------------------------------------------------------
// <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.RDS {
public partial class RDSUserSessions {
/// <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>
/// imgEditRDSCollection 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 imgEditRDSCollection;
/// <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>
/// litCollectionName 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 litCollectionName;
/// <summary>
/// tabs control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.RDS.UserControls.RdsServerTabs tabs;
/// <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>
/// RDAppsUpdatePanel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.UpdatePanel RDAppsUpdatePanel;
/// <summary>
/// btnRefresh 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 btnRefresh;
/// <summary>
/// secRdsUserSessions control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secRdsUserSessions;
/// <summary>
/// panelRdsUserSessions 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 panelRdsUserSessions;
/// <summary>
/// gvRDSUserSessions 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 gvRDSUserSessions;
/// <summary>
/// buttonPanel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.ItemButtonPanel buttonPanel;
}
}

View file

@ -153,4 +153,7 @@
<data name="headerAddApps.Text" xml:space="preserve">
<value>Available Remote Applications</value>
</data>
<data name="lnkDisplayName" xml:space="preserve">
<value>ShowProgressDialog('Loading ...');</value>
</data>
</root>

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=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="Tab.RdsApplications" xml:space="preserve">
<value>Remote Applications</value>
</data>
<data name="Tab.RdsServers" xml:space="preserve">
<value>RDS Servers</value>
</data>
<data name="Tab.RdsUsers" xml:space="preserve">
<value>RDS Users</value>
</data>
<data name="Tab.Settings" xml:space="preserve">
<value>Settings</value>
</data>
<data name="Tab.UserSessions" xml:space="preserve">
<value>User Sessions</value>
</data>
</root>

View file

@ -4,8 +4,8 @@
<asp:UpdatePanel ID="RDAppsUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
<ContentTemplate>
<div class="FormButtonsBarClean">
<asp:Button ID="btnAdd" runat="server" Text="Add..." CssClass="Button2" OnClick="btnAdd_Click" meta:resourcekey="btnAdd" />
<asp:Button ID="btnDelete" runat="server" Text="Delete" CssClass="Button2" OnClick="btnDelete_Click" meta:resourcekey="btnDelete"/>
<asp:Button ID="btnAdd" runat="server" Text="Add..." CssClass="Button1" OnClick="btnAdd_Click" meta:resourcekey="btnAdd" />
<asp:Button ID="btnDelete" runat="server" Text="Delete" CssClass="Button1" OnClick="btnDelete_Click" meta:resourcekey="btnDelete"/>
</div>
<asp:GridView ID="gvApps" runat="server" meta:resourcekey="gvApps" AutoGenerateColumns="False"
Width="600px" CssSelectorClass="NormalGridView"
@ -24,15 +24,11 @@
<ItemStyle Width="90%" Wrap="false">
</ItemStyle>
<ItemTemplate>
<asp:Literal ID="litDisplayName" runat="server" Text='<%# Eval("DisplayName") %>'></asp:Literal>
<asp:hyperlink id="lnkDisplayName" meta:resourcekey="lnkDisplayName" runat="server" Text='<%# Eval("DisplayName") %>' NavigateUrl='<%# GetCollectionUsersEditUrl(Eval("Alias").ToString()) %>'/>
<asp:HiddenField ID="hfFilePath" runat="server" Value='<%# Eval("FilePath") %>'/>
<asp:HiddenField ID="hfRequiredCommandLine" runat="server" Value='<%# Eval("RequiredCommandLine") %>'/>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:hyperlink id="lnkUsers" meta:resourcekey="lnkUsers" runat="server" NavigateUrl='<%# GetCollectionUsersEditUrl(Eval("DisplayName").ToString()) %>'>Users</asp:hyperlink>
</ItemTemplate>
</asp:TemplateField>
</asp:TemplateField>
</Columns>
</asp:GridView>
<br />
@ -74,6 +70,7 @@
<ItemTemplate>
<asp:Literal ID="litName" runat="server" Text='<%# Eval("DisplayName") %>'></asp:Literal>
<asp:HiddenField ID="hfFilePathPopup" runat="server" Value='<%# Eval("FilePath") %>'/>
<asp:HiddenField ID="hfRequiredCommandLinePopup" runat="server" Value='<%# Eval("RequiredCommandLine") %>'/>
</ItemTemplate>
</asp:TemplateField>
</Columns>

View file

@ -50,7 +50,7 @@ namespace WebsitePanel.Portal.RDS.UserControls
}
public void SetApps(RemoteApplication[] apps)
{
{
BindApps(apps, false);
}
@ -104,30 +104,68 @@ namespace WebsitePanel.Portal.RDS.UserControls
List<RemoteApplication> selectedApps = GetPopUpGridViewApps();
BindApps(selectedApps.ToArray(), true);
}
}
protected void BindPopupApps()
{
RdsCollection collection = ES.Services.RDS.GetRdsCollection(PanelRequest.CollectionID);
StartMenuApp[] apps = ES.Services.RDS.GetAvailableRemoteApplications(PanelRequest.ItemID, collection.Name);
List<StartMenuApp> apps = ES.Services.RDS.GetAvailableRemoteApplications(PanelRequest.ItemID, collection.Name).ToList();
var sessionHosts = ES.Services.RDS.GetRdsCollectionSessionHosts(PanelRequest.CollectionID);
var addedApplications = GetApps();
var aliases = addedApplications.Select(p => p.Alias);
apps = apps.Where(x => !aliases.Contains(x.Alias)).ToList();
apps = apps.Where(x => !GetApps().Select(p => p.DisplayName).Contains(x.DisplayName)).ToArray();
Array.Sort(apps, CompareAccount);
if (Direction == SortDirection.Ascending)
{
Array.Reverse(apps);
apps = apps.OrderBy(a => a.DisplayName).ToList();
Direction = SortDirection.Descending;
}
else
{
apps = apps.OrderByDescending(a => a.DisplayName).ToList();
Direction = SortDirection.Ascending;
}
var requiredParams = addedApplications.Select(a => a.RequiredCommandLine.ToLower());
foreach (var host in sessionHosts)
{
if (!requiredParams.Contains(string.Format("/v:{0}", host.ToLower())))
{
var fullRemote = new StartMenuApp
{
DisplayName = string.Format("Full Desktop - {0}", host.ToLower()),
FilePath = "%SystemRoot%\\system32\\mstsc.exe",
RequiredCommandLine = string.Format("/v:{0}", host.ToLower())
};
var sessionHost = collection.Servers.Where(s => s.FqdName.Equals(host, StringComparison.CurrentCultureIgnoreCase)).First();
if (sessionHost != null)
{
fullRemote.DisplayName = string.Format("Full Desktop - {0}", sessionHost.Name.ToLower());
}
fullRemote.Alias = fullRemote.DisplayName.Replace(" ", "");
if (apps.Count > 0)
{
apps.Insert(0, fullRemote);
}
else
{
apps.Add(fullRemote);
}
}
}
gvPopupApps.DataSource = apps;
gvPopupApps.DataBind();
}
protected void BindApps(RemoteApplication[] newApps, bool preserveExisting)
{
{
// get binded addresses
List<RemoteApplication> apps = new List<RemoteApplication>();
if(preserveExisting)
@ -154,7 +192,7 @@ namespace WebsitePanel.Portal.RDS.UserControls
apps.Add(newApp);
}
}
}
gvApps.DataSource = apps;
gvApps.DataBind();
@ -172,8 +210,9 @@ namespace WebsitePanel.Portal.RDS.UserControls
RemoteApplication app = new RemoteApplication();
app.Alias = (string)gvApps.DataKeys[i][0];
app.DisplayName = ((Literal)row.FindControl("litDisplayName")).Text;
app.DisplayName = ((HyperLink)row.FindControl("lnkDisplayName")).Text;
app.FilePath = ((HiddenField)row.FindControl("hfFilePath")).Value;
app.RequiredCommandLine = ((HiddenField)row.FindControl("hfRequiredCommandLine")).Value;
if (state == SelectedState.All ||
(state == SelectedState.Selected && chkSelect.Checked) ||
@ -200,7 +239,8 @@ namespace WebsitePanel.Portal.RDS.UserControls
{
Alias = (string)gvPopupApps.DataKeys[i][0],
DisplayName = ((Literal)row.FindControl("litName")).Text,
FilePath = ((HiddenField)row.FindControl("hfFilePathPopup")).Value
FilePath = ((HiddenField)row.FindControl("hfFilePathPopup")).Value,
RequiredCommandLine = ((HiddenField)row.FindControl("hfRequiredCommandLinePopup")).Value
});
}
}

View file

@ -1,31 +1,3 @@
// Copyright (c) 2015, 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.

View file

@ -4,8 +4,8 @@
<asp:UpdatePanel ID="UsersUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
<ContentTemplate>
<div class="FormButtonsBarClean">
<asp:Button ID="btnAdd" runat="server" Text="Add..." CssClass="Button2" OnClick="btnAdd_Click" meta:resourcekey="btnAdd" />
<asp:Button ID="btnDelete" runat="server" Text="Delete" CssClass="Button2" OnClick="btnDelete_Click" meta:resourcekey="btnDelete"/>
<asp:Button ID="btnAdd" runat="server" Text="Add..." CssClass="Button1" OnClick="btnAdd_Click" meta:resourcekey="btnAdd" />
<asp:Button ID="btnDelete" runat="server" Text="Delete" CssClass="Button1" OnClick="btnDelete_Click" meta:resourcekey="btnDelete"/>
</div>
<asp:GridView ID="gvServers" runat="server" meta:resourcekey="gvServers" AutoGenerateColumns="False"
Width="600px" CssSelectorClass="NormalGridView"

View file

@ -1,31 +1,3 @@
// Copyright (c) 2015, 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.

View file

@ -0,0 +1,30 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RDSCollectionTabs.ascx.cs" Inherits="WebsitePanel.Portal.RDS.UserControls.RdsServerTabs" %>
<table width="100%" cellpadding="0" cellspacing="1">
<tr>
<td class="Tabs">
<asp:DataList ID="rdsTabs" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow" EnableViewState="false">
<ItemStyle Wrap="False" />
<ItemTemplate >
<asp:HyperLink ID="lnkTab" runat="server" CssClass="Tab" NavigateUrl='<%# Eval("Url") %>' OnClick="return tabClicked();">
<%# Eval("Name") %>
</asp:HyperLink>
</ItemTemplate>
<SelectedItemStyle Wrap="False" />
<SelectedItemTemplate>
<asp:HyperLink ID="lnkSelTab" runat="server" CssClass="ActiveTab" NavigateUrl='<%# Eval("Url") %>' OnClick="return tabClicked;">
<%# Eval("Name") %>
</asp:HyperLink>
</SelectedItemTemplate>
</asp:DataList>
</td>
</tr>
</table>
<br />
<script type="text/javascript">
function tabClicked() {
ShowProgressDialog('Loading');
ShowProgressDialogInternal();
return true;
}
</script>

View file

@ -0,0 +1,54 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebsitePanel.Portal.Code.UserControls;
namespace WebsitePanel.Portal.RDS.UserControls
{
public partial class RdsServerTabs : WebsitePanelControlBase
{
public string SelectedTab { get; set; }
protected void Page_Load(object sender, EventArgs e)
{
BindTabs();
}
private void BindTabs()
{
List<Tab> tabsList = new List<Tab>();
tabsList.Add(CreateTab("rds_edit_collection", "Tab.RdsServers"));
tabsList.Add(CreateTab("rds_edit_collection_settings", "Tab.Settings"));
tabsList.Add(CreateTab("rds_collection_edit_apps", "Tab.RdsApplications"));
tabsList.Add(CreateTab("rds_collection_edit_users", "Tab.RdsUsers"));
tabsList.Add(CreateTab("rds_collection_user_sessions", "Tab.UserSessions"));
int idx = 0;
foreach (Tab tab in tabsList)
{
if (String.Compare(tab.Id, SelectedTab, true) == 0)
{
break;
}
idx++;
}
rdsTabs.SelectedIndex = idx;
rdsTabs.DataSource = tabsList;
rdsTabs.DataBind();
}
private Tab CreateTab(string id, string text)
{
return new Tab(id, GetLocalizedString(text),
HostModule.EditUrl("AccountID", PanelRequest.AccountID.ToString(), id,
"SpaceID=" + PanelSecurity.PackageId.ToString(),
"ItemID=" + PanelRequest.ItemID.ToString(), "CollectionID=" + PanelRequest.CollectionID));
}
}
}

View file

@ -0,0 +1,24 @@
//------------------------------------------------------------------------------
// <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.RDS.UserControls {
public partial class RdsServerTabs {
/// <summary>
/// rdsTabs 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.DataList rdsTabs;
}
}

View file

@ -4,8 +4,8 @@
<asp:UpdatePanel ID="UsersUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
<ContentTemplate>
<div class="FormButtonsBarClean">
<asp:Button ID="btnAdd" runat="server" Text="Add..." CssClass="Button2" OnClick="btnAdd_Click" meta:resourcekey="btnAdd" />
<asp:Button ID="btnDelete" runat="server" Text="Delete" CssClass="Button2" OnClick="btnDelete_Click" meta:resourcekey="btnDelete"/>
<asp:Button ID="btnAdd" runat="server" Text="Add..." CssClass="Button1" OnClick="btnAdd_Click" meta:resourcekey="btnAdd" />
<asp:Button ID="btnDelete" runat="server" Text="Delete" CssClass="Button1" OnClick="btnDelete_Click" meta:resourcekey="btnDelete"/>
</div>
<asp:GridView ID="gvUsers" runat="server" meta:resourcekey="gvUsers" AutoGenerateColumns="False"
Width="600px" CssSelectorClass="NormalGridView"
@ -21,7 +21,7 @@
<ItemStyle Width="10px" />
</asp:TemplateField>
<asp:TemplateField meta:resourcekey="gvUsersAccount" HeaderText="gvUsersAccount">
<ItemStyle Width="60%" Wrap="false">
<ItemStyle Width="96%" Wrap="false" HorizontalAlign="Left">
</ItemStyle>
<ItemTemplate>
<asp:Literal ID="litAccount" runat="server" Text='<%# Eval("DisplayName") %>'></asp:Literal>
@ -75,14 +75,14 @@
<ItemStyle Width="10px" />
</asp:TemplateField>
<asp:TemplateField meta:resourcekey="gvAccountsDisplayName">
<ItemStyle Width="50%"></ItemStyle>
<ItemStyle Width="50%" HorizontalAlign="Left"></ItemStyle>
<ItemTemplate>
<asp:Image ID="imgAccount" runat="server" ImageUrl='<%# GetAccountImage((int)Eval("AccountType")) %>' ImageAlign="AbsMiddle" />
<asp:Literal ID="litDisplayName" runat="server" Text='<%# Eval("DisplayName") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField meta:resourcekey="gvAccountsEmail">
<ItemStyle Width="50%"></ItemStyle>
<ItemStyle Width="50%" HorizontalAlign="Left"></ItemStyle>
<ItemTemplate>
<asp:Literal ID="litPrimaryEmailAddress" runat="server" Text='<%# Eval("PrimaryEmailAddress") %>'></asp:Literal>
</ItemTemplate>

View file

@ -1,31 +1,3 @@
// Copyright (c) 2015, 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.

View file

@ -0,0 +1,22 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RDSSessionLimit.ascx.cs" Inherits="WebsitePanel.Portal.RDS.UserControls.RDSSessionLimit" %>
<asp:DropDownList ID="SessionLimit" runat="server" CssClass="NormalTextBox">
<asp:ListItem Value="0" Text="Never" />
<asp:ListItem Value="1" Text="1 minute" />
<asp:ListItem Value="5" Text="5 minutes" />
<asp:ListItem Value="10" Text="10 minutes" />
<asp:ListItem Value="15" Text="15 minutes" />
<asp:ListItem Value="30" Text="30 minutes" />
<asp:ListItem Value="60" Text="1 hour" />
<asp:ListItem Value="120" Text="2 hours" />
<asp:ListItem Value="180" Text="3 hours" />
<asp:ListItem Value="360" Text="6 hours" />
<asp:ListItem Value="480" Text="8 hours" />
<asp:ListItem Value="720" Text="12 hours" />
<asp:ListItem Value="960" Text="16 hours" />
<asp:ListItem Value="1080" Text="18 hours" />
<asp:ListItem Value="1440" Text="1 day" />
<asp:ListItem Value="2880" Text="2 days" />
<asp:ListItem Value="4320" Text="3 days" />
<asp:ListItem Value="5760" Text="4 days" />
<asp:ListItem Value="7200" Text="5 days" />
</asp:DropDownList>

View file

@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace WebsitePanel.Portal.RDS.UserControls
{
public partial class RDSSessionLimit : System.Web.UI.UserControl
{
public int SelectedLimit
{
get
{
return Convert.ToInt32(SessionLimit.SelectedItem.Value);
}
set
{
SessionLimit.SelectedValue = value.ToString();
}
}
protected void Page_Load(object sender, EventArgs e)
{
}
}
}

View file

@ -0,0 +1,24 @@
//------------------------------------------------------------------------------
// <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.RDS.UserControls {
public partial class RDSSessionLimit {
/// <summary>
/// SessionLimit 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 SessionLimit;
}
}

View file

@ -11,7 +11,7 @@
<Columns>
<asp:TemplateField SortExpression="ExternalIP" HeaderText="gvIPAddressesExternalIP">
<ItemTemplate>
<asp:hyperlink NavigateUrl='<%# EditModuleUrl("AddressID", Eval("AddressID").ToString(), "edit_ip") %>' runat="server" ID="lnkEdit">
<asp:hyperlink NavigateUrl='<%# EditModuleUrl("AddressID", Eval("AddressID").ToString(), "edit_ip", "ReturnUrl", GetReturnUrl()) %>' runat="server" ID="lnkEdit">
<%# Eval("ExternalIP") %>
</asp:hyperlink>
</ItemTemplate>

View file

@ -43,6 +43,18 @@ namespace WebsitePanel.Portal
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
gvIPAddresses.PageIndex = PageIndex;
}
}
public int PageIndex
{
get
{
return PanelRequest.GetInt("IpAddressesPage", 0);
}
}
public string EditModuleUrl(string key, string keyVal, string ctrlKey)
@ -55,9 +67,18 @@ namespace WebsitePanel.Portal
return HostModule.EditUrl(key, keyVal, ctrlKey, key2 + "=" + keyVal2);
}
public string GetReturnUrl()
{
var returnUrl = Request.Url
.AddParameter("IpAddressesCollapsed", "False")
.AddParameter("IpAddressesPage", gvIPAddresses.PageIndex.ToString());
return Uri.EscapeDataString("~" + returnUrl.PathAndQuery);
}
protected void btnAdd_Click(object sender, EventArgs e)
{
Response.Redirect(HostModule.EditUrl("ServerID", PanelRequest.ServerId.ToString(), "add_ip"), true);
Response.Redirect(EditModuleUrl("ServerID", PanelRequest.ServerId.ToString(), "add_ip", "ReturnUrl", GetReturnUrl()), true);
}
}
}

View file

@ -58,6 +58,8 @@ namespace WebsitePanel.Portal
ShowErrorMessage("SERVER_GET_SERVER", ex);
return;
}
IPAddressesHeader.IsCollapsed = IsIpAddressesCollapsed;
}
}
@ -232,5 +234,13 @@ namespace WebsitePanel.Portal
return;
}
}
protected bool IsIpAddressesCollapsed
{
get
{
return PanelRequest.GetBool("IpAddressesCollapsed", true);
}
}
}
}

View file

@ -28,6 +28,15 @@
<asp:Label id="lnkDisplayMailboxPlan" runat="server" EnableViewState="true" ><%# PortalAntiXSS.Encode((string)Eval("MailboxPlan"))%></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField >
<ItemStyle Width="15%"></ItemStyle>
<ItemTemplate>
&nbsp;<label>
<input type="radio" name="DefaultMailboxPlan" value='<%# Eval("MailboxPlanId") %>' <%# IsChecked((bool) Eval("IsDefault")) %>/>
<asp:Label runat="server" meta:resourcekey="lblDefaultMailboxPlan" Text="Default"></asp:Label>
</label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
&nbsp;<asp:ImageButton id="imgDelMailboxPlan" runat="server" Text="Delete" SkinID="ExchangeDelete"
@ -52,7 +61,11 @@
</Columns>
</asp:GridView>
<br />
<br />
<div style="text-align: center">
<asp:Button ID="btnSetDefaultMailboxPlan" runat="server" meta:resourcekey="btnSetDefaultMailboxPlan"
Text="Set Default Mailboxplan" CssClass="Button1" OnClick="btnSetDefaultMailboxPlan_Click" />
</div>
<wsp:CollapsiblePanel id="secMailboxPlan" runat="server"
TargetControlID="MailboxPlan" meta:resourcekey="secMailboxPlan" Text="Mailboxplan">
</wsp:CollapsiblePanel>

Some files were not shown because too many files have changed in this diff Show more