mergecommit
This commit is contained in:
commit
aed1199470
81 changed files with 2467 additions and 1113 deletions
|
@ -1,35 +1,7 @@
|
|||
// Copyright (c) 2012, Outercurve Foundation.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// - Redistributions of source code must retain the above copyright notice, this
|
||||
// list of conditions and the following disclaimer.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18033
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
|
|
Binary file not shown.
|
@ -310,7 +310,7 @@ function websitepanel_ChangePassword($params)
|
|||
else
|
||||
{
|
||||
// Attempt to change the user's account password
|
||||
$result = $wsp->change_user_password($user['UserId'], $password);
|
||||
$result = $wsp->changeUserPassword($user['UserId'], $password);
|
||||
if ($result >= 0)
|
||||
{
|
||||
// Log this action for logging / tracking purposes incase the client complains we have record of what went on and why
|
||||
|
|
|
@ -1964,7 +1964,145 @@ WHERE
|
|||
RETURN
|
||||
GO
|
||||
|
||||
-- Lync Phone Numbers Quota
|
||||
|
||||
IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE ([QuotaName] = N'Lync.PhoneNumbers'))
|
||||
BEGIN
|
||||
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID], [HideQuota]) VALUES (381, 41, 12, N'Lync.PhoneNumbers', N'Phone Numbers', 2, 0, NULL, NULL)
|
||||
END
|
||||
GO
|
||||
|
||||
|
||||
ALTER FUNCTION [dbo].[CalculateQuotaUsage]
|
||||
(
|
||||
@PackageID int,
|
||||
@QuotaID int
|
||||
)
|
||||
RETURNS int
|
||||
AS
|
||||
BEGIN
|
||||
|
||||
DECLARE @QuotaTypeID int
|
||||
SELECT @QuotaTypeID = QuotaTypeID FROM Quotas
|
||||
WHERE QuotaID = @QuotaID
|
||||
|
||||
IF @QuotaTypeID <> 2
|
||||
RETURN 0
|
||||
|
||||
DECLARE @Result int
|
||||
|
||||
IF @QuotaID = 52 -- diskspace
|
||||
SET @Result = dbo.CalculatePackageDiskspace(@PackageID)
|
||||
ELSE IF @QuotaID = 51 -- bandwidth
|
||||
SET @Result = dbo.CalculatePackageBandwidth(@PackageID)
|
||||
ELSE IF @QuotaID = 53 -- domains
|
||||
SET @Result = (SELECT COUNT(D.DomainID) FROM PackagesTreeCache AS PT
|
||||
INNER JOIN Domains AS D ON D.PackageID = PT.PackageID
|
||||
WHERE IsSubDomain = 0 AND IsInstantAlias = 0 AND IsDomainPointer = 0 AND PT.ParentPackageID = @PackageID)
|
||||
ELSE IF @QuotaID = 54 -- sub-domains
|
||||
SET @Result = (SELECT COUNT(D.DomainID) FROM PackagesTreeCache AS PT
|
||||
INNER JOIN Domains AS D ON D.PackageID = PT.PackageID
|
||||
WHERE IsSubDomain = 1 AND IsInstantAlias = 0 AND IsDomainPointer = 0 AND PT.ParentPackageID = @PackageID)
|
||||
ELSE IF @QuotaID = 220 -- domain pointers
|
||||
SET @Result = (SELECT COUNT(D.DomainID) FROM PackagesTreeCache AS PT
|
||||
INNER JOIN Domains AS D ON D.PackageID = PT.PackageID
|
||||
WHERE IsDomainPointer = 1 AND PT.ParentPackageID = @PackageID)
|
||||
ELSE IF @QuotaID = 71 -- scheduled tasks
|
||||
SET @Result = (SELECT COUNT(S.ScheduleID) FROM PackagesTreeCache AS PT
|
||||
INNER JOIN Schedule AS S ON S.PackageID = PT.PackageID
|
||||
WHERE PT.ParentPackageID = @PackageID)
|
||||
ELSE IF @QuotaID = 305 -- RAM of VPS
|
||||
SET @Result = (SELECT SUM(CAST(SIP.PropertyValue AS int)) FROM ServiceItemProperties AS SIP
|
||||
INNER JOIN ServiceItems AS SI ON SIP.ItemID = SI.ItemID
|
||||
INNER JOIN PackagesTreeCache AS PT ON SI.PackageID = PT.PackageID
|
||||
WHERE SIP.PropertyName = 'RamSize' AND PT.ParentPackageID = @PackageID)
|
||||
ELSE IF @QuotaID = 306 -- HDD of VPS
|
||||
SET @Result = (SELECT SUM(CAST(SIP.PropertyValue AS int)) FROM ServiceItemProperties AS SIP
|
||||
INNER JOIN ServiceItems AS SI ON SIP.ItemID = SI.ItemID
|
||||
INNER JOIN PackagesTreeCache AS PT ON SI.PackageID = PT.PackageID
|
||||
WHERE SIP.PropertyName = 'HddSize' AND PT.ParentPackageID = @PackageID)
|
||||
ELSE IF @QuotaID = 309 -- External IP addresses of VPS
|
||||
SET @Result = (SELECT COUNT(PIP.PackageAddressID) FROM PackageIPAddresses AS PIP
|
||||
INNER JOIN IPAddresses AS IP ON PIP.AddressID = IP.AddressID
|
||||
INNER JOIN PackagesTreeCache AS PT ON PIP.PackageID = PT.PackageID
|
||||
WHERE PT.ParentPackageID = @PackageID AND IP.PoolID = 3)
|
||||
ELSE IF @QuotaID = 100 -- Dedicated Web IP addresses
|
||||
SET @Result = (SELECT COUNT(PIP.PackageAddressID) FROM PackageIPAddresses AS PIP
|
||||
INNER JOIN IPAddresses AS IP ON PIP.AddressID = IP.AddressID
|
||||
INNER JOIN PackagesTreeCache AS PT ON PIP.PackageID = PT.PackageID
|
||||
WHERE PT.ParentPackageID = @PackageID AND IP.PoolID = 2)
|
||||
ELSE IF @QuotaID = 350 -- RAM of VPSforPc
|
||||
SET @Result = (SELECT SUM(CAST(SIP.PropertyValue AS int)) FROM ServiceItemProperties AS SIP
|
||||
INNER JOIN ServiceItems AS SI ON SIP.ItemID = SI.ItemID
|
||||
INNER JOIN PackagesTreeCache AS PT ON SI.PackageID = PT.PackageID
|
||||
WHERE SIP.PropertyName = 'Memory' AND PT.ParentPackageID = @PackageID)
|
||||
ELSE IF @QuotaID = 351 -- HDD of VPSforPc
|
||||
SET @Result = (SELECT SUM(CAST(SIP.PropertyValue AS int)) FROM ServiceItemProperties AS SIP
|
||||
INNER JOIN ServiceItems AS SI ON SIP.ItemID = SI.ItemID
|
||||
INNER JOIN PackagesTreeCache AS PT ON SI.PackageID = PT.PackageID
|
||||
WHERE SIP.PropertyName = 'HddSize' AND PT.ParentPackageID = @PackageID)
|
||||
ELSE IF @QuotaID = 354 -- External IP addresses of VPSforPc
|
||||
SET @Result = (SELECT COUNT(PIP.PackageAddressID) FROM PackageIPAddresses AS PIP
|
||||
INNER JOIN IPAddresses AS IP ON PIP.AddressID = IP.AddressID
|
||||
INNER JOIN PackagesTreeCache AS PT ON PIP.PackageID = PT.PackageID
|
||||
WHERE PT.ParentPackageID = @PackageID AND IP.PoolID = 3)
|
||||
ELSE IF @QuotaID = 319 -- BB Users
|
||||
SET @Result = (SELECT COUNT(ea.AccountID) FROM ExchangeAccounts ea
|
||||
INNER JOIN BlackBerryUsers bu ON ea.AccountID = bu.AccountID
|
||||
INNER JOIN ServiceItems si ON ea.ItemID = si.ItemID
|
||||
INNER JOIN PackagesTreeCache pt ON si.PackageID = pt.PackageID
|
||||
WHERE pt.ParentPackageID = @PackageID)
|
||||
ELSE IF @QuotaID = 320 -- OCS Users
|
||||
SET @Result = (SELECT COUNT(ea.AccountID) FROM ExchangeAccounts ea
|
||||
INNER JOIN OCSUsers ocs ON ea.AccountID = ocs.AccountID
|
||||
INNER JOIN ServiceItems si ON ea.ItemID = si.ItemID
|
||||
INNER JOIN PackagesTreeCache pt ON si.PackageID = pt.PackageID
|
||||
WHERE pt.ParentPackageID = @PackageID)
|
||||
ELSE IF @QuotaID = 206 -- HostedSolution.Users
|
||||
SET @Result = (SELECT COUNT(ea.AccountID) FROM ExchangeAccounts AS ea
|
||||
INNER JOIN ServiceItems si ON ea.ItemID = si.ItemID
|
||||
INNER JOIN PackagesTreeCache pt ON si.PackageID = pt.PackageID
|
||||
WHERE pt.ParentPackageID = @PackageID AND ea.AccountType IN (1,5,6,7))
|
||||
ELSE IF @QuotaID = 78 -- Exchange2007.Mailboxes
|
||||
SET @Result = (SELECT COUNT(ea.AccountID) FROM ExchangeAccounts AS ea
|
||||
INNER JOIN ServiceItems si ON ea.ItemID = si.ItemID
|
||||
INNER JOIN PackagesTreeCache pt ON si.PackageID = pt.PackageID
|
||||
WHERE pt.ParentPackageID = @PackageID
|
||||
AND ea.AccountType IN (1)
|
||||
AND ea.MailboxPlanId IS NOT NULL)
|
||||
ELSE IF @QuotaID = 77 -- Exchange2007.DiskSpace
|
||||
SET @Result = (SELECT SUM(B.MailboxSizeMB) FROM ExchangeAccounts AS ea
|
||||
INNER JOIN ExchangeMailboxPlans AS B ON ea.MailboxPlanId = B.MailboxPlanId
|
||||
INNER JOIN ServiceItems si ON ea.ItemID = si.ItemID
|
||||
INNER JOIN PackagesTreeCache pt ON si.PackageID = pt.PackageID
|
||||
WHERE pt.ParentPackageID = @PackageID)
|
||||
ELSE IF @QuotaID = 370 -- Lync.Users
|
||||
SET @Result = (SELECT COUNT(ea.AccountID) FROM ExchangeAccounts AS ea
|
||||
INNER JOIN LyncUsers lu ON ea.AccountID = lu.AccountID
|
||||
INNER JOIN ServiceItems si ON ea.ItemID = si.ItemID
|
||||
INNER JOIN PackagesTreeCache pt ON si.PackageID = pt.PackageID
|
||||
WHERE pt.ParentPackageID = @PackageID)
|
||||
ELSE IF @QuotaID = 376 -- Lync.EVUsers
|
||||
SET @Result = (SELECT COUNT(ea.AccountID) FROM ExchangeAccounts AS ea
|
||||
INNER JOIN LyncUsers lu ON ea.AccountID = lu.AccountID
|
||||
INNER JOIN LyncUserPlans lp ON lu.LyncUserPlanId = lp.LyncUserPlanId
|
||||
INNER JOIN ServiceItems si ON ea.ItemID = si.ItemID
|
||||
INNER JOIN PackagesTreeCache pt ON si.PackageID = pt.PackageID
|
||||
WHERE pt.ParentPackageID = @PackageID AND lp.EnterpriseVoice = 1)
|
||||
ELSE IF @QuotaID = 381 -- Dedicated Lync Phone Numbers
|
||||
SET @Result = (SELECT COUNT(PIP.PackageAddressID) FROM PackageIPAddresses AS PIP
|
||||
INNER JOIN IPAddresses AS IP ON PIP.AddressID = IP.AddressID
|
||||
INNER JOIN PackagesTreeCache AS PT ON PIP.PackageID = PT.PackageID
|
||||
WHERE PT.ParentPackageID = @PackageID AND IP.PoolID = 5)
|
||||
ELSE
|
||||
SET @Result = (SELECT COUNT(SI.ItemID) FROM Quotas AS Q
|
||||
INNER JOIN ServiceItems AS SI ON SI.ItemTypeID = Q.ItemTypeID
|
||||
INNER JOIN PackagesTreeCache AS PT ON SI.PackageID = PT.PackageID AND PT.ParentPackageID = @PackageID
|
||||
WHERE Q.QuotaID = @QuotaID)
|
||||
|
||||
RETURN @Result
|
||||
END
|
||||
GO
|
||||
|
||||
-- Enterprise Storage Provider
|
||||
IF NOT EXISTS (SELECT * FROM [dbo].[ResourceGroups] WHERE [GroupName] = 'EnterpriseStorage')
|
||||
|
@ -2006,6 +2144,7 @@ ALTER PROCEDURE [dbo].[SearchExchangeAccounts]
|
|||
@IncludeDistributionLists bit,
|
||||
@IncludeRooms bit,
|
||||
@IncludeEquipment bit,
|
||||
@IncludeSecurityGroups bit,
|
||||
@FilterColumn nvarchar(50) = '',
|
||||
@FilterValue nvarchar(50) = '',
|
||||
@SortColumn nvarchar(50)
|
||||
|
@ -2027,7 +2166,7 @@ OR (@IncludeContacts = 1 AND EA.AccountType = 2)
|
|||
OR (@IncludeDistributionLists = 1 AND EA.AccountType = 3)
|
||||
OR (@IncludeRooms = 1 AND EA.AccountType = 5)
|
||||
OR (@IncludeEquipment = 1 AND EA.AccountType = 6)
|
||||
OR (@IncludeEquipment = 0 AND @IncludeContacts = 0 AND @IncludeDistributionLists = 0 AND @IncludeRooms = 0 AND @IncludeEquipment = 0 AND EA.AccountType = 8))
|
||||
OR (@IncludeSecurityGroups = 1 AND EA.AccountType = 8))
|
||||
AND EA.ItemID = @ItemID
|
||||
'
|
||||
|
||||
|
@ -2057,8 +2196,77 @@ WHERE ' + @condition
|
|||
print @sql
|
||||
|
||||
exec sp_executesql @sql, N'@ItemID int, @IncludeMailboxes int, @IncludeContacts int,
|
||||
@IncludeDistributionLists int, @IncludeRooms bit, @IncludeEquipment bit',
|
||||
@ItemID, @IncludeMailboxes, @IncludeContacts, @IncludeDistributionLists, @IncludeRooms, @IncludeEquipment
|
||||
@IncludeDistributionLists int, @IncludeRooms bit, @IncludeEquipment bit, @IncludeSecurityGroups bit',
|
||||
@ItemID, @IncludeMailboxes, @IncludeContacts, @IncludeDistributionLists, @IncludeRooms, @IncludeEquipment, @IncludeSecurityGroups
|
||||
|
||||
RETURN
|
||||
GO
|
||||
|
||||
|
||||
IF EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'SearchExchangeAccountsByTypes')
|
||||
DROP PROCEDURE [dbo].[SearchExchangeAccountsByTypes]
|
||||
GO
|
||||
|
||||
|
||||
CREATE PROCEDURE [dbo].[SearchExchangeAccountsByTypes]
|
||||
(
|
||||
@ActorID int,
|
||||
@ItemID int,
|
||||
@AccountTypes nvarchar(30),
|
||||
@FilterColumn nvarchar(50) = '',
|
||||
@FilterValue nvarchar(50) = '',
|
||||
@SortColumn nvarchar(50)
|
||||
)
|
||||
AS
|
||||
|
||||
DECLARE @PackageID int
|
||||
SELECT @PackageID = PackageID FROM ServiceItems
|
||||
WHERE ItemID = @ItemID
|
||||
|
||||
-- check rights
|
||||
IF dbo.CheckActorPackageRights(@ActorID, @PackageID) = 0
|
||||
RAISERROR('You are not allowed to access this package', 16, 1)
|
||||
|
||||
DECLARE @condition nvarchar(700)
|
||||
SET @condition = 'EA.ItemID = @ItemID AND EA.AccountType IN (' + @AccountTypes + ')'
|
||||
|
||||
IF @FilterColumn <> '' AND @FilterColumn IS NOT NULL
|
||||
AND @FilterValue <> '' AND @FilterValue IS NOT NULL
|
||||
BEGIN
|
||||
IF @FilterColumn = 'PrimaryEmailAddress' AND @AccountTypes <> '2'
|
||||
BEGIN
|
||||
SET @condition = @condition + ' AND EA.AccountID IN (SELECT EAEA.AccountID FROM ExchangeAccountEmailAddresses EAEA WHERE EAEA.EmailAddress LIKE ''' + @FilterValue + ''')'
|
||||
END
|
||||
ELSE
|
||||
BEGIN
|
||||
SET @condition = @condition + ' AND ' + @FilterColumn + ' LIKE ''' + @FilterValue + ''''
|
||||
END
|
||||
END
|
||||
|
||||
IF @SortColumn IS NULL OR @SortColumn = ''
|
||||
SET @SortColumn = 'EA.DisplayName ASC'
|
||||
|
||||
DECLARE @sql nvarchar(3500)
|
||||
SET @sql = '
|
||||
SELECT
|
||||
EA.AccountID,
|
||||
EA.ItemID,
|
||||
EA.AccountType,
|
||||
EA.AccountName,
|
||||
EA.DisplayName,
|
||||
EA.PrimaryEmailAddress,
|
||||
EA.MailEnabledPublicFolder,
|
||||
EA.MailboxPlanId,
|
||||
P.MailboxPlan,
|
||||
EA.SubscriberNumber,
|
||||
EA.UserPrincipalName
|
||||
FROM
|
||||
ExchangeAccounts AS EA
|
||||
LEFT OUTER JOIN ExchangeMailboxPlans AS P ON EA.MailboxPlanId = P.MailboxPlanId
|
||||
WHERE ' + @condition
|
||||
+ ' ORDER BY ' + @SortColumn
|
||||
|
||||
EXEC sp_executesql @sql, N'@ItemID int', @ItemID
|
||||
|
||||
RETURN
|
||||
GO
|
||||
|
|
|
@ -1,35 +1,7 @@
|
|||
// Copyright (c) 2012, Outercurve Foundation.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// - Redistributions of source code must retain the above copyright notice, this
|
||||
// list of conditions and the following disclaimer.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18033
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
'------------------------------------------------------------------------------
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.18033
|
||||
' Runtime Version:4.0.30319.18051
|
||||
'
|
||||
' Changes to this file may cause incorrect behavior and will be lost if
|
||||
' the code is regenerated.
|
||||
|
|
|
@ -230,6 +230,7 @@ order by rg.groupOrder
|
|||
public const string LYNC_EVMOBILE = "Lync.EVMobile";
|
||||
public const string LYNC_EVINTERNATIONAL = "Lync.EVInternational";
|
||||
public const string LYNC_ENABLEDPLANSEDITING = "Lync.EnablePlansEditing";
|
||||
public const string LYNC_PHONE = "Lync.PhoneNumbers";
|
||||
|
||||
public const string HELICON_ZOO = "HeliconZoo.*";
|
||||
|
||||
|
|
|
@ -3053,7 +3053,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SearchAccounts", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public ExchangeAccount[] SearchAccounts(int itemId, bool includeMailboxes, bool includeContacts, bool includeDistributionLists, bool includeRooms, bool includeEquipment, string filterColumn, string filterValue, string sortColumn)
|
||||
public ExchangeAccount[] SearchAccounts(int itemId, bool includeMailboxes, bool includeContacts, bool includeDistributionLists, bool includeRooms, bool includeEquipment, bool includeSecurityGroups, string filterColumn, string filterValue, string sortColumn)
|
||||
{
|
||||
object[] results = this.Invoke("SearchAccounts", new object[] {
|
||||
itemId,
|
||||
|
@ -3062,6 +3062,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
includeDistributionLists,
|
||||
includeRooms,
|
||||
includeEquipment,
|
||||
includeSecurityGroups,
|
||||
filterColumn,
|
||||
filterValue,
|
||||
sortColumn});
|
||||
|
@ -3069,7 +3070,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginSearchAccounts(int itemId, bool includeMailboxes, bool includeContacts, bool includeDistributionLists, bool includeRooms, bool includeEquipment, string filterColumn, string filterValue, string sortColumn, System.AsyncCallback callback, object asyncState)
|
||||
public System.IAsyncResult BeginSearchAccounts(int itemId, bool includeMailboxes, bool includeContacts, bool includeDistributionLists, bool includeRooms, bool includeEquipment, bool includeSecurityGroups, string filterColumn, string filterValue, string sortColumn, System.AsyncCallback callback, object asyncState)
|
||||
{
|
||||
return this.BeginInvoke("SearchAccounts", new object[] {
|
||||
itemId,
|
||||
|
@ -3078,6 +3079,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
includeDistributionLists,
|
||||
includeRooms,
|
||||
includeEquipment,
|
||||
includeSecurityGroups,
|
||||
filterColumn,
|
||||
filterValue,
|
||||
sortColumn}, callback, asyncState);
|
||||
|
@ -3091,13 +3093,13 @@ namespace WebsitePanel.EnterpriseServer
|
|||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void SearchAccountsAsync(int itemId, bool includeMailboxes, bool includeContacts, bool includeDistributionLists, bool includeRooms, bool includeEquipment, string filterColumn, string filterValue, string sortColumn)
|
||||
public void SearchAccountsAsync(int itemId, bool includeMailboxes, bool includeContacts, bool includeDistributionLists, bool includeRooms, bool includeEquipment, bool includeSecurityGroups, string filterColumn, string filterValue, string sortColumn)
|
||||
{
|
||||
this.SearchAccountsAsync(itemId, includeMailboxes, includeContacts, includeDistributionLists, includeRooms, includeEquipment, filterColumn, filterValue, sortColumn, null);
|
||||
this.SearchAccountsAsync(itemId, includeMailboxes, includeContacts, includeDistributionLists, includeRooms, includeEquipment, includeSecurityGroups, filterColumn, filterValue, sortColumn, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void SearchAccountsAsync(int itemId, bool includeMailboxes, bool includeContacts, bool includeDistributionLists, bool includeRooms, bool includeEquipment, string filterColumn, string filterValue, string sortColumn, object userState)
|
||||
public void SearchAccountsAsync(int itemId, bool includeMailboxes, bool includeContacts, bool includeDistributionLists, bool includeRooms, bool includeEquipment, bool includeSecurityGroups, string filterColumn, string filterValue, string sortColumn, object userState)
|
||||
{
|
||||
if ((this.SearchAccountsOperationCompleted == null))
|
||||
{
|
||||
|
@ -3110,6 +3112,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
includeDistributionLists,
|
||||
includeRooms,
|
||||
includeEquipment,
|
||||
includeSecurityGroups,
|
||||
filterColumn,
|
||||
filterValue,
|
||||
sortColumn}, this.SearchAccountsOperationCompleted, userState);
|
||||
|
|
|
@ -127,13 +127,13 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution
|
|||
|
||||
private System.Threading.SendOrPostCallback GetOrganizationSecurityGroupsPagedOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback AddUserToSecurityGroupOperationCompleted;
|
||||
private System.Threading.SendOrPostCallback AddObjectToSecurityGroupOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback DeleteUserFromSecurityGroupOperationCompleted;
|
||||
private System.Threading.SendOrPostCallback DeleteObjectFromSecurityGroupOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback GetSecurityGroupsByMemberOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback SearchSecurityGroupsOperationCompleted;
|
||||
private System.Threading.SendOrPostCallback SearchOrganizationAccountsOperationCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public esOrganizations()
|
||||
|
@ -235,16 +235,16 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution
|
|||
public event GetOrganizationSecurityGroupsPagedCompletedEventHandler GetOrganizationSecurityGroupsPagedCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event AddUserToSecurityGroupCompletedEventHandler AddUserToSecurityGroupCompleted;
|
||||
public event AddObjectToSecurityGroupCompletedEventHandler AddObjectToSecurityGroupCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event DeleteUserFromSecurityGroupCompletedEventHandler DeleteUserFromSecurityGroupCompleted;
|
||||
public event DeleteObjectFromSecurityGroupCompletedEventHandler DeleteObjectFromSecurityGroupCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event GetSecurityGroupsByMemberCompletedEventHandler GetSecurityGroupsByMemberCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event SearchSecurityGroupsCompletedEventHandler SearchSecurityGroupsCompleted;
|
||||
public event SearchOrganizationAccountsCompletedEventHandler SearchOrganizationAccountsCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/CheckOrgIdExists", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
|
@ -2166,112 +2166,112 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution
|
|||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/AddUserToSecurityGroup", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public int AddUserToSecurityGroup(int itemId, int userAccountId, string groupName)
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/AddObjectToSecurityGroup", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public int AddObjectToSecurityGroup(int itemId, int accountId, string groupName)
|
||||
{
|
||||
object[] results = this.Invoke("AddUserToSecurityGroup", new object[] {
|
||||
object[] results = this.Invoke("AddObjectToSecurityGroup", new object[] {
|
||||
itemId,
|
||||
userAccountId,
|
||||
accountId,
|
||||
groupName});
|
||||
return ((int)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginAddUserToSecurityGroup(int itemId, int userAccountId, string groupName, System.AsyncCallback callback, object asyncState)
|
||||
public System.IAsyncResult BeginAddObjectToSecurityGroup(int itemId, int accountId, string groupName, System.AsyncCallback callback, object asyncState)
|
||||
{
|
||||
return this.BeginInvoke("AddUserToSecurityGroup", new object[] {
|
||||
return this.BeginInvoke("AddObjectToSecurityGroup", new object[] {
|
||||
itemId,
|
||||
userAccountId,
|
||||
accountId,
|
||||
groupName}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public int EndAddUserToSecurityGroup(System.IAsyncResult asyncResult)
|
||||
public int EndAddObjectToSecurityGroup(System.IAsyncResult asyncResult)
|
||||
{
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((int)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void AddUserToSecurityGroupAsync(int itemId, int userAccountId, string groupName)
|
||||
public void AddObjectToSecurityGroupAsync(int itemId, int accountId, string groupName)
|
||||
{
|
||||
this.AddUserToSecurityGroupAsync(itemId, userAccountId, groupName, null);
|
||||
this.AddObjectToSecurityGroupAsync(itemId, accountId, groupName, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void AddUserToSecurityGroupAsync(int itemId, int userAccountId, string groupName, object userState)
|
||||
public void AddObjectToSecurityGroupAsync(int itemId, int accountId, string groupName, object userState)
|
||||
{
|
||||
if ((this.AddUserToSecurityGroupOperationCompleted == null))
|
||||
if ((this.AddObjectToSecurityGroupOperationCompleted == null))
|
||||
{
|
||||
this.AddUserToSecurityGroupOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddUserToSecurityGroupOperationCompleted);
|
||||
this.AddObjectToSecurityGroupOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddObjectToSecurityGroupOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("AddUserToSecurityGroup", new object[] {
|
||||
this.InvokeAsync("AddObjectToSecurityGroup", new object[] {
|
||||
itemId,
|
||||
userAccountId,
|
||||
groupName}, this.AddUserToSecurityGroupOperationCompleted, userState);
|
||||
accountId,
|
||||
groupName}, this.AddObjectToSecurityGroupOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnAddUserToSecurityGroupOperationCompleted(object arg)
|
||||
private void OnAddObjectToSecurityGroupOperationCompleted(object arg)
|
||||
{
|
||||
if ((this.AddUserToSecurityGroupCompleted != null))
|
||||
if ((this.AddObjectToSecurityGroupCompleted != null))
|
||||
{
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.AddUserToSecurityGroupCompleted(this, new AddUserToSecurityGroupCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
this.AddObjectToSecurityGroupCompleted(this, new AddObjectToSecurityGroupCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteUserFromSecurityGroup", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public int DeleteUserFromSecurityGroup(int itemId, int userAccountId, string groupName)
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteObjectFromSecurityGroup", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public int DeleteObjectFromSecurityGroup(int itemId, int accountId, string groupName)
|
||||
{
|
||||
object[] results = this.Invoke("DeleteUserFromSecurityGroup", new object[] {
|
||||
object[] results = this.Invoke("DeleteObjectFromSecurityGroup", new object[] {
|
||||
itemId,
|
||||
userAccountId,
|
||||
accountId,
|
||||
groupName});
|
||||
return ((int)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginDeleteUserFromSecurityGroup(int itemId, int userAccountId, string groupName, System.AsyncCallback callback, object asyncState)
|
||||
public System.IAsyncResult BeginDeleteObjectFromSecurityGroup(int itemId, int accountId, string groupName, System.AsyncCallback callback, object asyncState)
|
||||
{
|
||||
return this.BeginInvoke("DeleteUserFromSecurityGroup", new object[] {
|
||||
return this.BeginInvoke("DeleteObjectFromSecurityGroup", new object[] {
|
||||
itemId,
|
||||
userAccountId,
|
||||
accountId,
|
||||
groupName}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public int EndDeleteUserFromSecurityGroup(System.IAsyncResult asyncResult)
|
||||
public int EndDeleteObjectFromSecurityGroup(System.IAsyncResult asyncResult)
|
||||
{
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((int)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void DeleteUserFromSecurityGroupAsync(int itemId, int userAccountId, string groupName)
|
||||
public void DeleteObjectFromSecurityGroupAsync(int itemId, int accountId, string groupName)
|
||||
{
|
||||
this.DeleteUserFromSecurityGroupAsync(itemId, userAccountId, groupName, null);
|
||||
this.DeleteObjectFromSecurityGroupAsync(itemId, accountId, groupName, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void DeleteUserFromSecurityGroupAsync(int itemId, int userAccountId, string groupName, object userState)
|
||||
public void DeleteObjectFromSecurityGroupAsync(int itemId, int accountId, string groupName, object userState)
|
||||
{
|
||||
if ((this.DeleteUserFromSecurityGroupOperationCompleted == null))
|
||||
if ((this.DeleteObjectFromSecurityGroupOperationCompleted == null))
|
||||
{
|
||||
this.DeleteUserFromSecurityGroupOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteUserFromSecurityGroupOperationCompleted);
|
||||
this.DeleteObjectFromSecurityGroupOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteObjectFromSecurityGroupOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("DeleteUserFromSecurityGroup", new object[] {
|
||||
this.InvokeAsync("DeleteObjectFromSecurityGroup", new object[] {
|
||||
itemId,
|
||||
userAccountId,
|
||||
groupName}, this.DeleteUserFromSecurityGroupOperationCompleted, userState);
|
||||
accountId,
|
||||
groupName}, this.DeleteObjectFromSecurityGroupOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnDeleteUserFromSecurityGroupOperationCompleted(object arg)
|
||||
private void OnDeleteObjectFromSecurityGroupOperationCompleted(object arg)
|
||||
{
|
||||
if ((this.DeleteUserFromSecurityGroupCompleted != null))
|
||||
if ((this.DeleteObjectFromSecurityGroupCompleted != null))
|
||||
{
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.DeleteUserFromSecurityGroupCompleted(this, new DeleteUserFromSecurityGroupCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
this.DeleteObjectFromSecurityGroupCompleted(this, new DeleteObjectFromSecurityGroupCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2328,60 +2328,63 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution
|
|||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SearchSecurityGroups", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public ExchangeAccount[] SearchSecurityGroups(int itemId, string filterColumn, string filterValue, string sortColumn)
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SearchOrganizationAccounts", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public ExchangeAccount[] SearchOrganizationAccounts(int itemId, string filterColumn, string filterValue, string sortColumn, bool includeOnlySecurityGroups)
|
||||
{
|
||||
object[] results = this.Invoke("SearchSecurityGroups", new object[] {
|
||||
object[] results = this.Invoke("SearchOrganizationAccounts", new object[] {
|
||||
itemId,
|
||||
filterColumn,
|
||||
filterValue,
|
||||
sortColumn});
|
||||
sortColumn,
|
||||
includeOnlySecurityGroups});
|
||||
return ((ExchangeAccount[])(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginSearchSecurityGroups(int itemId, string filterColumn, string filterValue, string sortColumn, System.AsyncCallback callback, object asyncState)
|
||||
public System.IAsyncResult BeginSearchOrganizationAccounts(int itemId, string filterColumn, string filterValue, string sortColumn, bool includeOnlySecurityGroups, System.AsyncCallback callback, object asyncState)
|
||||
{
|
||||
return this.BeginInvoke("SearchSecurityGroups", new object[] {
|
||||
return this.BeginInvoke("SearchOrganizationAccounts", new object[] {
|
||||
itemId,
|
||||
filterColumn,
|
||||
filterValue,
|
||||
sortColumn}, callback, asyncState);
|
||||
sortColumn,
|
||||
includeOnlySecurityGroups}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public ExchangeAccount[] EndSearchSecurityGroups(System.IAsyncResult asyncResult)
|
||||
public ExchangeAccount[] EndSearchOrganizationAccounts(System.IAsyncResult asyncResult)
|
||||
{
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((ExchangeAccount[])(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void SearchSecurityGroupsAsync(int itemId, string filterColumn, string filterValue, string sortColumn)
|
||||
public void SearchOrganizationAccountsAsync(int itemId, string filterColumn, string filterValue, string sortColumn, bool includeOnlySecurityGroups)
|
||||
{
|
||||
this.SearchSecurityGroupsAsync(itemId, filterColumn, filterValue, sortColumn, null);
|
||||
this.SearchOrganizationAccountsAsync(itemId, filterColumn, filterValue, sortColumn, includeOnlySecurityGroups, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void SearchSecurityGroupsAsync(int itemId, string filterColumn, string filterValue, string sortColumn, object userState)
|
||||
public void SearchOrganizationAccountsAsync(int itemId, string filterColumn, string filterValue, string sortColumn, bool includeOnlySecurityGroups, object userState)
|
||||
{
|
||||
if ((this.SearchSecurityGroupsOperationCompleted == null))
|
||||
if ((this.SearchOrganizationAccountsOperationCompleted == null))
|
||||
{
|
||||
this.SearchSecurityGroupsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSearchSecurityGroupsOperationCompleted);
|
||||
this.SearchOrganizationAccountsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSearchOrganizationAccountsOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("SearchSecurityGroups", new object[] {
|
||||
this.InvokeAsync("SearchOrganizationAccounts", new object[] {
|
||||
itemId,
|
||||
filterColumn,
|
||||
filterValue,
|
||||
sortColumn}, this.SearchSecurityGroupsOperationCompleted, userState);
|
||||
sortColumn,
|
||||
includeOnlySecurityGroups}, this.SearchOrganizationAccountsOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnSearchSecurityGroupsOperationCompleted(object arg)
|
||||
private void OnSearchOrganizationAccountsOperationCompleted(object arg)
|
||||
{
|
||||
if ((this.SearchSecurityGroupsCompleted != null))
|
||||
if ((this.SearchOrganizationAccountsCompleted != null))
|
||||
{
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.SearchSecurityGroupsCompleted(this, new SearchSecurityGroupsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
this.SearchOrganizationAccountsCompleted(this, new SearchOrganizationAccountsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3324,18 +3327,18 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution
|
|||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
public delegate void AddUserToSecurityGroupCompletedEventHandler(object sender, AddUserToSecurityGroupCompletedEventArgs e);
|
||||
public delegate void AddObjectToSecurityGroupCompletedEventHandler(object sender, AddObjectToSecurityGroupCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class AddUserToSecurityGroupCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
|
||||
public partial class AddObjectToSecurityGroupCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
|
||||
{
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal AddUserToSecurityGroupCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
internal AddObjectToSecurityGroupCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
base(exception, cancelled, userState)
|
||||
{
|
||||
this.results = results;
|
||||
|
@ -3354,18 +3357,18 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution
|
|||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
public delegate void DeleteUserFromSecurityGroupCompletedEventHandler(object sender, DeleteUserFromSecurityGroupCompletedEventArgs e);
|
||||
public delegate void DeleteObjectFromSecurityGroupCompletedEventHandler(object sender, DeleteObjectFromSecurityGroupCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class DeleteUserFromSecurityGroupCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
|
||||
public partial class DeleteObjectFromSecurityGroupCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
|
||||
{
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal DeleteUserFromSecurityGroupCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
internal DeleteObjectFromSecurityGroupCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
base(exception, cancelled, userState)
|
||||
{
|
||||
this.results = results;
|
||||
|
@ -3414,18 +3417,18 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution
|
|||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
public delegate void SearchSecurityGroupsCompletedEventHandler(object sender, SearchSecurityGroupsCompletedEventArgs e);
|
||||
public delegate void SearchOrganizationAccountsCompletedEventHandler(object sender, SearchOrganizationAccountsCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class SearchSecurityGroupsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
|
||||
public partial class SearchOrganizationAccountsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
|
||||
{
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal SearchSecurityGroupsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
internal SearchOrganizationAccountsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
base(exception, cancelled, userState)
|
||||
{
|
||||
this.results = results;
|
||||
|
|
|
@ -188,6 +188,22 @@ namespace WebsitePanel.EnterpriseServer
|
|||
// get type properties
|
||||
PropertyInfo[] props = GetTypeProperties(type);
|
||||
|
||||
// leave only a property from the DataReader
|
||||
DataTable readerSchema = reader.GetSchemaTable();
|
||||
if (readerSchema != null)
|
||||
{
|
||||
List<PropertyInfo> propslist = new List<PropertyInfo>();
|
||||
foreach (DataRow field in readerSchema.Rows)
|
||||
{
|
||||
string columnName = System.Convert.ToString(field["ColumnName"]);
|
||||
|
||||
foreach (PropertyInfo prop in props)
|
||||
if (columnName.ToLower() == prop.Name.ToLower())
|
||||
propslist.Add(prop);
|
||||
}
|
||||
props = propslist.ToArray();
|
||||
}
|
||||
|
||||
// iterate through reader
|
||||
while (reader.Read())
|
||||
{
|
||||
|
|
|
@ -2636,6 +2636,38 @@ namespace WebsitePanel.EnterpriseServer
|
|||
);
|
||||
}
|
||||
|
||||
public static IDataReader SearchExchangeAccountsByTypes(int actorId, int itemId, string accountTypes,
|
||||
string filterColumn, string filterValue, string sortColumn)
|
||||
{
|
||||
// check input parameters
|
||||
string[] types = accountTypes.Split(',');
|
||||
for (int i = 0; i < types.Length; i++)
|
||||
{
|
||||
try
|
||||
{
|
||||
int type = Int32.Parse(types[i]);
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw new ArgumentException("Wrong patameter", "accountTypes");
|
||||
}
|
||||
}
|
||||
|
||||
string searchTypes = String.Join(",", types);
|
||||
|
||||
return SqlHelper.ExecuteReader(
|
||||
ConnectionString,
|
||||
CommandType.StoredProcedure,
|
||||
"SearchExchangeAccountsByTypes",
|
||||
new SqlParameter("@ActorID", actorId),
|
||||
new SqlParameter("@ItemID", itemId),
|
||||
new SqlParameter("@AccountTypes", searchTypes),
|
||||
new SqlParameter("@FilterColumn", VerifyColumnName(filterColumn)),
|
||||
new SqlParameter("@FilterValue", VerifyColumnValue(filterValue)),
|
||||
new SqlParameter("@SortColumn", VerifyColumnName(sortColumn))
|
||||
);
|
||||
}
|
||||
|
||||
public static DataSet GetExchangeAccountsPaged(int actorId, int itemId, string accountTypes,
|
||||
string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows)
|
||||
{
|
||||
|
@ -2672,7 +2704,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
|
||||
public static IDataReader SearchExchangeAccounts(int actorId, int itemId, bool includeMailboxes,
|
||||
bool includeContacts, bool includeDistributionLists, bool includeRooms, bool includeEquipment,
|
||||
string filterColumn, string filterValue, string sortColumn)
|
||||
bool includeSecurityGroups, string filterColumn, string filterValue, string sortColumn)
|
||||
{
|
||||
return SqlHelper.ExecuteReader(
|
||||
ConnectionString,
|
||||
|
@ -2685,6 +2717,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
new SqlParameter("@IncludeDistributionLists", includeDistributionLists),
|
||||
new SqlParameter("@IncludeRooms", includeRooms),
|
||||
new SqlParameter("@IncludeEquipment", includeEquipment),
|
||||
new SqlParameter("@IncludeSecurityGroups", includeSecurityGroups),
|
||||
new SqlParameter("@FilterColumn", VerifyColumnName(filterColumn)),
|
||||
new SqlParameter("@FilterValue", VerifyColumnValue(filterValue)),
|
||||
new SqlParameter("@SortColumn", VerifyColumnName(sortColumn))
|
||||
|
|
|
@ -999,7 +999,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
else if (accountType == ExchangeAccountType.Contact)
|
||||
return SearchAccounts(0, false, true, false, false, false, "", "", "");
|
||||
else if (accountType == ExchangeAccountType.DistributionList)
|
||||
return SearchAccounts(0, false, false, true, false, false, "", "", "");
|
||||
return SearchAccounts(0, false, false, true, false, false, false, "", "", "");
|
||||
else
|
||||
{
|
||||
List<ExchangeAccount> demoAccounts = new List<ExchangeAccount>();
|
||||
|
@ -1050,7 +1050,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
|
||||
public static List<ExchangeAccount> SearchAccounts(int itemId,
|
||||
bool includeMailboxes, bool includeContacts, bool includeDistributionLists,
|
||||
bool includeRooms, bool includeEquipment,
|
||||
bool includeRooms, bool includeEquipment, bool includeSecurityGroups,
|
||||
string filterColumn, string filterValue, string sortColumn)
|
||||
{
|
||||
#region Demo Mode
|
||||
|
@ -1131,6 +1131,16 @@ namespace WebsitePanel.EnterpriseServer
|
|||
demoAccounts.Add(d1);
|
||||
}
|
||||
|
||||
if (includeSecurityGroups)
|
||||
{
|
||||
ExchangeAccount g1 = new ExchangeAccount();
|
||||
g1.AccountId = 7;
|
||||
g1.AccountName = "group_fabrikam";
|
||||
g1.AccountType = ExchangeAccountType.SecurityGroup;
|
||||
g1.DisplayName = "Fabrikam Sales Dept";
|
||||
demoAccounts.Add(g1);
|
||||
}
|
||||
|
||||
return demoAccounts;
|
||||
}
|
||||
#endregion
|
||||
|
@ -3444,7 +3454,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
ExchangeDistributionList dl = exchange.GetDistributionListGeneralSettings(accountName);
|
||||
|
||||
// add meta-item
|
||||
int accountId = AddAccount(itemId, ExchangeAccountType.DistributionList, email,
|
||||
int accountId = AddAccount(itemId, ExchangeAccountType.DistributionList, accountName,
|
||||
displayName, email, false,
|
||||
0, dl.SAMAccountName, null, 0, null);
|
||||
|
||||
|
@ -4039,7 +4049,8 @@ namespace WebsitePanel.EnterpriseServer
|
|||
List<ExchangeAccount> DistributionLists = GetAccounts(itemId, ExchangeAccountType.DistributionList);
|
||||
foreach (ExchangeAccount DistributionAccount in DistributionLists)
|
||||
{
|
||||
ExchangeDistributionList DistributionList = exchange.GetDistributionListGeneralSettings(DistributionAccount.AccountName);
|
||||
//ExchangeDistributionList DistributionList = exchange.GetDistributionListGeneralSettings(DistributionAccount.AccountName);
|
||||
OrganizationSecurityGroup DistributionList = OrganizationController.GetSecurityGroupGeneralSettings(itemId, DistributionAccount.AccountId);
|
||||
|
||||
foreach (ExchangeAccount member in DistributionList.MembersAccounts)
|
||||
{
|
||||
|
|
|
@ -1509,7 +1509,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
/// <returns> The account name with organization Id. </returns>
|
||||
private static string BuildAccountNameWithOrgId(string orgId, string name, int serviceId)
|
||||
{
|
||||
name = name.Length > 5 ? name.Substring(0, 5) : name;
|
||||
name = ((orgId.Length + name.Length) > 19 && name.Length > 9) ? name.Substring(0, (19 - orgId.Length) < 10 ? 10 : 19 - orgId.Length) : name;
|
||||
|
||||
orgId = (orgId.Length + name.Length) > 19 ? orgId.Substring(0, 19 - name.Length) : orgId;
|
||||
|
||||
|
@ -2034,6 +2034,10 @@ namespace WebsitePanel.EnterpriseServer
|
|||
DataProvider.SearchOrganizationAccounts(SecurityContext.User.UserId, itemId,
|
||||
filterColumn, filterValue, sortColumn, includeMailboxes));
|
||||
|
||||
return Tmpaccounts;
|
||||
|
||||
// on large lists is very slow
|
||||
/*
|
||||
List<OrganizationUser> Accounts = new List<OrganizationUser>();
|
||||
|
||||
foreach (OrganizationUser user in Tmpaccounts.ToArray())
|
||||
|
@ -2042,6 +2046,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
}
|
||||
|
||||
return Accounts;
|
||||
*/
|
||||
}
|
||||
|
||||
public static int GetAccountIdByUserPrincipalName(int itemId, string userPrincipalName)
|
||||
|
@ -2263,7 +2268,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
|
||||
Organizations orgProxy = GetOrganizationProxy(org.ServiceId);
|
||||
|
||||
string groupName = BuildAccountNameWithOrgId(org.OrganizationId, displayName, org.ServiceId);
|
||||
string groupName = BuildAccountNameWithOrgId(org.OrganizationId, displayName.Replace(" ", ""), org.ServiceId);
|
||||
|
||||
TaskManager.Write("accountName :" + groupName);
|
||||
|
||||
|
@ -2332,9 +2337,9 @@ namespace WebsitePanel.EnterpriseServer
|
|||
|
||||
securityGroup.IsDefault = account.AccountType == ExchangeAccountType.DefaultSecurityGroup;
|
||||
|
||||
List<OrganizationUser> members = new List<OrganizationUser>();
|
||||
List<ExchangeAccount> members = new List<ExchangeAccount>();
|
||||
|
||||
foreach (OrganizationUser user in securityGroup.MembersAccounts)
|
||||
foreach (ExchangeAccount user in securityGroup.MembersAccounts)
|
||||
{
|
||||
OrganizationUser userAccount = GetAccountByAccountName(itemId, user.SamAccountName);
|
||||
|
||||
|
@ -2342,6 +2347,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
{
|
||||
user.AccountId = userAccount.AccountId;
|
||||
user.AccountName = userAccount.AccountName;
|
||||
user.DisplayName = userAccount.DisplayName;
|
||||
user.PrimaryEmailAddress = userAccount.PrimaryEmailAddress;
|
||||
user.AccountType = userAccount.AccountType;
|
||||
|
||||
|
@ -2513,7 +2519,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return result;
|
||||
}
|
||||
|
||||
public static int AddUserToSecurityGroup(int itemId, int userAccountId, string groupName)
|
||||
public static int AddObjectToSecurityGroup(int itemId, int accountId, string groupName)
|
||||
{
|
||||
// check account
|
||||
int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive);
|
||||
|
@ -2530,11 +2536,11 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return -1;
|
||||
|
||||
// load user account
|
||||
OrganizationUser userAccount = GetAccount(itemId, userAccountId);
|
||||
ExchangeAccount account = ExchangeServerController.GetAccount(itemId, accountId);
|
||||
|
||||
Organizations orgProxy = GetOrganizationProxy(org.ServiceId);
|
||||
|
||||
orgProxy.AddUserToSecurityGroup(org.OrganizationId, userAccount.AccountName, groupName);
|
||||
orgProxy.AddObjectToSecurityGroup(org.OrganizationId, account.AccountName, groupName);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -2548,7 +2554,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
}
|
||||
}
|
||||
|
||||
public static int DeleteUserFromSecurityGroup(int itemId, int userAccountId, string groupName)
|
||||
public static int DeleteObjectFromSecurityGroup(int itemId, int accountId, string groupName)
|
||||
{
|
||||
// check account
|
||||
int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive);
|
||||
|
@ -2565,11 +2571,11 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return -1;
|
||||
|
||||
// load user account
|
||||
OrganizationUser userAccount = GetAccount(itemId, userAccountId);
|
||||
ExchangeAccount account = ExchangeServerController.GetAccount(itemId, accountId);
|
||||
|
||||
Organizations orgProxy = GetOrganizationProxy(org.ServiceId);
|
||||
|
||||
orgProxy.DeleteUserFromSecurityGroup(org.OrganizationId, userAccount.AccountName, groupName);
|
||||
orgProxy.DeleteObjectFromSecurityGroup(org.OrganizationId, account.AccountName, groupName);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -2610,16 +2616,20 @@ namespace WebsitePanel.EnterpriseServer
|
|||
// load account
|
||||
ExchangeAccount account = ExchangeServerController.GetAccount(itemId, accountId);
|
||||
|
||||
List<ExchangeAccount> SecurytyGroups = ExchangeServerController.GetAccounts(itemId, ExchangeAccountType.SecurityGroup);
|
||||
foreach (ExchangeAccount SecurytyGroupAccount in SecurytyGroups)
|
||||
{
|
||||
OrganizationSecurityGroup SecurytyGroup = GetSecurityGroupGeneralSettings(itemId, SecurytyGroupAccount.AccountId);
|
||||
List<ExchangeAccount> securytyGroups = ExchangeServerController.GetAccounts(itemId, ExchangeAccountType.SecurityGroup);
|
||||
|
||||
foreach (OrganizationUser member in SecurytyGroup.MembersAccounts)
|
||||
//load default group
|
||||
securytyGroups.AddRange(ExchangeServerController.GetAccounts(itemId, ExchangeAccountType.DefaultSecurityGroup));
|
||||
|
||||
foreach (ExchangeAccount securityGroupAccount in securytyGroups)
|
||||
{
|
||||
OrganizationSecurityGroup securityGroup = GetSecurityGroupGeneralSettings(itemId, securityGroupAccount.AccountId);
|
||||
|
||||
foreach (ExchangeAccount member in securityGroup.MembersAccounts)
|
||||
{
|
||||
if (member.AccountName == account.AccountName)
|
||||
{
|
||||
ret.Add(SecurytyGroupAccount);
|
||||
ret.Add(securityGroupAccount);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -2638,39 +2648,96 @@ namespace WebsitePanel.EnterpriseServer
|
|||
}
|
||||
}
|
||||
|
||||
public static List<ExchangeAccount> SearchSecurityGroups(int itemId, string filterColumn, string filterValue, string sortColumn)
|
||||
public static List<ExchangeAccount> SearchOrganizationAccounts(int itemId, string filterColumn, string filterValue,
|
||||
string sortColumn, bool includeOnlySecurityGroups)
|
||||
{
|
||||
#region Demo Mode
|
||||
|
||||
if (IsDemoMode)
|
||||
{
|
||||
List<ExchangeAccount> demoSecurityGroups = new List<ExchangeAccount>();
|
||||
List<ExchangeAccount> demoAccounts = new List<ExchangeAccount>();
|
||||
|
||||
ExchangeAccount m1 = new ExchangeAccount();
|
||||
m1.AccountId = 1;
|
||||
m1.AccountName = "john_fabrikam";
|
||||
m1.AccountType = ExchangeAccountType.Mailbox;
|
||||
m1.DisplayName = "John Smith";
|
||||
m1.PrimaryEmailAddress = "john@fabrikam.net";
|
||||
demoAccounts.Add(m1);
|
||||
|
||||
ExchangeAccount m2 = new ExchangeAccount();
|
||||
m2.AccountId = 2;
|
||||
m2.AccountName = "jack_fabrikam";
|
||||
m2.AccountType = ExchangeAccountType.User;
|
||||
m2.DisplayName = "Jack Brown";
|
||||
m2.PrimaryEmailAddress = "jack@fabrikam.net";
|
||||
demoAccounts.Add(m2);
|
||||
|
||||
ExchangeAccount m3 = new ExchangeAccount();
|
||||
m3.AccountId = 3;
|
||||
m3.AccountName = "marry_fabrikam";
|
||||
m3.AccountType = ExchangeAccountType.Mailbox;
|
||||
m3.DisplayName = "Marry Smith";
|
||||
m3.PrimaryEmailAddress = "marry@fabrikam.net";
|
||||
demoAccounts.Add(m3);
|
||||
|
||||
ExchangeAccount r1 = new ExchangeAccount();
|
||||
r1.AccountId = 20;
|
||||
r1.AccountName = "group1_fabrikam";
|
||||
r1.AccountType = ExchangeAccountType.SecurityGroup;
|
||||
r1.DisplayName = "Group 1";
|
||||
demoSecurityGroups.Add(r1);
|
||||
demoAccounts.Add(r1);
|
||||
|
||||
ExchangeAccount r2 = new ExchangeAccount();
|
||||
r1.AccountId = 21;
|
||||
r1.AccountName = "group2_fabrikam";
|
||||
r1.AccountType = ExchangeAccountType.SecurityGroup;
|
||||
r1.DisplayName = "Group 2";
|
||||
demoSecurityGroups.Add(r2);
|
||||
demoAccounts.Add(r2);
|
||||
|
||||
return demoSecurityGroups;
|
||||
return demoAccounts;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
List<ExchangeAccount> accounts = ObjectUtils.CreateListFromDataReader<ExchangeAccount>(
|
||||
DataProvider.SearchExchangeAccounts(
|
||||
SecurityContext.User.UserId, itemId, false, false, false, false, false, filterColumn, filterValue, sortColumn));
|
||||
string accountTypes = string.Format("{0}", ((int)ExchangeAccountType.SecurityGroup));
|
||||
|
||||
return accounts.Where(x => x.AccountType == ExchangeAccountType.SecurityGroup).ToList();
|
||||
if (!includeOnlySecurityGroups)
|
||||
{
|
||||
accountTypes = string.Format("{0}, {1}, {2}, {3}, {4}, {5}", accountTypes, ((int)ExchangeAccountType.User), ((int)ExchangeAccountType.Mailbox),
|
||||
((int)ExchangeAccountType.Room), ((int)ExchangeAccountType.Equipment), ((int)ExchangeAccountType.DistributionList));
|
||||
}
|
||||
|
||||
List<ExchangeAccount> tmpAccounts = ObjectUtils.CreateListFromDataReader<ExchangeAccount>(
|
||||
DataProvider.SearchExchangeAccountsByTypes(SecurityContext.User.UserId, itemId,
|
||||
accountTypes, filterColumn, filterValue, sortColumn));
|
||||
|
||||
List<ExchangeAccount> accounts = new List<ExchangeAccount>();
|
||||
|
||||
foreach (ExchangeAccount tmpAccount in tmpAccounts.ToArray())
|
||||
{
|
||||
bool bSuccess = false;
|
||||
|
||||
switch (tmpAccount.AccountType)
|
||||
{
|
||||
case ExchangeAccountType.SecurityGroup:
|
||||
bSuccess = GetSecurityGroupGeneralSettings(itemId, tmpAccount.AccountId) != null;
|
||||
break;
|
||||
case ExchangeAccountType.DistributionList:
|
||||
bSuccess = ExchangeServerController.GetDistributionListGeneralSettings(itemId, tmpAccount.AccountId) != null;
|
||||
break;
|
||||
default:
|
||||
bSuccess = GetUserGeneralSettings(itemId, tmpAccount.AccountId) != null;
|
||||
break;
|
||||
}
|
||||
|
||||
if (bSuccess)
|
||||
{
|
||||
accounts.Add(tmpAccount);
|
||||
}
|
||||
}
|
||||
|
||||
return accounts;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1231,7 +1231,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
}
|
||||
|
||||
// check quotas
|
||||
string quotaName = GetIPAddressesQuotaByResourceGroup(groupName);
|
||||
string quotaName = GetIPAddressesQuotaByResourceGroup(groupName, pool);
|
||||
|
||||
// get maximum server IPs
|
||||
List<IPAddressInfo> ips = ServerController.GetUnallottedIPAddresses(packageId, groupName, pool);
|
||||
|
@ -1249,15 +1249,15 @@ namespace WebsitePanel.EnterpriseServer
|
|||
int quotaUsed = cntx.Quotas[quotaName].QuotaUsedValue;
|
||||
|
||||
// check the maximum allowed number
|
||||
if (quotaAllocated != -1 &&
|
||||
(addressesNumber > (quotaAllocated - quotaUsed)))
|
||||
if (addressesNumber > (quotaAllocated - quotaUsed))
|
||||
{
|
||||
res.ErrorCodes.Add("IP_ADDRESSES_QUOTA_LIMIT_REACHED");
|
||||
return res;
|
||||
}
|
||||
|
||||
// check if requested more than available
|
||||
if (addressesNumber > maxAvailableIPs)
|
||||
if (maxAvailableIPs != -1 &&
|
||||
(addressesNumber > maxAvailableIPs))
|
||||
addressesNumber = maxAvailableIPs;
|
||||
|
||||
res = TaskManager.StartResultTask<ResultObject>("IP_ADDRESS", "ALLOCATE_PACKAGE_IP", packageId);
|
||||
|
@ -1303,7 +1303,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
int maxAvailableIPs = GetUnallottedIPAddresses(packageId, groupName, pool).Count;
|
||||
|
||||
// get quota name
|
||||
string quotaName = GetIPAddressesQuotaByResourceGroup(groupName);
|
||||
string quotaName = GetIPAddressesQuotaByResourceGroup(groupName, pool);
|
||||
|
||||
// get hosting plan IPs
|
||||
int number = 0;
|
||||
|
@ -1415,8 +1415,11 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return doc.InnerXml;
|
||||
}
|
||||
|
||||
private static string GetIPAddressesQuotaByResourceGroup(string groupName)
|
||||
private static string GetIPAddressesQuotaByResourceGroup(string groupName, IPAddressPool pool)
|
||||
{
|
||||
if (pool == IPAddressPool.PhoneNumbers)
|
||||
return Quotas.LYNC_PHONE;
|
||||
|
||||
if (String.Compare(groupName, ResourceGroups.VPS, true) == 0)
|
||||
{
|
||||
return Quotas.VPS_EXTERNAL_IP_ADDRESSES_NUMBER;
|
||||
|
|
|
@ -190,12 +190,12 @@ namespace WebsitePanel.EnterpriseServer
|
|||
[WebMethod]
|
||||
public List<ExchangeAccount> SearchAccounts(int itemId,
|
||||
bool includeMailboxes, bool includeContacts, bool includeDistributionLists,
|
||||
bool includeRooms, bool includeEquipment,
|
||||
bool includeRooms, bool includeEquipment, bool includeSecurityGroups,
|
||||
string filterColumn, string filterValue, string sortColumn)
|
||||
{
|
||||
return ExchangeServerController.SearchAccounts(itemId,
|
||||
includeMailboxes, includeContacts, includeDistributionLists,
|
||||
includeRooms, includeEquipment,
|
||||
includeRooms, includeEquipment, includeSecurityGroups,
|
||||
filterColumn, filterValue, sortColumn);
|
||||
}
|
||||
|
||||
|
|
|
@ -276,15 +276,15 @@ namespace WebsitePanel.EnterpriseServer
|
|||
}
|
||||
|
||||
[WebMethod]
|
||||
public int AddUserToSecurityGroup(int itemId, int userAccountId, string groupName)
|
||||
public int AddObjectToSecurityGroup(int itemId, int accountId, string groupName)
|
||||
{
|
||||
return OrganizationController.AddUserToSecurityGroup(itemId, userAccountId, groupName);
|
||||
return OrganizationController.AddObjectToSecurityGroup(itemId, accountId, groupName);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public int DeleteUserFromSecurityGroup(int itemId, int userAccountId, string groupName)
|
||||
public int DeleteObjectFromSecurityGroup(int itemId, int accountId, string groupName)
|
||||
{
|
||||
return OrganizationController.DeleteUserFromSecurityGroup(itemId, userAccountId, groupName);
|
||||
return OrganizationController.DeleteObjectFromSecurityGroup(itemId, accountId, groupName);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
|
@ -294,9 +294,11 @@ namespace WebsitePanel.EnterpriseServer
|
|||
}
|
||||
|
||||
[WebMethod]
|
||||
public List<ExchangeAccount> SearchSecurityGroups(int itemId, string filterColumn, string filterValue, string sortColumn)
|
||||
public List<ExchangeAccount> SearchOrganizationAccounts(int itemId, string filterColumn, string filterValue,
|
||||
string sortColumn, bool includeOnlySecurityGroups)
|
||||
{
|
||||
return OrganizationController.SearchSecurityGroups(itemId, filterColumn, filterValue, sortColumn);
|
||||
return OrganizationController.SearchOrganizationAccounts(itemId, filterColumn, filterValue, sortColumn,
|
||||
includeOnlySecurityGroups);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
|
@ -44,21 +44,31 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
return de;
|
||||
}
|
||||
|
||||
public static string[] GetUsersGroup(string group)
|
||||
public static string[] GetGroupObjects(string group, string objectType)
|
||||
{
|
||||
return GetGroupObjects(group, objectType, null);
|
||||
}
|
||||
|
||||
public static string[] GetGroupObjects(string group, string objectType, DirectoryEntry entry)
|
||||
{
|
||||
List<string> rets = new List<string>();
|
||||
|
||||
DirectorySearcher deSearch = new DirectorySearcher
|
||||
{
|
||||
Filter =
|
||||
"(&(objectClass=user))"
|
||||
"(&(objectClass=" + objectType + "))"
|
||||
};
|
||||
|
||||
SearchResultCollection srcUsers = deSearch.FindAll();
|
||||
|
||||
foreach (SearchResult srcUser in srcUsers)
|
||||
if (entry != null)
|
||||
{
|
||||
DirectoryEntry de = srcUser.GetDirectoryEntry();
|
||||
deSearch.SearchRoot = entry;
|
||||
}
|
||||
|
||||
SearchResultCollection srcObjects = deSearch.FindAll();
|
||||
|
||||
foreach (SearchResult srcObject in srcObjects)
|
||||
{
|
||||
DirectoryEntry de = srcObject.GetDirectoryEntry();
|
||||
PropertyValueCollection props = de.Properties["memberOf"];
|
||||
|
||||
foreach (string str in props)
|
||||
|
@ -371,20 +381,20 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
newGroupObject.CommitChanges();
|
||||
}
|
||||
|
||||
public static void AddUserToGroup(string userPath, string groupPath)
|
||||
public static void AddObjectToGroup(string objectPath, string groupPath)
|
||||
{
|
||||
DirectoryEntry user = new DirectoryEntry(userPath);
|
||||
DirectoryEntry obj = new DirectoryEntry(objectPath);
|
||||
DirectoryEntry group = new DirectoryEntry(groupPath);
|
||||
|
||||
group.Invoke("Add", user.Path);
|
||||
group.Invoke("Add", obj.Path);
|
||||
}
|
||||
|
||||
public static void RemoveUserFromGroup(string userPath, string groupPath)
|
||||
public static void RemoveObjectFromGroup(string obejctPath, string groupPath)
|
||||
{
|
||||
DirectoryEntry user = new DirectoryEntry(userPath);
|
||||
DirectoryEntry obj = new DirectoryEntry(obejctPath);
|
||||
DirectoryEntry group = new DirectoryEntry(groupPath);
|
||||
|
||||
group.Invoke("Remove", user.Path);
|
||||
group.Invoke("Remove", obj.Path);
|
||||
}
|
||||
|
||||
public static bool AdObjectExists(string path)
|
||||
|
|
|
@ -50,9 +50,9 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
|
||||
void SetSecurityGroupGeneralSettings(string organizationId, string groupName, string[] memberAccounts, string notes);
|
||||
|
||||
void AddUserToSecurityGroup(string organizationId, string loginName, string groupName);
|
||||
void AddObjectToSecurityGroup(string organizationId, string accountName, string groupName);
|
||||
|
||||
void DeleteUserFromSecurityGroup(string organizationId, string loginName, string groupName);
|
||||
void DeleteObjectFromSecurityGroup(string organizationId, string accountName, string groupName);
|
||||
|
||||
void SetUserGeneralSettings(string organizationId, string accountName, string displayName, string password,
|
||||
bool hideFromAddressBook, bool disabled, bool locked, string firstName, string initials,
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
set;
|
||||
}
|
||||
|
||||
public OrganizationUser[] MembersAccounts
|
||||
public ExchangeAccount[] MembersAccounts
|
||||
{
|
||||
get;
|
||||
set;
|
||||
|
|
|
@ -5656,7 +5656,7 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
|
||||
internal Collection<PSObject> ExecuteShellCommand(Runspace runSpace, Command cmd)
|
||||
{
|
||||
return ExecuteShellCommand(runSpace, cmd, true);
|
||||
return ExecuteShellCommand(runSpace, cmd, false);
|
||||
}
|
||||
|
||||
internal Collection<PSObject> ExecuteShellCommand(Runspace runSpace, Command cmd, bool useDomainController)
|
||||
|
|
|
@ -102,6 +102,20 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
return sb.ToString();
|
||||
}
|
||||
|
||||
private string GetObjectPath(string organizationId, string objName)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
// append provider
|
||||
AppendProtocol(sb);
|
||||
AppendDomainController(sb);
|
||||
AppendCNPath(sb, objName);
|
||||
AppendOUPath(sb, organizationId);
|
||||
AppendOUPath(sb, RootOU);
|
||||
AppendDomainPath(sb, RootDomain);
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
private string GetGroupPath(string organizationId, string groupName)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
@ -404,7 +418,7 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
HostedSolutionLog.DebugInfo("Group retrieved: {0}", groupPath);
|
||||
|
||||
|
||||
ActiveDirectoryUtils.AddUserToGroup(userPath, groupPath);
|
||||
ActiveDirectoryUtils.AddObjectToGroup(userPath, groupPath);
|
||||
HostedSolutionLog.DebugInfo("Added to group: {0}", groupPath);
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -904,8 +918,11 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
throw new ArgumentNullException("groupName");
|
||||
|
||||
string path = GetGroupPath(organizationId, groupName);
|
||||
string organizationPath = GetOrganizationPath(organizationId);
|
||||
|
||||
DirectoryEntry entry = ActiveDirectoryUtils.GetADObject(path);
|
||||
DirectoryEntry organizationEntry = ActiveDirectoryUtils.GetADObject(organizationPath);
|
||||
|
||||
|
||||
OrganizationSecurityGroup securityGroup = new OrganizationSecurityGroup();
|
||||
|
||||
|
@ -914,11 +931,28 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
securityGroup.AccountName = ActiveDirectoryUtils.GetADObjectStringProperty(entry, ADAttributes.SAMAccountName);
|
||||
securityGroup.SAMAccountName = ActiveDirectoryUtils.GetADObjectStringProperty(entry, ADAttributes.SAMAccountName);
|
||||
|
||||
List<OrganizationUser> members = new List<OrganizationUser>();
|
||||
List<ExchangeAccount> members = new List<ExchangeAccount>();
|
||||
|
||||
foreach (string userPath in ActiveDirectoryUtils.GetUsersGroup(groupName))
|
||||
foreach (string userPath in ActiveDirectoryUtils.GetGroupObjects(groupName, "user", organizationEntry))
|
||||
{
|
||||
members.Add(GetUser(userPath));
|
||||
OrganizationUser tmpUser = GetUser(userPath);
|
||||
|
||||
members.Add(new ExchangeAccount
|
||||
{
|
||||
AccountName = tmpUser.AccountName,
|
||||
SamAccountName = tmpUser.SamAccountName
|
||||
});
|
||||
}
|
||||
|
||||
foreach (string groupPath in ActiveDirectoryUtils.GetGroupObjects(groupName, "group", organizationEntry))
|
||||
{
|
||||
DirectoryEntry groupEntry = ActiveDirectoryUtils.GetADObject(groupPath);
|
||||
|
||||
members.Add(new ExchangeAccount
|
||||
{
|
||||
AccountName = ActiveDirectoryUtils.GetADObjectStringProperty(groupEntry, ADAttributes.SAMAccountName),
|
||||
SamAccountName = ActiveDirectoryUtils.GetADObjectStringProperty(groupEntry, ADAttributes.SAMAccountName)
|
||||
});
|
||||
}
|
||||
|
||||
securityGroup.MembersAccounts = members.ToArray();
|
||||
|
@ -977,72 +1011,79 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
|
||||
ActiveDirectoryUtils.SetADObjectProperty(entry, ADAttributes.Notes, notes);
|
||||
|
||||
foreach(string userPath in ActiveDirectoryUtils.GetUsersGroup(groupName)) {
|
||||
ActiveDirectoryUtils.RemoveUserFromGroup(userPath, path);
|
||||
foreach (string userPath in ActiveDirectoryUtils.GetGroupObjects(groupName, "user"))
|
||||
{
|
||||
ActiveDirectoryUtils.RemoveObjectFromGroup(userPath, path);
|
||||
}
|
||||
|
||||
foreach(string user in memberAccounts) {
|
||||
string userPath = GetUserPath(organizationId, user);
|
||||
ActiveDirectoryUtils.AddUserToGroup(userPath, path);
|
||||
foreach (string groupPath in ActiveDirectoryUtils.GetGroupObjects(groupName, "group"))
|
||||
{
|
||||
ActiveDirectoryUtils.RemoveObjectFromGroup(groupPath, path);
|
||||
}
|
||||
|
||||
foreach (string obj in memberAccounts)
|
||||
{
|
||||
string objPath = GetObjectPath(organizationId, obj);
|
||||
ActiveDirectoryUtils.AddObjectToGroup(objPath, path);
|
||||
}
|
||||
|
||||
entry.CommitChanges();
|
||||
}
|
||||
|
||||
public void AddUserToSecurityGroup(string organizationId, string loginName, string groupName)
|
||||
public void AddObjectToSecurityGroup(string organizationId, string accountName, string groupName)
|
||||
{
|
||||
AddUserToSecurityGroupInternal(organizationId, loginName, groupName);
|
||||
AddObjectToSecurityGroupInternal(organizationId, accountName, groupName);
|
||||
}
|
||||
|
||||
internal void AddUserToSecurityGroupInternal(string organizationId, string loginName, string groupName)
|
||||
internal void AddObjectToSecurityGroupInternal(string organizationId, string accountName, string groupName)
|
||||
{
|
||||
HostedSolutionLog.LogStart("AddUserToSecurityGroupInternal");
|
||||
HostedSolutionLog.DebugInfo("organizationId : {0}", organizationId);
|
||||
HostedSolutionLog.DebugInfo("loginName : {0}", loginName);
|
||||
HostedSolutionLog.DebugInfo("accountName : {0}", accountName);
|
||||
HostedSolutionLog.DebugInfo("groupName : {0}", groupName);
|
||||
|
||||
if (string.IsNullOrEmpty(organizationId))
|
||||
throw new ArgumentNullException("organizationId");
|
||||
|
||||
if (string.IsNullOrEmpty(loginName))
|
||||
if (string.IsNullOrEmpty(accountName))
|
||||
throw new ArgumentNullException("loginName");
|
||||
|
||||
if (string.IsNullOrEmpty(groupName))
|
||||
throw new ArgumentNullException("groupName");
|
||||
|
||||
string userPath = GetUserPath(organizationId, loginName);
|
||||
string objectPath = GetObjectPath(organizationId, accountName);
|
||||
|
||||
string groupPath = GetGroupPath(organizationId, groupName);
|
||||
|
||||
ActiveDirectoryUtils.AddUserToGroup(userPath, groupPath);
|
||||
ActiveDirectoryUtils.AddObjectToGroup(objectPath, groupPath);
|
||||
}
|
||||
|
||||
public void DeleteUserFromSecurityGroup(string organizationId, string loginName, string groupName)
|
||||
public void DeleteObjectFromSecurityGroup(string organizationId, string accountName, string groupName)
|
||||
{
|
||||
DeleteUserFromSecurityGroupInternal(organizationId, loginName, groupName);
|
||||
DeleteObjectFromSecurityGroupInternal(organizationId, accountName, groupName);
|
||||
}
|
||||
|
||||
internal void DeleteUserFromSecurityGroupInternal(string organizationId, string loginName, string groupName)
|
||||
internal void DeleteObjectFromSecurityGroupInternal(string organizationId, string accountName, string groupName)
|
||||
{
|
||||
HostedSolutionLog.LogStart("AddUserToSecurityGroupInternal");
|
||||
HostedSolutionLog.DebugInfo("organizationId : {0}", organizationId);
|
||||
HostedSolutionLog.DebugInfo("loginName : {0}", loginName);
|
||||
HostedSolutionLog.DebugInfo("accountName : {0}", accountName);
|
||||
HostedSolutionLog.DebugInfo("groupName : {0}", groupName);
|
||||
|
||||
if (string.IsNullOrEmpty(organizationId))
|
||||
throw new ArgumentNullException("organizationId");
|
||||
|
||||
if (string.IsNullOrEmpty(loginName))
|
||||
if (string.IsNullOrEmpty(accountName))
|
||||
throw new ArgumentNullException("loginName");
|
||||
|
||||
if (string.IsNullOrEmpty(groupName))
|
||||
throw new ArgumentNullException("groupName");
|
||||
|
||||
string userPath = GetUserPath(organizationId, loginName);
|
||||
string objectPath = GetObjectPath(organizationId, accountName);
|
||||
|
||||
string groupPath = GetGroupPath(organizationId, groupName);
|
||||
|
||||
ActiveDirectoryUtils.RemoveUserFromGroup(userPath, groupPath);
|
||||
ActiveDirectoryUtils.RemoveObjectFromGroup(objectPath, groupPath);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -1051,7 +1092,5 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
{
|
||||
return Environment.UserDomainName != Environment.MachineName;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -85,9 +85,9 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
|
||||
private System.Threading.SendOrPostCallback SetSecurityGroupGeneralSettingsOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback AddUserToSecurityGroupOperationCompleted;
|
||||
private System.Threading.SendOrPostCallback AddObjectToSecurityGroupOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback DeleteUserFromSecurityGroupOperationCompleted;
|
||||
private System.Threading.SendOrPostCallback DeleteObjectFromSecurityGroupOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback SetUserGeneralSettingsOperationCompleted;
|
||||
|
||||
|
@ -142,10 +142,10 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
public event SetSecurityGroupGeneralSettingsCompletedEventHandler SetSecurityGroupGeneralSettingsCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event AddUserToSecurityGroupCompletedEventHandler AddUserToSecurityGroupCompleted;
|
||||
public event AddObjectToSecurityGroupCompletedEventHandler AddObjectToSecurityGroupCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event DeleteUserFromSecurityGroupCompletedEventHandler DeleteUserFromSecurityGroupCompleted;
|
||||
public event DeleteObjectFromSecurityGroupCompletedEventHandler DeleteObjectFromSecurityGroupCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event SetUserGeneralSettingsCompletedEventHandler SetUserGeneralSettingsCompleted;
|
||||
|
@ -704,109 +704,109 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/AddUserToSecurityGroup", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public void AddUserToSecurityGroup(string organizationId, string loginName, string groupName)
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/AddObjectToSecurityGroup", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public void AddObjectToSecurityGroup(string organizationId, string accountName, string groupName)
|
||||
{
|
||||
this.Invoke("AddUserToSecurityGroup", new object[] {
|
||||
this.Invoke("AddObjectToSecurityGroup", new object[] {
|
||||
organizationId,
|
||||
loginName,
|
||||
accountName,
|
||||
groupName});
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginAddUserToSecurityGroup(string organizationId, string loginName, string groupName, System.AsyncCallback callback, object asyncState)
|
||||
public System.IAsyncResult BeginAddObjectToSecurityGroup(string organizationId, string accountName, string groupName, System.AsyncCallback callback, object asyncState)
|
||||
{
|
||||
return this.BeginInvoke("AddUserToSecurityGroup", new object[] {
|
||||
return this.BeginInvoke("AddObjectToSecurityGroup", new object[] {
|
||||
organizationId,
|
||||
loginName,
|
||||
accountName,
|
||||
groupName}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void EndAddUserToSecurityGroup(System.IAsyncResult asyncResult)
|
||||
public void EndAddObjectToSecurityGroup(System.IAsyncResult asyncResult)
|
||||
{
|
||||
this.EndInvoke(asyncResult);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void AddUserToSecurityGroupAsync(string organizationId, string loginName, string groupName)
|
||||
public void AddObjectToSecurityGroupAsync(string organizationId, string accountName, string groupName)
|
||||
{
|
||||
this.AddUserToSecurityGroupAsync(organizationId, loginName, groupName, null);
|
||||
this.AddObjectToSecurityGroupAsync(organizationId, accountName, groupName, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void AddUserToSecurityGroupAsync(string organizationId, string loginName, string groupName, object userState)
|
||||
public void AddObjectToSecurityGroupAsync(string organizationId, string accountName, string groupName, object userState)
|
||||
{
|
||||
if ((this.AddUserToSecurityGroupOperationCompleted == null))
|
||||
if ((this.AddObjectToSecurityGroupOperationCompleted == null))
|
||||
{
|
||||
this.AddUserToSecurityGroupOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddUserToSecurityGroupOperationCompleted);
|
||||
this.AddObjectToSecurityGroupOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddObjectToSecurityGroupOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("AddUserToSecurityGroup", new object[] {
|
||||
this.InvokeAsync("AddObjectToSecurityGroup", new object[] {
|
||||
organizationId,
|
||||
loginName,
|
||||
groupName}, this.AddUserToSecurityGroupOperationCompleted, userState);
|
||||
accountName,
|
||||
groupName}, this.AddObjectToSecurityGroupOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnAddUserToSecurityGroupOperationCompleted(object arg)
|
||||
private void OnAddObjectToSecurityGroupOperationCompleted(object arg)
|
||||
{
|
||||
if ((this.AddUserToSecurityGroupCompleted != null))
|
||||
if ((this.AddObjectToSecurityGroupCompleted != null))
|
||||
{
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.AddUserToSecurityGroupCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
this.AddObjectToSecurityGroupCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteUserFromSecurityGroup", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public void DeleteUserFromSecurityGroup(string organizationId, string loginName, string groupName)
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteObjectFromSecurityGroup", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public void DeleteObjectFromSecurityGroup(string organizationId, string accountName, string groupName)
|
||||
{
|
||||
this.Invoke("DeleteUserFromSecurityGroup", new object[] {
|
||||
this.Invoke("DeleteObjectFromSecurityGroup", new object[] {
|
||||
organizationId,
|
||||
loginName,
|
||||
accountName,
|
||||
groupName});
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginDeleteUserFromSecurityGroup(string organizationId, string loginName, string groupName, System.AsyncCallback callback, object asyncState)
|
||||
public System.IAsyncResult BeginDeleteObjectFromSecurityGroup(string organizationId, string accountName, string groupName, System.AsyncCallback callback, object asyncState)
|
||||
{
|
||||
return this.BeginInvoke("DeleteUserFromSecurityGroup", new object[] {
|
||||
return this.BeginInvoke("DeleteObjectFromSecurityGroup", new object[] {
|
||||
organizationId,
|
||||
loginName,
|
||||
accountName,
|
||||
groupName}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void EndDeleteUserFromSecurityGroup(System.IAsyncResult asyncResult)
|
||||
public void EndDeleteObjectFromSecurityGroup(System.IAsyncResult asyncResult)
|
||||
{
|
||||
this.EndInvoke(asyncResult);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void DeleteUserFromSecurityGroupAsync(string organizationId, string loginName, string groupName)
|
||||
public void DeleteObjectFromSecurityGroupAsync(string organizationId, string accountName, string groupName)
|
||||
{
|
||||
this.DeleteUserFromSecurityGroupAsync(organizationId, loginName, groupName, null);
|
||||
this.DeleteObjectFromSecurityGroupAsync(organizationId, accountName, groupName, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void DeleteUserFromSecurityGroupAsync(string organizationId, string loginName, string groupName, object userState)
|
||||
public void DeleteObjectFromSecurityGroupAsync(string organizationId, string accountName, string groupName, object userState)
|
||||
{
|
||||
if ((this.DeleteUserFromSecurityGroupOperationCompleted == null))
|
||||
if ((this.DeleteObjectFromSecurityGroupOperationCompleted == null))
|
||||
{
|
||||
this.DeleteUserFromSecurityGroupOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteUserFromSecurityGroupOperationCompleted);
|
||||
this.DeleteObjectFromSecurityGroupOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteObjectFromSecurityGroupOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("DeleteUserFromSecurityGroup", new object[] {
|
||||
this.InvokeAsync("DeleteObjectFromSecurityGroup", new object[] {
|
||||
organizationId,
|
||||
loginName,
|
||||
groupName}, this.DeleteUserFromSecurityGroupOperationCompleted, userState);
|
||||
accountName,
|
||||
groupName}, this.DeleteObjectFromSecurityGroupOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnDeleteUserFromSecurityGroupOperationCompleted(object arg)
|
||||
private void OnDeleteObjectFromSecurityGroupOperationCompleted(object arg)
|
||||
{
|
||||
if ((this.DeleteUserFromSecurityGroupCompleted != null))
|
||||
if ((this.DeleteObjectFromSecurityGroupCompleted != null))
|
||||
{
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.DeleteUserFromSecurityGroupCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
this.DeleteObjectFromSecurityGroupCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1619,11 +1619,11 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
public delegate void AddUserToSecurityGroupCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
|
||||
public delegate void AddObjectToSecurityGroupCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
public delegate void DeleteUserFromSecurityGroupCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
|
||||
public delegate void DeleteObjectFromSecurityGroupCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
|
|
|
@ -135,15 +135,15 @@ namespace WebsitePanel.Server
|
|||
}
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public void AddUserToSecurityGroup(string organizationId, string loginName, string groupName)
|
||||
public void AddObjectToSecurityGroup(string organizationId, string accountName, string groupName)
|
||||
{
|
||||
Organization.AddUserToSecurityGroup(organizationId, loginName, groupName);
|
||||
Organization.AddObjectToSecurityGroup(organizationId, accountName, groupName);
|
||||
}
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public void DeleteUserFromSecurityGroup(string organizationId, string loginName, string groupName)
|
||||
public void DeleteObjectFromSecurityGroup(string organizationId, string accountName, string groupName)
|
||||
{
|
||||
Organization.DeleteUserFromSecurityGroup(organizationId, loginName, groupName);
|
||||
Organization.DeleteObjectFromSecurityGroup(organizationId, accountName, groupName);
|
||||
}
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
|
|
|
@ -548,6 +548,7 @@
|
|||
<Control key="secur_groups" src="WebsitePanel/ExchangeServer/OrganizationSecurityGroups.ascx" title="OrganizationSecurityGroups" type="View" />
|
||||
<Control key="create_secur_group" src="WebsitePanel/ExchangeServer/OrganizationCreateSecurityGroup.ascx" title="OrganizationSecurityGroup" type="View" />
|
||||
<Control key="secur_group_settings" src="WebsitePanel/ExchangeServer/OrganizationSecurityGroupGeneralSettings.ascx" title="OrganizationSecurityGroup" type="View" />
|
||||
<Control key="secur_group_memberof" src="WebsitePanel/ExchangeServer/OrganizationSecurityGroupMemberOf.ascx" title="OrganizationSecurityGroupMemberOf" type="View" />
|
||||
|
||||
</Controls>
|
||||
</ModuleDefinition>
|
||||
|
|
|
@ -5341,4 +5341,22 @@
|
|||
<data name="WarningDescription.PHONE_EDIT_LIST_EMPTY_ERROR" xml:space="preserve">
|
||||
<value>At least one Phone number must be selected.</value>
|
||||
</data>
|
||||
<data name="Quota.Lync.PhoneNumbers" xml:space="preserve">
|
||||
<value>Phone Numbers per Organization</value>
|
||||
</data>
|
||||
<data name="Error.ORGANIZATION_CREATE_USER" xml:space="preserve">
|
||||
<value>Error creating user. See audit log for more details.</value>
|
||||
</data>
|
||||
<data name="Error.ORGANIZATION_CREATE_SECURITY_GROUP" xml:space="preserve">
|
||||
<value>Error creating security group. See audit log for more details.</value>
|
||||
</data>
|
||||
<data name="Error.ORGANIZATION_GET_SECURITY_GROUP_SETTINGS" xml:space="preserve">
|
||||
<value>Error reading group settings</value>
|
||||
</data>
|
||||
<data name="Error.ORGANIZATION_UPDATE_SECURITY_GROUP_SETTINGS" xml:space="preserve">
|
||||
<value>Error updating group settings</value>
|
||||
</data>
|
||||
<data name="Success.ORGANIZATION_UPDATE_SECURITY_GROUP_SETTINGS" xml:space="preserve">
|
||||
<value>Group general settings have been successfully updated.</value>
|
||||
</data>
|
||||
</root>
|
|
@ -198,4 +198,7 @@
|
|||
<data name="lblOrganizations.Text" xml:space="preserve">
|
||||
<value>Organizations:</value>
|
||||
</data>
|
||||
<data name="lblLyncPhone.Text" xml:space="preserve">
|
||||
<value>Lync Phone Numbers:</value>
|
||||
</data>
|
||||
</root>
|
|
@ -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="btnSave.OnClientClick" xml:space="preserve">
|
||||
<value>ShowProgressDialog('Updating...');</value>
|
||||
</data>
|
||||
<data name="btnSave.Text" xml:space="preserve">
|
||||
<value>Save Changes</value>
|
||||
</data>
|
||||
<data name="locTitle.Text" xml:space="preserve">
|
||||
<value>Edit Group </value>
|
||||
</data>
|
||||
<data name="secGeneral.Text" xml:space="preserve">
|
||||
<value>General</value>
|
||||
</data>
|
||||
<data name="Text.PageName" xml:space="preserve">
|
||||
<value>Groups</value>
|
||||
</data>
|
||||
</root>
|
|
@ -2,7 +2,7 @@
|
|||
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
|
||||
<%@ Register Src="UserControls/AccountsList.ascx" TagName="AccountsList" TagPrefix="wsp" %>
|
||||
<%@ Register Src="UserControls/MailboxSelector.ascx" TagName="MailboxSelector" TagPrefix="wsp" %>
|
||||
<%@ Register Src="UserControls/DistributionListTabs.ascx" TagName="DistributionListTabs" TagPrefix="wsp" %>
|
||||
<%@ Register Src="UserControls/SecurityGroupTabs.ascx" TagName="SecurityGroupTabs" TagPrefix="wsp" %>
|
||||
<%@ Register Src="UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %>
|
||||
<%@ Register Src="UserControls/Breadcrumb.ascx" TagName="Breadcrumb" TagPrefix="wsp" %>
|
||||
<%@ Register TagPrefix="wsp" TagName="CollapsiblePanel" Src="../UserControls/CollapsiblePanel.ascx" %>
|
||||
|
@ -27,19 +27,20 @@
|
|||
<asp:Literal ID="litDisplayName" runat="server" Text="John Smith" />
|
||||
</div>
|
||||
<div class="FormBody">
|
||||
<wsp:DistributionListTabs id="tabs" runat="server" SelectedTab="dlist_memberof" />
|
||||
<wsp:SecurityGroupTabs id="tabs" runat="server" SelectedTab="secur_group_memberof" />
|
||||
<wsp:SimpleMessageBox id="messageBox" runat="server" />
|
||||
|
||||
<wsp:CollapsiblePanel id="secDistributionLists" runat="server" TargetControlID="DistributionLists" meta:resourcekey="secDistributionLists" Text="Distribution Lists"></wsp:CollapsiblePanel>
|
||||
<asp:Panel ID="DistributionLists" runat="server" Height="0" style="overflow:hidden;">
|
||||
<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="distrlists" runat="server"
|
||||
<wsp:AccountsList id="groups" runat="server"
|
||||
MailboxesEnabled="false"
|
||||
EnableMailboxOnly="true"
|
||||
ContactsEnabled="false"
|
||||
DistributionListsEnabled="true" />
|
||||
DistributionListsEnabled="true"
|
||||
SecurityGroupsEnabled="true" />
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
|
|
@ -67,7 +67,20 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
|
||||
ExchangeAccount[] dLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
|
||||
distrlists.SetAccounts(dLists);
|
||||
ExchangeAccount[] secGroups = ES.Services.Organizations.GetSecurityGroupsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
|
||||
List<ExchangeAccount> groupsList = new List<ExchangeAccount>();
|
||||
foreach (ExchangeAccount distList in dLists)
|
||||
{
|
||||
groupsList.Add(distList);
|
||||
}
|
||||
|
||||
foreach (ExchangeAccount secGroup in secGroups)
|
||||
{
|
||||
groupsList.Add(secGroup);
|
||||
}
|
||||
|
||||
groups.SetAccounts(groupsList.ToArray());
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
@ -83,18 +96,53 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
|
||||
try
|
||||
{
|
||||
ExchangeAccount[] oldDistributionLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
List<string> newDistributionLists = new List<string>(distrlists.GetAccounts());
|
||||
foreach (ExchangeAccount oldlist in oldDistributionLists)
|
||||
ExchangeAccount[] oldSecGroups = ES.Services.Organizations.GetSecurityGroupsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
ExchangeAccount[] oldDistLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
|
||||
IList<ExchangeAccount> oldGroups = new List<ExchangeAccount>();
|
||||
foreach (ExchangeAccount distList in oldSecGroups)
|
||||
{
|
||||
if (newDistributionLists.Contains(oldlist.AccountName))
|
||||
newDistributionLists.Remove(oldlist.AccountName);
|
||||
else
|
||||
ES.Services.ExchangeServer.DeleteDistributionListMember(PanelRequest.ItemID, oldlist.AccountName, PanelRequest.AccountID);
|
||||
oldGroups.Add(distList);
|
||||
}
|
||||
|
||||
foreach (string newlist in newDistributionLists)
|
||||
ES.Services.ExchangeServer.AddDistributionListMember(PanelRequest.ItemID, newlist, PanelRequest.AccountID);
|
||||
foreach (ExchangeAccount secGroup in oldDistLists)
|
||||
{
|
||||
oldGroups.Add(secGroup);
|
||||
}
|
||||
|
||||
IDictionary<string, ExchangeAccountType> newGroups = groups.GetFullAccounts();
|
||||
foreach (ExchangeAccount oldGroup in oldGroups)
|
||||
{
|
||||
if (newGroups.ContainsKey(oldGroup.AccountName))
|
||||
{
|
||||
newGroups.Remove(oldGroup.AccountName);
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (oldGroup.AccountType)
|
||||
{
|
||||
case ExchangeAccountType.DistributionList:
|
||||
ES.Services.ExchangeServer.DeleteDistributionListMember(PanelRequest.ItemID, oldGroup.AccountName, PanelRequest.AccountID);
|
||||
break;
|
||||
case ExchangeAccountType.SecurityGroup:
|
||||
ES.Services.Organizations.DeleteObjectFromSecurityGroup(PanelRequest.ItemID, PanelRequest.AccountID, oldGroup.AccountName);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (KeyValuePair<string, ExchangeAccountType> newGroup in newGroups)
|
||||
{
|
||||
switch (newGroup.Value)
|
||||
{
|
||||
case ExchangeAccountType.DistributionList:
|
||||
ES.Services.ExchangeServer.AddDistributionListMember(PanelRequest.ItemID, newGroup.Key, PanelRequest.AccountID);
|
||||
break;
|
||||
case ExchangeAccountType.SecurityGroup:
|
||||
ES.Services.Organizations.AddObjectToSecurityGroup(PanelRequest.ItemID, PanelRequest.AccountID, newGroup.Key);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
messageBox.ShowSuccessMessage("EXCHANGE_UPDATE_DLIST_SETTINGS");
|
||||
BindSettings();
|
||||
|
|
|
@ -1,3 +1,31 @@
|
|||
// Copyright (c) 2012, Outercurve Foundation.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// - Redistributions of source code must retain the above copyright notice, this
|
||||
// list of conditions and the following disclaimer.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
|
@ -73,7 +101,7 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.DistributionListTabs tabs;
|
||||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.SecurityGroupTabs tabs;
|
||||
|
||||
/// <summary>
|
||||
/// messageBox control.
|
||||
|
@ -85,22 +113,22 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
|
||||
|
||||
/// <summary>
|
||||
/// secDistributionLists control.
|
||||
/// 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 secDistributionLists;
|
||||
protected global::WebsitePanel.Portal.CollapsiblePanel secGroups;
|
||||
|
||||
/// <summary>
|
||||
/// DistributionLists control.
|
||||
/// 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 DistributionLists;
|
||||
protected global::System.Web.UI.WebControls.Panel GroupsPanel;
|
||||
|
||||
/// <summary>
|
||||
/// GeneralUpdatePanel control.
|
||||
|
@ -112,13 +140,13 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
protected global::System.Web.UI.UpdatePanel GeneralUpdatePanel;
|
||||
|
||||
/// <summary>
|
||||
/// distrlists control.
|
||||
/// 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 distrlists;
|
||||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.AccountsList groups;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave control.
|
||||
|
|
|
@ -32,16 +32,17 @@
|
|||
<wsp:MailboxTabs id="tabs" runat="server" SelectedTab="mailbox_memberof" />
|
||||
<wsp:SimpleMessageBox id="messageBox" runat="server" />
|
||||
|
||||
<wsp:CollapsiblePanel id="secDistributionLists" runat="server" TargetControlID="DistributionLists" meta:resourcekey="secDistributionLists" Text="Distribution Lists"></wsp:CollapsiblePanel>
|
||||
<asp:Panel ID="DistributionLists" runat="server" Height="0" style="overflow:hidden;">
|
||||
<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="distrlists" runat="server"
|
||||
<wsp:AccountsList id="groups" runat="server"
|
||||
MailboxesEnabled="false"
|
||||
EnableMailboxOnly="true"
|
||||
ContactsEnabled="false"
|
||||
DistributionListsEnabled="true" />
|
||||
DistributionListsEnabled="true"
|
||||
SecurityGroupsEnabled="true" />
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
|
|
@ -59,10 +59,24 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
|
||||
// title
|
||||
litDisplayName.Text = mailbox.DisplayName;
|
||||
|
||||
//Distribution Lists
|
||||
ExchangeAccount[] dLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
|
||||
distrlists.SetAccounts(dLists);
|
||||
//Security Groups
|
||||
ExchangeAccount[] securGroups = ES.Services.Organizations.GetSecurityGroupsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
|
||||
List<ExchangeAccount> groupsList = new List<ExchangeAccount>();
|
||||
foreach (ExchangeAccount distList in dLists)
|
||||
{
|
||||
groupsList.Add(distList);
|
||||
}
|
||||
|
||||
foreach (ExchangeAccount secGroup in securGroups)
|
||||
{
|
||||
groupsList.Add(secGroup);
|
||||
}
|
||||
|
||||
groups.SetAccounts(groupsList.ToArray());
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
@ -78,18 +92,53 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
|
||||
try
|
||||
{
|
||||
ExchangeAccount[] oldDistributionLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
List<string> newDistributionLists = new List<string>(distrlists.GetAccounts());
|
||||
foreach (ExchangeAccount oldlist in oldDistributionLists)
|
||||
ExchangeAccount[] oldSecGroups = ES.Services.Organizations.GetSecurityGroupsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
ExchangeAccount[] oldDistLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
|
||||
IList<ExchangeAccount> oldGroups = new List<ExchangeAccount>();
|
||||
foreach (ExchangeAccount distList in oldSecGroups)
|
||||
{
|
||||
if (newDistributionLists.Contains(oldlist.AccountName))
|
||||
newDistributionLists.Remove(oldlist.AccountName);
|
||||
else
|
||||
ES.Services.ExchangeServer.DeleteDistributionListMember(PanelRequest.ItemID, oldlist.AccountName, PanelRequest.AccountID);
|
||||
oldGroups.Add(distList);
|
||||
}
|
||||
|
||||
foreach (string newlist in newDistributionLists)
|
||||
ES.Services.ExchangeServer.AddDistributionListMember(PanelRequest.ItemID, newlist, PanelRequest.AccountID);
|
||||
foreach (ExchangeAccount secGroup in oldDistLists)
|
||||
{
|
||||
oldGroups.Add(secGroup);
|
||||
}
|
||||
|
||||
IDictionary<string, ExchangeAccountType> newGroups = groups.GetFullAccounts();
|
||||
foreach (ExchangeAccount oldGroup in oldGroups)
|
||||
{
|
||||
if (newGroups.ContainsKey(oldGroup.AccountName))
|
||||
{
|
||||
newGroups.Remove(oldGroup.AccountName);
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (oldGroup.AccountType)
|
||||
{
|
||||
case ExchangeAccountType.DistributionList:
|
||||
ES.Services.ExchangeServer.DeleteDistributionListMember(PanelRequest.ItemID, oldGroup.AccountName, PanelRequest.AccountID);
|
||||
break;
|
||||
case ExchangeAccountType.SecurityGroup:
|
||||
ES.Services.Organizations.DeleteObjectFromSecurityGroup(PanelRequest.ItemID, PanelRequest.AccountID, oldGroup.AccountName);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (KeyValuePair<string, ExchangeAccountType> newGroup in newGroups)
|
||||
{
|
||||
switch (newGroup.Value)
|
||||
{
|
||||
case ExchangeAccountType.DistributionList:
|
||||
ES.Services.ExchangeServer.AddDistributionListMember(PanelRequest.ItemID, newGroup.Key, PanelRequest.AccountID);
|
||||
break;
|
||||
case ExchangeAccountType.SecurityGroup:
|
||||
ES.Services.Organizations.AddObjectToSecurityGroup(PanelRequest.ItemID, PanelRequest.AccountID, newGroup.Key);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
messageBox.ShowSuccessMessage("EXCHANGE_UPDATE_MAILBOX_SETTINGS");
|
||||
BindSettings();
|
||||
|
@ -104,7 +153,5 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
{
|
||||
SaveSettings();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
|
@ -1,3 +1,31 @@
|
|||
// Copyright (c) 2012, Outercurve Foundation.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// - Redistributions of source code must retain the above copyright notice, this
|
||||
// list of conditions and the following disclaimer.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
|
@ -85,22 +113,22 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
|
||||
|
||||
/// <summary>
|
||||
/// secDistributionLists control.
|
||||
/// 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 secDistributionLists;
|
||||
protected global::WebsitePanel.Portal.CollapsiblePanel secGroups;
|
||||
|
||||
/// <summary>
|
||||
/// DistributionLists control.
|
||||
/// 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 DistributionLists;
|
||||
protected global::System.Web.UI.WebControls.Panel GroupsPanel;
|
||||
|
||||
/// <summary>
|
||||
/// GeneralUpdatePanel control.
|
||||
|
@ -112,13 +140,13 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
protected global::System.Web.UI.UpdatePanel GeneralUpdatePanel;
|
||||
|
||||
/// <summary>
|
||||
/// distrlists control.
|
||||
/// 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 distrlists;
|
||||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.AccountsList groups;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave control.
|
||||
|
|
|
@ -128,7 +128,7 @@ namespace WebsitePanel.Portal.HostedSolution
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
messageBox.ShowErrorMessage("EXCHANGE_CREATE_MAILBOX", ex);
|
||||
messageBox.ShowErrorMessage("ORGANIZATION_CREATE_USER", ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -76,6 +76,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
members.Enabled = false;
|
||||
|
||||
btnSave.Visible = false;
|
||||
tabs.IsDefault = true;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
|
@ -0,0 +1,59 @@
|
|||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="OrganizationSecurityGroupMemberOf.ascx.cs" Inherits="WebsitePanel.Portal.HostedSolution.OrganizationSecurityGroupMemberOf" %>
|
||||
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
|
||||
|
||||
<%@ Register Src="../UserControls/CollapsiblePanel.ascx" TagName="CollapsiblePanel" TagPrefix="wsp" %>
|
||||
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
|
||||
<%@ Register Src="UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %>
|
||||
<%@ Register Src="UserControls/Breadcrumb.ascx" TagName="Breadcrumb" TagPrefix="wsp" %>
|
||||
<%@ Register Src="UserControls/AccountsList.ascx" TagName="AccountsList" TagPrefix="wsp" %>
|
||||
<%@ Register Src="UserControls/SecurityGroupTabs.ascx" TagName="SecurityGroupTabs" TagPrefix="wsp"%>
|
||||
|
||||
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
|
||||
|
||||
<div id="ExchangeContainer">
|
||||
<div class="Module">
|
||||
<div class="Header">
|
||||
<wsp:Breadcrumb id="breadcrumb" runat="server" PageName="Text.PageName" />
|
||||
</div>
|
||||
<div class="Left">
|
||||
<wsp:Menu id="menu" runat="server" SelectedItem="mailboxes" />
|
||||
</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">
|
||||
<wsp:SecurityGroupTabs id="tabs" runat="server" SelectedTab="secur_group_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"
|
||||
MailboxesEnabled="false"
|
||||
EnableMailboxOnly="true"
|
||||
ContactsEnabled="false"
|
||||
DistributionListsEnabled="true"
|
||||
SecurityGroupsEnabled="true" />
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Panel>
|
||||
|
||||
<div class="FormFooterClean">
|
||||
<asp:Button id="btnSave" runat="server" Text="Save Changes" CssClass="Button1"
|
||||
meta:resourcekey="btnSave" ValidationGroup="EditMailbox" OnClick="btnSave_Click"></asp:Button>
|
||||
<asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True" ShowSummary="False" ValidationGroup="EditMailbox" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,140 @@
|
|||
// Copyright (c) 2012, Outercurve Foundation.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// - Redistributions of source code must retain the above copyright notice, this
|
||||
// list of conditions and the following disclaimer.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
using System;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Collections.Generic;
|
||||
using WebsitePanel.EnterpriseServer;
|
||||
using WebsitePanel.Providers.HostedSolution;
|
||||
using WebsitePanel.Providers.ResultObjects;
|
||||
|
||||
namespace WebsitePanel.Portal.HostedSolution
|
||||
{
|
||||
public partial class OrganizationSecurityGroupMemberOf : WebsitePanelModuleBase
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
BindSettings();
|
||||
}
|
||||
}
|
||||
|
||||
private void BindSettings()
|
||||
{
|
||||
try
|
||||
{
|
||||
// get settings
|
||||
OrganizationSecurityGroup group = ES.Services.Organizations.GetSecurityGroupGeneralSettings(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
|
||||
litDisplayName.Text = group.DisplayName;
|
||||
|
||||
//Distribution Lists
|
||||
ExchangeAccount[] dLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
|
||||
//Security Groups
|
||||
ExchangeAccount[] securGroups = ES.Services.Organizations.GetSecurityGroupsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
|
||||
List<ExchangeAccount> groupsList = new List<ExchangeAccount>();
|
||||
foreach (ExchangeAccount distList in dLists)
|
||||
{
|
||||
groupsList.Add(distList);
|
||||
}
|
||||
|
||||
foreach (ExchangeAccount secGroup in securGroups)
|
||||
{
|
||||
groupsList.Add(secGroup);
|
||||
}
|
||||
|
||||
groups.SetAccounts(groupsList.ToArray());
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
messageBox.ShowErrorMessage("ORGANIZATION_GET_GROUP_SETTINGS", ex);
|
||||
}
|
||||
}
|
||||
|
||||
private void SaveSettings()
|
||||
{
|
||||
if (!Page.IsValid)
|
||||
return;
|
||||
|
||||
try
|
||||
{
|
||||
ExchangeAccount[] oldSecGroups = ES.Services.Organizations.GetSecurityGroupsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
ExchangeAccount[] oldDistLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
|
||||
IList<ExchangeAccount> oldGroups = new List<ExchangeAccount>();
|
||||
foreach (ExchangeAccount distList in oldSecGroups)
|
||||
{
|
||||
oldGroups.Add(distList);
|
||||
}
|
||||
|
||||
foreach (ExchangeAccount secGroup in oldDistLists)
|
||||
{
|
||||
oldGroups.Add(secGroup);
|
||||
}
|
||||
|
||||
IDictionary<string, ExchangeAccountType> newGroups = groups.GetFullAccounts();
|
||||
foreach (ExchangeAccount oldGroup in oldGroups)
|
||||
{
|
||||
if (newGroups.ContainsKey(oldGroup.AccountName))
|
||||
{
|
||||
newGroups.Remove(oldGroup.AccountName);
|
||||
}
|
||||
else
|
||||
{
|
||||
ES.Services.Organizations.DeleteObjectFromSecurityGroup(PanelRequest.ItemID, PanelRequest.AccountID, oldGroup.AccountName);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (KeyValuePair<string, ExchangeAccountType> newGroup in newGroups)
|
||||
{
|
||||
ES.Services.Organizations.AddObjectToSecurityGroup(PanelRequest.ItemID, PanelRequest.AccountID, newGroup.Key);
|
||||
}
|
||||
|
||||
messageBox.ShowSuccessMessage("ORGANIZATION_UPDATE_SECURITY_GROUP_SETTINGS");
|
||||
|
||||
|
||||
BindSettings();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
messageBox.ShowErrorMessage("ORGANIZATION_UPDATE_SECURITY_GROUP_SETTINGS", ex);
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
SaveSettings();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,169 @@
|
|||
// Copyright (c) 2012, Outercurve Foundation.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// - Redistributions of source code must retain the above copyright notice, this
|
||||
// list of conditions and the following disclaimer.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// 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 OrganizationSecurityGroupMemberOf {
|
||||
|
||||
/// <summary>
|
||||
/// asyncTasks control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks;
|
||||
|
||||
/// <summary>
|
||||
/// breadcrumb control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Breadcrumb breadcrumb;
|
||||
|
||||
/// <summary>
|
||||
/// menu control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Menu menu;
|
||||
|
||||
/// <summary>
|
||||
/// Image1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Image Image1;
|
||||
|
||||
/// <summary>
|
||||
/// locTitle control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize locTitle;
|
||||
|
||||
/// <summary>
|
||||
/// litDisplayName control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Literal litDisplayName;
|
||||
|
||||
/// <summary>
|
||||
/// tabs 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.SecurityGroupTabs 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>
|
||||
/// 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;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// ValidationSummary1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.ValidationSummary ValidationSummary1;
|
||||
}
|
||||
}
|
|
@ -43,27 +43,17 @@
|
|||
<uc1:MailboxTabs ID="MailboxTabsId" runat="server" SelectedTab="user_memberof" />
|
||||
<wsp:SimpleMessageBox id="messageBox" runat="server" />
|
||||
|
||||
<wsp:CollapsiblePanel id="secDistributionLists" runat="server" TargetControlID="DistributionListsPanel" meta:resourcekey="secDistributionLists" Text="Distribution Lists"></wsp:CollapsiblePanel>
|
||||
<asp:Panel ID="DistributionListsPanel" runat="server" Height="0" style="overflow:hidden;">
|
||||
<asp:UpdatePanel ID="DLGeneralUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
|
||||
<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="distrlists" runat="server"
|
||||
<wsp:AccountsList id="groups" runat="server"
|
||||
MailboxesEnabled="false"
|
||||
EnableMailboxOnly="true"
|
||||
ContactsEnabled="false"
|
||||
DistributionListsEnabled="true" />
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Panel>
|
||||
|
||||
<wsp:CollapsiblePanel id="secSecurityGroups" runat="server" TargetControlID="SecurityGroupsPanel" meta:resourcekey="secSecurityGroups" Text="Groups"></wsp:CollapsiblePanel>
|
||||
<asp:Panel ID="SecurityGroupsPanel" runat="server" Height="0" style="overflow:hidden;">
|
||||
<asp:UpdatePanel ID="SCGeneralUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
|
||||
<ContentTemplate>
|
||||
|
||||
<wsp:GroupsList id="securegroups" runat="server" />
|
||||
DistributionListsEnabled="true"
|
||||
SecurityGroupsEnabled="true" />
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
|
|
@ -44,6 +44,7 @@ namespace WebsitePanel.Portal.HostedSolution
|
|||
BindSettings();
|
||||
|
||||
MailboxTabsId.Visible = (PanelRequest.Context == "Mailbox");
|
||||
|
||||
UserTabsId.Visible = (PanelRequest.Context == "User");
|
||||
}
|
||||
}
|
||||
|
@ -53,26 +54,37 @@ namespace WebsitePanel.Portal.HostedSolution
|
|||
try
|
||||
{
|
||||
// get settings
|
||||
ExchangeMailbox mailbox = ES.Services.ExchangeServer.GetMailboxGeneralSettings(PanelRequest.ItemID,
|
||||
PanelRequest.AccountID);
|
||||
OrganizationUser user = ES.Services.Organizations.GetUserGeneralSettings(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
|
||||
// title
|
||||
litDisplayName.Text = mailbox.DisplayName;
|
||||
groups.DistributionListsEnabled = (user.AccountType == ExchangeAccountType.Mailbox
|
||||
|| user.AccountType == ExchangeAccountType.Room
|
||||
|| user.AccountType == ExchangeAccountType.Equipment);
|
||||
|
||||
litDisplayName.Text = user.DisplayName;
|
||||
|
||||
//Distribution Lists
|
||||
ExchangeAccount[] dLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
|
||||
distrlists.SetAccounts(dLists);
|
||||
|
||||
//Security Groups
|
||||
ExchangeAccount[] securGroups = ES.Services.Organizations.GetSecurityGroupsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
|
||||
securegroups.SetAccounts(securGroups);
|
||||
List<ExchangeAccount> groupsList = new List<ExchangeAccount>();
|
||||
foreach (ExchangeAccount distList in dLists)
|
||||
{
|
||||
groupsList.Add(distList);
|
||||
}
|
||||
|
||||
foreach (ExchangeAccount secGroup in securGroups)
|
||||
{
|
||||
groupsList.Add(secGroup);
|
||||
}
|
||||
|
||||
groups.SetAccounts(groupsList.ToArray());
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
messageBox.ShowErrorMessage("EXCHANGE_GET_MAILBOX_SETTINGS", ex);
|
||||
messageBox.ShowErrorMessage("ORGANIZATION_GET_USER_SETTINGS", ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -83,48 +95,62 @@ namespace WebsitePanel.Portal.HostedSolution
|
|||
|
||||
try
|
||||
{
|
||||
//Distribution Lists
|
||||
ExchangeAccount[] oldDistributionLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
List<string> newDistributionLists = new List<string>(distrlists.GetAccounts());
|
||||
foreach (ExchangeAccount oldlist in oldDistributionLists)
|
||||
ExchangeAccount[] oldSecGroups = ES.Services.Organizations.GetSecurityGroupsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
ExchangeAccount[] oldDistLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
|
||||
IList<ExchangeAccount> oldGroups = new List<ExchangeAccount>();
|
||||
foreach (ExchangeAccount distList in oldSecGroups)
|
||||
{
|
||||
if (newDistributionLists.Contains(oldlist.AccountName))
|
||||
newDistributionLists.Remove(oldlist.AccountName);
|
||||
else
|
||||
ES.Services.ExchangeServer.DeleteDistributionListMember(PanelRequest.ItemID, oldlist.AccountName, PanelRequest.AccountID);
|
||||
oldGroups.Add(distList);
|
||||
}
|
||||
|
||||
foreach (string newlist in newDistributionLists)
|
||||
ES.Services.ExchangeServer.AddDistributionListMember(PanelRequest.ItemID, newlist, PanelRequest.AccountID);
|
||||
foreach (ExchangeAccount secGroup in oldDistLists)
|
||||
{
|
||||
oldGroups.Add(secGroup);
|
||||
}
|
||||
|
||||
//Security Groups
|
||||
ExchangeAccount[] oldDSecurityGroups = ES.Services.Organizations.GetSecurityGroupsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
List<string> newSecurityGroups = new List<string>(securegroups.GetAccounts());
|
||||
foreach (ExchangeAccount oldgroup in oldDSecurityGroups)
|
||||
IDictionary<string, ExchangeAccountType> newGroups = groups.GetFullAccounts();
|
||||
foreach (ExchangeAccount oldGroup in oldGroups)
|
||||
{
|
||||
if (newSecurityGroups.Contains(oldgroup.AccountName))
|
||||
if (newGroups.ContainsKey(oldGroup.AccountName))
|
||||
{
|
||||
newSecurityGroups.Remove(oldgroup.AccountName);
|
||||
newGroups.Remove(oldGroup.AccountName);
|
||||
}
|
||||
else
|
||||
{
|
||||
ES.Services.Organizations.DeleteUserFromSecurityGroup(PanelRequest.ItemID, PanelRequest.AccountID, oldgroup.AccountName);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (string newgroup in newSecurityGroups)
|
||||
switch (oldGroup.AccountType)
|
||||
{
|
||||
ES.Services.Organizations.AddUserToSecurityGroup(PanelRequest.ItemID, PanelRequest.AccountID, newgroup);
|
||||
case ExchangeAccountType.DistributionList:
|
||||
ES.Services.ExchangeServer.DeleteDistributionListMember(PanelRequest.ItemID, oldGroup.AccountName, PanelRequest.AccountID);
|
||||
break;
|
||||
case ExchangeAccountType.SecurityGroup:
|
||||
ES.Services.Organizations.DeleteObjectFromSecurityGroup(PanelRequest.ItemID, PanelRequest.AccountID, oldGroup.AccountName);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
messageBox.ShowSuccessMessage("EXCHANGE_UPDATE_MAILBOX_SETTINGS");
|
||||
foreach (KeyValuePair<string, ExchangeAccountType> newGroup in newGroups)
|
||||
{
|
||||
switch (newGroup.Value)
|
||||
{
|
||||
case ExchangeAccountType.DistributionList:
|
||||
ES.Services.ExchangeServer.AddDistributionListMember(PanelRequest.ItemID, newGroup.Key, PanelRequest.AccountID);
|
||||
break;
|
||||
case ExchangeAccountType.SecurityGroup:
|
||||
ES.Services.Organizations.AddObjectToSecurityGroup(PanelRequest.ItemID, PanelRequest.AccountID, newGroup.Key);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
messageBox.ShowSuccessMessage("ORGANIZATION_UPDATE_USER_SETTINGS");
|
||||
|
||||
|
||||
BindSettings();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
messageBox.ShowErrorMessage("EXCHANGE_UPDATE_MAILBOX_SETTINGS", ex);
|
||||
messageBox.ShowErrorMessage("ORGANIZATION_UPDATE_USER_SETTINGS", ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -123,76 +123,40 @@ namespace WebsitePanel.Portal.HostedSolution {
|
|||
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
|
||||
|
||||
/// <summary>
|
||||
/// secDistributionLists control.
|
||||
/// 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 secDistributionLists;
|
||||
protected global::WebsitePanel.Portal.CollapsiblePanel secGroups;
|
||||
|
||||
/// <summary>
|
||||
/// DistributionListsPanel control.
|
||||
/// 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 DistributionListsPanel;
|
||||
protected global::System.Web.UI.WebControls.Panel GroupsPanel;
|
||||
|
||||
/// <summary>
|
||||
/// DLGeneralUpdatePanel control.
|
||||
/// 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 DLGeneralUpdatePanel;
|
||||
protected global::System.Web.UI.UpdatePanel GeneralUpdatePanel;
|
||||
|
||||
/// <summary>
|
||||
/// distrlists control.
|
||||
/// 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 distrlists;
|
||||
|
||||
/// <summary>
|
||||
/// secSecurityGroups control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.CollapsiblePanel secSecurityGroups;
|
||||
|
||||
/// <summary>
|
||||
/// SecurityGroupsPanel 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 SecurityGroupsPanel;
|
||||
|
||||
/// <summary>
|
||||
/// SCGeneralUpdatePanel 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 SCGeneralUpdatePanel;
|
||||
|
||||
/// <summary>
|
||||
/// securegroups 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.GroupsList securegroups;
|
||||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.AccountsList groups;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave control.
|
||||
|
|
|
@ -37,6 +37,13 @@
|
|||
<asp:Literal ID="litPrimaryEmailAddress" runat="server" Text='<%# Eval("PrimaryEmailAddress") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField meta:resourcekey="gvAccountsAccountType" HeaderText="gvAccountsAccountType">
|
||||
<HeaderStyle Wrap="false" />
|
||||
<ItemStyle Width="50%" Wrap="false"></ItemStyle>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="litType" runat="server" Text='<%# GetType((int)Eval("AccountType")) %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
|
@ -69,6 +76,8 @@
|
|||
meta:resourcekey="chkIncludeContacts" AutoPostBack="true" CssClass="Normal" OnCheckedChanged="chkIncludeMailboxes_CheckedChanged" />
|
||||
<asp:CheckBox ID="chkIncludeLists" runat="server" Text="Distribution Lists" Checked="true"
|
||||
meta:resourcekey="chkIncludeLists" AutoPostBack="true" CssClass="Normal" OnCheckedChanged="chkIncludeMailboxes_CheckedChanged" />
|
||||
<asp:CheckBox ID="chkIncludeGroups" runat="server" Text="Groups" Checked="true"
|
||||
meta:resourcekey="chkIncludeGroups" AutoPostBack="true" CssClass="Normal" OnCheckedChanged="chkIncludeMailboxes_CheckedChanged" />
|
||||
</div>
|
||||
<div class="FormButtonsBarClean">
|
||||
<div class="FormButtonsBarCleanRight">
|
||||
|
@ -109,6 +118,12 @@
|
|||
<asp:Literal ID="litPrimaryEmailAddress" runat="server" Text='<%# Eval("PrimaryEmailAddress") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField meta:resourcekey="gvAccountsAccountType" HeaderText="gvAccountsAccountType">
|
||||
<ItemStyle Width="50%"></ItemStyle>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="litType" runat="server" Text='<%# GetType((int)Eval("AccountType")) %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
@ -67,6 +68,12 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
set { ViewState["DistributionListsEnabled"] = value; }
|
||||
}
|
||||
|
||||
public bool SecurityGroupsEnabled
|
||||
{
|
||||
get { return ViewState["SecurityGroupsEnabled"] != null ? (bool)ViewState["SecurityGroupsEnabled"] : false; }
|
||||
set { ViewState["SecurityGroupsEnabled"] = value; }
|
||||
}
|
||||
|
||||
public int ExcludeAccountId
|
||||
{
|
||||
get { return PanelRequest.AccountID; }
|
||||
|
@ -89,6 +96,21 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
return accountNames.ToArray();
|
||||
}
|
||||
|
||||
public IDictionary<string, ExchangeAccountType> GetFullAccounts()
|
||||
{
|
||||
// get selected accounts
|
||||
List<ExchangeAccount> selectedAccounts = GetGridViewAccounts(gvAccounts, SelectedState.All);
|
||||
|
||||
IDictionary<string, ExchangeAccountType> accounts = new Dictionary<string, ExchangeAccountType>();
|
||||
|
||||
foreach (ExchangeAccount account in selectedAccounts)
|
||||
{
|
||||
accounts.Add(account.AccountName, account.AccountType);
|
||||
}
|
||||
|
||||
return accounts;
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
// toggle controls
|
||||
|
@ -109,6 +131,11 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
chkIncludeContacts.Checked = ContactsEnabled;
|
||||
chkIncludeLists.Visible = DistributionListsEnabled;
|
||||
chkIncludeLists.Checked = DistributionListsEnabled;
|
||||
|
||||
chkIncludeGroups.Visible = SecurityGroupsEnabled;
|
||||
chkIncludeGroups.Checked = SecurityGroupsEnabled;
|
||||
|
||||
gvAccounts.Columns[3].Visible = gvPopupAccounts.Columns[3].Visible = SecurityGroupsEnabled;
|
||||
}
|
||||
|
||||
// register javascript
|
||||
|
@ -133,7 +160,9 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
string imgName = "mailbox_16.gif";
|
||||
if (accountType == ExchangeAccountType.Contact)
|
||||
imgName = "contact_16.gif";
|
||||
else if (accountType == ExchangeAccountType.DistributionList)
|
||||
else if (accountType == ExchangeAccountType.DistributionList
|
||||
|| accountType == ExchangeAccountType.SecurityGroup
|
||||
|| accountType == ExchangeAccountType.DefaultSecurityGroup)
|
||||
imgName = "dlist_16.gif";
|
||||
else if (accountType == ExchangeAccountType.Room)
|
||||
imgName = "room_16.gif";
|
||||
|
@ -143,6 +172,23 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
return GetThemedImage("Exchange/" + imgName);
|
||||
}
|
||||
|
||||
public string GetType(int accountTypeId)
|
||||
{
|
||||
ExchangeAccountType accountType = (ExchangeAccountType)accountTypeId;
|
||||
|
||||
switch(accountType)
|
||||
{
|
||||
case ExchangeAccountType.DistributionList:
|
||||
return "Distribution";
|
||||
case ExchangeAccountType.SecurityGroup:
|
||||
return "Security";
|
||||
case ExchangeAccountType.DefaultSecurityGroup:
|
||||
return "Default";
|
||||
default:
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
// bind all accounts
|
||||
|
@ -174,9 +220,14 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
{
|
||||
ExchangeAccount[] accounts = ES.Services.ExchangeServer.SearchAccounts(PanelRequest.ItemID,
|
||||
chkIncludeMailboxes.Checked, chkIncludeContacts.Checked, chkIncludeLists.Checked,
|
||||
chkIncludeRooms.Checked, chkIncludeEquipment.Checked,
|
||||
chkIncludeRooms.Checked, chkIncludeEquipment.Checked, chkIncludeGroups.Checked,
|
||||
ddlSearchColumn.SelectedValue, txtSearchValue.Text + "%", "");
|
||||
|
||||
if (SecurityGroupsEnabled)
|
||||
{
|
||||
accounts = accounts.Where(x => !GetAccounts().Contains(x.AccountName)).ToArray();
|
||||
}
|
||||
|
||||
if (ExcludeAccountId > 0)
|
||||
{
|
||||
List<ExchangeAccount> updatedAccounts = new List<ExchangeAccount>();
|
||||
|
@ -189,6 +240,11 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
|
||||
gvPopupAccounts.DataSource = accounts;
|
||||
gvPopupAccounts.DataBind();
|
||||
|
||||
if (gvPopupAccounts.Rows.Count > 0)
|
||||
{
|
||||
UpdateGridViewAccounts(gvPopupAccounts);
|
||||
}
|
||||
}
|
||||
|
||||
private void BindAccounts(ExchangeAccount[] newAccounts, bool preserveExisting)
|
||||
|
@ -224,6 +280,11 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
gvAccounts.DataSource = accounts;
|
||||
gvAccounts.DataBind();
|
||||
|
||||
if (gvAccounts.Rows.Count > 0)
|
||||
{
|
||||
UpdateGridViewAccounts(gvAccounts);
|
||||
}
|
||||
|
||||
btnDelete.Visible = gvAccounts.Rows.Count > 0;
|
||||
}
|
||||
|
||||
|
@ -251,6 +312,38 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
return accounts;
|
||||
}
|
||||
|
||||
private void UpdateGridViewAccounts(GridView gv)
|
||||
{
|
||||
CheckBox chkSelectAll = (CheckBox)gv.HeaderRow.FindControl("chkSelectAll");
|
||||
|
||||
for (int i = 0; i < gv.Rows.Count; i++)
|
||||
{
|
||||
GridViewRow row = gv.Rows[i];
|
||||
CheckBox chkSelect = (CheckBox)row.FindControl("chkSelect");
|
||||
if (chkSelect == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
ExchangeAccountType exAccountType = (ExchangeAccountType)Enum.Parse(typeof(ExchangeAccountType), ((Literal)row.FindControl("litAccountType")).Text);
|
||||
|
||||
if (exAccountType != ExchangeAccountType.DefaultSecurityGroup)
|
||||
{
|
||||
chkSelectAll = null;
|
||||
chkSelect.Enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
chkSelect.Enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (chkSelectAll != null)
|
||||
{
|
||||
chkSelectAll.Enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
protected void chkIncludeMailboxes_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
BindPopupAccounts();
|
||||
|
|
|
@ -1,7 +1,34 @@
|
|||
// Copyright (c) 2012, Outercurve Foundation.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// - Redistributions of source code must retain the above copyright notice, this
|
||||
// list of conditions and the following disclaimer.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.832
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
|
@ -11,12 +38,6 @@
|
|||
namespace WebsitePanel.Portal.ExchangeServer.UserControls {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// AccountsList class.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated class.
|
||||
/// </remarks>
|
||||
public partial class AccountsList {
|
||||
|
||||
/// <summary>
|
||||
|
@ -136,6 +157,15 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls {
|
|||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox chkIncludeLists;
|
||||
|
||||
/// <summary>
|
||||
/// chkIncludeGroups 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 chkIncludeGroups;
|
||||
|
||||
/// <summary>
|
||||
/// SearchPanel control.
|
||||
/// </summary>
|
||||
|
|
|
@ -184,7 +184,7 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
{
|
||||
ExchangeAccount[] accounts = ES.Services.ExchangeServer.SearchAccounts(PanelRequest.ItemID,
|
||||
chkIncludeMailboxes.Checked, chkIncludeContacts.Checked, chkIncludeLists.Checked,
|
||||
chkIncludeRooms.Checked, chkIncludeEquipment.Checked,
|
||||
chkIncludeRooms.Checked, chkIncludeEquipment.Checked, false,
|
||||
ddlSearchColumn.SelectedValue, txtSearchValue.Text + "%", "");
|
||||
|
||||
if (ExcludeAccountId > 0)
|
||||
|
|
|
@ -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="btnAdd.Text" xml:space="preserve">
|
||||
<value>Add...</value>
|
||||
|
@ -135,6 +135,9 @@
|
|||
<data name="chkIncludeEquipment.Text" xml:space="preserve">
|
||||
<value>Equipment</value>
|
||||
</data>
|
||||
<data name="chkIncludeGroups" xml:space="preserve">
|
||||
<value>Groups</value>
|
||||
</data>
|
||||
<data name="chkIncludeLists.Text" xml:space="preserve">
|
||||
<value>Distribution Lists</value>
|
||||
</data>
|
||||
|
@ -153,6 +156,9 @@
|
|||
<data name="gvAccounts.EmptyDataText" xml:space="preserve">
|
||||
<value>The list of accounts is empty. Click "Add..." button to add accounts.</value>
|
||||
</data>
|
||||
<data name="gvAccountsAccountType.HeaderText" xml:space="preserve">
|
||||
<value>Type</value>
|
||||
</data>
|
||||
<data name="gvAccountsDisplayName.HeaderText" xml:space="preserve">
|
||||
<value>Display Name</value>
|
||||
</data>
|
||||
|
|
|
@ -153,6 +153,9 @@
|
|||
<data name="gvAccounts.EmptyDataText" xml:space="preserve">
|
||||
<value>The list of accounts is empty. Click "Add..." button to add accounts.</value>
|
||||
</data>
|
||||
<data name="gvAccountsAccountType.HeaderText" xml:space="preserve">
|
||||
<value>Type</value>
|
||||
</data>
|
||||
<data name="gvAccountsDisplayName.HeaderText" xml:space="preserve">
|
||||
<value>Display Name</value>
|
||||
</data>
|
||||
|
@ -163,7 +166,7 @@
|
|||
<value>No accounts found.</value>
|
||||
</data>
|
||||
<data name="headerAddAccounts.Text" xml:space="preserve">
|
||||
<value>Organization Users</value>
|
||||
<value>Organization Accounts</value>
|
||||
</data>
|
||||
<data name="locIncludeSearch.Text" xml:space="preserve">
|
||||
<value>Include in search:</value>
|
||||
|
|
|
@ -116,8 +116,8 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
|
||||
private void BindPopupAccounts()
|
||||
{
|
||||
ExchangeAccount[] accounts = ES.Services.Organizations.SearchSecurityGroups(PanelRequest.ItemID,
|
||||
ddlSearchColumn.SelectedValue, txtSearchValue.Text + "%", "");
|
||||
ExchangeAccount[] accounts = ES.Services.Organizations.SearchOrganizationAccounts(PanelRequest.ItemID,
|
||||
ddlSearchColumn.SelectedValue, txtSearchValue.Text + "%", "", true);
|
||||
|
||||
accounts = accounts.Where(x => !GetAccounts().Contains(x.AccountName)).ToArray();
|
||||
|
||||
|
@ -158,6 +158,8 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
gvGroups.DataSource = accounts;
|
||||
gvGroups.DataBind();
|
||||
|
||||
UpdateGridViewAccounts(gvGroups);
|
||||
|
||||
btnDelete.Visible = gvGroups.Rows.Count > 0;
|
||||
}
|
||||
|
||||
|
@ -184,6 +186,38 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
return accounts;
|
||||
}
|
||||
|
||||
private void UpdateGridViewAccounts(GridView gv)
|
||||
{
|
||||
CheckBox chkSelectAll = (CheckBox)gv.HeaderRow.FindControl("chkSelectAll");
|
||||
|
||||
for (int i = 0; i < gv.Rows.Count; i++)
|
||||
{
|
||||
GridViewRow row = gv.Rows[i];
|
||||
CheckBox chkSelect = (CheckBox)row.FindControl("chkSelect");
|
||||
if (chkSelect == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
ExchangeAccountType exAccountType = (ExchangeAccountType)Enum.Parse(typeof(ExchangeAccountType), ((Literal)row.FindControl("litAccountType")).Text);
|
||||
|
||||
if (exAccountType != ExchangeAccountType.DefaultSecurityGroup)
|
||||
{
|
||||
chkSelectAll = null;
|
||||
chkSelect.Enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
chkSelect.Enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (chkSelectAll != null)
|
||||
{
|
||||
chkSelectAll.Enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
protected void chkIncludeMailboxes_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
BindPopupAccounts();
|
||||
|
|
|
@ -104,6 +104,10 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
chkIncludeLists.Visible = DistributionListsEnabled;
|
||||
chkIncludeLists.Checked = DistributionListsEnabled;
|
||||
}
|
||||
|
||||
// increase timeout
|
||||
ScriptManager scriptMngr = ScriptManager.GetCurrent(this.Page);
|
||||
scriptMngr.AsyncPostBackTimeout = 300;
|
||||
}
|
||||
|
||||
private void BindSelectedAccount(ExchangeAccount account)
|
||||
|
@ -157,7 +161,7 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
{
|
||||
ExchangeAccount[] accounts = ES.Services.ExchangeServer.SearchAccounts(PanelRequest.ItemID,
|
||||
chkIncludeMailboxes.Checked, chkIncludeContacts.Checked, chkIncludeLists.Checked,
|
||||
chkIncludeRooms.Checked, chkIncludeEquipment.Checked,
|
||||
chkIncludeRooms.Checked, chkIncludeEquipment.Checked, false,
|
||||
ddlSearchColumn.SelectedValue, txtSearchValue.Text + "%", "");
|
||||
|
||||
if (ExcludeAccountId > 0)
|
||||
|
|
|
@ -44,6 +44,13 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
set { selectedTab = value; }
|
||||
}
|
||||
|
||||
private bool isDefault = false;
|
||||
public bool IsDefault
|
||||
{
|
||||
get { return isDefault; }
|
||||
set { isDefault = value; }
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
BindTabs();
|
||||
|
@ -53,6 +60,10 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
{
|
||||
List<Tab> tabsList = new List<Tab>();
|
||||
tabsList.Add(CreateTab("secur_group_settings", "Tab.Settings"));
|
||||
if (!isDefault)
|
||||
{
|
||||
tabsList.Add(CreateTab("secur_group_memberof", "Tab.MemberOf"));
|
||||
}
|
||||
|
||||
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||
|
||||
|
|
|
@ -151,7 +151,9 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
// increase timeout
|
||||
ScriptManager scriptMngr = ScriptManager.GetCurrent(this.Page);
|
||||
scriptMngr.AsyncPostBackTimeout = 300;
|
||||
}
|
||||
|
||||
private void BindSelectedAccount(OrganizationUser account)
|
||||
|
@ -288,6 +290,8 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
if (e.CommandName == "SelectAccount")
|
||||
{
|
||||
string[] parts = e.CommandArgument.ToString().Split('|');
|
||||
|
||||
/*
|
||||
OrganizationUser account = new OrganizationUser();
|
||||
account.AccountName = parts[0];
|
||||
account.DisplayName = parts[1];
|
||||
|
@ -295,6 +299,11 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
account.AccountId = Utils.ParseInt(parts[3]);
|
||||
account.SamAccountName = parts[4];
|
||||
account.SubscriberNumber = parts[5];
|
||||
*/
|
||||
|
||||
int AccountId = Utils.ParseInt(parts[3]);
|
||||
|
||||
OrganizationUser account = ES.Services.Organizations.GetUserGeneralSettings(PanelRequest.ItemID, AccountId);
|
||||
|
||||
// set account
|
||||
BindSelectedAccount(account);
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
</asp:TemplateField>
|
||||
<asp:TemplateField meta:resourcekey="gvAccountsDisplayName" HeaderText="gvAccountsDisplayName">
|
||||
<HeaderStyle Wrap="false" />
|
||||
<ItemStyle Width="50%" Wrap="false"></ItemStyle>
|
||||
<ItemStyle Width="34%" Wrap="false"></ItemStyle>
|
||||
<ItemTemplate>
|
||||
<asp:Image ID="img1" runat="server" ImageUrl='<%# GetAccountImage((int)Eval("AccountType")) %>' ImageAlign="AbsMiddle" />
|
||||
<asp:Literal ID="litDisplayName" runat="server" Text='<%# Eval("DisplayName") %>'></asp:Literal>
|
||||
|
@ -31,11 +31,18 @@
|
|||
</asp:TemplateField>
|
||||
<asp:TemplateField meta:resourcekey="gvAccountsEmail" HeaderText="gvAccountsEmail">
|
||||
<HeaderStyle Wrap="false" />
|
||||
<ItemStyle Width="50%" Wrap="false"></ItemStyle>
|
||||
<ItemStyle Width="33%" Wrap="false"></ItemStyle>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="litPrimaryEmailAddress" runat="server" Text='<%# Eval("PrimaryEmailAddress") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField meta:resourcekey="gvAccountsAccountType" HeaderText="gvAccountsAccountType">
|
||||
<HeaderStyle Wrap="false" />
|
||||
<ItemStyle Width="33%" Wrap="false"></ItemStyle>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="litType" runat="server" Text='<%# GetType((int)Eval("AccountType")) %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
|
@ -83,18 +90,24 @@
|
|||
<ItemStyle Width="10px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField meta:resourcekey="gvAccountsDisplayName">
|
||||
<ItemStyle Width="50%"></ItemStyle>
|
||||
<ItemStyle Width="34%"></ItemStyle>
|
||||
<ItemTemplate>
|
||||
<asp:Image ID="img1" 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="33%"></ItemStyle>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="litPrimaryEmailAddress" runat="server" Text='<%# Eval("PrimaryEmailAddress") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField meta:resourcekey="gvAccountsAccountType" HeaderText="gvAccountsAccountType">
|
||||
<ItemStyle Width="33%"></ItemStyle>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="litType" runat="server" Text='<%# GetType((int)Eval("AccountType")) %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
|
|
|
@ -54,79 +54,12 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
Unselected
|
||||
}
|
||||
|
||||
public bool IncludeMailboxes
|
||||
{
|
||||
get
|
||||
{
|
||||
object ret = ViewState["IncludeMailboxes"];
|
||||
return (ret != null) ? (bool)ret : false;
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["IncludeMailboxes"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IncludeMailboxesOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
object ret = ViewState["IncludeMailboxesOnly"];
|
||||
return (ret != null) ? (bool)ret : false;
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["IncludeMailboxesOnly"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public bool ExcludeOCSUsers
|
||||
{
|
||||
get
|
||||
{
|
||||
object ret = ViewState["ExcludeOCSUsers"];
|
||||
return (ret != null) ? (bool)ret : false;
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ExcludeOCSUsers"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool ExcludeLyncUsers
|
||||
{
|
||||
get
|
||||
{
|
||||
object ret = ViewState["ExcludeLyncUsers"];
|
||||
return (ret != null) ? (bool)ret : false;
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ExcludeLyncUsers"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public bool ExcludeBESUsers
|
||||
{
|
||||
get
|
||||
{
|
||||
object ret = ViewState["ExcludeBESUsers"];
|
||||
return (ret != null) ? (bool)ret : false;
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ExcludeBESUsers"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
public int ExcludeAccountId
|
||||
{
|
||||
get { return PanelRequest.AccountID; }
|
||||
}
|
||||
|
||||
public void SetAccounts(OrganizationUser[] accounts)
|
||||
public void SetAccounts(ExchangeAccount[] accounts)
|
||||
{
|
||||
BindAccounts(accounts, false);
|
||||
}
|
||||
|
@ -134,10 +67,10 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
public string[] GetAccounts()
|
||||
{
|
||||
// get selected accounts
|
||||
List<OrganizationUser> selectedAccounts = GetGridViewAccounts(gvAccounts, SelectedState.All);
|
||||
List<ExchangeAccount> selectedAccounts = GetGridViewAccounts(gvAccounts, SelectedState.All);
|
||||
|
||||
List<string> accountNames = new List<string>();
|
||||
foreach (OrganizationUser account in selectedAccounts)
|
||||
foreach (ExchangeAccount account in selectedAccounts)
|
||||
accountNames.Add(account.AccountName);
|
||||
|
||||
return accountNames.ToArray();
|
||||
|
@ -178,7 +111,7 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
protected void btnDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
// get selected accounts
|
||||
List<OrganizationUser> selectedAccounts = GetGridViewAccounts(gvAccounts, SelectedState.Unselected);
|
||||
List<ExchangeAccount> selectedAccounts = GetGridViewAccounts(gvAccounts, SelectedState.Unselected);
|
||||
|
||||
// add to the main list
|
||||
BindAccounts(selectedAccounts.ToArray(), false);
|
||||
|
@ -187,7 +120,7 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
protected void btnAddSelected_Click(object sender, EventArgs e)
|
||||
{
|
||||
// get selected accounts
|
||||
List<OrganizationUser> selectedAccounts = GetGridViewAccounts(gvPopupAccounts, SelectedState.Selected);
|
||||
List<ExchangeAccount> selectedAccounts = GetGridViewAccounts(gvPopupAccounts, SelectedState.Selected);
|
||||
|
||||
// add to the main list
|
||||
BindAccounts(selectedAccounts.ToArray(), true);
|
||||
|
@ -206,6 +139,15 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
case ExchangeAccountType.Equipment:
|
||||
imgName = "equipment_16.gif";
|
||||
break;
|
||||
case ExchangeAccountType.DistributionList:
|
||||
imgName = "dlist_16.gif";
|
||||
break;
|
||||
case ExchangeAccountType.SecurityGroup:
|
||||
imgName = "dlist_16.gif";
|
||||
break;
|
||||
case ExchangeAccountType.DefaultSecurityGroup:
|
||||
imgName = "dlist_16.gif";
|
||||
break;
|
||||
default:
|
||||
imgName = "admin_16.png";
|
||||
break;
|
||||
|
@ -214,60 +156,42 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
return GetThemedImage("Exchange/" + imgName);
|
||||
}
|
||||
|
||||
public string GetType(int accountTypeId)
|
||||
{
|
||||
ExchangeAccountType accountType = (ExchangeAccountType)accountTypeId;
|
||||
|
||||
switch (accountType)
|
||||
{
|
||||
case ExchangeAccountType.DistributionList:
|
||||
return "Distribution";
|
||||
case ExchangeAccountType.SecurityGroup:
|
||||
return "Security";
|
||||
case ExchangeAccountType.DefaultSecurityGroup:
|
||||
return "Default Group";
|
||||
default:
|
||||
return accountType.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
private void BindPopupAccounts()
|
||||
{
|
||||
OrganizationUser[] accounts = ES.Services.Organizations.SearchAccounts(PanelRequest.ItemID,
|
||||
ddlSearchColumn.SelectedValue, txtSearchValue.Text + "%", "", IncludeMailboxes);
|
||||
ExchangeAccount[] accounts = ES.Services.Organizations.SearchOrganizationAccounts(PanelRequest.ItemID,
|
||||
ddlSearchColumn.SelectedValue, txtSearchValue.Text + "%", "", false);
|
||||
|
||||
List<OrganizationUser> newAccounts = new List<OrganizationUser>();
|
||||
List<ExchangeAccount> newAccounts = new List<ExchangeAccount>();
|
||||
|
||||
accounts = accounts.Where(x => !GetAccounts().Contains(x.AccountName)).ToArray();
|
||||
|
||||
if (ExcludeAccountId > 0)
|
||||
{
|
||||
List<OrganizationUser> updatedAccounts = new List<OrganizationUser>();
|
||||
foreach (OrganizationUser account in accounts)
|
||||
List<ExchangeAccount> updatedAccounts = new List<ExchangeAccount>();
|
||||
foreach (ExchangeAccount account in accounts)
|
||||
if (account.AccountId != ExcludeAccountId)
|
||||
updatedAccounts.Add(account);
|
||||
|
||||
accounts = updatedAccounts.ToArray();
|
||||
}
|
||||
|
||||
if (IncludeMailboxesOnly)
|
||||
{
|
||||
|
||||
List<OrganizationUser> updatedAccounts = new List<OrganizationUser>();
|
||||
foreach (OrganizationUser account in accounts)
|
||||
{
|
||||
bool addUser = false;
|
||||
if (account.ExternalEmail != string.Empty) addUser = true;
|
||||
if ((account.IsBlackBerryUser) & (ExcludeBESUsers)) addUser = false;
|
||||
if ((account.IsLyncUser) & (ExcludeLyncUsers)) addUser = false;
|
||||
|
||||
if (addUser) updatedAccounts.Add(account);
|
||||
}
|
||||
|
||||
accounts = updatedAccounts.ToArray();
|
||||
}
|
||||
else
|
||||
if ((ExcludeOCSUsers) | (ExcludeBESUsers) | (ExcludeLyncUsers))
|
||||
{
|
||||
|
||||
List<OrganizationUser> updatedAccounts = new List<OrganizationUser>();
|
||||
foreach (OrganizationUser account in accounts)
|
||||
{
|
||||
bool addUser = true;
|
||||
if ((account.IsOCSUser) & (ExcludeOCSUsers)) addUser = false;
|
||||
if ((account.IsLyncUser) & (ExcludeLyncUsers)) addUser = false;
|
||||
if ((account.IsBlackBerryUser) & (ExcludeBESUsers)) addUser = false;
|
||||
|
||||
if (addUser) updatedAccounts.Add(account);
|
||||
}
|
||||
|
||||
accounts = updatedAccounts.ToArray();
|
||||
}
|
||||
|
||||
|
||||
Array.Sort(accounts, CompareAccount);
|
||||
if (Direction == SortDirection.Ascending)
|
||||
{
|
||||
|
@ -281,21 +205,21 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
gvPopupAccounts.DataBind();
|
||||
}
|
||||
|
||||
private void BindAccounts(OrganizationUser[] newAccounts, bool preserveExisting)
|
||||
private void BindAccounts(ExchangeAccount[] newAccounts, bool preserveExisting)
|
||||
{
|
||||
// get binded addresses
|
||||
List<OrganizationUser> accounts = new List<OrganizationUser>();
|
||||
List<ExchangeAccount> accounts = new List<ExchangeAccount>();
|
||||
if(preserveExisting)
|
||||
accounts.AddRange(GetGridViewAccounts(gvAccounts, SelectedState.All));
|
||||
|
||||
// add new accounts
|
||||
if (newAccounts != null)
|
||||
{
|
||||
foreach (OrganizationUser newAccount in newAccounts)
|
||||
foreach (ExchangeAccount newAccount in newAccounts)
|
||||
{
|
||||
// check if exists
|
||||
bool exists = false;
|
||||
foreach (OrganizationUser account in accounts)
|
||||
foreach (ExchangeAccount account in accounts)
|
||||
{
|
||||
if (String.Compare(newAccount.AccountName, account.AccountName, true) == 0)
|
||||
{
|
||||
|
@ -317,9 +241,9 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
btnDelete.Visible = gvAccounts.Rows.Count > 0;
|
||||
}
|
||||
|
||||
private List<OrganizationUser> GetGridViewAccounts(GridView gv, SelectedState state)
|
||||
private List<ExchangeAccount> GetGridViewAccounts(GridView gv, SelectedState state)
|
||||
{
|
||||
List<OrganizationUser> accounts = new List<OrganizationUser>();
|
||||
List<ExchangeAccount> accounts = new List<ExchangeAccount>();
|
||||
for (int i = 0; i < gv.Rows.Count; i++)
|
||||
{
|
||||
GridViewRow row = gv.Rows[i];
|
||||
|
@ -327,7 +251,7 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
if (chkSelect == null)
|
||||
continue;
|
||||
|
||||
OrganizationUser account = new OrganizationUser();
|
||||
ExchangeAccount account = new ExchangeAccount();
|
||||
account.AccountType = (ExchangeAccountType)Enum.Parse(typeof(ExchangeAccountType), ((Literal)row.FindControl("litAccountType")).Text);
|
||||
account.AccountName = (string)gv.DataKeys[i][0];
|
||||
account.DisplayName = ((Literal)row.FindControl("litDisplayName")).Text;
|
||||
|
@ -352,7 +276,7 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
set { ViewState[DirectionString] = value; }
|
||||
}
|
||||
|
||||
private static int CompareAccount(OrganizationUser user1, OrganizationUser user2)
|
||||
private static int CompareAccount(ExchangeAccount user1, ExchangeAccount user2)
|
||||
{
|
||||
return string.Compare(user1.DisplayName, user2.DisplayName);
|
||||
}
|
||||
|
|
|
@ -90,11 +90,6 @@
|
|||
<asp:CheckBox ID="chkRemoteUserAccess" runat="server" meta:resourcekey="chkRemoteUserAccess" Text="Remote User access"></asp:CheckBox>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:CheckBox ID="chkPublicIMConnectivity" runat="server" meta:resourcekey="chkPublicIMConnectivity" Text="Public IM Connectivity"></asp:CheckBox>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
</asp:Panel>
|
||||
|
|
|
@ -42,12 +42,10 @@ namespace WebsitePanel.Portal.Lync
|
|||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
PackageContext cntx = null;
|
||||
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||
|
||||
if (!IsPostBack)
|
||||
{
|
||||
cntx = ES.Services.Packages.GetPackageContext(PanelSecurity.PackageId);
|
||||
|
||||
string[] archivePolicy = ES.Services.Lync.GetPolicyList(PanelRequest.ItemID, LyncPolicyType.Archiving, null);
|
||||
if (archivePolicy != null)
|
||||
{
|
||||
|
@ -95,23 +93,15 @@ namespace WebsitePanel.Portal.Lync
|
|||
*/
|
||||
|
||||
chkRemoteUserAccess.Checked = plan.RemoteUserAccess;
|
||||
chkPublicIMConnectivity.Checked = plan.PublicIMConnectivity;
|
||||
|
||||
chkAllowOrganizeMeetingsWithExternalAnonymous.Checked = plan.AllowOrganizeMeetingsWithExternalAnonymous;
|
||||
|
||||
ddTelephony.SelectedIndex = plan.Telephony;
|
||||
Utils.SelectListItem(ddTelephony, plan.Telephony);
|
||||
|
||||
tbServerURI.Text = plan.ServerURI;
|
||||
|
||||
locTitle.Text = plan.LyncUserPlanName;
|
||||
this.DisableControls = true;
|
||||
|
||||
string planArchivePolicy = "";
|
||||
if (plan.ArchivePolicy != null) planArchivePolicy = plan.ArchivePolicy;
|
||||
string planTelephonyDialPlanPolicy = "";
|
||||
if (plan.TelephonyDialPlanPolicy != null) planTelephonyDialPlanPolicy = plan.TelephonyDialPlanPolicy;
|
||||
string planTelephonyVoicePolicy = "";
|
||||
if (plan.TelephonyVoicePolicy != null) planTelephonyVoicePolicy = plan.TelephonyVoicePolicy;
|
||||
string planArchivePolicy = ""; if (plan.ArchivePolicy != null) planArchivePolicy = plan.ArchivePolicy;
|
||||
string planTelephonyDialPlanPolicy = ""; if (plan.TelephonyDialPlanPolicy != null) planTelephonyDialPlanPolicy = plan.TelephonyDialPlanPolicy;
|
||||
string planTelephonyVoicePolicy = ""; if (plan.TelephonyVoicePolicy != null) planTelephonyVoicePolicy = plan.TelephonyVoicePolicy;
|
||||
|
||||
ddArchivingPolicy.Items.Clear();
|
||||
ddArchivingPolicy.Items.Add(new System.Web.UI.WebControls.ListItem(planArchivePolicy.Replace("Tag:", ""), planArchivePolicy));
|
||||
|
@ -120,12 +110,16 @@ namespace WebsitePanel.Portal.Lync
|
|||
ddTelephonyVoicePolicy.Items.Clear();
|
||||
ddTelephonyVoicePolicy.Items.Add(new System.Web.UI.WebControls.ListItem(planTelephonyVoicePolicy.Replace("Tag:", ""), planTelephonyVoicePolicy));
|
||||
|
||||
locTitle.Text = plan.LyncUserPlanName;
|
||||
this.DisableControls = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
chkIM.Checked = true;
|
||||
chkIM.Enabled = false;
|
||||
|
||||
// chkNone.Checked = true; because not used
|
||||
|
||||
if (cntx != null)
|
||||
{
|
||||
foreach (QuotaValueInfo quota in cntx.QuotasArray)
|
||||
|
@ -140,10 +134,6 @@ namespace WebsitePanel.Portal.Lync
|
|||
chkConferencing.Checked = Convert.ToBoolean(quota.QuotaAllocatedValue);
|
||||
chkConferencing.Enabled = Convert.ToBoolean(quota.QuotaAllocatedValue);
|
||||
break;
|
||||
case 375:
|
||||
chkEnterpriseVoice.Checked = Convert.ToBoolean(quota.QuotaAllocatedValue);
|
||||
chkEnterpriseVoice.Enabled = Convert.ToBoolean(quota.QuotaAllocatedValue);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -152,32 +142,29 @@ namespace WebsitePanel.Portal.Lync
|
|||
}
|
||||
}
|
||||
|
||||
bool enterpriseVoiceQuota = Utils.CheckQouta(Quotas.LYNC_ENTERPRISEVOICE, cntx);
|
||||
|
||||
PlanFeaturesTelephony.Visible = enterpriseVoiceQuota;
|
||||
secPlanFeaturesTelephony.Visible = enterpriseVoiceQuota;
|
||||
if (!enterpriseVoiceQuota) Utils.SelectListItem(ddTelephony, "0");
|
||||
|
||||
bool enterpriseVoice = enterpriseVoiceQuota && (ddTelephony.SelectedValue == "2");
|
||||
|
||||
chkEnterpriseVoice.Enabled = false;
|
||||
chkEnterpriseVoice.Checked = false;
|
||||
chkEnterpriseVoice.Checked = enterpriseVoice;
|
||||
pnEnterpriseVoice.Visible = enterpriseVoice;
|
||||
|
||||
pnEnterpriseVoice.Visible = false;
|
||||
pnServerURI.Visible = false;
|
||||
|
||||
switch (ddTelephony.SelectedIndex)
|
||||
switch (ddTelephony.SelectedValue)
|
||||
{
|
||||
case 1:
|
||||
break;
|
||||
case 2:
|
||||
pnEnterpriseVoice.Visible = true;
|
||||
chkEnterpriseVoice.Checked = true;
|
||||
break;
|
||||
case 3:
|
||||
case "3":
|
||||
case "4":
|
||||
pnServerURI.Visible = true;
|
||||
break;
|
||||
case 4:
|
||||
pnServerURI.Visible = true;
|
||||
default:
|
||||
pnServerURI.Visible = false;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||
PlanFeaturesTelephony.Visible = Utils.CheckQouta(Quotas.LYNC_ENTERPRISEVOICE, cntx);
|
||||
secPlanFeaturesTelephony.Visible = PlanFeaturesTelephony.Visible;
|
||||
|
||||
}
|
||||
|
||||
|
@ -221,6 +208,8 @@ namespace WebsitePanel.Portal.Lync
|
|||
{
|
||||
try
|
||||
{
|
||||
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||
|
||||
Providers.HostedSolution.LyncUserPlan plan = new Providers.HostedSolution.LyncUserPlan();
|
||||
plan.LyncUserPlanName = txtPlan.Text;
|
||||
plan.IsDefault = false;
|
||||
|
@ -230,8 +219,10 @@ namespace WebsitePanel.Portal.Lync
|
|||
plan.Federation = chkFederation.Checked;
|
||||
plan.Conferencing = chkConferencing.Checked;
|
||||
|
||||
bool enterpriseVoiceQuota = Utils.CheckQouta(Quotas.LYNC_ENTERPRISEVOICE, cntx);
|
||||
bool enterpriseVoice = enterpriseVoiceQuota && (ddTelephony.SelectedValue == "2");
|
||||
|
||||
plan.EnterpriseVoice = chkEnterpriseVoice.Checked;
|
||||
plan.EnterpriseVoice = enterpriseVoice;
|
||||
|
||||
plan.VoicePolicy = LyncVoicePolicyType.None;
|
||||
|
||||
|
@ -257,11 +248,12 @@ namespace WebsitePanel.Portal.Lync
|
|||
*/
|
||||
|
||||
plan.RemoteUserAccess = chkRemoteUserAccess.Checked;
|
||||
plan.PublicIMConnectivity = chkPublicIMConnectivity.Checked;
|
||||
|
||||
plan.AllowOrganizeMeetingsWithExternalAnonymous = chkAllowOrganizeMeetingsWithExternalAnonymous.Checked;
|
||||
|
||||
plan.Telephony = ddTelephony.SelectedIndex;
|
||||
int telephonyId = -1;
|
||||
int.TryParse(ddTelephony.SelectedValue, out telephonyId);
|
||||
plan.Telephony = telephonyId;
|
||||
|
||||
plan.ServerURI = tbServerURI.Text;
|
||||
|
||||
|
|
|
@ -29,11 +29,13 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.3074
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebsitePanel.Portal.Lync {
|
||||
|
||||
|
||||
|
@ -45,6 +47,7 @@ namespace WebsitePanel.Portal.Lync {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks;
|
||||
|
||||
|
@ -54,6 +57,7 @@ namespace WebsitePanel.Portal.Lync {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Breadcrumb breadcrumb;
|
||||
|
||||
|
@ -63,6 +67,7 @@ namespace WebsitePanel.Portal.Lync {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Menu menu;
|
||||
|
||||
|
@ -72,6 +77,7 @@ namespace WebsitePanel.Portal.Lync {
|
|||
/// <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;
|
||||
|
||||
|
@ -81,6 +87,7 @@ namespace WebsitePanel.Portal.Lync {
|
|||
/// <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;
|
||||
|
||||
|
@ -90,6 +97,7 @@ namespace WebsitePanel.Portal.Lync {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
|
||||
|
||||
|
@ -99,6 +107,7 @@ namespace WebsitePanel.Portal.Lync {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.CollapsiblePanel secPlan;
|
||||
|
||||
|
@ -108,6 +117,7 @@ namespace WebsitePanel.Portal.Lync {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Panel Plan;
|
||||
|
||||
|
@ -117,6 +127,7 @@ namespace WebsitePanel.Portal.Lync {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtPlan;
|
||||
|
||||
|
@ -126,6 +137,7 @@ namespace WebsitePanel.Portal.Lync {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.RequiredFieldValidator valRequirePlan;
|
||||
|
||||
|
@ -135,6 +147,7 @@ namespace WebsitePanel.Portal.Lync {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.CollapsiblePanel secPlanFeatures;
|
||||
|
||||
|
@ -144,6 +157,7 @@ namespace WebsitePanel.Portal.Lync {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Panel PlanFeatures;
|
||||
|
||||
|
@ -153,6 +167,7 @@ namespace WebsitePanel.Portal.Lync {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox chkIM;
|
||||
|
||||
|
@ -162,6 +177,7 @@ namespace WebsitePanel.Portal.Lync {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox chkMobility;
|
||||
|
||||
|
@ -171,6 +187,7 @@ namespace WebsitePanel.Portal.Lync {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox chkConferencing;
|
||||
|
||||
|
@ -180,6 +197,7 @@ namespace WebsitePanel.Portal.Lync {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox chkEnterpriseVoice;
|
||||
|
||||
|
@ -189,6 +207,7 @@ namespace WebsitePanel.Portal.Lync {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.CollapsiblePanel secPlanFeaturesFederation;
|
||||
|
||||
|
@ -198,6 +217,7 @@ namespace WebsitePanel.Portal.Lync {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Panel PlanFeaturesFederation;
|
||||
|
||||
|
@ -207,6 +227,7 @@ namespace WebsitePanel.Portal.Lync {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox chkFederation;
|
||||
|
||||
|
@ -216,24 +237,17 @@ namespace WebsitePanel.Portal.Lync {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox chkRemoteUserAccess;
|
||||
|
||||
/// <summary>
|
||||
/// chkPublicIMConnectivity 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 chkPublicIMConnectivity;
|
||||
|
||||
/// <summary>
|
||||
/// secPlanFeaturesArchiving control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.CollapsiblePanel secPlanFeaturesArchiving;
|
||||
|
||||
|
@ -243,6 +257,7 @@ namespace WebsitePanel.Portal.Lync {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Panel PlanFeaturesArchiving;
|
||||
|
||||
|
@ -252,6 +267,7 @@ namespace WebsitePanel.Portal.Lync {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize locArchivingPolicy;
|
||||
|
||||
|
@ -261,6 +277,7 @@ namespace WebsitePanel.Portal.Lync {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.DropDownList ddArchivingPolicy;
|
||||
|
||||
|
@ -270,6 +287,7 @@ namespace WebsitePanel.Portal.Lync {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.CollapsiblePanel secPlanFeaturesMeeting;
|
||||
|
||||
|
@ -279,6 +297,7 @@ namespace WebsitePanel.Portal.Lync {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Panel PlanFeaturesMeeting;
|
||||
|
||||
|
@ -288,6 +307,7 @@ namespace WebsitePanel.Portal.Lync {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox chkAllowOrganizeMeetingsWithExternalAnonymous;
|
||||
|
||||
|
@ -297,6 +317,7 @@ namespace WebsitePanel.Portal.Lync {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.CollapsiblePanel secPlanFeaturesTelephony;
|
||||
|
||||
|
@ -306,6 +327,7 @@ namespace WebsitePanel.Portal.Lync {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Panel PlanFeaturesTelephony;
|
||||
|
||||
|
@ -315,6 +337,7 @@ namespace WebsitePanel.Portal.Lync {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize locTelephony;
|
||||
|
||||
|
@ -324,6 +347,7 @@ namespace WebsitePanel.Portal.Lync {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.DropDownList ddTelephony;
|
||||
|
||||
|
@ -333,6 +357,7 @@ namespace WebsitePanel.Portal.Lync {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Panel pnEnterpriseVoice;
|
||||
|
||||
|
@ -342,6 +367,7 @@ namespace WebsitePanel.Portal.Lync {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize locTelephonyProvider;
|
||||
|
||||
|
@ -351,6 +377,7 @@ namespace WebsitePanel.Portal.Lync {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox tbTelephoneProvider;
|
||||
|
||||
|
@ -360,6 +387,7 @@ namespace WebsitePanel.Portal.Lync {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button btnAccept;
|
||||
|
||||
|
@ -369,6 +397,7 @@ namespace WebsitePanel.Portal.Lync {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.RequiredFieldValidator AcceptRequiredValidator;
|
||||
|
||||
|
@ -378,6 +407,7 @@ namespace WebsitePanel.Portal.Lync {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize locDialPlan;
|
||||
|
||||
|
@ -387,6 +417,7 @@ namespace WebsitePanel.Portal.Lync {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.DropDownList ddTelephonyDialPlanPolicy;
|
||||
|
||||
|
@ -396,6 +427,7 @@ namespace WebsitePanel.Portal.Lync {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize locVoicePolicy;
|
||||
|
||||
|
@ -405,6 +437,7 @@ namespace WebsitePanel.Portal.Lync {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.DropDownList ddTelephonyVoicePolicy;
|
||||
|
||||
|
@ -414,6 +447,7 @@ namespace WebsitePanel.Portal.Lync {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Panel pnServerURI;
|
||||
|
||||
|
@ -423,6 +457,7 @@ namespace WebsitePanel.Portal.Lync {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize locServerURI;
|
||||
|
||||
|
@ -432,6 +467,7 @@ namespace WebsitePanel.Portal.Lync {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox tbServerURI;
|
||||
|
||||
|
@ -441,6 +477,7 @@ namespace WebsitePanel.Portal.Lync {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button btnAdd;
|
||||
|
||||
|
@ -450,6 +487,7 @@ namespace WebsitePanel.Portal.Lync {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.ValidationSummary ValidationSummary1;
|
||||
}
|
||||
|
|
|
@ -57,35 +57,42 @@ namespace WebsitePanel.Portal.Lync
|
|||
private void BindPhoneNumbers()
|
||||
{
|
||||
|
||||
PackageIPAddress[] ips = ES.Services.Servers.GetPackageUnassignedIPAddresses(PanelSecurity.PackageId, IPAddressPool.PhoneNumbers);
|
||||
|
||||
if (ips.Length > 0)
|
||||
{
|
||||
ddlPhoneNumber.Items.Add(new ListItem("<Select Phone>", ""));
|
||||
|
||||
PackageIPAddress[] ips = ES.Services.Servers.GetPackageUnassignedIPAddresses(PanelSecurity.PackageId, IPAddressPool.PhoneNumbers);
|
||||
foreach (PackageIPAddress ip in ips)
|
||||
{
|
||||
string phone = ip.ExternalIP;
|
||||
ddlPhoneNumber.Items.Add(new ListItem(phone, ip.PackageAddressID.ToString()));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected void Page_PreRender(object sender, EventArgs e)
|
||||
{
|
||||
bool EnterpriseVoice = false;
|
||||
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||
bool enterpriseVoiceQuota = Utils.CheckQouta(Quotas.LYNC_ENTERPRISEVOICE, cntx);
|
||||
|
||||
bool enterpriseVoice = false;
|
||||
|
||||
WebsitePanel.Providers.HostedSolution.LyncUserPlan plan = planSelector.plan;
|
||||
if (plan != null)
|
||||
EnterpriseVoice = plan.EnterpriseVoice;
|
||||
enterpriseVoice = plan.EnterpriseVoice && enterpriseVoiceQuota && (ddlPhoneNumber.Items.Count > 0);
|
||||
|
||||
pnEnterpriseVoice.Visible = EnterpriseVoice;
|
||||
pnEnterpriseVoice.Visible = enterpriseVoice;
|
||||
|
||||
if (!EnterpriseVoice)
|
||||
if (!enterpriseVoice)
|
||||
{
|
||||
ddlPhoneNumber.Text = "";
|
||||
tbPin.Text = "";
|
||||
}
|
||||
|
||||
if (EnterpriseVoice)
|
||||
if (enterpriseVoice)
|
||||
{
|
||||
string[] pinPolicy = ES.Services.Lync.GetPolicyList(PanelRequest.ItemID, LyncPolicyType.Pin, "MinPasswordLength");
|
||||
if (pinPolicy != null)
|
||||
|
@ -111,9 +118,15 @@ namespace WebsitePanel.Portal.Lync
|
|||
if (res.IsSuccess && res.ErrorCodes.Count == 0)
|
||||
{
|
||||
|
||||
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||
bool enterpriseVoiceQuota = Utils.CheckQouta(Quotas.LYNC_ENTERPRISEVOICE, cntx);
|
||||
|
||||
string lineUri = "";
|
||||
if (enterpriseVoiceQuota) lineUri = ddlPhoneNumber.SelectedItem.Text + ":" + tbPin.Text;
|
||||
|
||||
//#1
|
||||
LyncUser lyncUser = ES.Services.Lync.GetLyncUserGeneralSettings(PanelRequest.ItemID, accountId);
|
||||
ES.Services.Lync.SetLyncUserGeneralSettings(PanelRequest.ItemID, accountId, lyncUser.SipAddress, ddlPhoneNumber.SelectedItem.Text + ":" + tbPin.Text);
|
||||
ES.Services.Lync.SetLyncUserGeneralSettings(PanelRequest.ItemID, accountId, lyncUser.SipAddress, lineUri);
|
||||
|
||||
Response.Redirect(EditUrl("AccountID", accountId.ToString(), "edit_lync_user",
|
||||
"SpaceID=" + PanelSecurity.PackageId,
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.3074
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
|
|
|
@ -52,36 +52,42 @@ namespace WebsitePanel.Portal.Lync
|
|||
|
||||
private void BindPhoneNumbers()
|
||||
{
|
||||
PackageIPAddress[] ips = ES.Services.Servers.GetPackageUnassignedIPAddresses(PanelSecurity.PackageId, IPAddressPool.PhoneNumbers);
|
||||
|
||||
if (ips.Length > 0)
|
||||
{
|
||||
ddlPhoneNumber.Items.Add(new ListItem("<Select Phone>", ""));
|
||||
|
||||
PackageIPAddress[] ips = ES.Services.Servers.GetPackageUnassignedIPAddresses(PanelSecurity.PackageId, IPAddressPool.PhoneNumbers);
|
||||
foreach (PackageIPAddress ip in ips)
|
||||
{
|
||||
string phone = ip.ExternalIP;
|
||||
ddlPhoneNumber.Items.Add(new ListItem(phone, phone));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected void Page_PreRender(object sender, EventArgs e)
|
||||
{
|
||||
bool EnterpriseVoice = false;
|
||||
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||
bool enterpriseVoiceQuota = Utils.CheckQouta(Quotas.LYNC_ENTERPRISEVOICE, cntx);
|
||||
|
||||
bool enterpriseVoice = false;
|
||||
|
||||
WebsitePanel.Providers.HostedSolution.LyncUserPlan plan = planSelector.plan;
|
||||
if (plan != null)
|
||||
EnterpriseVoice = plan.EnterpriseVoice;
|
||||
enterpriseVoice = plan.EnterpriseVoice && enterpriseVoiceQuota && (ddlPhoneNumber.Items.Count > 0);
|
||||
|
||||
pnEnterpriseVoice.Visible = EnterpriseVoice;
|
||||
pnEnterpriseVoice.Visible = enterpriseVoice;
|
||||
|
||||
if (!EnterpriseVoice)
|
||||
if (!enterpriseVoice)
|
||||
{
|
||||
ddlPhoneNumber.Text = "";
|
||||
tbPin.Text = "";
|
||||
}
|
||||
|
||||
if (EnterpriseVoice)
|
||||
if (enterpriseVoice)
|
||||
{
|
||||
string[] pinPolicy = ES.Services.Lync.GetPolicyList(PanelRequest.ItemID, LyncPolicyType.Pin, "MinPasswordLength");
|
||||
if (pinPolicy != null)
|
||||
|
@ -120,10 +126,16 @@ namespace WebsitePanel.Portal.Lync
|
|||
return;
|
||||
try
|
||||
{
|
||||
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||
bool enterpriseVoiceQuota = Utils.CheckQouta(Quotas.LYNC_ENTERPRISEVOICE, cntx);
|
||||
|
||||
string lineUri = "";
|
||||
if (enterpriseVoiceQuota) lineUri = ddlPhoneNumber.SelectedItem.Text + ":" + tbPin.Text;
|
||||
|
||||
LyncUserResult res = ES.Services.Lync.SetUserLyncPlan(PanelRequest.ItemID, PanelRequest.AccountID, Convert.ToInt32(planSelector.planId));
|
||||
if (res.IsSuccess && res.ErrorCodes.Count == 0)
|
||||
{
|
||||
res = ES.Services.Lync.SetLyncUserGeneralSettings(PanelRequest.ItemID, PanelRequest.AccountID, lyncUserSettings.sipAddress, ddlPhoneNumber.SelectedItem.Text + ":" + tbPin.Text);
|
||||
res = ES.Services.Lync.SetLyncUserGeneralSettings(PanelRequest.ItemID, PanelRequest.AccountID, lyncUserSettings.sipAddress, lineUri);
|
||||
}
|
||||
|
||||
if (res.IsSuccess && res.ErrorCodes.Count == 0)
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.3074
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.3074
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
<table cellspacing="6">
|
||||
<tr>
|
||||
<td><asp:Localize ID="locIPQuota" runat="server" meta:resourcekey="locIPQuota" Text="Number of Phone Numbes:"></asp:Localize></td>
|
||||
<td><wsp:Quota ID="addressesQuota" runat="server" QuotaName="Web.IPAddresses" /></td>
|
||||
<td><wsp:Quota ID="addressesQuota" runat="server" QuotaName="Lync.PhoneNumbers" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.3074
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
|
|
|
@ -29,11 +29,11 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.3074
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebsitePanel.Portal {
|
||||
|
|
|
@ -30,6 +30,7 @@ using System;
|
|||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
|
@ -73,7 +74,15 @@ namespace WebsitePanel.Portal
|
|||
{
|
||||
try
|
||||
{
|
||||
ddlServer.DataSource = ES.Services.Servers.GetServers();
|
||||
ServerInfo[] allServers = ES.Services.Servers.GetServers();
|
||||
List<ServerInfo> servers = new List<ServerInfo>();
|
||||
foreach(ServerInfo server in allServers)
|
||||
{
|
||||
ServiceInfo[] service = ES.Services.Servers.GetServicesByServerIdGroupName(server.ServerId, ResourceGroups.Lync);
|
||||
if (service.Length>0) servers.Add(server);
|
||||
}
|
||||
|
||||
ddlServer.DataSource = servers;
|
||||
ddlServer.DataBind();
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
|
@ -29,11 +29,11 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.3074
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebsitePanel.Portal {
|
||||
|
|
|
@ -30,6 +30,7 @@ using System;
|
|||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
|
@ -96,7 +97,16 @@ namespace WebsitePanel.Portal
|
|||
|
||||
private void BindServers()
|
||||
{
|
||||
ddlServer.DataSource = ES.Services.Servers.GetServers();
|
||||
ServerInfo[] allServers = ES.Services.Servers.GetServers();
|
||||
List<ServerInfo> servers = new List<ServerInfo>();
|
||||
foreach (ServerInfo server in allServers)
|
||||
{
|
||||
ServiceInfo[] service = ES.Services.Servers.GetServicesByServerIdGroupName(server.ServerId, ResourceGroups.Lync);
|
||||
if (service.Length > 0) servers.Add(server);
|
||||
}
|
||||
|
||||
ddlServer.DataSource = servers;
|
||||
|
||||
ddlServer.DataBind();
|
||||
ddlServer.Items.Insert(0, new ListItem(GetLocalizedString("Text.NotAssigned"), ""));
|
||||
}
|
||||
|
|
|
@ -29,11 +29,11 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.3074
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebsitePanel.Portal {
|
||||
|
|
|
@ -105,11 +105,6 @@
|
|||
<asp:CheckBox ID="chkRemoteUserAccess" runat="server" meta:resourcekey="chkRemoteUserAccess" Text="Remote User access"></asp:CheckBox>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:CheckBox ID="chkPublicIMConnectivity" runat="server" meta:resourcekey="chkPublicIMConnectivity" Text="Public IM Connectivity"></asp:CheckBox>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
</asp:Panel>
|
||||
|
|
|
@ -173,7 +173,6 @@ namespace WebsitePanel.Portal
|
|||
plan.VoicePolicy = LyncVoicePolicyType.None;
|
||||
|
||||
plan.RemoteUserAccess = chkRemoteUserAccess.Checked;
|
||||
plan.PublicIMConnectivity = chkPublicIMConnectivity.Checked;
|
||||
|
||||
plan.AllowOrganizeMeetingsWithExternalAnonymous = chkAllowOrganizeMeetingsWithExternalAnonymous.Checked;
|
||||
|
||||
|
@ -314,7 +313,6 @@ namespace WebsitePanel.Portal
|
|||
chkEnterpriseVoice.Checked = plan.EnterpriseVoice;
|
||||
|
||||
chkRemoteUserAccess.Checked = plan.RemoteUserAccess;
|
||||
chkPublicIMConnectivity.Checked = plan.PublicIMConnectivity;
|
||||
|
||||
chkAllowOrganizeMeetingsWithExternalAnonymous.Checked = plan.AllowOrganizeMeetingsWithExternalAnonymous;
|
||||
ddTelephony.SelectedIndex = plan.Telephony;
|
||||
|
@ -437,7 +435,6 @@ namespace WebsitePanel.Portal
|
|||
plan.VoicePolicy = LyncVoicePolicyType.None;
|
||||
|
||||
plan.RemoteUserAccess = chkRemoteUserAccess.Checked;
|
||||
plan.PublicIMConnectivity = chkPublicIMConnectivity.Checked;
|
||||
|
||||
plan.AllowOrganizeMeetingsWithExternalAnonymous = chkAllowOrganizeMeetingsWithExternalAnonymous.Checked;
|
||||
|
||||
|
|
|
@ -29,11 +29,13 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.3074
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebsitePanel.Portal {
|
||||
|
||||
|
||||
|
@ -45,6 +47,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks;
|
||||
|
||||
|
@ -54,6 +57,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
|
||||
|
||||
|
@ -63,6 +67,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.GridView gvPlans;
|
||||
|
||||
|
@ -72,6 +77,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.CollapsiblePanel secPlan;
|
||||
|
||||
|
@ -81,6 +87,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Panel Plan;
|
||||
|
||||
|
@ -90,6 +97,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtPlan;
|
||||
|
||||
|
@ -99,6 +107,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.RequiredFieldValidator valRequirePlan;
|
||||
|
||||
|
@ -108,6 +117,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.CollapsiblePanel secPlanFeatures;
|
||||
|
||||
|
@ -117,6 +127,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Panel PlanFeatures;
|
||||
|
||||
|
@ -126,6 +137,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox chkIM;
|
||||
|
||||
|
@ -135,6 +147,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox chkMobility;
|
||||
|
||||
|
@ -144,6 +157,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox chkConferencing;
|
||||
|
||||
|
@ -153,6 +167,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox chkEnterpriseVoice;
|
||||
|
||||
|
@ -162,6 +177,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.CollapsiblePanel secPlanFeaturesFederation;
|
||||
|
||||
|
@ -171,6 +187,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Panel PlanFeaturesFederation;
|
||||
|
||||
|
@ -180,6 +197,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox chkFederation;
|
||||
|
||||
|
@ -189,24 +207,17 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox chkRemoteUserAccess;
|
||||
|
||||
/// <summary>
|
||||
/// chkPublicIMConnectivity 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 chkPublicIMConnectivity;
|
||||
|
||||
/// <summary>
|
||||
/// secPlanFeaturesArchiving control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.CollapsiblePanel secPlanFeaturesArchiving;
|
||||
|
||||
|
@ -216,6 +227,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Panel PlanFeaturesArchiving;
|
||||
|
||||
|
@ -225,6 +237,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize locArchivingPolicy;
|
||||
|
||||
|
@ -234,6 +247,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.DropDownList ddArchivingPolicy;
|
||||
|
||||
|
@ -243,6 +257,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.CollapsiblePanel secPlanFeaturesMeeting;
|
||||
|
||||
|
@ -252,6 +267,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Panel PlanFeaturesMeeting;
|
||||
|
||||
|
@ -261,6 +277,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox chkAllowOrganizeMeetingsWithExternalAnonymous;
|
||||
|
||||
|
@ -270,6 +287,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.CollapsiblePanel secPlanFeaturesTelephony;
|
||||
|
||||
|
@ -279,6 +297,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Panel PlanFeaturesTelephony;
|
||||
|
||||
|
@ -288,6 +307,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize locTelephony;
|
||||
|
||||
|
@ -297,6 +317,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.DropDownList ddTelephony;
|
||||
|
||||
|
@ -306,6 +327,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Panel pnEnterpriseVoice;
|
||||
|
||||
|
@ -315,6 +337,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize locTelephonyProvider;
|
||||
|
||||
|
@ -324,6 +347,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox tbTelephoneProvider;
|
||||
|
||||
|
@ -333,6 +357,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button btnAccept;
|
||||
|
||||
|
@ -342,6 +367,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.RequiredFieldValidator AcceptRequiredValidator;
|
||||
|
||||
|
@ -351,6 +377,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize locDialPlan;
|
||||
|
||||
|
@ -360,6 +387,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.DropDownList ddTelephonyDialPlanPolicy;
|
||||
|
||||
|
@ -369,6 +397,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize locVoicePolicy;
|
||||
|
||||
|
@ -378,6 +407,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.DropDownList ddTelephonyVoicePolicy;
|
||||
|
||||
|
@ -387,6 +417,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Panel pnServerURI;
|
||||
|
||||
|
@ -396,6 +427,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize locServerURI;
|
||||
|
||||
|
@ -405,6 +437,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox tbServerURI;
|
||||
|
||||
|
@ -414,6 +447,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button btnAddPlan;
|
||||
|
||||
|
@ -423,6 +457,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button btnUpdatePlan;
|
||||
|
||||
|
@ -432,6 +467,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtStatus;
|
||||
}
|
||||
|
|
|
@ -57,6 +57,10 @@
|
|||
<td class="SubHead" nowrap><asp:Label ID="lblLyncUsers" runat="server" meta:resourcekey="lblLyncUsers" Text="Lync Users:"></asp:Label></td>
|
||||
<td class="Normal"><wsp:Quota ID="quotaLyncUsers" runat="server" QuotaName="Lync.Users" DisplayGauge="True" /></td>
|
||||
</tr>
|
||||
<tr ID="pnlLyncPhone" runat="server">
|
||||
<td class="SubHead" nowrap><asp:Label ID="Label1" runat="server" meta:resourcekey="lblLyncPhone" Text="Lync Phone Numbers:"></asp:Label></td>
|
||||
<td class="Normal"><wsp:Quota ID="quotaLyncPhone" runat="server" QuotaName="Lync.PhoneNumbers" DisplayGauge="True" /></td>
|
||||
</tr>
|
||||
|
||||
<tr ID="pnlBlackBerryUsers" runat="server">
|
||||
<td class="SubHead" nowrap><asp:Label ID="lblBlackBerryUsers" runat="server" meta:resourcekey="lblBlackBerryUsers" Text="BlackBerry Users:"></asp:Label></td>
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.3074
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
|
@ -46,6 +47,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlDiskspace;
|
||||
|
||||
|
@ -55,6 +57,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.Quota quotaDiskspace;
|
||||
|
||||
|
@ -64,6 +67,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.HyperLink lnkViewDiskspaceDetails;
|
||||
|
||||
|
@ -73,6 +77,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlBandwidth;
|
||||
|
||||
|
@ -82,6 +87,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.Quota quotaBandwidth;
|
||||
|
||||
|
@ -91,6 +97,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.HyperLink lnkViewBandwidthDetails;
|
||||
|
||||
|
@ -100,6 +107,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlDomains;
|
||||
|
||||
|
@ -109,6 +117,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblDomains;
|
||||
|
||||
|
@ -118,6 +127,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.Quota quotaDomains;
|
||||
|
||||
|
@ -127,6 +137,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlSubDomains;
|
||||
|
||||
|
@ -136,6 +147,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblSubDomains;
|
||||
|
||||
|
@ -145,6 +157,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.Quota quotaSubDomains;
|
||||
|
||||
|
@ -154,6 +167,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlDomainPointers;
|
||||
|
||||
|
@ -163,6 +177,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblDomainPointers;
|
||||
|
||||
|
@ -172,6 +187,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.Quota quotaDomainPointers;
|
||||
|
||||
|
@ -181,6 +197,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlOrganizations;
|
||||
|
||||
|
@ -190,6 +207,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblOrganizations;
|
||||
|
||||
|
@ -199,6 +217,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.Quota quotaOrganizations;
|
||||
|
||||
|
@ -208,6 +227,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlUserAccounts;
|
||||
|
||||
|
@ -217,6 +237,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblUserAccounts;
|
||||
|
||||
|
@ -226,6 +247,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.Quota quotaUserAccounts;
|
||||
|
||||
|
@ -235,6 +257,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlExchangeAccounts;
|
||||
|
||||
|
@ -244,6 +267,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblExchangeAccounts;
|
||||
|
||||
|
@ -253,6 +277,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.Quota quotaExchangeAccounts;
|
||||
|
||||
|
@ -262,6 +287,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlExchangeStorage;
|
||||
|
||||
|
@ -271,6 +297,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblExchangeStorage;
|
||||
|
||||
|
@ -280,6 +307,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.Quota quotaExchangeStorage;
|
||||
|
||||
|
@ -289,6 +317,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlMailAccounts;
|
||||
|
||||
|
@ -298,6 +327,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblMailAccounts;
|
||||
|
||||
|
@ -307,6 +337,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.Quota quotaMailAccounts;
|
||||
|
||||
|
@ -316,6 +347,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlOCSUsers;
|
||||
|
||||
|
@ -325,6 +357,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblOCSUsers;
|
||||
|
||||
|
@ -334,6 +367,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.Quota quotaOCSUsers;
|
||||
|
||||
|
@ -343,6 +377,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlLyncUsers;
|
||||
|
||||
|
@ -352,6 +387,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblLyncUsers;
|
||||
|
||||
|
@ -361,15 +397,47 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.Quota quotaLyncUsers;
|
||||
|
||||
/// <summary>
|
||||
/// pnlLyncPhone 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.HtmlTableRow pnlLyncPhone;
|
||||
|
||||
/// <summary>
|
||||
/// Label1 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 Label1;
|
||||
|
||||
/// <summary>
|
||||
/// quotaLyncPhone control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.Quota quotaLyncPhone;
|
||||
|
||||
/// <summary>
|
||||
/// pnlBlackBerryUsers 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.HtmlTableRow pnlBlackBerryUsers;
|
||||
|
||||
|
@ -379,6 +447,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblBlackBerryUsers;
|
||||
|
||||
|
@ -388,6 +457,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.Quota quotaBlackBerryUsers;
|
||||
|
||||
|
@ -397,6 +467,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlSharepointSites;
|
||||
|
||||
|
@ -406,6 +477,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblSharepointSites;
|
||||
|
||||
|
@ -415,6 +487,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.Quota quotaSharepointSites;
|
||||
|
||||
|
@ -424,6 +497,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlWebSites;
|
||||
|
||||
|
@ -433,6 +507,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblWebSites;
|
||||
|
||||
|
@ -442,6 +517,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.Quota quotaWebSites;
|
||||
|
||||
|
@ -451,6 +527,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlFtpAccounts;
|
||||
|
||||
|
@ -460,6 +537,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblFtpAccounts;
|
||||
|
||||
|
@ -469,6 +547,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.Quota quotaFtpAccounts;
|
||||
|
||||
|
@ -478,6 +557,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlDatabases;
|
||||
|
||||
|
@ -487,6 +567,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblDatabases;
|
||||
|
||||
|
@ -496,6 +577,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.Quota quotaDatabases;
|
||||
|
||||
|
@ -505,6 +587,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlHyperVForPC;
|
||||
|
||||
|
@ -514,6 +597,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblHyperVForPC;
|
||||
|
||||
|
@ -523,6 +607,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.Quota quotaNumberOfVm;
|
||||
|
||||
|
@ -532,6 +617,7 @@ namespace WebsitePanel.Portal {
|
|||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button btnViewQuotas;
|
||||
}
|
||||
|
|
|
@ -90,7 +90,7 @@ namespace WebsitePanel.Portal.UserControls
|
|||
}
|
||||
|
||||
int quotaAllowed = -1;
|
||||
string quotaName = (String.Compare(ResourceGroup, ResourceGroups.VPS, true) == 0) ? Quotas.VPS_EXTERNAL_IP_ADDRESSES_NUMBER : Quotas.WEB_IP_ADDRESSES;
|
||||
string quotaName = Quotas.LYNC_PHONE;
|
||||
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||
if (cntx.Quotas.ContainsKey(quotaName))
|
||||
{
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.3074
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.3074
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
|
|
|
@ -79,5 +79,11 @@ namespace WebsitePanel.Portal
|
|||
{
|
||||
ddlFilterColumn.Items.Add(new ListItem(columnTitle, columnName));
|
||||
}
|
||||
|
||||
public override void Focus()
|
||||
{
|
||||
base.Focus();
|
||||
txtFilterValue.Focus();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -67,7 +67,10 @@ namespace WebsitePanel.Portal
|
|||
|
||||
|
||||
gvUsers.Sort("Username", System.Web.UI.WebControls.SortDirection.Ascending);
|
||||
|
||||
}
|
||||
|
||||
searchBox.Focus();
|
||||
}
|
||||
|
||||
public string GetUserHomePageUrl(int userId)
|
||||
|
|
|
@ -44,6 +44,9 @@ namespace WebsitePanel.Portal
|
|||
this.ContainerControl.Visible = (PanelSecurity.SelectedUser.Role != UserRole.User);
|
||||
lnkAllCustomers.NavigateUrl = NavigatePageURL(PortalUtils.GetUserCustomersPageId(),
|
||||
PortalUtils.USER_ID_PARAM, PanelSecurity.SelectedUserId.ToString());
|
||||
|
||||
if (!IsPostBack)
|
||||
txtFilterValue.Focus();
|
||||
}
|
||||
|
||||
private void BindGroupings()
|
||||
|
|
|
@ -209,6 +209,13 @@
|
|||
<Compile Include="Code\ReportingServices\IResourceStorage.cs" />
|
||||
<Compile Include="Code\ReportingServices\ReportingServicesUtils.cs" />
|
||||
<Compile Include="Code\UserControls\Tab.cs" />
|
||||
<Compile Include="ExchangeServer\OrganizationSecurityGroupMemberOf.ascx.cs">
|
||||
<DependentUpon>OrganizationSecurityGroupMemberOf.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ExchangeServer\OrganizationSecurityGroupMemberOf.ascx.designer.cs">
|
||||
<DependentUpon>OrganizationSecurityGroupMemberOf.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ExchangeServer\ExchangeDistributionListMemberOf.ascx.cs">
|
||||
<DependentUpon>ExchangeDistributionListMemberOf.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
@ -3979,6 +3986,7 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="ApplyEnableHardQuotaFeature.ascx" />
|
||||
<Content Include="ExchangeServer\OrganizationSecurityGroupMemberOf.ascx" />
|
||||
<Content Include="ExchangeServer\ExchangeDistributionListMemberOf.ascx" />
|
||||
<Content Include="ExchangeServer\ExchangeMailboxMemberOf.ascx" />
|
||||
<Content Include="ExchangeServer\OrganizationAddDomainName.ascx" />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue