Merge
This commit is contained in:
commit
0026a9c68c
13 changed files with 2415 additions and 2212 deletions
|
@ -7095,3 +7095,54 @@ AS
|
||||||
|
|
||||||
RETURN @Result
|
RETURN @Result
|
||||||
GO
|
GO
|
||||||
|
|
||||||
|
|
||||||
|
-- check domain used by hosted organization
|
||||||
|
|
||||||
|
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'GetOrganizationObjectsByDomain')
|
||||||
|
DROP PROCEDURE GetOrganizationObjectsByDomain
|
||||||
|
GO
|
||||||
|
|
||||||
|
CREATE PROCEDURE [dbo].[GetOrganizationObjectsByDomain]
|
||||||
|
(
|
||||||
|
@ItemID int,
|
||||||
|
@DomainName nvarchar(100)
|
||||||
|
)
|
||||||
|
AS
|
||||||
|
SELECT
|
||||||
|
'ExchangeAccounts' as ObjectName,
|
||||||
|
AccountID as ObjectID,
|
||||||
|
AccountType as ObjectType,
|
||||||
|
DisplayName as DisplayName
|
||||||
|
FROM
|
||||||
|
ExchangeAccounts
|
||||||
|
WHERE
|
||||||
|
UserPrincipalName LIKE '%@'+ @DomainName AND AccountType!=2
|
||||||
|
UNION
|
||||||
|
SELECT
|
||||||
|
'ExchangeAccountEmailAddresses' as ObjectName,
|
||||||
|
AddressID as ObjectID,
|
||||||
|
AccountID as ObjectType,
|
||||||
|
EmailAddress as DisplayName
|
||||||
|
FROM
|
||||||
|
ExchangeAccountEmailAddresses
|
||||||
|
WHERE
|
||||||
|
EmailAddress LIKE '%@'+ @DomainName
|
||||||
|
UNION
|
||||||
|
SELECT
|
||||||
|
'LyncUsers' as ObjectName,
|
||||||
|
ea.AccountID as ObjectID,
|
||||||
|
ea.AccountType as ObjectType,
|
||||||
|
ea.DisplayName as DisplayName
|
||||||
|
FROM
|
||||||
|
ExchangeAccounts ea
|
||||||
|
INNER JOIN
|
||||||
|
LyncUsers ou
|
||||||
|
ON
|
||||||
|
ea.AccountID = ou.AccountID
|
||||||
|
WHERE
|
||||||
|
ou.SipAddress LIKE '%@'+ @DomainName
|
||||||
|
ORDER BY
|
||||||
|
DisplayName
|
||||||
|
RETURN
|
||||||
|
GO
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -3256,6 +3256,18 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static DataSet GetOrganizationObjectsByDomain(int itemId, string domainName)
|
||||||
|
{
|
||||||
|
return SqlHelper.ExecuteDataset(
|
||||||
|
ConnectionString,
|
||||||
|
CommandType.StoredProcedure,
|
||||||
|
"GetOrganizationObjectsByDomain",
|
||||||
|
new SqlParameter("@ItemID", itemId),
|
||||||
|
new SqlParameter("@DomainName", domainName)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region CRM
|
#region CRM
|
||||||
|
|
|
@ -3080,5 +3080,10 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
public static DataSet GetOrganizationObjectsByDomain(int itemId, string domainName)
|
||||||
|
{
|
||||||
|
return DataProvider.GetOrganizationObjectsByDomain(itemId, domainName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -158,6 +158,13 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
return OrganizationController.SetOrganizationDefaultDomain(itemId, domainId);
|
return OrganizationController.SetOrganizationDefaultDomain(itemId, domainId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[WebMethod]
|
||||||
|
public DataSet GetOrganizationObjectsByDomain(int itemId, string domainName)
|
||||||
|
{
|
||||||
|
return OrganizationController.GetOrganizationObjectsByDomain(itemId, domainName);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Users
|
#region Users
|
||||||
|
|
|
@ -513,6 +513,7 @@
|
||||||
<Control key="org_domains" src="WebsitePanel/ExchangeServer/OrganizationDomainNames.ascx" title="OrganizationDomainNames" type="View" />
|
<Control key="org_domains" src="WebsitePanel/ExchangeServer/OrganizationDomainNames.ascx" title="OrganizationDomainNames" type="View" />
|
||||||
<Control key="org_add_domain" src="WebsitePanel/ExchangeServer/OrganizationAddDomainName.ascx" title="OrganizationAddDomainName" type="View" />
|
<Control key="org_add_domain" src="WebsitePanel/ExchangeServer/OrganizationAddDomainName.ascx" title="OrganizationAddDomainName" type="View" />
|
||||||
<Control key="add_domain" src="WebsitePanel/ExchangeServer/ExchangeAddDomainName.ascx" title="ExchangeAddDomainName" type="View" />
|
<Control key="add_domain" src="WebsitePanel/ExchangeServer/ExchangeAddDomainName.ascx" title="ExchangeAddDomainName" type="View" />
|
||||||
|
<Control key="check_domain" src="WebsitePanel/ExchangeServer/ExchangeCheckDomainName.ascx" title="ExchangeCheckDomainName" type="View" />
|
||||||
<Control key="domain_records" src="WebsitePanel/ExchangeServer/ExchangeDomainRecords.ascx" title="ExchangeDomainRecords" type="View" />
|
<Control key="domain_records" src="WebsitePanel/ExchangeServer/ExchangeDomainRecords.ascx" title="ExchangeDomainRecords" type="View" />
|
||||||
<Control key="storage_usage" src="WebsitePanel/ExchangeServer/ExchangeStorageUsage.ascx" title="ExchangeStorageUsage" type="View" />
|
<Control key="storage_usage" src="WebsitePanel/ExchangeServer/ExchangeStorageUsage.ascx" title="ExchangeStorageUsage" type="View" />
|
||||||
<Control key="storage_usage_details" src="WebsitePanel/ExchangeServer/ExchangeStorageUsageBreakdown.ascx" title="ExchangeStorageUsageBreakdown" type="View" />
|
<Control key="storage_usage_details" src="WebsitePanel/ExchangeServer/ExchangeStorageUsageBreakdown.ascx" title="ExchangeStorageUsageBreakdown" type="View" />
|
||||||
|
|
|
@ -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="locTitle.Text" xml:space="preserve">
|
||||||
|
<value>Delete domain</value>
|
||||||
|
</data>
|
||||||
|
<data name="Text.PageName" xml:space="preserve">
|
||||||
|
<value>Delete domain</value>
|
||||||
|
</data>
|
||||||
|
<data name="gvObjectsDisplayName.Header" xml:space="preserve">
|
||||||
|
<value>Display Name</value>
|
||||||
|
</data>
|
||||||
|
<data name="TopComments.Text" xml:space="preserve">
|
||||||
|
<value>Objects listed Below are dependent on this domain and must be removed prior to domain</value>
|
||||||
|
</data>
|
||||||
|
<data name="Contact.Text" xml:space="preserve">
|
||||||
|
<value>Contact</value>
|
||||||
|
</data>
|
||||||
|
<data name="DefaultSecurityGroup.Text" xml:space="preserve">
|
||||||
|
<value>Security group</value>
|
||||||
|
</data>
|
||||||
|
<data name="DistributionList.Text" xml:space="preserve">
|
||||||
|
<value>Distribution list</value>
|
||||||
|
</data>
|
||||||
|
<data name="Equipment.Text" xml:space="preserve">
|
||||||
|
<value>Equipment</value>
|
||||||
|
</data>
|
||||||
|
<data name="ExchangeAccountEmailAddresses.Text" xml:space="preserve">
|
||||||
|
<value>Email address</value>
|
||||||
|
</data>
|
||||||
|
<data name="gvObjectsDelete.Header" xml:space="preserve">
|
||||||
|
<value>Delete</value>
|
||||||
|
</data>
|
||||||
|
<data name="gvObjectsObjectType.Header" xml:space="preserve">
|
||||||
|
<value>Object Type</value>
|
||||||
|
</data>
|
||||||
|
<data name="gvObjectsView.Header" xml:space="preserve">
|
||||||
|
<value>View</value>
|
||||||
|
</data>
|
||||||
|
<data name="lnkDelete.Text" xml:space="preserve">
|
||||||
|
<value>Delete</value>
|
||||||
|
</data>
|
||||||
|
<data name="lnkView.Text" xml:space="preserve">
|
||||||
|
<value>View</value>
|
||||||
|
</data>
|
||||||
|
<data name="Mailbox.Text" xml:space="preserve">
|
||||||
|
<value>Mailbox</value>
|
||||||
|
</data>
|
||||||
|
<data name="PublicFolder.Text" xml:space="preserve">
|
||||||
|
<value>Public folder</value>
|
||||||
|
</data>
|
||||||
|
<data name="Room.Text" xml:space="preserve">
|
||||||
|
<value>Room</value>
|
||||||
|
</data>
|
||||||
|
<data name="SecurityGroup.Text" xml:space="preserve">
|
||||||
|
<value>Security group</value>
|
||||||
|
</data>
|
||||||
|
<data name="SharedMailbox.Text" xml:space="preserve">
|
||||||
|
<value>Shared mailbox</value>
|
||||||
|
</data>
|
||||||
|
<data name="User.Text" xml:space="preserve">
|
||||||
|
<value>Organization user</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
|
@ -0,0 +1,81 @@
|
||||||
|
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ExchangeCheckDomainName.ascx.cs" Inherits="WebsitePanel.Portal.ExchangeServer.ExchangeCheckDomainName" %>
|
||||||
|
<%@ 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="ExchangeDomainName48" runat="server" />
|
||||||
|
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Domain Names"></asp:Localize>
|
||||||
|
-
|
||||||
|
<asp:Literal ID="litDomainName" runat="server"></asp:Literal>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<asp:Literal ID="TopComments" runat="server" meta:resourcekey="TopComments"></asp:Literal>
|
||||||
|
|
||||||
|
<div class="FormBody">
|
||||||
|
<wsp:SimpleMessageBox id="messageBox" runat="server" />
|
||||||
|
<br />
|
||||||
|
|
||||||
|
<asp:GridView ID="gvObjects" runat="server" AutoGenerateColumns="False" EnableViewState="true"
|
||||||
|
Width="100%" CssSelectorClass="NormalGridView" OnRowCommand="gvObjects_RowCommand">
|
||||||
|
<Columns>
|
||||||
|
<asp:TemplateField HeaderText="gvObjectsDisplayName">
|
||||||
|
<ItemStyle Width="40%"></ItemStyle>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Image ID="img1" runat="server" ImageUrl='<%# GetObjectImage(Eval("ObjectName").ToString(),(int)Eval("ObjectType")) %>' ImageAlign="AbsMiddle" />
|
||||||
|
<asp:hyperlink id="lnk1" runat="server"
|
||||||
|
NavigateUrl='<%# GetEditUrl(Eval("ObjectName").ToString(),(int)Eval("ObjectType"),Eval("ObjectID").ToString()) %>'>
|
||||||
|
<%# Eval("DisplayName") %>
|
||||||
|
</asp:hyperlink>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="gvObjectsObjectType">
|
||||||
|
<ItemStyle Width="40%"></ItemStyle>
|
||||||
|
<ItemTemplate>
|
||||||
|
<%# GetObjectType(Eval("ObjectName").ToString(),(int)Eval("ObjectType")) %>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField HeaderText="gvObjectsView">
|
||||||
|
<ItemStyle Width="10%"></ItemStyle>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:hyperlink id="lnk2" runat="server"
|
||||||
|
NavigateUrl='<%# GetEditUrl(Eval("ObjectName").ToString(),(int)Eval("ObjectType"),Eval("ObjectID").ToString()) %>'>
|
||||||
|
<asp:Literal id="lnkView" runat="server" Text="View" meta:resourcekey="lnkView" />
|
||||||
|
</asp:hyperlink>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField HeaderText="gvObjectsDelete">
|
||||||
|
<ItemStyle Width="10%"></ItemStyle>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:LinkButton id="lnkDelete" runat="server" Text="Delete" meta:resourcekey="lnkDelete"
|
||||||
|
OnClientClick="return confirm('Are you sure you want to delete ?')"
|
||||||
|
CommandName="DeleteItem" CommandArgument='<%# Eval("ObjectType").ToString() + "," + Eval("DisplayName") %>'
|
||||||
|
Visible='<%# AllowDelete(Eval("ObjectName").ToString(), (int)Eval("ObjectType")) %>' />
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
|
||||||
|
|
||||||
|
<br />
|
||||||
|
<asp:Button id="btnBack" runat="server" Text="Back" CssClass="Button1" meta:resourcekey="btnBack"
|
||||||
|
OnClick="btnBack_Click" ></asp:Button>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -0,0 +1,220 @@
|
||||||
|
// 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 WebsitePanel.EnterpriseServer;
|
||||||
|
using WebsitePanel.Providers.HostedSolution;
|
||||||
|
|
||||||
|
namespace WebsitePanel.Portal.ExchangeServer
|
||||||
|
{
|
||||||
|
public partial class ExchangeCheckDomainName : WebsitePanelModuleBase
|
||||||
|
{
|
||||||
|
private static string EXCHANGEACCOUNTEMAILADDRESSES = "ExchangeAccountEmailAddresses";
|
||||||
|
private static string EXCHANGEACCOUNTS = "ExchangeAccounts";
|
||||||
|
private static string LYNCUSERS = "LyncUsers";
|
||||||
|
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (!IsPostBack)
|
||||||
|
{
|
||||||
|
// save return URL
|
||||||
|
ViewState["ReturnUrl"] = Request.UrlReferrer.ToString();
|
||||||
|
|
||||||
|
// domain name
|
||||||
|
DomainInfo domain = ES.Services.Servers.GetDomain(PanelRequest.DomainID);
|
||||||
|
litDomainName.Text = domain.DomainName;
|
||||||
|
|
||||||
|
Bind();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public string GetObjectType(string objectName, int objectType)
|
||||||
|
{
|
||||||
|
if (objectName == EXCHANGEACCOUNTS)
|
||||||
|
{
|
||||||
|
ExchangeAccountType accountType = (ExchangeAccountType)objectType;
|
||||||
|
objectName = accountType.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
string res = GetLocalizedString(objectName+".Text");
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(res))
|
||||||
|
res = objectName;
|
||||||
|
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool AllowDelete(string objectName, int objectType)
|
||||||
|
{
|
||||||
|
return objectName == EXCHANGEACCOUNTEMAILADDRESSES;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public string GetObjectImage(string objectName, int objectType)
|
||||||
|
{
|
||||||
|
string imgName = "blank16.gif";
|
||||||
|
|
||||||
|
if (objectName == EXCHANGEACCOUNTS)
|
||||||
|
{
|
||||||
|
ExchangeAccountType accountType = (ExchangeAccountType)objectType;
|
||||||
|
|
||||||
|
imgName = "mailbox_16.gif";
|
||||||
|
switch(accountType)
|
||||||
|
{
|
||||||
|
case ExchangeAccountType.Contact:
|
||||||
|
imgName = "contact_16.gif";
|
||||||
|
break;
|
||||||
|
case ExchangeAccountType.DistributionList:
|
||||||
|
imgName = "dlist_16.gif";
|
||||||
|
break;
|
||||||
|
case ExchangeAccountType.Room:
|
||||||
|
imgName = "room_16.gif";
|
||||||
|
break;
|
||||||
|
case ExchangeAccountType.Equipment:
|
||||||
|
imgName = "equipment_16.gif";
|
||||||
|
break;
|
||||||
|
case ExchangeAccountType.SharedMailbox:
|
||||||
|
imgName = "shared_16.gif";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (objectName == EXCHANGEACCOUNTEMAILADDRESSES)
|
||||||
|
{
|
||||||
|
imgName = "mailbox_16.gif";
|
||||||
|
}
|
||||||
|
|
||||||
|
return GetThemedImage("Exchange/" + imgName);
|
||||||
|
}
|
||||||
|
|
||||||
|
public string GetEditUrl(string objectName, int objectType, string objectId)
|
||||||
|
{
|
||||||
|
if (objectName == EXCHANGEACCOUNTS)
|
||||||
|
{
|
||||||
|
string key = "";
|
||||||
|
|
||||||
|
ExchangeAccountType accountType = (ExchangeAccountType)objectType;
|
||||||
|
|
||||||
|
switch (accountType)
|
||||||
|
{
|
||||||
|
case ExchangeAccountType.User:
|
||||||
|
key = "edit_user";
|
||||||
|
return EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), key,
|
||||||
|
"AccountID=" + objectId,
|
||||||
|
"ItemID=" + PanelRequest.ItemID, "context=user");
|
||||||
|
|
||||||
|
case ExchangeAccountType.Mailbox:
|
||||||
|
case ExchangeAccountType.Room:
|
||||||
|
case ExchangeAccountType.Equipment:
|
||||||
|
case ExchangeAccountType.SharedMailbox:
|
||||||
|
key = "mailbox_settings";
|
||||||
|
break;
|
||||||
|
case ExchangeAccountType.DistributionList:
|
||||||
|
key = "dlist_settings";
|
||||||
|
break;
|
||||||
|
case ExchangeAccountType.PublicFolder:
|
||||||
|
key = "public_folder_settings";
|
||||||
|
break;
|
||||||
|
case ExchangeAccountType.SecurityGroup:
|
||||||
|
case ExchangeAccountType.DefaultSecurityGroup:
|
||||||
|
key = "secur_group_settings";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(key))
|
||||||
|
{
|
||||||
|
return EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), key,
|
||||||
|
"AccountID=" + objectId,
|
||||||
|
"ItemID=" + PanelRequest.ItemID);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (objectName == EXCHANGEACCOUNTEMAILADDRESSES)
|
||||||
|
{
|
||||||
|
if (objectType>0)
|
||||||
|
return EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "mailbox_addresses",
|
||||||
|
"AccountID=" + objectType,
|
||||||
|
"ItemID=" + PanelRequest.ItemID);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (objectName == LYNCUSERS)
|
||||||
|
{
|
||||||
|
return EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "edit_lync_user",
|
||||||
|
"AccountID=" + objectId,
|
||||||
|
"ItemID=" + PanelRequest.ItemID);
|
||||||
|
}
|
||||||
|
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Bind()
|
||||||
|
{
|
||||||
|
DomainInfo domain = ES.Services.Servers.GetDomain(PanelRequest.DomainID);
|
||||||
|
|
||||||
|
gvObjects.DataSource =
|
||||||
|
ES.Services.Organizations.GetOrganizationObjectsByDomain(PanelRequest.ItemID, domain.DomainName);
|
||||||
|
gvObjects.DataBind();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void btnBack_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (ViewState["ReturnUrl"] != null)
|
||||||
|
Response.Redirect((string)ViewState["ReturnUrl"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void gvObjects_RowCommand(object sender, GridViewCommandEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.CommandName == "DeleteItem")
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string[] arg = e.CommandArgument.ToString().Split(',');
|
||||||
|
if (arg.Length != 2) return;
|
||||||
|
|
||||||
|
string[] emails = { arg[1] };
|
||||||
|
|
||||||
|
int accountID = 0;
|
||||||
|
if (!int.TryParse(arg[0], out accountID))
|
||||||
|
return;
|
||||||
|
|
||||||
|
int result = ES.Services.ExchangeServer.DeleteMailboxEmailAddresses(
|
||||||
|
PanelRequest.ItemID, accountID, emails);
|
||||||
|
|
||||||
|
Bind();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,87 @@
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace WebsitePanel.Portal.ExchangeServer {
|
||||||
|
|
||||||
|
|
||||||
|
public partial class ExchangeCheckDomainName {
|
||||||
|
|
||||||
|
/// <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>
|
||||||
|
/// litDomainName 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 litDomainName;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// TopComments 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 TopComments;
|
||||||
|
|
||||||
|
/// <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>
|
||||||
|
/// gvObjects 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 gvObjects;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnBack 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 btnBack;
|
||||||
|
}
|
||||||
|
}
|
|
@ -103,7 +103,9 @@ namespace WebsitePanel.Portal.ExchangeServer
|
||||||
int result = ES.Services.Organizations.DeleteOrganizationDomain(PanelRequest.ItemID, domainId);
|
int result = ES.Services.Organizations.DeleteOrganizationDomain(PanelRequest.ItemID, domainId);
|
||||||
if (result < 0)
|
if (result < 0)
|
||||||
{
|
{
|
||||||
messageBox.ShowErrorMessage("EXCHANGE_UNABLE_TO_DELETE_DOMAIN");
|
Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "check_domain",
|
||||||
|
"SpaceID=" + PanelSecurity.PackageId, "DomainID=" + domainId));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// rebind domains
|
// rebind domains
|
||||||
|
|
|
@ -103,7 +103,9 @@ namespace WebsitePanel.Portal.ExchangeServer
|
||||||
int result = ES.Services.Organizations.DeleteOrganizationDomain(PanelRequest.ItemID, domainId);
|
int result = ES.Services.Organizations.DeleteOrganizationDomain(PanelRequest.ItemID, domainId);
|
||||||
if (result < 0)
|
if (result < 0)
|
||||||
{
|
{
|
||||||
messageBox.ShowErrorMessage("EXCHANGE_UNABLE_TO_DELETE_DOMAIN");
|
Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "check_domain",
|
||||||
|
"SpaceID=" + PanelSecurity.PackageId, "DomainID=" + domainId));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// rebind domains
|
// rebind domains
|
||||||
|
|
|
@ -211,6 +211,13 @@
|
||||||
<Compile Include="Code\ReportingServices\IResourceStorage.cs" />
|
<Compile Include="Code\ReportingServices\IResourceStorage.cs" />
|
||||||
<Compile Include="Code\ReportingServices\ReportingServicesUtils.cs" />
|
<Compile Include="Code\ReportingServices\ReportingServicesUtils.cs" />
|
||||||
<Compile Include="Code\UserControls\Tab.cs" />
|
<Compile Include="Code\UserControls\Tab.cs" />
|
||||||
|
<Compile Include="ExchangeServer\ExchangeCheckDomainName.ascx.cs">
|
||||||
|
<DependentUpon>ExchangeCheckDomainName.ascx</DependentUpon>
|
||||||
|
<SubType>ASPXCodeBehind</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="ExchangeServer\ExchangeCheckDomainName.ascx.designer.cs">
|
||||||
|
<DependentUpon>ExchangeCheckDomainName.ascx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="ProviderControls\Windows2012_Settings.ascx.cs">
|
<Compile Include="ProviderControls\Windows2012_Settings.ascx.cs">
|
||||||
<DependentUpon>Windows2012_Settings.ascx</DependentUpon>
|
<DependentUpon>Windows2012_Settings.ascx</DependentUpon>
|
||||||
<SubType>ASPXCodeBehind</SubType>
|
<SubType>ASPXCodeBehind</SubType>
|
||||||
|
@ -4291,6 +4298,7 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="ApplyEnableHardQuotaFeature.ascx" />
|
<Content Include="ApplyEnableHardQuotaFeature.ascx" />
|
||||||
|
<Content Include="ExchangeServer\ExchangeCheckDomainName.ascx" />
|
||||||
<Content Include="ProviderControls\Windows2012_Settings.ascx" />
|
<Content Include="ProviderControls\Windows2012_Settings.ascx" />
|
||||||
<Content Include="RDSServersAddserver.ascx" />
|
<Content Include="RDSServersAddserver.ascx" />
|
||||||
<Content Include="RDSServers.ascx" />
|
<Content Include="RDSServers.ascx" />
|
||||||
|
@ -4315,6 +4323,9 @@
|
||||||
<Content Include="RDS\App_LocalResources\RDSEditApplicationUsers.ascx.resx">
|
<Content Include="RDS\App_LocalResources\RDSEditApplicationUsers.ascx.resx">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Content>
|
</Content>
|
||||||
|
<Content Include="ExchangeServer\App_LocalResources\ExchangeCheckDomainName.ascx.resx">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Content>
|
||||||
<EmbeddedResource Include="ScheduleTaskControls\App_LocalResources\DomainLookupView.ascx.resx">
|
<EmbeddedResource Include="ScheduleTaskControls\App_LocalResources\DomainLookupView.ascx.resx">
|
||||||
<Generator>ResXFileCodeGenerator</Generator>
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
<LastGenOutput>DomainLookupView.ascx.Designer.cs</LastGenOutput>
|
<LastGenOutput>DomainLookupView.ascx.Designer.cs</LastGenOutput>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue