Merge commit
This commit is contained in:
commit
cc2fe76768
112 changed files with 14125 additions and 299 deletions
|
@ -42964,11 +42964,11 @@ INSERT [dbo].[ServiceDefaultProperties] ([ProviderID], [PropertyName], [Property
|
|||
GO
|
||||
INSERT [dbo].[ServiceDefaultProperties] ([ProviderID], [PropertyName], [PropertyValue]) VALUES (101, N'PerlPath', N'%SYSTEMDRIVE%\Perl\bin\PerlEx30.dll')
|
||||
GO
|
||||
INSERT [dbo].[ServiceDefaultProperties] ([ProviderID], [PropertyName], [PropertyValue]) VALUES (101, N'Php4Path', N'%PROGRAMFILES%\PHP\php.exe')
|
||||
INSERT [dbo].[ServiceDefaultProperties] ([ProviderID], [PropertyName], [PropertyValue]) VALUES (101, N'Php4Path', N'%PROGRAMFILES(x86)%\PHP\php.exe')
|
||||
GO
|
||||
INSERT [dbo].[ServiceDefaultProperties] ([ProviderID], [PropertyName], [PropertyValue]) VALUES (101, N'PhpMode', N'FastCGI')
|
||||
GO
|
||||
INSERT [dbo].[ServiceDefaultProperties] ([ProviderID], [PropertyName], [PropertyValue]) VALUES (101, N'PhpPath', N'%PROGRAMFILES%\PHP\php-cgi.exe')
|
||||
INSERT [dbo].[ServiceDefaultProperties] ([ProviderID], [PropertyName], [PropertyValue]) VALUES (101, N'PhpPath', N'%PROGRAMFILES(x86)%\PHP\php-cgi.exe')
|
||||
GO
|
||||
INSERT [dbo].[ServiceDefaultProperties] ([ProviderID], [PropertyName], [PropertyValue]) VALUES (101, N'ProtectedGroupsFile', N'.htgroup')
|
||||
GO
|
||||
|
@ -43014,11 +43014,11 @@ INSERT [dbo].[ServiceDefaultProperties] ([ProviderID], [PropertyName], [Property
|
|||
GO
|
||||
INSERT [dbo].[ServiceDefaultProperties] ([ProviderID], [PropertyName], [PropertyValue]) VALUES (105, N'PerlPath', N'%SYSTEMDRIVE%\Perl\bin\PerlEx30.dll')
|
||||
GO
|
||||
INSERT [dbo].[ServiceDefaultProperties] ([ProviderID], [PropertyName], [PropertyValue]) VALUES (105, N'Php4Path', N'%PROGRAMFILES%\PHP\php.exe')
|
||||
INSERT [dbo].[ServiceDefaultProperties] ([ProviderID], [PropertyName], [PropertyValue]) VALUES (105, N'Php4Path', N'%PROGRAMFILES(x86)%\PHP\php.exe')
|
||||
GO
|
||||
INSERT [dbo].[ServiceDefaultProperties] ([ProviderID], [PropertyName], [PropertyValue]) VALUES (105, N'PhpMode', N'FastCGI')
|
||||
GO
|
||||
INSERT [dbo].[ServiceDefaultProperties] ([ProviderID], [PropertyName], [PropertyValue]) VALUES (105, N'PhpPath', N'%PROGRAMFILES%\PHP\php-cgi.exe')
|
||||
INSERT [dbo].[ServiceDefaultProperties] ([ProviderID], [PropertyName], [PropertyValue]) VALUES (105, N'PhpPath', N'%PROGRAMFILES(x86)%\PHP\php-cgi.exe')
|
||||
GO
|
||||
INSERT [dbo].[ServiceDefaultProperties] ([ProviderID], [PropertyName], [PropertyValue]) VALUES (105, N'ProtectedGroupsFile', N'.htgroup')
|
||||
GO
|
||||
|
|
|
@ -2403,7 +2403,7 @@ INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupContr
|
|||
END
|
||||
GO
|
||||
|
||||
-- RDS Quota
|
||||
-- RDS Quotas
|
||||
|
||||
IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'RDS.Users')
|
||||
BEGIN
|
||||
|
@ -2411,6 +2411,12 @@ INSERT [dbo].[Quotas] ([QuotaID], [GroupID],[QuotaOrder], [QuotaName], [QuotaDe
|
|||
END
|
||||
GO
|
||||
|
||||
IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'RDS.Servers')
|
||||
BEGIN
|
||||
INSERT [dbo].[Quotas] ([QuotaID], [GroupID],[QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (451, 45, 2, N'RDS.Servers',N'Remote Desktop Servers',2, 0 , NULL)
|
||||
END
|
||||
GO
|
||||
|
||||
-- RDS Provider
|
||||
|
||||
IF NOT EXISTS (SELECT * FROM [dbo].[Providers] WHERE [DisplayName] = 'Remote Desktop Services Windows 2012')
|
||||
|
@ -5418,9 +5424,668 @@ deallocate c
|
|||
|
||||
GO
|
||||
|
||||
|
||||
|
||||
/*Remote Desktop Services*/
|
||||
|
||||
/*Remote Desktop Services Tables*/
|
||||
IF EXISTS (SELECT * FROM SYS.TABLES WHERE name = 'RDSCollectionUsers')
|
||||
DROP TABLE RDSCollectionUsers
|
||||
GO
|
||||
CREATE TABLE RDSCollectionUsers
|
||||
(
|
||||
ID INT IDENTITY(1,1) NOT NULL PRIMARY KEY,
|
||||
RDSCollectionId INT NOT NULL,
|
||||
AccountID INT NOT NULL
|
||||
)
|
||||
GO
|
||||
|
||||
|
||||
IF EXISTS (SELECT * FROM SYS.TABLES WHERE name = 'RDSServers')
|
||||
DROP TABLE RDSServers
|
||||
GO
|
||||
CREATE TABLE RDSServers
|
||||
(
|
||||
ID INT IDENTITY(1,1) NOT NULL PRIMARY KEY,
|
||||
ItemID INT,
|
||||
Name NVARCHAR(255),
|
||||
FqdName NVARCHAR(255),
|
||||
Description NVARCHAR(255),
|
||||
RDSCollectionId INT/* FOREIGN KEY REFERENCES RDSCollection (ID)*/
|
||||
)
|
||||
GO
|
||||
|
||||
|
||||
IF EXISTS (SELECT * FROM SYS.TABLES WHERE name = 'RDSCollections')
|
||||
DROP TABLE RDSCollections
|
||||
GO
|
||||
CREATE TABLE RDSCollections
|
||||
(
|
||||
ID INT IDENTITY(1,1) NOT NULL PRIMARY KEY,
|
||||
ItemID INT NOT NULL,
|
||||
Name NVARCHAR(255),
|
||||
Description NVARCHAR(255)
|
||||
)
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[RDSCollectionUsers] WITH CHECK ADD CONSTRAINT [FK_RDSCollectionUsers_RDSCollectionId] FOREIGN KEY([RDSCollectionId])
|
||||
REFERENCES [dbo].[RDSCollections] ([ID])
|
||||
ON DELETE CASCADE
|
||||
GO
|
||||
|
||||
|
||||
ALTER TABLE [dbo].[RDSCollectionUsers] WITH CHECK ADD CONSTRAINT [FK_RDSCollectionUsers_UserId] FOREIGN KEY([AccountID])
|
||||
REFERENCES [dbo].[ExchangeAccounts] ([AccountID])
|
||||
ON DELETE CASCADE
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[RDSServers] WITH CHECK ADD CONSTRAINT [FK_RDSServers_RDSCollectionId] FOREIGN KEY([RDSCollectionId])
|
||||
REFERENCES [dbo].[RDSCollections] ([ID])
|
||||
GO
|
||||
|
||||
/*Remote Desktop Services Procedures*/
|
||||
|
||||
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'AddRDSServer')
|
||||
DROP PROCEDURE AddRDSServer
|
||||
GO
|
||||
CREATE PROCEDURE [dbo].[AddRDSServer]
|
||||
(
|
||||
@RDSServerID INT OUTPUT,
|
||||
@Name NVARCHAR(255),
|
||||
@FqdName NVARCHAR(255),
|
||||
@Description NVARCHAR(255)
|
||||
)
|
||||
AS
|
||||
INSERT INTO RDSServers
|
||||
(
|
||||
Name,
|
||||
FqdName,
|
||||
Description
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
@Name,
|
||||
@FqdName,
|
||||
@Description
|
||||
)
|
||||
|
||||
SET @RDSServerID = SCOPE_IDENTITY()
|
||||
|
||||
RETURN
|
||||
GO
|
||||
|
||||
|
||||
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'DeleteRDSServer')
|
||||
DROP PROCEDURE DeleteRDSServer
|
||||
GO
|
||||
CREATE PROCEDURE [dbo].[DeleteRDSServer]
|
||||
(
|
||||
@Id int
|
||||
)
|
||||
AS
|
||||
DELETE FROM RDSServers
|
||||
WHERE Id = @Id
|
||||
GO
|
||||
|
||||
|
||||
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'UpdateRDSServer')
|
||||
DROP PROCEDURE UpdateRDSServer
|
||||
GO
|
||||
CREATE PROCEDURE [dbo].[UpdateRDSServer]
|
||||
(
|
||||
@Id INT,
|
||||
@ItemID INT,
|
||||
@Name NVARCHAR(255),
|
||||
@FqdName NVARCHAR(255),
|
||||
@Description NVARCHAR(255),
|
||||
@RDSCollectionId INT
|
||||
)
|
||||
AS
|
||||
|
||||
UPDATE RDSServers
|
||||
SET
|
||||
ItemID = @ItemID,
|
||||
Name = @Name,
|
||||
FqdName = @FqdName,
|
||||
Description = @Description,
|
||||
RDSCollectionId = @RDSCollectionId
|
||||
WHERE ID = @Id
|
||||
GO
|
||||
|
||||
|
||||
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'AddRDSServerToOrganization')
|
||||
DROP PROCEDURE AddRDSServerToOrganization
|
||||
GO
|
||||
CREATE PROCEDURE [dbo].[AddRDSServerToOrganization]
|
||||
(
|
||||
@Id INT,
|
||||
@ItemID INT
|
||||
)
|
||||
AS
|
||||
|
||||
UPDATE RDSServers
|
||||
SET
|
||||
ItemID = @ItemID
|
||||
WHERE ID = @Id
|
||||
GO
|
||||
|
||||
|
||||
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'RemoveRDSServerFromOrganization')
|
||||
DROP PROCEDURE RemoveRDSServerFromOrganization
|
||||
GO
|
||||
CREATE PROCEDURE [dbo].[RemoveRDSServerFromOrganization]
|
||||
(
|
||||
@Id INT
|
||||
)
|
||||
AS
|
||||
|
||||
UPDATE RDSServers
|
||||
SET
|
||||
ItemID = NULL
|
||||
WHERE ID = @Id
|
||||
GO
|
||||
|
||||
|
||||
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'AddRDSServerToCollection')
|
||||
DROP PROCEDURE AddRDSServerToCollection
|
||||
GO
|
||||
CREATE PROCEDURE [dbo].[AddRDSServerToCollection]
|
||||
(
|
||||
@Id INT,
|
||||
@RDSCollectionId INT
|
||||
)
|
||||
AS
|
||||
|
||||
UPDATE RDSServers
|
||||
SET
|
||||
RDSCollectionId = @RDSCollectionId
|
||||
WHERE ID = @Id
|
||||
GO
|
||||
|
||||
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'RemoveRDSServerFromCollection')
|
||||
DROP PROCEDURE RemoveRDSServerFromCollection
|
||||
GO
|
||||
CREATE PROCEDURE [dbo].[RemoveRDSServerFromCollection]
|
||||
(
|
||||
@Id INT
|
||||
)
|
||||
AS
|
||||
|
||||
UPDATE RDSServers
|
||||
SET
|
||||
RDSCollectionId = NULL
|
||||
WHERE ID = @Id
|
||||
GO
|
||||
|
||||
|
||||
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'GetRDSServersByItemId')
|
||||
DROP PROCEDURE GetRDSServersByItemId
|
||||
GO
|
||||
CREATE PROCEDURE [dbo].[GetRDSServersByItemId]
|
||||
(
|
||||
@ItemID INT
|
||||
)
|
||||
AS
|
||||
SELECT
|
||||
RS.Id,
|
||||
RS.ItemID,
|
||||
RS.Name,
|
||||
RS.FqdName,
|
||||
RS.Description,
|
||||
RS.RdsCollectionId,
|
||||
SI.ItemName
|
||||
FROM RDSServers AS RS
|
||||
LEFT OUTER JOIN ServiceItems AS SI ON SI.ItemId = RS.ItemId
|
||||
WHERE RS.ItemID = @ItemID
|
||||
GO
|
||||
|
||||
|
||||
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'GetRDSServers')
|
||||
DROP PROCEDURE GetRDSServers
|
||||
GO
|
||||
CREATE PROCEDURE [dbo].[GetRDSServers]
|
||||
AS
|
||||
SELECT
|
||||
RS.Id,
|
||||
RS.ItemID,
|
||||
RS.Name,
|
||||
RS.FqdName,
|
||||
RS.Description,
|
||||
RS.RdsCollectionId,
|
||||
SI.ItemName
|
||||
FROM RDSServers AS RS
|
||||
LEFT OUTER JOIN ServiceItems AS SI ON SI.ItemId = RS.ItemId
|
||||
GO
|
||||
|
||||
|
||||
|
||||
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'GetRDSServerById')
|
||||
DROP PROCEDURE GetRDSServerById
|
||||
GO
|
||||
CREATE PROCEDURE [dbo].[GetRDSServerById]
|
||||
(
|
||||
@ID INT
|
||||
)
|
||||
AS
|
||||
SELECT TOP 1
|
||||
RS.Id,
|
||||
RS.ItemID,
|
||||
RS.Name,
|
||||
RS.FqdName,
|
||||
RS.Description,
|
||||
RS.RdsCollectionId,
|
||||
SI.ItemName
|
||||
FROM RDSServers AS RS
|
||||
LEFT OUTER JOIN ServiceItems AS SI ON SI.ItemId = RS.ItemId
|
||||
WHERE Id = @Id
|
||||
GO
|
||||
|
||||
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'GetRDSServersByCollectionId')
|
||||
DROP PROCEDURE GetRDSServersByCollectionId
|
||||
GO
|
||||
CREATE PROCEDURE [dbo].[GetRDSServersByCollectionId]
|
||||
(
|
||||
@RdsCollectionId INT
|
||||
)
|
||||
AS
|
||||
SELECT
|
||||
RS.Id,
|
||||
RS.ItemID,
|
||||
RS.Name,
|
||||
RS.FqdName,
|
||||
RS.Description,
|
||||
RS.RdsCollectionId,
|
||||
SI.ItemName
|
||||
FROM RDSServers AS RS
|
||||
LEFT OUTER JOIN ServiceItems AS SI ON SI.ItemId = RS.ItemId
|
||||
WHERE RdsCollectionId = @RdsCollectionId
|
||||
GO
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'GetRDSServersPaged')
|
||||
DROP PROCEDURE GetRDSServersPaged
|
||||
GO
|
||||
CREATE PROCEDURE [dbo].[GetRDSServersPaged]
|
||||
(
|
||||
@FilterColumn nvarchar(50) = '',
|
||||
@FilterValue nvarchar(50) = '',
|
||||
@ItemID int,
|
||||
@IgnoreItemId bit,
|
||||
@RdsCollectionId int,
|
||||
@IgnoreRdsCollectionId bit,
|
||||
@SortColumn nvarchar(50),
|
||||
@StartRow int,
|
||||
@MaximumRows int
|
||||
)
|
||||
AS
|
||||
-- build query and run it to the temporary table
|
||||
DECLARE @sql nvarchar(2000)
|
||||
|
||||
SET @sql = '
|
||||
|
||||
DECLARE @EndRow int
|
||||
SET @EndRow = @StartRow + @MaximumRows
|
||||
|
||||
DECLARE @RDSServer TABLE
|
||||
(
|
||||
ItemPosition int IDENTITY(0,1),
|
||||
RDSServerId int
|
||||
)
|
||||
INSERT INTO @RDSServer (RDSServerId)
|
||||
SELECT
|
||||
S.ID
|
||||
FROM RDSServers AS S
|
||||
WHERE
|
||||
((((@ItemID is Null AND S.ItemID is null) or @IgnoreItemId = 1)
|
||||
or (@ItemID is not Null AND S.ItemID = @ItemID))
|
||||
and
|
||||
(((@RdsCollectionId is Null AND S.RDSCollectionId is null) or @IgnoreRdsCollectionId = 1)
|
||||
or (@RdsCollectionId is not Null AND S.RDSCollectionId = @RdsCollectionId)))'
|
||||
|
||||
IF @FilterColumn <> '' AND @FilterValue <> ''
|
||||
SET @sql = @sql + ' AND ' + @FilterColumn + ' LIKE @FilterValue '
|
||||
|
||||
IF @SortColumn <> '' AND @SortColumn IS NOT NULL
|
||||
SET @sql = @sql + ' ORDER BY ' + @SortColumn + ' '
|
||||
|
||||
SET @sql = @sql + ' SELECT COUNT(RDSServerId) FROM @RDSServer;
|
||||
SELECT
|
||||
ST.ID,
|
||||
ST.ItemID,
|
||||
ST.Name,
|
||||
ST.FqdName,
|
||||
ST.Description,
|
||||
ST.RdsCollectionId,
|
||||
SI.ItemName
|
||||
FROM @RDSServer AS S
|
||||
INNER JOIN RDSServers AS ST ON S.RDSServerId = ST.ID
|
||||
LEFT OUTER JOIN ServiceItems AS SI ON SI.ItemId = ST.ItemId
|
||||
WHERE S.ItemPosition BETWEEN @StartRow AND @EndRow'
|
||||
|
||||
exec sp_executesql @sql, N'@StartRow int, @MaximumRows int, @FilterValue nvarchar(50), @ItemID int, @RdsCollectionId int, @IgnoreItemId bit, @IgnoreRdsCollectionId bit',
|
||||
@StartRow, @MaximumRows, @FilterValue, @ItemID, @RdsCollectionId, @IgnoreItemId , @IgnoreRdsCollectionId
|
||||
|
||||
|
||||
RETURN
|
||||
|
||||
GO
|
||||
SET ANSI_NULLS ON
|
||||
GO
|
||||
SET QUOTED_IDENTIFIER ON
|
||||
GO
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'GetRDSCollectionsPaged')
|
||||
DROP PROCEDURE GetRDSCollectionsPaged
|
||||
GO
|
||||
CREATE PROCEDURE [dbo].[GetRDSCollectionsPaged]
|
||||
(
|
||||
@FilterColumn nvarchar(50) = '',
|
||||
@FilterValue nvarchar(50) = '',
|
||||
@ItemID int,
|
||||
@SortColumn nvarchar(50),
|
||||
@StartRow int,
|
||||
@MaximumRows int
|
||||
)
|
||||
AS
|
||||
-- build query and run it to the temporary table
|
||||
DECLARE @sql nvarchar(2000)
|
||||
|
||||
SET @sql = '
|
||||
|
||||
DECLARE @EndRow int
|
||||
SET @EndRow = @StartRow + @MaximumRows
|
||||
DECLARE @RDSCollections TABLE
|
||||
(
|
||||
ItemPosition int IDENTITY(0,1),
|
||||
RDSCollectionId int
|
||||
)
|
||||
INSERT INTO @RDSCollections (RDSCollectionId)
|
||||
SELECT
|
||||
S.ID
|
||||
FROM RDSCollections AS S
|
||||
WHERE
|
||||
((@ItemID is Null AND S.ItemID is null)
|
||||
or (@ItemID is not Null AND S.ItemID = @ItemID))'
|
||||
|
||||
IF @FilterColumn <> '' AND @FilterValue <> ''
|
||||
SET @sql = @sql + ' AND ' + @FilterColumn + ' LIKE @FilterValue '
|
||||
|
||||
IF @SortColumn <> '' AND @SortColumn IS NOT NULL
|
||||
SET @sql = @sql + ' ORDER BY ' + @SortColumn + ' '
|
||||
|
||||
SET @sql = @sql + ' SELECT COUNT(RDSCollectionId) FROM @RDSCollections;
|
||||
SELECT
|
||||
CR.ID,
|
||||
CR.ItemID,
|
||||
CR.Name,
|
||||
CR.Description
|
||||
FROM @RDSCollections AS C
|
||||
INNER JOIN RDSCollections AS CR ON C.RDSCollectionId = CR.ID
|
||||
WHERE C.ItemPosition BETWEEN @StartRow AND @EndRow'
|
||||
|
||||
exec sp_executesql @sql, N'@StartRow int, @MaximumRows int, @FilterValue nvarchar(50), @ItemID int',
|
||||
@StartRow, @MaximumRows, @FilterValue, @ItemID
|
||||
|
||||
|
||||
RETURN
|
||||
|
||||
GO
|
||||
SET ANSI_NULLS ON
|
||||
GO
|
||||
SET QUOTED_IDENTIFIER ON
|
||||
GO
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'GetRDSCollectionsByItemId')
|
||||
DROP PROCEDURE GetRDSCollectionsByItemId
|
||||
GO
|
||||
CREATE PROCEDURE [dbo].[GetRDSCollectionsByItemId]
|
||||
(
|
||||
@ItemID INT
|
||||
)
|
||||
AS
|
||||
SELECT
|
||||
Id,
|
||||
ItemId,
|
||||
Name,
|
||||
Description
|
||||
FROM RDSCollections
|
||||
WHERE ItemID = @ItemID
|
||||
GO
|
||||
|
||||
|
||||
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'GetRDSCollectionByName')
|
||||
DROP PROCEDURE GetRDSCollectionByName
|
||||
GO
|
||||
CREATE PROCEDURE [dbo].[GetRDSCollectionByName]
|
||||
(
|
||||
@Name NVARCHAR(255)
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT TOP 1
|
||||
Id,
|
||||
Name,
|
||||
ItemId,
|
||||
Description
|
||||
FROM RDSCollections
|
||||
WHERE Name = @Name
|
||||
GO
|
||||
|
||||
|
||||
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'GetRDSCollectionById')
|
||||
DROP PROCEDURE GetRDSCollectionById
|
||||
GO
|
||||
CREATE PROCEDURE [dbo].[GetRDSCollectionById]
|
||||
(
|
||||
@ID INT
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT TOP 1
|
||||
Id,
|
||||
ItemId,
|
||||
Name,
|
||||
Description
|
||||
FROM RDSCollections
|
||||
WHERE ID = @ID
|
||||
GO
|
||||
|
||||
|
||||
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'AddRDSCollection')
|
||||
DROP PROCEDURE AddRDSCollection
|
||||
GO
|
||||
CREATE PROCEDURE [dbo].[AddRDSCollection]
|
||||
(
|
||||
@RDSCollectionID INT OUTPUT,
|
||||
@ItemID INT,
|
||||
@Name NVARCHAR(255),
|
||||
@Description NVARCHAR(255)
|
||||
)
|
||||
AS
|
||||
|
||||
INSERT INTO RDSCollections
|
||||
(
|
||||
ItemID,
|
||||
Name,
|
||||
Description
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
@ItemID,
|
||||
@Name,
|
||||
@Description
|
||||
)
|
||||
|
||||
SET @RDSCollectionID = SCOPE_IDENTITY()
|
||||
|
||||
RETURN
|
||||
GO
|
||||
|
||||
|
||||
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'UpdateRDSCollection')
|
||||
DROP PROCEDURE UpdateRDSCollection
|
||||
GO
|
||||
CREATE PROCEDURE [dbo].[UpdateRDSCollection]
|
||||
(
|
||||
@ID INT,
|
||||
@ItemID INT,
|
||||
@Name NVARCHAR(255),
|
||||
@Description NVARCHAR(255)
|
||||
)
|
||||
AS
|
||||
|
||||
UPDATE RDSCollections
|
||||
SET
|
||||
ItemID = @ItemID,
|
||||
Name = @Name,
|
||||
Description = @Description
|
||||
WHERE ID = @Id
|
||||
GO
|
||||
|
||||
|
||||
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'DeleteRDSCollection')
|
||||
DROP PROCEDURE DeleteRDSCollection
|
||||
GO
|
||||
CREATE PROCEDURE [dbo].[DeleteRDSCollection]
|
||||
(
|
||||
@Id int
|
||||
)
|
||||
AS
|
||||
|
||||
UPDATE RDSServers
|
||||
SET
|
||||
RDSCollectionId = Null
|
||||
WHERE RDSCollectionId = @Id
|
||||
|
||||
DELETE FROM RDSCollections
|
||||
WHERE Id = @Id
|
||||
GO
|
||||
|
||||
|
||||
|
||||
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'GetRDSCollectionUsersByRDSCollectionId')
|
||||
DROP PROCEDURE GetRDSCollectionUsersByRDSCollectionId
|
||||
GO
|
||||
CREATE PROCEDURE [dbo].[GetRDSCollectionUsersByRDSCollectionId]
|
||||
(
|
||||
@ID INT
|
||||
)
|
||||
AS
|
||||
SELECT
|
||||
[AccountID],
|
||||
[ItemID],
|
||||
[AccountType],
|
||||
[AccountName],
|
||||
[DisplayName],
|
||||
[PrimaryEmailAddress],
|
||||
[MailEnabledPublicFolder],
|
||||
[MailboxManagerActions],
|
||||
[SamAccountName],
|
||||
[AccountPassword],
|
||||
[CreatedDate],
|
||||
[MailboxPlanId],
|
||||
[SubscriberNumber],
|
||||
[UserPrincipalName],
|
||||
[ExchangeDisclaimerId],
|
||||
[ArchivingMailboxPlanId],
|
||||
[EnableArchiving],
|
||||
[LevelID],
|
||||
[IsVIP]
|
||||
FROM ExchangeAccounts
|
||||
WHERE AccountID IN (Select AccountId from RDSCollectionUsers where RDSCollectionId = @Id)
|
||||
GO
|
||||
|
||||
|
||||
|
||||
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'AddUserToRDSCollection')
|
||||
DROP PROCEDURE AddUserToRDSCollection
|
||||
GO
|
||||
CREATE PROCEDURE [dbo].[AddUserToRDSCollection]
|
||||
(
|
||||
@RDSCollectionID INT,
|
||||
@AccountId INT
|
||||
)
|
||||
AS
|
||||
|
||||
INSERT INTO RDSCollectionUsers
|
||||
(
|
||||
RDSCollectionId,
|
||||
AccountID
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
@RDSCollectionID,
|
||||
@AccountId
|
||||
)
|
||||
GO
|
||||
|
||||
|
||||
|
||||
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'RemoveRDSUserFromRDSCollection')
|
||||
DROP PROCEDURE RemoveRDSUserFromRDSCollection
|
||||
GO
|
||||
CREATE PROCEDURE [dbo].[RemoveRDSUserFromRDSCollection]
|
||||
(
|
||||
@AccountId INT,
|
||||
@RDSCollectionId INT
|
||||
)
|
||||
AS
|
||||
|
||||
|
||||
DELETE FROM RDSCollectionUsers
|
||||
WHERE AccountId = @AccountId AND RDSCollectionId = @RDSCollectionId
|
||||
GO
|
||||
|
||||
|
||||
|
||||
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'GetOrganizationRdsUsersCount')
|
||||
DROP PROCEDURE GetOrganizationRdsUsersCount
|
||||
GO
|
||||
CREATE PROCEDURE [dbo].GetOrganizationRdsUsersCount
|
||||
(
|
||||
@ItemID INT,
|
||||
@TotalNumber int OUTPUT
|
||||
)
|
||||
AS
|
||||
SELECT
|
||||
@TotalNumber = Count([RDSCollectionId])
|
||||
FROM [dbo].[RDSCollectionUsers]
|
||||
WHERE [RDSCollectionId] in (SELECT [ID] FROM [RDSCollections] where [ItemId] = @ItemId )
|
||||
RETURN
|
||||
GO
|
||||
|
||||
|
||||
-- wsp-10269: Changed php extension path in default properties for IIS70 and IIS80 provider
|
||||
update ServiceDefaultProperties
|
||||
set PhpPath='%PROGRAMFILES(x86)%\PHP\php-cgi.exe'
|
||||
where ProviderId in(101, 105)
|
||||
|
||||
update ServiceDefaultProperties
|
||||
set Php4Path='%PROGRAMFILES(x86)%\PHP\ph.exe'
|
||||
where ProviderId in(101, 105)
|
||||
|
||||
GO
|
||||
|
||||
-- Hyper-V 2012 R2
|
||||
IF NOT EXISTS (SELECT * FROM [dbo].[Providers] WHERE [ProviderName] = 'HyperV2012R2')
|
||||
IF NOT EXISTS (SELECT * FROM [dbo].[Providers] WHERE [ProviderName] = 'Microsoft Hyper-V 2012 R2')
|
||||
BEGIN
|
||||
INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (350, 30, N'HyperV2012R2', N'Microsoft Hyper-V 2012 R2', N'WebsitePanel.Providers.Virtualization.HyperV2012R2, WebsitePanel.Providers.Virtualization.HyperV2012R2', N'HyperV', 1)
|
||||
END
|
||||
GO
|
||||
G
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2013
|
||||
VisualStudioVersion = 12.0.30723.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.FixDefaultPublicFolderMailbox", "WebsitePanel.FixDefaultPublicFolderMailbox\WebsitePanel.FixDefaultPublicFolderMailbox.csproj", "{07678C66-5671-4836-B8C4-5F214105E189}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{07678C66-5671-4836-B8C4-5F214105E189}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{07678C66-5671-4836-B8C4-5F214105E189}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{07678C66-5671-4836-B8C4-5F214105E189}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{07678C66-5671-4836-B8C4-5F214105E189}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -0,0 +1,211 @@
|
|||
// Copyright (c) 2014, Outercurve Foundation.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// - Redistributions of source code must retain the above copyright notice, this
|
||||
// list of conditions and the following disclaimer.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
using Microsoft.Web.Services3;
|
||||
using WebsitePanel.EnterpriseServer;
|
||||
using WebsitePanel.EnterpriseServer.HostedSolution;
|
||||
|
||||
|
||||
namespace WebsitePanel.FixDefaultPublicFolderMailbox
|
||||
{
|
||||
/// <summary>
|
||||
/// ES Proxy class
|
||||
/// </summary>
|
||||
public class ES
|
||||
{
|
||||
private static ServerContext serverContext = null;
|
||||
|
||||
public static void InitializeServices(ServerContext context)
|
||||
{
|
||||
serverContext = context;
|
||||
}
|
||||
|
||||
public static ES Services
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ES();
|
||||
}
|
||||
}
|
||||
|
||||
public esSystem System
|
||||
{
|
||||
get { return GetCachedProxy<esSystem>(); }
|
||||
}
|
||||
|
||||
public esApplicationsInstaller ApplicationsInstaller
|
||||
{
|
||||
get { return GetCachedProxy<esApplicationsInstaller>(); }
|
||||
}
|
||||
|
||||
public esAuditLog AuditLog
|
||||
{
|
||||
get { return GetCachedProxy<esAuditLog>(); }
|
||||
}
|
||||
|
||||
public esAuthentication Authentication
|
||||
{
|
||||
get { return GetCachedProxy<esAuthentication>(false); }
|
||||
}
|
||||
|
||||
public esComments Comments
|
||||
{
|
||||
get { return GetCachedProxy<esComments>(); }
|
||||
}
|
||||
|
||||
public esDatabaseServers DatabaseServers
|
||||
{
|
||||
get { return GetCachedProxy<esDatabaseServers>(); }
|
||||
}
|
||||
|
||||
public esFiles Files
|
||||
{
|
||||
get { return GetCachedProxy<esFiles>(); }
|
||||
}
|
||||
|
||||
public esFtpServers FtpServers
|
||||
{
|
||||
get { return GetCachedProxy<esFtpServers>(); }
|
||||
}
|
||||
|
||||
public esMailServers MailServers
|
||||
{
|
||||
get { return GetCachedProxy<esMailServers>(); }
|
||||
}
|
||||
|
||||
public esOperatingSystems OperatingSystems
|
||||
{
|
||||
get { return GetCachedProxy<esOperatingSystems>(); }
|
||||
}
|
||||
|
||||
public esPackages Packages
|
||||
{
|
||||
get { return GetCachedProxy<esPackages>(); }
|
||||
}
|
||||
|
||||
public esScheduler Scheduler
|
||||
{
|
||||
get { return GetCachedProxy<esScheduler>(); }
|
||||
}
|
||||
|
||||
public esTasks Tasks
|
||||
{
|
||||
get { return GetCachedProxy<esTasks>(); }
|
||||
}
|
||||
|
||||
public esServers Servers
|
||||
{
|
||||
get { return GetCachedProxy<esServers>(); }
|
||||
}
|
||||
|
||||
public esStatisticsServers StatisticsServers
|
||||
{
|
||||
get { return GetCachedProxy<esStatisticsServers>(); }
|
||||
}
|
||||
|
||||
public esUsers Users
|
||||
{
|
||||
get { return GetCachedProxy<esUsers>(); }
|
||||
}
|
||||
|
||||
public esWebServers WebServers
|
||||
{
|
||||
get { return GetCachedProxy<esWebServers>(); }
|
||||
}
|
||||
|
||||
public esSharePointServers SharePointServers
|
||||
{
|
||||
get { return GetCachedProxy<esSharePointServers>(); }
|
||||
}
|
||||
|
||||
public esImport Import
|
||||
{
|
||||
get { return GetCachedProxy<esImport>(); }
|
||||
}
|
||||
|
||||
public esBackup Backup
|
||||
{
|
||||
get { return GetCachedProxy<esBackup>(); }
|
||||
}
|
||||
|
||||
|
||||
public esExchangeServer ExchangeServer
|
||||
{
|
||||
get { return GetCachedProxy<esExchangeServer>(); }
|
||||
}
|
||||
|
||||
public esOrganizations Organizations
|
||||
{
|
||||
get
|
||||
{
|
||||
return GetCachedProxy<esOrganizations>();
|
||||
}
|
||||
}
|
||||
|
||||
protected ES()
|
||||
{
|
||||
}
|
||||
|
||||
protected virtual T GetCachedProxy<T>()
|
||||
{
|
||||
return GetCachedProxy<T>(true);
|
||||
}
|
||||
|
||||
protected virtual T GetCachedProxy<T>(bool secureCalls)
|
||||
{
|
||||
if (serverContext == null)
|
||||
{
|
||||
throw new Exception("Server context is not specified");
|
||||
}
|
||||
|
||||
Type t = typeof(T);
|
||||
string key = t.FullName + ".ServiceProxy";
|
||||
T proxy = (T)Activator.CreateInstance(t);
|
||||
|
||||
object p = proxy;
|
||||
|
||||
// configure proxy
|
||||
EnterpriseServerProxyConfigurator cnfg = new EnterpriseServerProxyConfigurator();
|
||||
cnfg.EnterpriseServerUrl = serverContext.Server;
|
||||
if (secureCalls)
|
||||
{
|
||||
cnfg.Username = serverContext.Username;
|
||||
cnfg.Password = serverContext.Password;
|
||||
}
|
||||
|
||||
cnfg.Configure((WebServicesClientProtocol)p);
|
||||
|
||||
return proxy;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,109 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Configuration;
|
||||
using WebsitePanel.Providers.HostedSolution;
|
||||
|
||||
namespace WebsitePanel.FixDefaultPublicFolderMailbox
|
||||
{
|
||||
class Fix
|
||||
{
|
||||
static private ServerContext serverContext;
|
||||
|
||||
public const int ERROR_USER_WRONG_PASSWORD = -110;
|
||||
public const int ERROR_USER_WRONG_USERNAME = -109;
|
||||
public const int ERROR_USER_ACCOUNT_CANCELLED = -105;
|
||||
public const int ERROR_USER_ACCOUNT_PENDING = -103;
|
||||
|
||||
private static bool Connect(string server, string username, string password)
|
||||
{
|
||||
bool ret = true;
|
||||
serverContext = new ServerContext();
|
||||
serverContext.Server = server;
|
||||
serverContext.Username = username;
|
||||
serverContext.Password = password;
|
||||
|
||||
ES.InitializeServices(serverContext);
|
||||
int status = -1;
|
||||
try
|
||||
{
|
||||
status = ES.Services.Authentication.AuthenticateUser(serverContext.Username, serverContext.Password, null);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteError("Authentication error", ex);
|
||||
return false;
|
||||
}
|
||||
|
||||
string errorMessage = "Check your internet connection or server URL.";
|
||||
if (status != 0)
|
||||
{
|
||||
switch (status)
|
||||
{
|
||||
case ERROR_USER_WRONG_USERNAME:
|
||||
errorMessage = "Wrong username.";
|
||||
break;
|
||||
case ERROR_USER_WRONG_PASSWORD:
|
||||
errorMessage = "Wrong password.";
|
||||
break;
|
||||
case ERROR_USER_ACCOUNT_CANCELLED:
|
||||
errorMessage = "Account cancelled.";
|
||||
break;
|
||||
case ERROR_USER_ACCOUNT_PENDING:
|
||||
errorMessage = "Account pending.";
|
||||
break;
|
||||
}
|
||||
Log.WriteError(
|
||||
string.Format("Cannot connect to the remote server. {0}", errorMessage));
|
||||
ret = false;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static void Start(string organizationId)
|
||||
{
|
||||
|
||||
//Authenticates user
|
||||
if (!Connect(
|
||||
ConfigurationManager.AppSettings["ES.WebService"],
|
||||
ConfigurationManager.AppSettings["ES.Username"],
|
||||
ConfigurationManager.AppSettings["ES.Password"]))
|
||||
return;
|
||||
|
||||
Organization[] orgs = ES.Services.ExchangeServer.GetExchangeOrganizations(1, true);
|
||||
|
||||
foreach (Organization org in orgs)
|
||||
{
|
||||
if (organizationId == null)
|
||||
FixOrganization(org);
|
||||
else if (org.OrganizationId == organizationId)
|
||||
FixOrganization(org);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void FixOrganization(Organization organization)
|
||||
{
|
||||
if (String.IsNullOrEmpty(organization.OrganizationId))
|
||||
return;
|
||||
|
||||
Log.WriteLine("Organization " + organization.OrganizationId);
|
||||
|
||||
string res = "";
|
||||
|
||||
try
|
||||
{
|
||||
res = ES.Services.ExchangeServer.SetDefaultPublicFolderMailbox(organization.Id);
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
Log.WriteError(ex.ToString());
|
||||
}
|
||||
|
||||
Log.WriteLine(res);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,204 @@
|
|||
// Copyright (c) 2014, Outercurve Foundation.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// - Redistributions of source code must retain the above copyright notice, this
|
||||
// list of conditions and the following disclaimer.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
using System;
|
||||
using System.Configuration;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
|
||||
namespace WebsitePanel.FixDefaultPublicFolderMailbox
|
||||
{
|
||||
/// <summary>
|
||||
/// Simple log
|
||||
/// </summary>
|
||||
public sealed class Log
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the class.
|
||||
/// </summary>
|
||||
private Log()
|
||||
{
|
||||
}
|
||||
|
||||
private static string logFile = "WebsitePanel.FixDefaultPublicFolderMailbox.log";
|
||||
|
||||
/// <summary>
|
||||
/// Initializes trace listeners.
|
||||
/// </summary>
|
||||
public static void Initialize(string fileName)
|
||||
{
|
||||
logFile = fileName;
|
||||
FileStream fileLog = new FileStream(logFile, FileMode.Append);
|
||||
TextWriterTraceListener fileListener = new TextWriterTraceListener(fileLog);
|
||||
fileListener.TraceOutputOptions = TraceOptions.DateTime;
|
||||
Trace.UseGlobalLock = true;
|
||||
Trace.Listeners.Clear();
|
||||
Trace.Listeners.Add(fileListener);
|
||||
TextWriterTraceListener consoleListener = new TextWriterTraceListener(System.Console.Out);
|
||||
Trace.Listeners.Add(consoleListener);
|
||||
Trace.AutoFlush = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Write error to the log.
|
||||
/// </summary>
|
||||
/// <param name="message">Error message.</param>
|
||||
/// <param name="ex">Exception.</param>
|
||||
internal static void WriteError(string message, Exception ex)
|
||||
{
|
||||
try
|
||||
{
|
||||
string line = string.Format("[{0:G}] ERROR: {1}", DateTime.Now, message);
|
||||
Trace.WriteLine(line);
|
||||
Trace.WriteLine(ex);
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Write error to the log.
|
||||
/// </summary>
|
||||
/// <param name="message">Error message.</param>
|
||||
internal static void WriteError(string message)
|
||||
{
|
||||
try
|
||||
{
|
||||
string line = string.Format("[{0:G}] ERROR: {1}", DateTime.Now, message);
|
||||
Trace.WriteLine(line);
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Write to log
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
internal static void Write(string message)
|
||||
{
|
||||
try
|
||||
{
|
||||
string line = string.Format("[{0:G}] {1}", DateTime.Now, message);
|
||||
Trace.Write(line);
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Write line to log
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
internal static void WriteLine(string message)
|
||||
{
|
||||
try
|
||||
{
|
||||
string line = string.Format("[{0:G}] {1}", DateTime.Now, message);
|
||||
Trace.WriteLine(line);
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Write info message to log
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
internal static void WriteInfo(string message)
|
||||
{
|
||||
try
|
||||
{
|
||||
string line = string.Format("[{0:G}] INFO: {1}", DateTime.Now, message);
|
||||
Trace.WriteLine(line);
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Write start message to log
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
internal static void WriteStart(string message)
|
||||
{
|
||||
try
|
||||
{
|
||||
string line = string.Format("[{0:G}] START: {1}", DateTime.Now, message);
|
||||
Trace.WriteLine(line);
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Write end message to log
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
internal static void WriteEnd(string message)
|
||||
{
|
||||
try
|
||||
{
|
||||
string line = string.Format("[{0:G}] END: {1}", DateTime.Now, message);
|
||||
Trace.WriteLine(line);
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
internal static void WriteApplicationStart()
|
||||
{
|
||||
try
|
||||
{
|
||||
string name = typeof(Log).Assembly.GetName().Name;
|
||||
string version = typeof(Log).Assembly.GetName().Version.ToString(3);
|
||||
string line = string.Format("[{0:G}] ***** {1} {2} Started *****", DateTime.Now, name, version);
|
||||
Trace.WriteLine(line);
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
internal static void WriteApplicationEnd()
|
||||
{
|
||||
try
|
||||
{
|
||||
string name = typeof(Log).Assembly.GetName().Name;
|
||||
string line = string.Format("[{0:G}] ***** {1} Ended *****", DateTime.Now, name);
|
||||
Trace.WriteLine(line);
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Opens notepad to view log file.
|
||||
/// </summary>
|
||||
public static void ShowLogFile()
|
||||
{
|
||||
try
|
||||
{
|
||||
string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, logFile);
|
||||
Process.Start("notepad.exe", path);
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,81 @@
|
|||
// Copyright (c) 2014, Outercurve Foundation.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// - Redistributions of source code must retain the above copyright notice, this
|
||||
// list of conditions and the following disclaimer.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Configuration;
|
||||
|
||||
namespace WebsitePanel.FixDefaultPublicFolderMailbox
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Log.Initialize(ConfigurationManager.AppSettings["LogFile"]);
|
||||
|
||||
bool showHelp = false;
|
||||
string param = null;
|
||||
|
||||
if (args.Length==0)
|
||||
{
|
||||
showHelp = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
param = args[0];
|
||||
|
||||
if ((param == "/?") || (param.ToLower() == "/h"))
|
||||
showHelp = true;
|
||||
}
|
||||
|
||||
if (showHelp)
|
||||
{
|
||||
string name = typeof(Log).Assembly.GetName().Name;
|
||||
string version = typeof(Log).Assembly.GetName().Version.ToString(3);
|
||||
|
||||
Console.WriteLine("WebsitePanel Fix default public folder mailbox. " + version);
|
||||
Console.WriteLine("Usage :");
|
||||
Console.WriteLine(name + " [/All]");
|
||||
Console.WriteLine("or");
|
||||
Console.WriteLine(name + " [OrganizationId]");
|
||||
return;
|
||||
}
|
||||
|
||||
Log.WriteApplicationStart();
|
||||
|
||||
if (param.ToLower() == "/all")
|
||||
param = null;
|
||||
|
||||
Fix.Start(param);
|
||||
|
||||
Log.WriteApplicationEnd();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("WebsitePanel.FixDefaultPublicFolderMailbox")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("WebsitePanel.FixDefaultPublicFolderMailbox")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2014")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("a329d7ea-f908-4be7-b85e-af9d5116534f")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
@ -0,0 +1,62 @@
|
|||
// Copyright (c) 2014, Outercurve Foundation.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// - Redistributions of source code must retain the above copyright notice, this
|
||||
// list of conditions and the following disclaimer.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace WebsitePanel.FixDefaultPublicFolderMailbox
|
||||
{
|
||||
public class ServerContext
|
||||
{
|
||||
private string serverName;
|
||||
|
||||
public string Server
|
||||
{
|
||||
get { return serverName; }
|
||||
set { serverName = value; }
|
||||
}
|
||||
|
||||
private string userName;
|
||||
|
||||
public string Username
|
||||
{
|
||||
get { return userName; }
|
||||
set { userName = value; }
|
||||
}
|
||||
|
||||
private string password;
|
||||
|
||||
public string Password
|
||||
{
|
||||
get { return password; }
|
||||
set { password = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,76 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{07678C66-5671-4836-B8C4-5F214105E189}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>WebsitePanel.FixDefaultPublicFolderMailbox</RootNamespace>
|
||||
<AssemblyName>WebsitePanel.FixDefaultPublicFolderMailbox</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\Lib\Microsoft.Web.Services3.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.configuration" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Web.Services" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="WebsitePanel.EnterpriseServer.Base">
|
||||
<HintPath>..\..\..\Bin\WebsitePanel.EnterpriseServer.Base.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="WebsitePanel.EnterpriseServer.Client">
|
||||
<HintPath>..\..\..\Bin\WebsitePanel.EnterpriseServer.Client.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="WebsitePanel.Providers.Base">
|
||||
<HintPath>..\..\..\Bin\WebsitePanel.Providers.Base.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ES.cs" />
|
||||
<Compile Include="Fix.cs" />
|
||||
<Compile Include="Log.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="ServerContext.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
<appSettings>
|
||||
<add key="ES.WebService" value="http://localhost:9002"/>
|
||||
<add key="ES.Username" value="serveradmin"/>
|
||||
<add key="ES.Password" value="serveradmin"/>
|
||||
<add key="LogFile" value="WebsitePanel.FixDefaultPublicFolderMailbox.log"/>
|
||||
</appSettings>
|
||||
</configuration>
|
|
@ -256,5 +256,8 @@ order by rg.groupOrder
|
|||
public const string ENTERPRICESTORAGE_DRIVEMAPS = "EnterpriseStorage.DriveMaps";
|
||||
|
||||
public const string SERVICE_LEVELS = "ServiceLevel.";
|
||||
|
||||
public const string RDS_USERS = "RDS.Users";
|
||||
public const string RDS_SERVERS = "RDS.Servers";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,5 +56,6 @@ namespace WebsitePanel.EnterpriseServer
|
|||
public const string Lync = "Lync";
|
||||
public const string EnterpriseStorage = "EnterpriseStorage";
|
||||
public const string ServiceLevels = "Service Levels";
|
||||
public const string RDS = "RDS";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -125,6 +125,8 @@ namespace WebsitePanel.EnterpriseServer {
|
|||
|
||||
private System.Threading.SendOrPostCallback DeletePublicFolderEmailAddressesOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback SetDefaultPublicFolderMailboxOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback AddExchangeDisclaimerOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback UpdateExchangeDisclaimerOperationCompleted;
|
||||
|
@ -362,6 +364,9 @@ namespace WebsitePanel.EnterpriseServer {
|
|||
/// <remarks/>
|
||||
public event DeletePublicFolderEmailAddressesCompletedEventHandler DeletePublicFolderEmailAddressesCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event SetDefaultPublicFolderMailboxCompletedEventHandler SetDefaultPublicFolderMailboxCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event AddExchangeDisclaimerCompletedEventHandler AddExchangeDisclaimerCompleted;
|
||||
|
||||
|
@ -1933,6 +1938,47 @@ namespace WebsitePanel.EnterpriseServer {
|
|||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetDefaultPublicFolderMailbox", 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 string SetDefaultPublicFolderMailbox(int itemId) {
|
||||
object[] results = this.Invoke("SetDefaultPublicFolderMailbox", new object[] {
|
||||
itemId});
|
||||
return ((string)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginSetDefaultPublicFolderMailbox(int itemId, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("SetDefaultPublicFolderMailbox", new object[] {
|
||||
itemId}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public string EndSetDefaultPublicFolderMailbox(System.IAsyncResult asyncResult) {
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((string)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void SetDefaultPublicFolderMailboxAsync(int itemId) {
|
||||
this.SetDefaultPublicFolderMailboxAsync(itemId, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void SetDefaultPublicFolderMailboxAsync(int itemId, object userState) {
|
||||
if ((this.SetDefaultPublicFolderMailboxOperationCompleted == null)) {
|
||||
this.SetDefaultPublicFolderMailboxOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetDefaultPublicFolderMailboxOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("SetDefaultPublicFolderMailbox", new object[] {
|
||||
itemId}, this.SetDefaultPublicFolderMailboxOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnSetDefaultPublicFolderMailboxOperationCompleted(object arg) {
|
||||
if ((this.SetDefaultPublicFolderMailboxCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.SetDefaultPublicFolderMailboxCompleted(this, new SetDefaultPublicFolderMailboxCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddExchangeDisclaimer", 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 int AddExchangeDisclaimer(int itemId, ExchangeDisclaimer disclaimer) {
|
||||
|
@ -6309,6 +6355,32 @@ namespace WebsitePanel.EnterpriseServer {
|
|||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void SetDefaultPublicFolderMailboxCompletedEventHandler(object sender, SetDefaultPublicFolderMailboxCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class SetDefaultPublicFolderMailboxCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal SetDefaultPublicFolderMailboxCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
base(exception, cancelled, userState) {
|
||||
this.results = results;
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public string Result {
|
||||
get {
|
||||
this.RaiseExceptionIfNecessary();
|
||||
return ((string)(this.results[0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void AddExchangeDisclaimerCompletedEventHandler(object sender, AddExchangeDisclaimerCompletedEventArgs e);
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -35,6 +35,7 @@ using WebsitePanel.Providers.HostedSolution;
|
|||
using Microsoft.ApplicationBlocks.Data;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.Win32;
|
||||
using WebsitePanel.Providers.RemoteDesktopServices;
|
||||
|
||||
namespace WebsitePanel.EnterpriseServer
|
||||
{
|
||||
|
@ -4435,5 +4436,287 @@ namespace WebsitePanel.EnterpriseServer
|
|||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region RDS
|
||||
|
||||
public static IDataReader GetRDSCollectionsByItemId(int itemId)
|
||||
{
|
||||
return SqlHelper.ExecuteReader(
|
||||
ConnectionString,
|
||||
CommandType.StoredProcedure,
|
||||
"GetRDSCollectionsByItemId",
|
||||
new SqlParameter("@ItemID", itemId)
|
||||
);
|
||||
}
|
||||
|
||||
public static IDataReader GetRDSCollectionByName(string name)
|
||||
{
|
||||
return SqlHelper.ExecuteReader(
|
||||
ConnectionString,
|
||||
CommandType.StoredProcedure,
|
||||
"GetRDSCollectionByName",
|
||||
new SqlParameter("@Name", name)
|
||||
);
|
||||
}
|
||||
|
||||
public static IDataReader GetRDSCollectionById(int id)
|
||||
{
|
||||
return SqlHelper.ExecuteReader(
|
||||
ConnectionString,
|
||||
CommandType.StoredProcedure,
|
||||
"GetRDSCollectionById",
|
||||
new SqlParameter("@ID", id)
|
||||
);
|
||||
}
|
||||
|
||||
public static DataSet GetRDSCollectionsPaged(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows)
|
||||
{
|
||||
return SqlHelper.ExecuteDataset(
|
||||
ConnectionString,
|
||||
CommandType.StoredProcedure,
|
||||
"GetRDSCollectionsPaged",
|
||||
new SqlParameter("@FilterColumn", VerifyColumnName(filterColumn)),
|
||||
new SqlParameter("@FilterValue", VerifyColumnValue(filterValue)),
|
||||
new SqlParameter("@itemId", itemId),
|
||||
new SqlParameter("@SortColumn", VerifyColumnName(sortColumn)),
|
||||
new SqlParameter("@startRow", startRow),
|
||||
new SqlParameter("@maximumRows", maximumRows)
|
||||
);
|
||||
}
|
||||
|
||||
public static int AddRDSCollection(int itemId, string name, string description)
|
||||
{
|
||||
SqlParameter rdsCollectionId = new SqlParameter("@RDSCollectionID", SqlDbType.Int);
|
||||
rdsCollectionId.Direction = ParameterDirection.Output;
|
||||
|
||||
SqlHelper.ExecuteNonQuery(
|
||||
ConnectionString,
|
||||
CommandType.StoredProcedure,
|
||||
"AddRDSCollection",
|
||||
rdsCollectionId,
|
||||
new SqlParameter("@ItemID", itemId),
|
||||
new SqlParameter("@Name", name),
|
||||
new SqlParameter("@Description", description)
|
||||
);
|
||||
|
||||
// read identity
|
||||
return Convert.ToInt32(rdsCollectionId.Value);
|
||||
}
|
||||
|
||||
public static int GetOrganizationRdsUsersCount(int itemId)
|
||||
{
|
||||
SqlParameter count = new SqlParameter("@TotalNumber", SqlDbType.Int);
|
||||
count.Direction = ParameterDirection.Output;
|
||||
|
||||
DataSet ds = SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure,
|
||||
ObjectQualifier + "GetOrganizationRdsUsersCount",
|
||||
count,
|
||||
new SqlParameter("@ItemId", itemId));
|
||||
|
||||
// read identity
|
||||
return Convert.ToInt32(count.Value);
|
||||
}
|
||||
|
||||
public static void UpdateRDSCollection(RdsCollection collection)
|
||||
{
|
||||
UpdateRDSCollection(collection.Id, collection.ItemId, collection.Name, collection.Description);
|
||||
}
|
||||
|
||||
public static void UpdateRDSCollection(int id, int itemId, string name, string description)
|
||||
{
|
||||
SqlHelper.ExecuteNonQuery(
|
||||
ConnectionString,
|
||||
CommandType.StoredProcedure,
|
||||
"UpdateRDSCollection",
|
||||
new SqlParameter("@Id", id),
|
||||
new SqlParameter("@ItemID", itemId),
|
||||
new SqlParameter("@Name", name),
|
||||
new SqlParameter("@Description", description)
|
||||
);
|
||||
}
|
||||
|
||||
public static void DeleteRDSCollection(int id)
|
||||
{
|
||||
SqlHelper.ExecuteNonQuery(
|
||||
ConnectionString,
|
||||
CommandType.StoredProcedure,
|
||||
"DeleteRDSCollection",
|
||||
new SqlParameter("@Id", id)
|
||||
);
|
||||
}
|
||||
|
||||
public static int AddRDSServer(string name, string fqdName, string description)
|
||||
{
|
||||
SqlParameter rdsServerId = new SqlParameter("@RDSServerID", SqlDbType.Int);
|
||||
rdsServerId.Direction = ParameterDirection.Output;
|
||||
|
||||
SqlHelper.ExecuteNonQuery(
|
||||
ConnectionString,
|
||||
CommandType.StoredProcedure,
|
||||
"AddRDSServer",
|
||||
rdsServerId,
|
||||
new SqlParameter("@FqdName", fqdName),
|
||||
new SqlParameter("@Name", name),
|
||||
new SqlParameter("@Description", description)
|
||||
);
|
||||
|
||||
// read identity
|
||||
return Convert.ToInt32(rdsServerId.Value);
|
||||
}
|
||||
|
||||
public static IDataReader GetRDSServersByItemId(int itemId)
|
||||
{
|
||||
return SqlHelper.ExecuteReader(
|
||||
ConnectionString,
|
||||
CommandType.StoredProcedure,
|
||||
"GetRDSServersByItemId",
|
||||
new SqlParameter("@ItemID", itemId)
|
||||
);
|
||||
}
|
||||
|
||||
public static DataSet GetRDSServersPaged(int? itemId, int? collectionId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, bool ignoreItemId = false, bool ignoreRdsCollectionId = false)
|
||||
{
|
||||
return SqlHelper.ExecuteDataset(
|
||||
ConnectionString,
|
||||
CommandType.StoredProcedure,
|
||||
"GetRDSServersPaged",
|
||||
new SqlParameter("@FilterColumn", VerifyColumnName(filterColumn)),
|
||||
new SqlParameter("@FilterValue", VerifyColumnValue(filterValue)),
|
||||
new SqlParameter("@SortColumn", VerifyColumnName(sortColumn)),
|
||||
new SqlParameter("@startRow", startRow),
|
||||
new SqlParameter("@ItemID", itemId),
|
||||
new SqlParameter("@RdsCollectionId", collectionId),
|
||||
new SqlParameter("@IgnoreItemId", ignoreItemId),
|
||||
new SqlParameter("@IgnoreRdsCollectionId", ignoreRdsCollectionId),
|
||||
new SqlParameter("@maximumRows", maximumRows)
|
||||
);
|
||||
}
|
||||
|
||||
public static IDataReader GetRDSServerById(int id)
|
||||
{
|
||||
return SqlHelper.ExecuteReader(
|
||||
ConnectionString,
|
||||
CommandType.StoredProcedure,
|
||||
"GetRDSServerById",
|
||||
new SqlParameter("@ID", id)
|
||||
);
|
||||
}
|
||||
|
||||
public static IDataReader GetRDSServersByCollectionId(int collectionId)
|
||||
{
|
||||
return SqlHelper.ExecuteReader(
|
||||
ConnectionString,
|
||||
CommandType.StoredProcedure,
|
||||
"GetRDSServersByCollectionId",
|
||||
new SqlParameter("@RdsCollectionId", collectionId)
|
||||
);
|
||||
}
|
||||
|
||||
public static void DeleteRDSServer(int id)
|
||||
{
|
||||
SqlHelper.ExecuteNonQuery(
|
||||
ConnectionString,
|
||||
CommandType.StoredProcedure,
|
||||
"DeleteRDSServer",
|
||||
new SqlParameter("@Id", id)
|
||||
);
|
||||
}
|
||||
|
||||
public static void UpdateRDSServer(RdsServer server)
|
||||
{
|
||||
UpdateRDSServer(server.Id, server.ItemId, server.Name, server.FqdName, server.Description,
|
||||
server.RdsCollectionId);
|
||||
}
|
||||
|
||||
public static void UpdateRDSServer(int id, int? itemId, string name, string fqdName, string description, int? rdsCollectionId)
|
||||
{
|
||||
SqlHelper.ExecuteNonQuery(
|
||||
ConnectionString,
|
||||
CommandType.StoredProcedure,
|
||||
"UpdateRDSServer",
|
||||
new SqlParameter("@Id", id),
|
||||
new SqlParameter("@ItemID", itemId),
|
||||
new SqlParameter("@Name", name),
|
||||
new SqlParameter("@FqdName", fqdName),
|
||||
new SqlParameter("@Description", description),
|
||||
new SqlParameter("@RDSCollectionId", rdsCollectionId)
|
||||
);
|
||||
}
|
||||
|
||||
public static void AddRDSServerToCollection(int serverId, int rdsCollectionId)
|
||||
{
|
||||
SqlHelper.ExecuteNonQuery(
|
||||
ConnectionString,
|
||||
CommandType.StoredProcedure,
|
||||
"AddRDSServerToCollection",
|
||||
new SqlParameter("@Id", serverId),
|
||||
new SqlParameter("@RDSCollectionId", rdsCollectionId)
|
||||
);
|
||||
}
|
||||
|
||||
public static void AddRDSServerToOrganization(int itemId, int serverId)
|
||||
{
|
||||
SqlHelper.ExecuteNonQuery(
|
||||
ConnectionString,
|
||||
CommandType.StoredProcedure,
|
||||
"AddRDSServerToOrganization",
|
||||
new SqlParameter("@Id", serverId),
|
||||
new SqlParameter("@ItemID", itemId)
|
||||
);
|
||||
}
|
||||
|
||||
public static void RemoveRDSServerFromOrganization(int serverId)
|
||||
{
|
||||
SqlHelper.ExecuteNonQuery(
|
||||
ConnectionString,
|
||||
CommandType.StoredProcedure,
|
||||
"RemoveRDSServerFromOrganization",
|
||||
new SqlParameter("@Id", serverId)
|
||||
);
|
||||
}
|
||||
|
||||
public static void RemoveRDSServerFromCollection(int serverId)
|
||||
{
|
||||
SqlHelper.ExecuteNonQuery(
|
||||
ConnectionString,
|
||||
CommandType.StoredProcedure,
|
||||
"RemoveRDSServerFromCollection",
|
||||
new SqlParameter("@Id", serverId)
|
||||
);
|
||||
}
|
||||
|
||||
public static IDataReader GetRDSCollectionUsersByRDSCollectionId(int id)
|
||||
{
|
||||
return SqlHelper.ExecuteReader(
|
||||
ConnectionString,
|
||||
CommandType.StoredProcedure,
|
||||
"GetRDSCollectionUsersByRDSCollectionId",
|
||||
new SqlParameter("@id", id)
|
||||
);
|
||||
}
|
||||
|
||||
public static void AddRDSUserToRDSCollection(int rdsCollectionId, int accountId)
|
||||
{
|
||||
SqlHelper.ExecuteNonQuery(
|
||||
ConnectionString,
|
||||
CommandType.StoredProcedure,
|
||||
"AddUserToRDSCollection",
|
||||
new SqlParameter("@RDSCollectionId", rdsCollectionId),
|
||||
new SqlParameter("@AccountID", accountId)
|
||||
);
|
||||
}
|
||||
|
||||
public static void RemoveRDSUserFromRDSCollection(int rdsCollectionId, int accountId)
|
||||
{
|
||||
SqlHelper.ExecuteNonQuery(
|
||||
ConnectionString,
|
||||
CommandType.StoredProcedure,
|
||||
"RemoveRDSUserFromRDSCollection",
|
||||
new SqlParameter("@RDSCollectionId", rdsCollectionId),
|
||||
new SqlParameter("@AccountID", accountId)
|
||||
);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2012, Outercurve Foundation.
|
||||
// Copyright (c) 2014, Outercurve Foundation.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
|
@ -589,6 +589,15 @@ namespace WebsitePanel.EnterpriseServer
|
|||
|
||||
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
||||
|
||||
// delete public folders
|
||||
List<ExchangeAccount> folders = GetAccounts(itemId, ExchangeAccountType.PublicFolder);
|
||||
folders.Sort(delegate(ExchangeAccount f1, ExchangeAccount f2) { return f2.AccountId.CompareTo(f1.AccountId); });
|
||||
|
||||
foreach (ExchangeAccount folder in folders)
|
||||
DeletePublicFolder(itemId, folder.AccountId);
|
||||
|
||||
exchange.DeletePublicFolder(org.OrganizationId, "\\" + org.OrganizationId);
|
||||
|
||||
bool successful = exchange.DeleteOrganization(
|
||||
org.OrganizationId,
|
||||
org.DistinguishedName,
|
||||
|
@ -600,19 +609,6 @@ namespace WebsitePanel.EnterpriseServer
|
|||
org.AddressBookPolicy,
|
||||
acceptedDomains.ToArray());
|
||||
|
||||
// delete public folders
|
||||
if (successful)
|
||||
{
|
||||
List<ExchangeAccount> folders = GetAccounts(itemId, ExchangeAccountType.PublicFolder);
|
||||
folders.Sort(delegate(ExchangeAccount f1, ExchangeAccount f2) { return f2.AccountId.CompareTo(f1.AccountId);});
|
||||
|
||||
foreach(ExchangeAccount folder in folders)
|
||||
DeletePublicFolder(itemId, folder.AccountId);
|
||||
|
||||
exchange.DeletePublicFolder(org.OrganizationId, "\\" + org.OrganizationId);
|
||||
}
|
||||
|
||||
|
||||
return successful ? 0 : BusinessErrorCodes.ERROR_EXCHANGE_DELETE_SOME_PROBLEMS;
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
@ -5380,6 +5376,61 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return res;
|
||||
}
|
||||
|
||||
public static string SetDefaultPublicFolderMailbox(int itemId)
|
||||
{
|
||||
string res = "";
|
||||
|
||||
try
|
||||
{
|
||||
Organization org = GetOrganization(itemId);
|
||||
if (org == null)
|
||||
return null;
|
||||
|
||||
int exchangeServiceId = GetExchangeServiceID(org.PackageId);
|
||||
|
||||
if (exchangeServiceId <= 0)
|
||||
return null;
|
||||
|
||||
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
||||
|
||||
if (exchange == null)
|
||||
return null;
|
||||
|
||||
//Create Exchange Organization
|
||||
if (string.IsNullOrEmpty(org.GlobalAddressList))
|
||||
{
|
||||
ExtendToExchangeOrganization(ref org);
|
||||
|
||||
PackageController.UpdatePackageItem(org);
|
||||
}
|
||||
|
||||
res += "OrgPublicFolderMailbox = " + exchange.CreateOrganizationRootPublicFolder(org.OrganizationId, org.DistinguishedName, org.SecurityGroup, org.DefaultDomain) + Environment.NewLine;
|
||||
|
||||
List<ExchangeAccount> mailboxes = GetExchangeMailboxes(itemId);
|
||||
|
||||
foreach(ExchangeAccount mailbox in mailboxes)
|
||||
{
|
||||
string id = mailbox.PrimaryEmailAddress;
|
||||
string[] defaultPublicFoldes = exchange.SetDefaultPublicFolderMailbox(id, org.OrganizationId, org.DistinguishedName);
|
||||
|
||||
if (defaultPublicFoldes.Length==1)
|
||||
res += id + " has a value \"" + defaultPublicFoldes[0] + "\"" + Environment.NewLine;
|
||||
|
||||
if (defaultPublicFoldes.Length == 2)
|
||||
res += id + " changed from \"" + defaultPublicFoldes[0] + "\" to \"" + defaultPublicFoldes[1] + "\"" + Environment.NewLine;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
res += " Error " + ex.ToString();
|
||||
}
|
||||
|
||||
return res;
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Helpers
|
||||
|
@ -5873,5 +5924,6 @@ namespace WebsitePanel.EnterpriseServer
|
|||
}
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@ using WebsitePanel.Providers.CRM;
|
|||
using WebsitePanel.Providers.DNS;
|
||||
using WebsitePanel.Providers.HostedSolution;
|
||||
using WebsitePanel.Providers.ResultObjects;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace WebsitePanel.EnterpriseServer
|
||||
{
|
||||
|
@ -237,6 +238,12 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return value;
|
||||
}
|
||||
|
||||
public static string GetOrganizationCRMUniqueName(string orgName)
|
||||
{
|
||||
return Regex.Replace(orgName, @"[^\dA-Za-z]", "-", RegexOptions.Compiled);
|
||||
}
|
||||
|
||||
|
||||
public static OrganizationResult CreateOrganization(int organizationId, string baseCurrencyCode, string baseCurrencyName, string baseCurrencySymbol, string regionName, int userId, string collation, int baseLanguageCode)
|
||||
{
|
||||
OrganizationResult res = StartTask<OrganizationResult>("CRM", "CREATE_ORGANIZATION");
|
||||
|
@ -329,7 +336,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
if (port != string.Empty)
|
||||
port = ":" + port;
|
||||
|
||||
string strDomainName = string.Format("{0}.{1}", org.OrganizationId,
|
||||
string strDomainName = string.Format("{0}.{1}", GetOrganizationCRMUniqueName(org.OrganizationId),
|
||||
serviceSettings[Constants.IFDWebApplicationRootDomain]);
|
||||
org.CrmUrl = string.Format("{0}://{1}{2}", schema, strDomainName, port);
|
||||
|
||||
|
|
|
@ -726,6 +726,13 @@ namespace WebsitePanel.EnterpriseServer
|
|||
successful = false;
|
||||
}
|
||||
|
||||
//Cleanup RDS
|
||||
|
||||
if (RemoteDesktopServicesController.DeleteRemoteDesktopService(itemId).IsSuccess == false)
|
||||
{
|
||||
successful = false;
|
||||
}
|
||||
|
||||
//Cleanup Exchange
|
||||
try
|
||||
{
|
||||
|
@ -1657,6 +1664,11 @@ namespace WebsitePanel.EnterpriseServer
|
|||
|
||||
int maxLen = 19 - orgId.Length;
|
||||
|
||||
if (!string.IsNullOrEmpty(orgId))
|
||||
{
|
||||
orgId = orgId.TrimEnd(' ', '.');
|
||||
}
|
||||
|
||||
// try to choose name
|
||||
int i = 0;
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -703,6 +703,14 @@ namespace WebsitePanel.EnterpriseServer
|
|||
{
|
||||
return ExchangeServerController.DeletePublicFolderEmailAddresses(itemId, accountId, emailAddresses);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public string SetDefaultPublicFolderMailbox(int itemId)
|
||||
{
|
||||
return ExchangeServerController.SetDefaultPublicFolderMailbox(itemId);
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region Disclaimers
|
||||
|
|
|
@ -36,7 +36,8 @@ using System.Web.Services.Protocols;
|
|||
using System.ComponentModel;
|
||||
|
||||
using Microsoft.Web.Services3;
|
||||
|
||||
using WebsitePanel.Providers.Common;
|
||||
using WebsitePanel.Providers.HostedSolution;
|
||||
using WebsitePanel.Providers.RemoteDesktopServices;
|
||||
|
||||
namespace WebsitePanel.EnterpriseServer
|
||||
|
@ -50,14 +51,178 @@ namespace WebsitePanel.EnterpriseServer
|
|||
[ToolboxItem(false)]
|
||||
public class esRemoteDesktopServices : System.Web.Services.WebService
|
||||
{
|
||||
/*
|
||||
|
||||
[WebMethod]
|
||||
public DataSet GetRawOdbcSourcesPaged(int packageId,
|
||||
string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows)
|
||||
public RdsCollection GetRdsCollection(int collectionId)
|
||||
{
|
||||
return OperatingSystemController.GetRawOdbcSourcesPaged(packageId, filterColumn,
|
||||
filterValue, sortColumn, startRow, maximumRows);
|
||||
return RemoteDesktopServicesController.GetRdsCollection(collectionId);
|
||||
}
|
||||
*/
|
||||
|
||||
[WebMethod]
|
||||
public List<RdsCollection> GetOrganizationRdsCollections(int itemId)
|
||||
{
|
||||
return RemoteDesktopServicesController.GetOrganizationRdsCollections(itemId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public ResultObject AddRdsCollection(int itemId, RdsCollection collection)
|
||||
{
|
||||
return RemoteDesktopServicesController.AddRdsCollection(itemId, collection);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public RdsCollectionPaged GetRdsCollectionsPaged(int itemId, string filterColumn, string filterValue,
|
||||
string sortColumn, int startRow, int maximumRows)
|
||||
{
|
||||
return RemoteDesktopServicesController.GetRdsCollectionsPaged(itemId, filterColumn, filterValue, sortColumn,
|
||||
startRow, maximumRows);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public ResultObject RemoveRdsCollection(int itemId, RdsCollection collection)
|
||||
{
|
||||
return RemoteDesktopServicesController.RemoveRdsCollection(itemId, collection);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public RdsServersPaged GetRdsServersPaged(string filterColumn, string filterValue, string sortColumn,
|
||||
int startRow, int maximumRows)
|
||||
{
|
||||
return RemoteDesktopServicesController.GetRdsServersPaged(filterColumn, filterValue, sortColumn, startRow,
|
||||
maximumRows);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public RdsServersPaged GetFreeRdsServersPaged(string filterColumn, string filterValue,
|
||||
string sortColumn, int startRow, int maximumRows)
|
||||
{
|
||||
return RemoteDesktopServicesController.GetFreeRdsServersPaged(filterColumn, filterValue,
|
||||
sortColumn, startRow, maximumRows);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public RdsServersPaged GetOrganizationRdsServersPaged(int itemId, string filterColumn, string filterValue,
|
||||
string sortColumn, int startRow, int maximumRows)
|
||||
{
|
||||
return RemoteDesktopServicesController.GetOrganizationRdsServersPaged(itemId, filterColumn, filterValue,
|
||||
sortColumn, startRow, maximumRows);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public RdsServersPaged GetOrganizationFreeRdsServersPaged(int itemId, string filterColumn, string filterValue,
|
||||
string sortColumn, int startRow, int maximumRows)
|
||||
{
|
||||
return RemoteDesktopServicesController.GetOrganizationFreeRdsServersPaged(itemId, filterColumn, filterValue,
|
||||
sortColumn, startRow, maximumRows);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public RdsServer GetRdsServer(int rdsSeverId)
|
||||
{
|
||||
return RemoteDesktopServicesController.GetRdsServer(rdsSeverId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public List<RdsServer> GetCollectionRdsServers(int collectionId)
|
||||
{
|
||||
return RemoteDesktopServicesController.GetCollectionRdsServers(collectionId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public List<RdsServer> GetOrganizationRdsServers(int itemId)
|
||||
{
|
||||
return RemoteDesktopServicesController.GetOrganizationRdsServers(itemId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public ResultObject AddRdsServer(RdsServer rdsServer)
|
||||
{
|
||||
return RemoteDesktopServicesController.AddRdsServer(rdsServer);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public ResultObject AddRdsServerToCollection(int itemId, RdsServer rdsServer, RdsCollection rdsCollection)
|
||||
{
|
||||
return RemoteDesktopServicesController.AddRdsServerToCollection(itemId, rdsServer, rdsCollection);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public ResultObject AddRdsServerToOrganization(int itemId, int serverId)
|
||||
{
|
||||
return RemoteDesktopServicesController.AddRdsServerToOrganization(itemId, serverId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public ResultObject RemoveRdsServer(int rdsServerId)
|
||||
{
|
||||
return RemoteDesktopServicesController.RemoveRdsServer(rdsServerId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public ResultObject RemoveRdsServerFromCollection(int itemId, RdsServer rdsServer, RdsCollection rdsCollection)
|
||||
{
|
||||
return RemoteDesktopServicesController.RemoveRdsServerFromCollection(itemId, rdsServer, rdsCollection);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public ResultObject RemoveRdsServerFromOrganization(int rdsServerId)
|
||||
{
|
||||
return RemoteDesktopServicesController.RemoveRdsServerFromOrganization(rdsServerId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public ResultObject UpdateRdsServer(RdsServer rdsServer)
|
||||
{
|
||||
return RemoteDesktopServicesController.UpdateRdsServer(rdsServer);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public List<OrganizationUser> GetRdsCollectionUsers(int collectionId)
|
||||
{
|
||||
return RemoteDesktopServicesController.GetRdsCollectionUsers(collectionId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public ResultObject SetUsersToRdsCollection(int itemId, int collectionId, List<OrganizationUser> users)
|
||||
{
|
||||
return RemoteDesktopServicesController.SetUsersToRdsCollection(itemId, collectionId, users);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public List<RemoteApplication> GetCollectionRemoteApplications(int itemId, string collectionName)
|
||||
{
|
||||
return RemoteDesktopServicesController.GetCollectionRemoteApplications(itemId, collectionName);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public List<StartMenuApp> GetAvailableRemoteApplications(int itemId, string collectionName)
|
||||
{
|
||||
return RemoteDesktopServicesController.GetAvailableRemoteApplications(itemId, collectionName);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public ResultObject AddRemoteApplicationToCollection(int itemId, RdsCollection collection, RemoteApplication application)
|
||||
{
|
||||
return RemoteDesktopServicesController.AddRemoteApplicationToCollection(itemId, collection, application);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public ResultObject RemoveRemoteApplicationFromCollection(int itemId, RdsCollection collection, RemoteApplication application)
|
||||
{
|
||||
return RemoteDesktopServicesController.RemoveRemoteApplicationFromCollection(itemId, collection, application);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public ResultObject SetRemoteApplicationsToRdsCollection(int itemId, int collectionId, List<RemoteApplication> remoteApps)
|
||||
{
|
||||
return RemoteDesktopServicesController.SetRemoteApplicationsToRdsCollection(itemId, collectionId, remoteApps);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public int GetOrganizationRdsUsersCount(int itemId)
|
||||
{
|
||||
return RemoteDesktopServicesController.GetOrganizationRdsUsersCount(itemId);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -130,6 +130,31 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
return res;
|
||||
}
|
||||
|
||||
public static bool IsComputerInGroup(string samAccountName, string group)
|
||||
{
|
||||
bool res = false;
|
||||
DirectorySearcher deSearch = new DirectorySearcher
|
||||
{
|
||||
Filter =
|
||||
("(&(objectClass=computer)(samaccountname=" + samAccountName + "))")
|
||||
};
|
||||
|
||||
//get the group result
|
||||
SearchResult results = deSearch.FindOne();
|
||||
DirectoryEntry de = results.GetDirectoryEntry();
|
||||
PropertyValueCollection props = de.Properties["memberOf"];
|
||||
|
||||
foreach (string str in props)
|
||||
{
|
||||
if (str.IndexOf(group) != -1)
|
||||
{
|
||||
res = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
public static string CreateOrganizationalUnit(string name, string parentPath)
|
||||
{
|
||||
string ret;
|
||||
|
|
|
@ -368,6 +368,10 @@ namespace WebsitePanel.Providers.Mail
|
|||
|
||||
#region IceWarp
|
||||
|
||||
public bool UseDomainDiskQuota { get; set; }
|
||||
public bool UseDomainLimits { get; set; }
|
||||
public bool UseUserLimits { get; set; }
|
||||
|
||||
public int MegaByteSendLimit { get; set; }
|
||||
public int NumberSendLimit { get; set; }
|
||||
|
||||
|
|
|
@ -28,6 +28,9 @@
|
|||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
|
||||
namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||
{
|
||||
|
@ -36,6 +39,24 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
|||
/// </summary>
|
||||
public interface IRemoteDesktopServices
|
||||
{
|
||||
bool CreateCollection(string organizationId, RdsCollection collection);
|
||||
RdsCollection GetCollection(string collectionName);
|
||||
bool RemoveCollection(string organizationId, string collectionName);
|
||||
bool SetUsersInCollection(string organizationId, string collectionName, List<string> users);
|
||||
void AddSessionHostServerToCollection(string organizationId, string collectionName, RdsServer server);
|
||||
void AddSessionHostServersToCollection(string organizationId, string collectionName, List<RdsServer> servers);
|
||||
void RemoveSessionHostServerFromCollection(string organizationId, string collectionName, RdsServer server);
|
||||
void RemoveSessionHostServersFromCollection(string organizationId, string collectionName, List<RdsServer> servers);
|
||||
|
||||
List<StartMenuApp> GetAvailableRemoteApplications(string collectionName);
|
||||
List<RemoteApplication> GetCollectionRemoteApplications(string collectionName);
|
||||
bool AddRemoteApplication(string collectionName, RemoteApplication remoteApp);
|
||||
bool AddRemoteApplications(string collectionName, List<RemoteApplication> remoteApps);
|
||||
bool RemoveRemoteApplication(string collectionName, RemoteApplication remoteApp);
|
||||
|
||||
bool AddSessionHostFeatureToServer(string hostName);
|
||||
bool CheckSessionHostFeatureInstallation(string hostName);
|
||||
|
||||
bool CheckServerAvailability(string hostName);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||
{
|
||||
[Serializable]
|
||||
public class RdsCollection
|
||||
{
|
||||
public RdsCollection()
|
||||
{
|
||||
Servers = new List<RdsServer>();
|
||||
}
|
||||
|
||||
public int Id { get; set; }
|
||||
public int ItemId { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
public List<RdsServer> Servers { get; set; }
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||
{
|
||||
public class RdsCollectionPaged
|
||||
{
|
||||
public int RecordsCount { get; set; }
|
||||
public RdsCollection[] Collections { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
using System.Net;
|
||||
|
||||
namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||
{
|
||||
public class RdsServer
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int? ItemId { get; set; }
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return string.IsNullOrEmpty(FqdName) ? string.Empty : FqdName.Split('.')[0];
|
||||
}
|
||||
}
|
||||
public string FqdName { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string Address { get; set; }
|
||||
public string ItemName { get; set; }
|
||||
public int? RdsCollectionId { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||
{
|
||||
public class RdsServersPaged
|
||||
{
|
||||
public int RecordsCount { get; set; }
|
||||
public RdsServer[] Servers { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||
{
|
||||
public class RemoteApplication
|
||||
{
|
||||
public string Alias { get; set; }
|
||||
public string DisplayName { get; set; }
|
||||
public string FilePath { get; set; }
|
||||
public string FileVirtualPath { get; set; }
|
||||
public bool ShowInWebAccess { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
using System.Net;
|
||||
|
||||
namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||
{
|
||||
public class SessionHostServer
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string FqdName { get; set; }
|
||||
public string Address { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||
{
|
||||
public class StartMenuApp
|
||||
{
|
||||
public string DisplayName { get; set; }
|
||||
public string FilePath { get; set; }
|
||||
public string FileVirtualPath { get; set; }
|
||||
}
|
||||
}
|
|
@ -123,6 +123,13 @@
|
|||
<Compile Include="OS\QuotaType.cs" />
|
||||
<Compile Include="OS\SystemFilesPaged.cs" />
|
||||
<Compile Include="RemoteDesktopServices\IRemoteDesktopServices.cs" />
|
||||
<Compile Include="RemoteDesktopServices\RdsCollection.cs" />
|
||||
<Compile Include="RemoteDesktopServices\RdsCollectionPaged.cs" />
|
||||
<Compile Include="RemoteDesktopServices\RdsServer.cs" />
|
||||
<Compile Include="RemoteDesktopServices\RdsServersPaged.cs" />
|
||||
<Compile Include="RemoteDesktopServices\RemoteApplication.cs" />
|
||||
<Compile Include="RemoteDesktopServices\SessionHostServer.cs" />
|
||||
<Compile Include="RemoteDesktopServices\StartMenuApp.cs" />
|
||||
<Compile Include="ResultObjects\HeliconApe.cs" />
|
||||
<Compile Include="HostedSolution\ExchangeMobileDevice.cs" />
|
||||
<Compile Include="HostedSolution\IOCSEdgeServer.cs" />
|
||||
|
|
|
@ -183,12 +183,19 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
return orgResponse.Details;
|
||||
}
|
||||
|
||||
public virtual string GetOrganizationUniqueName(string orgName)
|
||||
{
|
||||
return Regex.Replace(orgName, @"[^\dA-Za-z]", "-", RegexOptions.Compiled);
|
||||
}
|
||||
|
||||
protected virtual Uri GetCRMOrganizationUrl(string orgName)
|
||||
{
|
||||
//string url = "https://" + ProviderSettings[Constants.AppRootDomain] + ":" + ProviderSettings[Constants.Port] + "/" + orgName + "/XRMServices/2011/Organization.svc";
|
||||
|
||||
string url;
|
||||
|
||||
orgName = GetOrganizationUniqueName(orgName);
|
||||
|
||||
string organizationWebServiceUri = ProviderSettings[Constants.OrganizationWebService];
|
||||
|
||||
if (String.IsNullOrEmpty(orgName))
|
||||
|
@ -723,7 +730,7 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
|
||||
OrganizationResult ret = StartLog<OrganizationResult>("CreateOrganizationInternal");
|
||||
|
||||
organizationUniqueName = Regex.Replace(organizationUniqueName, @"[^\dA-Za-z]", "-", RegexOptions.Compiled);
|
||||
organizationUniqueName = GetOrganizationUniqueName(organizationUniqueName);
|
||||
|
||||
// calculate UserRootPath
|
||||
string ldapstr = "";
|
||||
|
|
|
@ -1004,7 +1004,10 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
|
||||
|
||||
|
||||
if (!DeleteOrganizationMailboxes(runSpace, ou))
|
||||
if (!DeleteOrganizationMailboxes(runSpace, ou, false))
|
||||
ret = false;
|
||||
|
||||
if (!DeleteOrganizationMailboxes(runSpace, ou, true))
|
||||
ret = false;
|
||||
|
||||
if (!DeleteOrganizationContacts(runSpace, ou))
|
||||
|
@ -1159,13 +1162,15 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
return ret;
|
||||
}
|
||||
|
||||
internal bool DeleteOrganizationMailboxes(Runspace runSpace, string ou)
|
||||
internal bool DeleteOrganizationMailboxes(Runspace runSpace, string ou, bool publicFolder)
|
||||
{
|
||||
ExchangeLog.LogStart("DeleteOrganizationMailboxes");
|
||||
bool ret = true;
|
||||
|
||||
Command cmd = new Command("Get-Mailbox");
|
||||
cmd.Parameters.Add("OrganizationalUnit", ou);
|
||||
if (publicFolder) cmd.Parameters.Add("PublicFolder");
|
||||
|
||||
Collection<PSObject> result = ExecuteShellCommand(runSpace, cmd);
|
||||
if (result != null && result.Count > 0)
|
||||
{
|
||||
|
@ -1177,7 +1182,7 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
id = ObjToString(GetPSObjectProperty(obj, "Identity"));
|
||||
RemoveDevicesInternal(runSpace, id);
|
||||
|
||||
RemoveMailbox(runSpace, id, false);
|
||||
RemoveMailbox(runSpace, id, publicFolder);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
@ -3193,6 +3198,15 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
#endregion
|
||||
|
||||
#region Contacts
|
||||
|
||||
private bool CheckEmailExist(Runspace runSpace, string email)
|
||||
{
|
||||
Command cmd = new Command("Get-Recipient");
|
||||
cmd.Parameters.Add("Identity", email);
|
||||
Collection<PSObject> result = ExecuteShellCommand(runSpace, cmd);
|
||||
return result.Count > 0;
|
||||
}
|
||||
|
||||
private void CreateContactInternal(
|
||||
string organizationId,
|
||||
string organizationDistinguishedName,
|
||||
|
@ -3214,9 +3228,29 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
{
|
||||
runSpace = OpenRunspace();
|
||||
|
||||
//
|
||||
string tempEmailUser = Guid.NewGuid().ToString("N");
|
||||
string[] parts = contactEmail.Split('@');
|
||||
if (parts.Length==2)
|
||||
{
|
||||
if (CheckEmailExist(runSpace, parts[0] + "@" + defaultOrganizationDomain))
|
||||
{
|
||||
for(int num=1;num<100;num++)
|
||||
{
|
||||
string testEmailUser = parts[0] + num.ToString();
|
||||
if (!CheckEmailExist(runSpace, testEmailUser + "@" + defaultOrganizationDomain))
|
||||
{
|
||||
tempEmailUser = testEmailUser;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
tempEmailUser = parts[0];
|
||||
}
|
||||
|
||||
string ouName = ConvertADPathToCanonicalName(organizationDistinguishedName);
|
||||
string tempEmail = string.Format("{0}@{1}", Guid.NewGuid().ToString("N"), defaultOrganizationDomain);
|
||||
string tempEmail = string.Format("{0}@{1}", tempEmailUser, defaultOrganizationDomain);
|
||||
//create contact
|
||||
Command cmd = new Command("New-MailContact");
|
||||
cmd.Parameters.Add("Name", contactAccountName);
|
||||
|
@ -4575,7 +4609,6 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
}
|
||||
finally
|
||||
{
|
||||
|
||||
CloseRunspace(runSpace);
|
||||
}
|
||||
ExchangeLog.LogEnd("DeletePublicFolderInternal");
|
||||
|
@ -5300,6 +5333,8 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
cmd.Parameters.Add("Identity", id);
|
||||
cmd.Parameters.Add("DefaultPublicFolderMailbox", newValue);
|
||||
|
||||
ExecuteShellCommand(runSpace, cmd);
|
||||
|
||||
res.Add(newValue);
|
||||
}
|
||||
|
||||
|
|
|
@ -624,7 +624,10 @@ namespace WebsitePanel.Providers.Mail
|
|||
DefaultUserQuotaInMB = Convert.ToInt32((object) domain.GetProperty("D_UserMailbox"))/1024,
|
||||
DefaultUserMaxMessageSizeMegaByte = Convert.ToInt32((object) domain.GetProperty("D_UserMsg"))/1024,
|
||||
DefaultUserMegaByteSendLimit = Convert.ToInt32((object) domain.GetProperty("D_UserMB")),
|
||||
DefaultUserNumberSendLimit = Convert.ToInt32((object) domain.GetProperty("D_UserNumber"))
|
||||
DefaultUserNumberSendLimit = Convert.ToInt32((object) domain.GetProperty("D_UserNumber")),
|
||||
UseDomainDiskQuota = Convert.ToBoolean(ProviderSettings["UseDomainDiskQuota"]),
|
||||
UseDomainLimits = Convert.ToBoolean(ProviderSettings["UseDomainLimits"]),
|
||||
UseUserLimits = Convert.ToBoolean(ProviderSettings["UseUserLimits"])
|
||||
};
|
||||
|
||||
return mailDomain;
|
||||
|
|
|
@ -33,6 +33,8 @@
|
|||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.DirectoryServices" />
|
||||
<Reference Include="System.Management.Automation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
|
||||
<Reference Include="System.Xml" />
|
||||
<ProjectReference Include="..\WebsitePanel.Providers.Base\WebsitePanel.Providers.Base.csproj">
|
||||
<Project>{684C932A-6C75-46AC-A327-F3689D89EB42}</Project>
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -28,67 +28,50 @@
|
|||
|
||||
namespace WebsitePanel.Providers.Web.Iis.Extensions
|
||||
{
|
||||
using Providers.Utils;
|
||||
using Handlers;
|
||||
using Common;
|
||||
using Microsoft.Web.Administration;
|
||||
using Microsoft.Web.Management.Server;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using Microsoft.Win32;
|
||||
using System.Collections.Specialized;
|
||||
|
||||
internal sealed class ExtensionsModuleService : ConfigurationModuleService
|
||||
{
|
||||
public const string PathAttribute = "path";
|
||||
|
||||
// Mappings collection to properly detect ISAPI modules registered in IIS.
|
||||
static NameValueCollection ISAPI_MODULES = new NameValueCollection
|
||||
public SettingPair[] GetExtensionsInstalled(ServerManager srvman)
|
||||
{
|
||||
// Misc
|
||||
{ Constants.AspPathSetting, @"\inetsrv\asp.dll" },
|
||||
// ASP.NET x86
|
||||
{ Constants.AspNet11PathSetting, @"\Framework\v1.1.4322\aspnet_isapi.dll" },
|
||||
{ Constants.AspNet20PathSetting, @"\Framework\v2.0.50727\aspnet_isapi.dll" },
|
||||
{ Constants.AspNet40PathSetting, @"\Framework\v4.0.30128\aspnet_isapi.dll" },
|
||||
var settings = new List<SettingPair>();
|
||||
var config = srvman.GetApplicationHostConfiguration();
|
||||
|
||||
var handlersSection = (HandlersSection) config.GetSection(Constants.HandlersSection, typeof (HandlersSection));
|
||||
|
||||
var executalbesToLookFor = new[]
|
||||
{
|
||||
// Perl
|
||||
new KeyValuePair<string, string>(Constants.PerlPathSetting, "\\perl.exe"),
|
||||
// Php
|
||||
new KeyValuePair<string, string>(Constants.Php4PathSetting, "\\php.exe"),
|
||||
new KeyValuePair<string, string>(Constants.PhpPathSetting, "\\php-cgi.exe"),
|
||||
// Classic ASP
|
||||
new KeyValuePair<string, string>(Constants.AspPathSetting, @"\inetsrv\asp.dll"),
|
||||
// ASP.NET
|
||||
new KeyValuePair<string, string>(Constants.AspNet11PathSetting, @"\Framework\v1.1.4322\aspnet_isapi.dll"),
|
||||
new KeyValuePair<string, string>(Constants.AspNet20PathSetting, @"\Framework\v2.0.50727\aspnet_isapi.dll"),
|
||||
new KeyValuePair<string, string>(Constants.AspNet40PathSetting, @"\Framework\v4.0.30319\aspnet_isapi.dll"),
|
||||
// ASP.NET x64
|
||||
{ Constants.AspNet20x64PathSetting, @"\Framework64\v2.0.50727\aspnet_isapi.dll" },
|
||||
{ Constants.AspNet40x64PathSetting, @"\Framework64\v4.0.30128\aspnet_isapi.dll" }
|
||||
new KeyValuePair<string, string>(Constants.AspNet20x64PathSetting, @"\Framework64\v2.0.50727\aspnet_isapi.dll"),
|
||||
new KeyValuePair<string, string>(Constants.AspNet40x64PathSetting, @"\Framework64\v4.0.30319\aspnet_isapi.dll"),
|
||||
};
|
||||
|
||||
public SettingPair[] GetISAPIExtensionsInstalled(ServerManager srvman)
|
||||
foreach (var handler in handlersSection.Handlers)
|
||||
{
|
||||
List<SettingPair> settings = new List<SettingPair>();
|
||||
//
|
||||
var config = srvman.GetApplicationHostConfiguration();
|
||||
//
|
||||
var section = config.GetSection(Constants.IsapiCgiRestrictionSection);
|
||||
//
|
||||
foreach (var item in section.GetCollection())
|
||||
foreach (var valuePair in executalbesToLookFor)
|
||||
{
|
||||
var isapiModulePath = Convert.ToString(item.GetAttributeValue(PathAttribute));
|
||||
//
|
||||
for (int i = 0; i < ISAPI_MODULES.Keys.Count; i++)
|
||||
var key = valuePair.Key;
|
||||
if (handler.ScriptProcessor.EndsWith(valuePair.Value) && !settings.Exists(s => s.Name == key))
|
||||
{
|
||||
var pathExt = ISAPI_MODULES.Get(i);
|
||||
//
|
||||
if (isapiModulePath.EndsWith(pathExt))
|
||||
{
|
||||
settings.Add(new SettingPair
|
||||
{
|
||||
// Retrieve key name
|
||||
Name = ISAPI_MODULES.GetKey(i),
|
||||
// Evaluate ISAPI module path
|
||||
Value = isapiModulePath
|
||||
});
|
||||
//
|
||||
break;
|
||||
settings.Add(new SettingPair{Name = valuePair.Key, Value = handler.ScriptProcessor});
|
||||
}
|
||||
}
|
||||
}
|
||||
//
|
||||
|
||||
return settings.ToArray();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -100,6 +100,9 @@ namespace WebsitePanel.Providers.Web
|
|||
public const string AspNet20x64PathSetting = "AspNet20x64Path";
|
||||
public const string AspNet40PathSetting = "AspNet40Path";
|
||||
public const string AspNet40x64PathSetting = "AspNet40x64Path";
|
||||
public const string PerlPathSetting = "PerlPath";
|
||||
public const string Php4PathSetting = "Php4Path";
|
||||
public const string PhpPathSetting = "PhpPath";
|
||||
|
||||
public const string WEBSITEPANEL_IISMODULES = "WebsitePanel.IIsModules";
|
||||
public const string DOTNETPANEL_IISMODULES = "DotNetPanel.IIsModules";
|
||||
|
@ -892,7 +895,7 @@ namespace WebsitePanel.Providers.Web
|
|||
if (handlerName != GetActivePhpHandlerName(virtualDir))
|
||||
{
|
||||
// Only change handler if it is different from the current one
|
||||
handlersSvc.CopyInheritedHandlers(((WebSite)virtualDir).SiteId, virtualDir.VirtualPath);
|
||||
handlersSvc.CopyInheritedHandlers(GetSiteIdFromVirtualDir(virtualDir), virtualDir.VirtualPath);
|
||||
MakeHandlerActive(handlerName, virtualDir);
|
||||
}
|
||||
}
|
||||
|
@ -3409,7 +3412,7 @@ namespace WebsitePanel.Providers.Web
|
|||
|
||||
using (ServerManager srvman = webObjectsSvc.GetServerManager())
|
||||
{
|
||||
allSettings.AddRange(extensionsSvc.GetISAPIExtensionsInstalled(srvman));
|
||||
allSettings.AddRange(extensionsSvc.GetExtensionsInstalled(srvman));
|
||||
|
||||
// add default web management settings
|
||||
WebManagementServiceSettings wmSettings = GetWebManagementServiceSettings();
|
||||
|
@ -4484,7 +4487,7 @@ namespace WebsitePanel.Providers.Web
|
|||
|
||||
protected PhpVersion[] GetPhpVersions(ServerManager srvman, WebVirtualDirectory virtualDir)
|
||||
{
|
||||
var config = srvman.GetWebConfiguration(((WebSite)virtualDir).SiteId, virtualDir.VirtualPath);
|
||||
var config = srvman.GetWebConfiguration(GetSiteIdFromVirtualDir(virtualDir), virtualDir.VirtualPath);
|
||||
//var config = srvman.GetApplicationHostConfiguration();
|
||||
var handlersSection = config.GetSection(Constants.HandlersSection);
|
||||
|
||||
|
@ -4526,7 +4529,7 @@ namespace WebsitePanel.Providers.Web
|
|||
|
||||
protected string GetActivePhpHandlerName(ServerManager srvman, WebVirtualDirectory virtualDir)
|
||||
{
|
||||
var config = srvman.GetWebConfiguration(((WebSite)virtualDir).SiteId, virtualDir.VirtualPath);
|
||||
var config = srvman.GetWebConfiguration(GetSiteIdFromVirtualDir(virtualDir), virtualDir.VirtualPath);
|
||||
var handlersSection = config.GetSection(Constants.HandlersSection);
|
||||
|
||||
// Find first handler for *.php
|
||||
|
@ -4545,7 +4548,7 @@ namespace WebsitePanel.Providers.Web
|
|||
{
|
||||
using (var srvman = webObjectsSvc.GetServerManager())
|
||||
{
|
||||
var config = srvman.GetWebConfiguration(((WebSite)virtualDir).SiteId, virtualDir.VirtualPath);
|
||||
var config = srvman.GetWebConfiguration(GetSiteIdFromVirtualDir(virtualDir), virtualDir.VirtualPath);
|
||||
|
||||
var handlersSection = (HandlersSection)config.GetSection(Constants.HandlersSection, typeof(HandlersSection));
|
||||
|
||||
|
@ -4564,6 +4567,11 @@ namespace WebsitePanel.Providers.Web
|
|||
}
|
||||
}
|
||||
|
||||
protected string GetSiteIdFromVirtualDir(WebVirtualDirectory virtualDir)
|
||||
{
|
||||
return string.IsNullOrEmpty(virtualDir.ParentSiteName) ? ((WebSite) virtualDir).SiteId : virtualDir.ParentSiteName;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -27,7 +27,10 @@
|
|||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Web;
|
||||
using System.Collections;
|
||||
using System.Web.Services;
|
||||
|
@ -36,6 +39,7 @@ using System.ComponentModel;
|
|||
using Microsoft.Web.Services3;
|
||||
|
||||
using WebsitePanel.Providers;
|
||||
using WebsitePanel.Providers.OS;
|
||||
using WebsitePanel.Providers.RemoteDesktopServices;
|
||||
using WebsitePanel.Server.Utils;
|
||||
|
||||
|
@ -55,7 +59,273 @@ namespace WebsitePanel.Server
|
|||
get { return (IRemoteDesktopServices)Provider; }
|
||||
}
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public bool CreateCollection(string organizationId, RdsCollection collection)
|
||||
{
|
||||
try
|
||||
{
|
||||
Log.WriteStart("'{0}' CreateCollection", ProviderSettings.ProviderName);
|
||||
var result = RDSProvider.CreateCollection(organizationId, collection);
|
||||
Log.WriteEnd("'{0}' CreateCollection", ProviderSettings.ProviderName);
|
||||
return result;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteError(String.Format("'{0}' CreateCollection", ProviderSettings.ProviderName), ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public RdsCollection GetCollection(string collectionName)
|
||||
{
|
||||
try
|
||||
{
|
||||
Log.WriteStart("'{0}' GetCollection", ProviderSettings.ProviderName);
|
||||
var result = RDSProvider.GetCollection(collectionName);
|
||||
Log.WriteEnd("'{0}' GetCollection", ProviderSettings.ProviderName);
|
||||
return result;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteError(String.Format("'{0}' GetCollection", ProviderSettings.ProviderName), ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public bool RemoveCollection(string organizationId, string collectionName)
|
||||
{
|
||||
try
|
||||
{
|
||||
Log.WriteStart("'{0}' RemoveCollection", ProviderSettings.ProviderName);
|
||||
var result = RDSProvider.RemoveCollection(organizationId,collectionName);
|
||||
Log.WriteEnd("'{0}' RemoveCollection", ProviderSettings.ProviderName);
|
||||
return result;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteError(String.Format("'{0}' RemoveCollection", ProviderSettings.ProviderName), ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public bool SetUsersInCollection(string organizationId, string collectionName, List<string> users)
|
||||
{
|
||||
try
|
||||
{
|
||||
Log.WriteStart("'{0}' UpdateUsersInCollection", ProviderSettings.ProviderName);
|
||||
var result = RDSProvider.SetUsersInCollection(organizationId, collectionName, users);
|
||||
Log.WriteEnd("'{0}' UpdateUsersInCollection", ProviderSettings.ProviderName);
|
||||
return result;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteError(String.Format("'{0}' UpdateUsersInCollection", ProviderSettings.ProviderName), ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public void AddSessionHostServerToCollection(string organizationId, string collectionName, RdsServer server)
|
||||
{
|
||||
try
|
||||
{
|
||||
Log.WriteStart("'{0}' AddSessionHostServersToCollection", ProviderSettings.ProviderName);
|
||||
RDSProvider.AddSessionHostServerToCollection(organizationId, collectionName, server);
|
||||
Log.WriteEnd("'{0}' AddSessionHostServersToCollection", ProviderSettings.ProviderName);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteError(String.Format("'{0}' AddSessionHostServersToCollection", ProviderSettings.ProviderName), ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public void AddSessionHostServersToCollection(string organizationId, string collectionName, List<RdsServer> servers)
|
||||
{
|
||||
try
|
||||
{
|
||||
Log.WriteStart("'{0}' AddSessionHostServersToCollection", ProviderSettings.ProviderName);
|
||||
RDSProvider.AddSessionHostServersToCollection(organizationId, collectionName, servers);
|
||||
Log.WriteEnd("'{0}' AddSessionHostServersToCollection", ProviderSettings.ProviderName);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteError(String.Format("'{0}' AddSessionHostServersToCollection", ProviderSettings.ProviderName), ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public void RemoveSessionHostServerFromCollection(string organizationId, string collectionName, RdsServer server)
|
||||
{
|
||||
try
|
||||
{
|
||||
Log.WriteStart("'{0}' RemoveSessionHostServerFromCollection", ProviderSettings.ProviderName);
|
||||
RDSProvider.RemoveSessionHostServerFromCollection(organizationId, collectionName, server);
|
||||
Log.WriteEnd("'{0}' RemoveSessionHostServerFromCollection", ProviderSettings.ProviderName);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteError(String.Format("'{0}' RemoveSessionHostServerFromCollection", ProviderSettings.ProviderName), ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public void RemoveSessionHostServersFromCollection(string organizationId, string collectionName, List<RdsServer> servers)
|
||||
{
|
||||
try
|
||||
{
|
||||
Log.WriteStart("'{0}' RemoveSessionHostServersFromCollection", ProviderSettings.ProviderName);
|
||||
RDSProvider.RemoveSessionHostServersFromCollection(organizationId, collectionName, servers);
|
||||
Log.WriteEnd("'{0}' RemoveSessionHostServersFromCollection", ProviderSettings.ProviderName);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteError(String.Format("'{0}' RemoveSessionHostServersFromCollection", ProviderSettings.ProviderName), ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public List<StartMenuApp> GetAvailableRemoteApplications(string collectionName)
|
||||
{
|
||||
try
|
||||
{
|
||||
Log.WriteStart("'{0}' GetAvailableRemoteApplications", ProviderSettings.ProviderName);
|
||||
var result = RDSProvider.GetAvailableRemoteApplications(collectionName);
|
||||
Log.WriteEnd("'{0}' GetAvailableRemoteApplications", ProviderSettings.ProviderName);
|
||||
return result;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteError(String.Format("'{0}' UpdateUsersInCollection", ProviderSettings.ProviderName), ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public List<RemoteApplication> GetCollectionRemoteApplications(string collectionName)
|
||||
{
|
||||
try
|
||||
{
|
||||
Log.WriteStart("'{0}' GetCollectionRemoteApplications", ProviderSettings.ProviderName);
|
||||
var result = RDSProvider.GetCollectionRemoteApplications(collectionName);
|
||||
Log.WriteEnd("'{0}' GetCollectionRemoteApplications", ProviderSettings.ProviderName);
|
||||
return result;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteError(String.Format("'{0}' GetCollectionRemoteApplications", ProviderSettings.ProviderName), ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public bool AddRemoteApplication(string collectionName, RemoteApplication remoteApp)
|
||||
{
|
||||
try
|
||||
{
|
||||
Log.WriteStart("'{0}' AddRemoteApplication", ProviderSettings.ProviderName);
|
||||
var result = RDSProvider.AddRemoteApplication(collectionName, remoteApp);
|
||||
Log.WriteEnd("'{0}' AddRemoteApplication", ProviderSettings.ProviderName);
|
||||
return result;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteError(String.Format("'{0}' AddRemoteApplication", ProviderSettings.ProviderName), ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public bool AddRemoteApplications(string collectionName, List<RemoteApplication> remoteApps)
|
||||
{
|
||||
try
|
||||
{
|
||||
Log.WriteStart("'{0}' AddRemoteApplications", ProviderSettings.ProviderName);
|
||||
var result = RDSProvider.AddRemoteApplications(collectionName, remoteApps);
|
||||
Log.WriteEnd("'{0}' AddRemoteApplications", ProviderSettings.ProviderName);
|
||||
return result;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteError(String.Format("'{0}' AddRemoteApplications", ProviderSettings.ProviderName), ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public bool RemoveRemoteApplication(string collectionName, RemoteApplication remoteApp)
|
||||
{
|
||||
try
|
||||
{
|
||||
Log.WriteStart("'{0}' RemoveRemoteApplication", ProviderSettings.ProviderName);
|
||||
var result = RDSProvider.RemoveRemoteApplication(collectionName, remoteApp);
|
||||
Log.WriteEnd("'{0}' RemoveRemoteApplication", ProviderSettings.ProviderName);
|
||||
return result;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteError(String.Format("'{0}' RemoveRemoteApplication", ProviderSettings.ProviderName), ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public bool AddSessionHostFeatureToServer(string hostName)
|
||||
{
|
||||
try
|
||||
{
|
||||
Log.WriteStart("'{0}' AddSessionHostFeatureToServer", ProviderSettings.ProviderName);
|
||||
var result = RDSProvider.AddSessionHostFeatureToServer(hostName);
|
||||
Log.WriteEnd("'{0}' AddSessionHostFeatureToServer", ProviderSettings.ProviderName);
|
||||
return result;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteError(String.Format("'{0}' AddSessionHostServersToCollection", ProviderSettings.ProviderName), ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public bool CheckSessionHostFeatureInstallation(string hostName)
|
||||
{
|
||||
try
|
||||
{
|
||||
Log.WriteStart("'{0}' CheckSessionHostFeatureInstallation", ProviderSettings.ProviderName);
|
||||
var result = RDSProvider.CheckSessionHostFeatureInstallation(hostName);
|
||||
Log.WriteEnd("'{0}' CheckSessionHostFeatureInstallation", ProviderSettings.ProviderName);
|
||||
return result;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteError(String.Format("'{0}' CheckSessionHostFeatureInstallation", ProviderSettings.ProviderName), ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public bool CheckServerAvailability(string hostName)
|
||||
{
|
||||
try
|
||||
{
|
||||
Log.WriteStart("'{0}' CheckServerAvailability", ProviderSettings.ProviderName);
|
||||
var result = RDSProvider.CheckServerAvailability(hostName);
|
||||
Log.WriteEnd("'{0}' CheckServerAvailability", ProviderSettings.ProviderName);
|
||||
return result;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteError(String.Format("'{0}' CheckServerAvailability", ProviderSettings.ProviderName), ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -132,4 +132,13 @@
|
|||
|
||||
<Control key="enterprisestorage_drive_maps" />
|
||||
<Control key="create_enterprisestorage_drive_map" general_key="enterprisestorage_drive_maps" />
|
||||
|
||||
<!--RDS-->
|
||||
<Control key="rds_servers" />
|
||||
<Control key="rds_add_server" general_key="rds_servers"/>
|
||||
|
||||
<Control key="rds_collections" />
|
||||
<Control key="rds_create_collection" general_key="rds_collections" />
|
||||
<Control key="rds_collection_edit_apps" general_key="rds_collections" />
|
||||
<Control key="rds_collection_edit_users" general_key="rds_collections" />
|
||||
</Controls>
|
||||
|
|
|
@ -169,6 +169,12 @@
|
|||
</Controls>
|
||||
</ModuleDefinition>
|
||||
|
||||
<ModuleDefinition id="RDSServers">
|
||||
<Controls>
|
||||
<Control key="" src="WebsitePanel/RDSServers.ascx" title="RDSServers" type="View" />
|
||||
<Control key="add_rdsserver" src="WebsitePanel/RDSServersAddserver.ascx" title="RDSServersAddserver" type="View" icon="computer_add_48.png" />
|
||||
</Controls>
|
||||
</ModuleDefinition>
|
||||
|
||||
<ModuleDefinition id="Servers">
|
||||
<Controls>
|
||||
|
@ -561,6 +567,13 @@
|
|||
|
||||
<Control key="lync_phonenumbers" src="WebsitePanel/Lync/LyncPhoneNumbers.ascx" title="LyncPhoneNumbers" type="View" />
|
||||
<Control key="allocate_phonenumbers" src="WebsitePanel/Lync/LyncAllocatePhoneNumbers.ascx" title="LyncPhoneNumbers" type="View" />
|
||||
|
||||
<Control key="rds_servers" src="WebsitePanel/RDS/AssignedRDSServers.ascx" title="RDSServers" type="View" />
|
||||
<Control key="rds_add_server" src="WebsitePanel/RDS/AddRDSServer.ascx" title="AddRDSServer" type="View" />
|
||||
<Control key="rds_collections" src="WebsitePanel/RDS/RDSCollections.ascx" title="RDSCollections" type="View" />
|
||||
<Control key="rds_create_collection" src="WebsitePanel/RDS/RDSCreateCollection.ascx" title="RDSCreateCollection" type="View" />
|
||||
<Control key="rds_collection_edit_apps" src="WebsitePanel/RDS/RDSEditCollectionApps.ascx" title="RDSEditCollectionApps" type="View" />
|
||||
<Control key="rds_collection_edit_users" src="WebsitePanel/RDS/RDSEditCollectionUsers.ascx" title="RDSEditCollectionUsers" type="View" />
|
||||
</Controls>
|
||||
</ModuleDefinition>
|
||||
|
||||
|
|
|
@ -712,6 +712,16 @@
|
|||
<Module moduleDefinitionID="Servers" title="Servers" container="Edit.ascx" icon="computer_48.png" />
|
||||
</Content>
|
||||
</Page>
|
||||
<Page name="RDSServers" roles="Administrator" skin="Browse1.ascx">
|
||||
<Content id="LeftPane">
|
||||
<Module moduleDefinitionID="UserAccountMenu" title="UserMenu" container="Clear.ascx">
|
||||
<ModuleData ref="UserMenu"/>
|
||||
</Module>
|
||||
</Content>
|
||||
<Content id="ContentPane">
|
||||
<Module moduleDefinitionID="RDSServers" title="RDSServers" icon="computer_48.png" container="Edit.ascx"/>
|
||||
</Content>
|
||||
</Page>
|
||||
<Page name="IPAddresses" roles="Administrator" skin="Browse1.ascx">
|
||||
<Content id="LeftPane">
|
||||
<Module moduleDefinitionID="UserAccountMenu" title="UserMenu" container="Clear.ascx">
|
||||
|
|
|
@ -789,4 +789,10 @@
|
|||
<data name="ModuleTitle.UserOrganization" xml:space="preserve">
|
||||
<value>Hosted Organization</value>
|
||||
</data>
|
||||
<data name="ModuleTitle.RDSServers" xml:space="preserve">
|
||||
<value>RDS Servers</value>
|
||||
</data>
|
||||
<data name="ModuleTitle.RDSServersAddserver" xml:space="preserve">
|
||||
<value>Add New RDS Server</value>
|
||||
</data>
|
||||
</root>
|
|
@ -480,4 +480,7 @@
|
|||
<data name="PageTitle.PhoneNumbers" xml:space="preserve">
|
||||
<value>Phone Numbers</value>
|
||||
</data>
|
||||
<data name="PageName.RDSServers" xml:space="preserve">
|
||||
<value>RDS Servers</value>
|
||||
</data>
|
||||
</root>
|
|
@ -5584,4 +5584,13 @@
|
|||
<data name="Error.SERVICE_LEVEL_IN_USE" xml:space="preserve">
|
||||
<value>Unable to remove Service Level because it is being used</value>
|
||||
</data>
|
||||
<data name="Quota.RDS.Servers" xml:space="preserve">
|
||||
<value>Remote Desktop Servers</value>
|
||||
</data>
|
||||
<data name="Quota.RDS.Users" xml:space="preserve">
|
||||
<value>Remote Desktop Users</value>
|
||||
</data>
|
||||
<data name="Error.RDS_CREATE_COLLECTION_RDSSERVER_REQUAIRED" xml:space="preserve">
|
||||
<value>Error creating rds collection. You need to add at least 1 rds server to collection</value>
|
||||
</data>
|
||||
</root>
|
|
@ -97,3 +97,7 @@ Default skin template. The following skins are provided as examples only.
|
|||
<%-- Enterprise Storage Icons --%>
|
||||
<asp:Image SkinID="EnterpriseStorageSpace48" runat="server" ImageUrl="images/Exchange/spaces48.png" ImageAlign="AbsMiddle" Width="48" Height="48"></asp:Image>
|
||||
<asp:Image SkinID="EnterpriseStorageDriveMaps48" runat="server" ImageUrl="images/Exchange/net_drive48.png" ImageAlign="AbsMiddle" Width="48" Height="48"></asp:Image>
|
||||
|
||||
<%-- RDS Icons --%>
|
||||
<asp:Image SkinID="AssignedRDSServers48" runat="server" ImageUrl="icons/computer_48.png" ImageAlign="AbsMiddle" Width="48" Height="48"></asp:Image>
|
||||
<asp:Image SkinID="AddRDSServer48" runat="server" ImageUrl="icons/computer_add_48.png" ImageAlign="AbsMiddle" Width="48" Height="48"></asp:Image>
|
|
@ -163,7 +163,9 @@ h2.ProductTitle.Huge {margin:0;}
|
|||
.NormalGreen {color:#87c442;}
|
||||
.NormalRed {color:#f25555;}
|
||||
.FormBody {margin:10px 0;}
|
||||
|
||||
.FormContentRDS {border: 2px solid #eee;padding: 10px;margin: 10px;}
|
||||
.FormFooterRDSConf {border-color: #eee;border-style: none solid solid;border-width: 2px;padding: 20px 15px 15px 10px;width: 97%;}
|
||||
.FormContentRDSConf {border-color: #eee;border-style: solid;border-width: 2px;padding: 30px 15px 15px 10px;width: 97%;}
|
||||
|
||||
/* not modified */
|
||||
/*
|
||||
|
|
|
@ -290,7 +290,7 @@ namespace WebsitePanel.Portal
|
|||
authCookie.HttpOnly = true;
|
||||
|
||||
if (persistent)
|
||||
authCookie.Expires = DateTime.Now.AddMonths(1);
|
||||
authCookie.Expires = ticket.Expiration;
|
||||
|
||||
HttpContext.Current.Response.Cookies.Add(authCookie);
|
||||
}
|
||||
|
@ -457,7 +457,7 @@ namespace WebsitePanel.Portal
|
|||
1,
|
||||
username,
|
||||
DateTime.Now,
|
||||
DateTime.Now.AddMinutes(GetAuthenticationFormsTimeout()),
|
||||
persistent ? DateTime.Now.AddMonths(1) : DateTime.Now.AddMinutes(GetAuthenticationFormsTimeout()),
|
||||
persistent,
|
||||
String.Concat(password, Environment.NewLine, Enum.GetName(typeof(UserRole), role))
|
||||
);
|
||||
|
@ -592,9 +592,9 @@ namespace WebsitePanel.Portal
|
|||
// set theme
|
||||
SetCurrentTheme(theme);
|
||||
|
||||
// remember me
|
||||
if (rememberLogin)
|
||||
HttpContext.Current.Response.Cookies[FormsAuthentication.FormsCookieName].Expires = DateTime.Now.AddMonths(1);
|
||||
//// remember me
|
||||
//if (rememberLogin)
|
||||
// HttpContext.Current.Response.Cookies[FormsAuthentication.FormsCookieName].Expires = DateTime.Now.AddMonths(1);
|
||||
}
|
||||
|
||||
public static void SetCurrentLanguage(string preferredLocale)
|
||||
|
|
|
@ -231,4 +231,13 @@
|
|||
<data name="Text.EnterpriseStorageDriveMaps" xml:space="preserve">
|
||||
<value>Drive Maps</value>
|
||||
</data>
|
||||
<data name="Text.RDSCollections" xml:space="preserve">
|
||||
<value>RDS Collections</value>
|
||||
</data>
|
||||
<data name="Text.RDSGroup" xml:space="preserve">
|
||||
<value>RDS</value>
|
||||
</data>
|
||||
<data name="Text.RDSServers" xml:space="preserve">
|
||||
<value>RDS Servers</value>
|
||||
</data>
|
||||
</root>
|
|
@ -0,0 +1,126 @@
|
|||
<?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="btnAddRDSServer.Text" xml:space="preserve">
|
||||
<value>Add RDS Server</value>
|
||||
</data>
|
||||
<data name="gvRDSServers.Empty" xml:space="preserve">
|
||||
<value>The list of RDS Servers is empty.<br><br>To add a new Server click "Add RDS Sever" button.</value>
|
||||
</data>
|
||||
</root>
|
|
@ -252,4 +252,13 @@
|
|||
<data name="Text.CreateOrganization" xml:space="preserve">
|
||||
<value>Create Organization</value>
|
||||
</data>
|
||||
<data name="Text.RDSCollections" xml:space="preserve">
|
||||
<value>RDS Collections</value>
|
||||
</data>
|
||||
<data name="Text.RDSGroup" xml:space="preserve">
|
||||
<value>Hosted Organization - Remote Desktop Services</value>
|
||||
</data>
|
||||
<data name="Text.RDSServers" xml:space="preserve">
|
||||
<value>RDS Servers</value>
|
||||
</data>
|
||||
</root>
|
|
@ -225,6 +225,11 @@ namespace WebsitePanel.Portal
|
|||
get { return GetCachedProxy<esEnterpriseStorage>(); }
|
||||
}
|
||||
|
||||
public esRemoteDesktopServices RDS
|
||||
{
|
||||
get { return GetCachedProxy<esRemoteDesktopServices>(); }
|
||||
}
|
||||
|
||||
protected ES()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -213,5 +213,10 @@ namespace WebsitePanel.Portal
|
|||
{
|
||||
get { return HttpContext.Current.Request["ctl"] ?? ""; }
|
||||
}
|
||||
|
||||
public static int CollectionID
|
||||
{
|
||||
get { return GetInt("CollectionId"); }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,104 @@
|
|||
// Copyright (c) 2012, Outercurve Foundation.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// - Redistributions of source code must retain the above copyright notice, this
|
||||
// list of conditions and the following disclaimer.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
using WebsitePanel.EnterpriseServer;
|
||||
using WebsitePanel.Providers.RemoteDesktopServices;
|
||||
|
||||
namespace WebsitePanel.Portal
|
||||
{
|
||||
public class RDSHelper
|
||||
{
|
||||
#region RDS Servers
|
||||
|
||||
RdsServersPaged rdsServers;
|
||||
|
||||
public int GetRDSServersPagedCount(string filterValue)
|
||||
{
|
||||
//return 4;
|
||||
return rdsServers.RecordsCount;
|
||||
}
|
||||
|
||||
public RdsServer[] GetRDSServersPaged(int maximumRows, int startRowIndex, string sortColumn, string filterValue)
|
||||
{
|
||||
rdsServers = ES.Services.RDS.GetRdsServersPaged("", filterValue, sortColumn, startRowIndex, maximumRows);
|
||||
|
||||
return rdsServers.Servers;
|
||||
//return new RdsServer[] { new RdsServer { Name = "rds.1.server", FqdName = "", Address = "127.0.0.1" },
|
||||
// new RdsServer { Name = "rds.2.server", FqdName = "", Address = "127.0.0.2" },
|
||||
// new RdsServer { Name = "rds.3.server", FqdName = "", Address = "127.0.0.3" },
|
||||
// new RdsServer { Name = "rds.4.server", FqdName = "", Address = "127.0.0.4" }};
|
||||
}
|
||||
|
||||
public int GetOrganizationRdsServersPagedCount(int itemId, string filterValue)
|
||||
{
|
||||
return rdsServers.RecordsCount;
|
||||
}
|
||||
|
||||
public RdsServer[] GetOrganizationRdsServersPaged(int itemId, int maximumRows, int startRowIndex, string sortColumn, string filterValue)
|
||||
{
|
||||
rdsServers = ES.Services.RDS.GetOrganizationRdsServersPaged(itemId, "", filterValue, sortColumn, startRowIndex, maximumRows);
|
||||
|
||||
return rdsServers.Servers;
|
||||
}
|
||||
|
||||
public RdsServer[] GetFreeRDSServers()
|
||||
{
|
||||
return ES.Services.RDS.GetFreeRdsServersPaged("", "", "", 0, 1000).Servers;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region RDS Collectons
|
||||
|
||||
RdsCollectionPaged rdsCollections;
|
||||
|
||||
public int GetRDSCollectonsPagedCount(int itemId, string filterValue)
|
||||
{
|
||||
//return 3;
|
||||
return rdsCollections.RecordsCount;
|
||||
}
|
||||
|
||||
public RdsCollection[] GetRDSCollectonsPaged(int itemId, int maximumRows, int startRowIndex, string sortColumn, string filterValue)
|
||||
{
|
||||
rdsCollections = ES.Services.RDS.GetRdsCollectionsPaged(itemId, "Name", filterValue, sortColumn, startRowIndex, maximumRows);
|
||||
|
||||
return rdsCollections.Collections;
|
||||
|
||||
//return new RdsCollection[] { new RdsCollection { Name = "Collection 1", Description = "" },
|
||||
// new RdsCollection { Name = "Collection 2", Description = "" },
|
||||
// new RdsCollection { Name = "Collection 3", Description = "" }};
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -15,7 +15,7 @@
|
|||
ControlToValidate="DomainName" Display="Dynamic" ValidationGroup="Domain" SetFocusOnError="true"></asp:RequiredFieldValidator>
|
||||
<asp:RegularExpressionValidator id="DomainFormatValidator" runat="server" meta:resourcekey="DomainFormatValidator"
|
||||
ControlToValidate="DomainName" Display="Dynamic" ValidationGroup="Domain" SetFocusOnError="true"
|
||||
ValidationExpression="^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.){1,10}[a-zA-Z]{2,6}$"></asp:RegularExpressionValidator>
|
||||
ValidationExpression="^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.){1,10}[a-zA-Z]{2,15}$"></asp:RegularExpressionValidator>
|
||||
</p>
|
||||
|
||||
<p id="SubDomainPanel" runat="server" style="padding: 15px 0 15px 5px;" visible="false">
|
||||
|
|
|
@ -270,4 +270,7 @@
|
|||
<data name="OlderMails.Text" xml:space="preserve">
|
||||
<value>Handle older mails</value>
|
||||
</data>
|
||||
<data name="cbForwardOlder.Text" xml:space="preserve">
|
||||
<value>Enable forwarding of older messages</value>
|
||||
</data>
|
||||
</root>
|
|
@ -181,7 +181,7 @@
|
|||
<table width="100%">
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<asp:CheckBox ID="cbForwardOlder" runat="server" meta:resourcekey="cbDeleteOlder" AutoPostBack="True" OnCheckedChanged="cbForwardOlder_CheckedChanged"
|
||||
<asp:CheckBox ID="cbForwardOlder" runat="server" meta:resourcekey="cbForwardOlder" AutoPostBack="True" OnCheckedChanged="cbForwardOlder_CheckedChanged"
|
||||
Text="Enable forwarding of older messages"></asp:CheckBox>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -38,29 +38,6 @@ namespace WebsitePanel.Portal.ProviderControls
|
|||
{
|
||||
public partial class IceWarp_EditDomain : WebsitePanelControlBase, IMailEditDomainControl
|
||||
{
|
||||
private StringDictionary _serviceSettings;
|
||||
|
||||
private StringDictionary ServiceSettings
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_serviceSettings != null)
|
||||
return _serviceSettings;
|
||||
|
||||
_serviceSettings = new StringDictionary();
|
||||
var domain = ES.Services.MailServers.GetMailDomain(PanelRequest.ItemID);
|
||||
|
||||
var settings = ES.Services.Servers.GetServiceSettings(domain.ServiceId);
|
||||
|
||||
foreach (var settingPair in settings.Select(setting => setting.Split('=')))
|
||||
{
|
||||
_serviceSettings.Add(settingPair[0], settingPair[1]);
|
||||
}
|
||||
|
||||
return _serviceSettings;
|
||||
}
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
AdvancedSettingsPanel.Visible = PanelSecurity.EffectiveUser.Role == UserRole.Administrator;
|
||||
|
@ -77,9 +54,9 @@ namespace WebsitePanel.Portal.ProviderControls
|
|||
public void BindItem(MailDomain item)
|
||||
{
|
||||
// Hide/show controls when not enabled on service level
|
||||
rowMaxDomainDiskSpace.Visible = ServiceSettings.ContainsKey("UseDomainDiskQuota") && Convert.ToBoolean(ServiceSettings["UseDomainDiskQuota"]);
|
||||
rowDomainLimits.Visible = ServiceSettings.ContainsKey("UseDomainLimits") && Convert.ToBoolean(ServiceSettings["UseDomainLimits"]);
|
||||
rowUserLimits.Visible = ServiceSettings.ContainsKey("UseUserLimits") && Convert.ToBoolean(ServiceSettings["UseUserLimits"]);
|
||||
rowMaxDomainDiskSpace.Visible = item.UseDomainDiskQuota;
|
||||
rowDomainLimits.Visible = item.UseDomainLimits;
|
||||
rowUserLimits.Visible = item.UseUserLimits;
|
||||
|
||||
txtMaxDomainDiskSpace.Text = item.MaxDomainSizeInMB.ToString();
|
||||
txtMaxDomainUsers.Text = item.MaxDomainUsers.ToString();
|
||||
|
|
|
@ -1,12 +1,55 @@
|
|||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RDS_Settings.ascx.cs" Inherits="WebsitePanel.Portal.ProviderControls.RDS_Settings" %>
|
||||
<table>
|
||||
<tr>
|
||||
<td class="SubHead" width="150" nowrap>
|
||||
<asp:Label runat="server" ID="lblUsersHome" meta:resourcekey="lblUsersHome" Text="Users Home:"/>
|
||||
<td class="SubHead" width="200" nowrap>
|
||||
<asp:Label runat="server" ID="lblConnectionBroker" meta:resourcekey="lblConnectionBroker" Text="Connection Broker:"/>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="txtUsersHome" MaxLength="256" Width="200px" />
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtUsersHome" Display="Dynamic" ErrorMessage="*" />
|
||||
<asp:TextBox runat="server" ID="txtConnectionBroker" MaxLength="1000" Width="200px" />
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtConnectionBroker" Display="Dynamic" ErrorMessage="*" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SubHead" width="200" nowrap>
|
||||
<asp:Label runat="server" ID="lblGateway" meta:resourcekey="lblGateway" Text="Gateway Servers:"/>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="txtGateway" MaxLength="1000" Width="200px" />
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtGateway" Display="Dynamic" ErrorMessage="*" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SubHead" width="200" nowrap>
|
||||
<asp:Label runat="server" ID="lblRootOU" meta:resourcekey="lblRootOU" Text="Root OU:"/>
|
||||
</td>
|
||||
<td class="Normal">
|
||||
<asp:TextBox runat="server" ID="txtRootOU" MaxLength="1000" Width="200px" />
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtRootOU" ErrorMessage="*" Display="Dynamic" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SubHead" width="200" nowrap>
|
||||
<asp:Label runat="server" ID="lblPrimaryDomainController" meta:resourcekey="lblPrimaryDomainController" Text="Primary Domain Controller:"/>
|
||||
</td>
|
||||
<td class="Normal">
|
||||
<asp:TextBox runat="server" ID="txtPrimaryDomainController" MaxLength="1000" Width="200px"/>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="txtPrimaryDomainController" ErrorMessage="*" Display="Dynamic" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SubHead" width="200" nowrap>
|
||||
<asp:Label runat="server" ID="lblUseCentralNPS" meta:resourcekey="lblUseCentralNPS" Text="Use Central NPS:"/>
|
||||
</td>
|
||||
<td class="Normal">
|
||||
<asp:CheckBox runat="server" ID="chkUseCentralNPS" meta:resourcekey="chkUseCentralNPS" OnCheckedChanged="chkUseCentralNPS_CheckedChanged" AutoPostBack="True" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SubHead" width="200" nowrap>
|
||||
<asp:Label runat="server" ID="lblCentralNPS" meta:resourcekey="lblCentralNPS" MaxLength="1000" Text="Central NPS:"/>
|
||||
</td>
|
||||
<td class="Normal">
|
||||
<asp:TextBox runat="server" ID="txtCentralNPS" Width="200px"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
|
@ -36,16 +36,44 @@ namespace WebsitePanel.Portal.ProviderControls
|
|||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void BindSettings(System.Collections.Specialized.StringDictionary settings)
|
||||
{
|
||||
txtUsersHome.Text = settings[Constants.UsersHome];
|
||||
txtConnectionBroker.Text = settings["ConnectionBroker"];
|
||||
txtGateway.Text = settings["GWServrsList"];
|
||||
txtRootOU.Text = settings["RootOU"];
|
||||
txtPrimaryDomainController.Text = settings["PrimaryDomainController"];
|
||||
|
||||
if (!string.IsNullOrEmpty(settings["UseCentralNPS"]) && bool.TrueString == settings["UseCentralNPS"])
|
||||
{
|
||||
chkUseCentralNPS.Checked = true;
|
||||
txtCentralNPS.Enabled = true;
|
||||
txtCentralNPS.Text = settings["CentralNPS"];
|
||||
}
|
||||
else
|
||||
{
|
||||
chkUseCentralNPS.Checked = false;
|
||||
txtCentralNPS.Enabled = false;
|
||||
txtCentralNPS.Text = string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
public void SaveSettings(System.Collections.Specialized.StringDictionary settings)
|
||||
{
|
||||
settings[Constants.UsersHome] = txtUsersHome.Text;
|
||||
settings["ConnectionBroker"] = txtConnectionBroker.Text;
|
||||
settings["GWServrsList"] = txtGateway.Text;
|
||||
settings["RootOU"] = txtRootOU.Text;
|
||||
settings["PrimaryDomainController"] = txtPrimaryDomainController.Text;
|
||||
settings["UseCentralNPS"] = chkUseCentralNPS.Checked.ToString();
|
||||
settings["CentralNPS"] = chkUseCentralNPS.Checked ? txtCentralNPS.Text : string.Empty;
|
||||
}
|
||||
|
||||
protected void chkUseCentralNPS_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
txtCentralNPS.Enabled = chkUseCentralNPS.Checked;
|
||||
txtCentralNPS.Text = chkUseCentralNPS.Checked ? txtCentralNPS.Text : string.Empty;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,31 +1,3 @@
|
|||
// Copyright (c) 2014, Outercurve Foundation.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// - Redistributions of source code must retain the above copyright notice, this
|
||||
// list of conditions and the following disclaimer.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
|
@ -35,37 +7,153 @@
|
|||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
namespace WebsitePanel.Portal.ProviderControls {
|
||||
|
||||
|
||||
public partial class RDS_Settings {
|
||||
|
||||
/// <summary>
|
||||
/// lblUsersHome control.
|
||||
/// lblConnectionBroker 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 lblUsersHome;
|
||||
protected global::System.Web.UI.WebControls.Label lblConnectionBroker;
|
||||
|
||||
/// <summary>
|
||||
/// txtUsersHome control.
|
||||
/// txtConnectionBroker control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtUsersHome;
|
||||
protected global::System.Web.UI.WebControls.TextBox txtConnectionBroker;
|
||||
|
||||
/// <summary>
|
||||
/// RequiredFieldValidator1 control.
|
||||
/// RequiredFieldValidator2 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator1;
|
||||
protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator2;
|
||||
|
||||
/// <summary>
|
||||
/// lblGateway 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 lblGateway;
|
||||
|
||||
/// <summary>
|
||||
/// txtGateway control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtGateway;
|
||||
|
||||
/// <summary>
|
||||
/// RequiredFieldValidator3 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator3;
|
||||
|
||||
/// <summary>
|
||||
/// lblRootOU 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 lblRootOU;
|
||||
|
||||
/// <summary>
|
||||
/// txtRootOU control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtRootOU;
|
||||
|
||||
/// <summary>
|
||||
/// RequiredFieldValidator4 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator4;
|
||||
|
||||
/// <summary>
|
||||
/// lblPrimaryDomainController 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 lblPrimaryDomainController;
|
||||
|
||||
/// <summary>
|
||||
/// txtPrimaryDomainController control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtPrimaryDomainController;
|
||||
|
||||
/// <summary>
|
||||
/// RequiredFieldValidator5 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator5;
|
||||
|
||||
/// <summary>
|
||||
/// lblUseCentralNPS 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 lblUseCentralNPS;
|
||||
|
||||
/// <summary>
|
||||
/// chkUseCentralNPS 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 chkUseCentralNPS;
|
||||
|
||||
/// <summary>
|
||||
/// lblCentralNPS 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 lblCentralNPS;
|
||||
|
||||
/// <summary>
|
||||
/// txtCentralNPS control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtCentralNPS;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="AddRDSServer.ascx.cs" Inherits="WebsitePanel.Portal.RDS.AddRDSServer" %>
|
||||
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
|
||||
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
|
||||
<script type="text/javascript" src="/JavaScript/jquery.min.js?v=1.4.4"></script>
|
||||
|
||||
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
|
||||
|
||||
<div id="ExchangeContainer">
|
||||
<div class="Module">
|
||||
<div class="Left">
|
||||
</div>
|
||||
<div class="Content">
|
||||
<div class="Center">
|
||||
<div class="Title">
|
||||
<asp:Image ID="imgAddRDSServer" SkinID="AddRDSServer48" runat="server" />
|
||||
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Add Server To Organization"></asp:Localize>
|
||||
</div>
|
||||
<div class="FormBody">
|
||||
<wsp:SimpleMessageBox id="messageBox" runat="server" />
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td class="FormLabel150"><asp:Localize ID="locServer" runat="server" meta:resourcekey="locServer" Text="Server:"></asp:Localize></td>
|
||||
<td>
|
||||
<asp:DropDownList ID="ddlServers" runat="server" CssClass="NormalTextBox" Width="150px" style="vertical-align: middle;" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="FormFooterClean">
|
||||
<asp:Button id="btnAdd" runat="server" Text="Add" CssClass="Button1" meta:resourcekey="btnAdd" ValidationGroup="AddRDSServer" OnClick="btnAdd_Click"></asp:Button>
|
||||
<asp:ValidationSummary ID="valSummary" runat="server" ShowMessageBox="True" ShowSummary="False" ValidationGroup="AddRDSServer" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,76 @@
|
|||
// Copyright (c) 2014, Outercurve Foundation.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// - Redistributions of source code must retain the above copyright notice, this
|
||||
// list of conditions and the following disclaimer.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
using System;
|
||||
using System.Web.UI.WebControls;
|
||||
using WebsitePanel.EnterpriseServer;
|
||||
using WebsitePanel.Providers.Common;
|
||||
using WebsitePanel.Providers.HostedSolution;
|
||||
using WebsitePanel.Providers.OS;
|
||||
|
||||
namespace WebsitePanel.Portal.RDS
|
||||
{
|
||||
public partial class AddRDSServer : WebsitePanelModuleBase
|
||||
{
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
BindRDSServers();
|
||||
}
|
||||
|
||||
btnAdd.Enabled = ddlServers.Items.Count > 0;
|
||||
}
|
||||
|
||||
private void BindRDSServers()
|
||||
{
|
||||
ddlServers.DataSource = new RDSHelper().GetFreeRDSServers();
|
||||
ddlServers.DataTextField = "Name";
|
||||
ddlServers.DataValueField = "Id";
|
||||
ddlServers.DataBind();
|
||||
}
|
||||
|
||||
protected void btnAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsValid)
|
||||
return;
|
||||
|
||||
try
|
||||
{
|
||||
ES.Services.RDS.AddRdsServerToOrganization(PanelRequest.ItemID, int.Parse(ddlServers.SelectedValue));
|
||||
|
||||
Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "rds_servers",
|
||||
"SpaceID=" + PanelSecurity.PackageId));
|
||||
}
|
||||
catch { }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,87 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebsitePanel.Portal.RDS {
|
||||
|
||||
|
||||
public partial class AddRDSServer {
|
||||
|
||||
/// <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>
|
||||
/// imgAddRDSServer 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 imgAddRDSServer;
|
||||
|
||||
/// <summary>
|
||||
/// locTitle control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize locTitle;
|
||||
|
||||
/// <summary>
|
||||
/// messageBox control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
|
||||
|
||||
/// <summary>
|
||||
/// locServer 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 locServer;
|
||||
|
||||
/// <summary>
|
||||
/// ddlServers control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.DropDownList ddlServers;
|
||||
|
||||
/// <summary>
|
||||
/// btnAdd 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 btnAdd;
|
||||
|
||||
/// <summary>
|
||||
/// valSummary control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.ValidationSummary valSummary;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,144 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="btnCreate.OnClientClick" xml:space="preserve">
|
||||
<value>ShowProgressDialog('Adding RDS Server ...');</value>
|
||||
</data>
|
||||
<data name="btnAdd.Text" xml:space="preserve">
|
||||
<value>Add</value>
|
||||
</data>
|
||||
<data name="FormComments.Text" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="Text.PageName" xml:space="preserve">
|
||||
<value>Add RDS Server</value>
|
||||
</data>
|
||||
<data name="valRequireFolderName.ErrorMessage" xml:space="preserve">
|
||||
<value>Enter Folder Name</value>
|
||||
</data>
|
||||
<data name="valRequireFolderName.Text" xml:space="preserve">
|
||||
<value>*</value>
|
||||
</data>
|
||||
<data name="locTitle.Text" xml:space="preserve">
|
||||
<value>Add RDS Server To Organization</value>
|
||||
</data>
|
||||
<data name="locServer.Text" xml:space="preserve">
|
||||
<value>Select RDS Server:</value>
|
||||
</data>
|
||||
</root>
|
|
@ -0,0 +1,150 @@
|
|||
<?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="btnAddServerToOrg.Text" xml:space="preserve">
|
||||
<value>Add...</value>
|
||||
</data>
|
||||
<data name="cmdDelete.OnClientClick" xml:space="preserve">
|
||||
<value>if(!confirm('Are you sure you want to remove selected server?')) return false; else ShowProgressDialog('Removing server...');</value>
|
||||
</data>
|
||||
<data name="cmdDelete.Text" xml:space="preserve">
|
||||
<value>Remove</value>
|
||||
</data>
|
||||
<data name="cmdDelete.ToolTip" xml:space="preserve">
|
||||
<value>Remove Server</value>
|
||||
</data>
|
||||
<data name="gvRDSAssignedServers.Empty" xml:space="preserve">
|
||||
<value>No RDS Servers have been added yet. To add a new RDS Servers click "Add..." button.</value>
|
||||
</data>
|
||||
<data name="HSFormComments.Text" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="Text.PageName" xml:space="preserve">
|
||||
<value>RDS Servers</value>
|
||||
</data>
|
||||
<data name="gvRDSServerName.Header" xml:space="preserve">
|
||||
<value>Server</value>
|
||||
</data>
|
||||
<data name="locTitle.Text" xml:space="preserve">
|
||||
<value>Assigned RDS Servers</value>
|
||||
</data>
|
||||
<data name="locQuota.Text" xml:space="preserve">
|
||||
<value>Total RDS Servers Allocated:</value>
|
||||
</data>
|
||||
</root>
|
|
@ -0,0 +1,150 @@
|
|||
<?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="btnAddCollection.Text" xml:space="preserve">
|
||||
<value>Create New RDS Collection</value>
|
||||
</data>
|
||||
<data name="cmdDelete.OnClientClick" xml:space="preserve">
|
||||
<value>if(!confirm('Are you sure you want to remove selected rds collection?')) return false; else ShowProgressDialog('Deleting Collection...');</value>
|
||||
</data>
|
||||
<data name="cmdDelete.Text" xml:space="preserve">
|
||||
<value>Remove</value>
|
||||
</data>
|
||||
<data name="cmdDelete.ToolTip" xml:space="preserve">
|
||||
<value>Delete Collection</value>
|
||||
</data>
|
||||
<data name="gvRDSCollections.Empty" xml:space="preserve">
|
||||
<value>No collections have been added yet. To add a new click "Create New RDS Collection" button.</value>
|
||||
</data>
|
||||
<data name="HSFormComments.Text" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="Text.PageName" xml:space="preserve">
|
||||
<value>RDS Collections</value>
|
||||
</data>
|
||||
<data name="gvCollectionName.Header" xml:space="preserve">
|
||||
<value>Collection Name</value>
|
||||
</data>
|
||||
<data name="locTitle.Text" xml:space="preserve">
|
||||
<value>RDS Collections</value>
|
||||
</data>
|
||||
<data name="gvServer.Header" xml:space="preserve">
|
||||
<value>RDS Server</value>
|
||||
</data>
|
||||
</root>
|
|
@ -0,0 +1,144 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="btnCreate.OnClientClick" xml:space="preserve">
|
||||
<value>ShowProgressDialog('Adding RDS Server ...');</value>
|
||||
</data>
|
||||
<data name="btnSave.Text" xml:space="preserve">
|
||||
<value>Save</value>
|
||||
</data>
|
||||
<data name="FormComments.Text" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="Text.PageName" xml:space="preserve">
|
||||
<value>Create RDS Collection</value>
|
||||
</data>
|
||||
<data name="locTitle.Text" xml:space="preserve">
|
||||
<value>Create New RDS Collection</value>
|
||||
</data>
|
||||
<data name="locCollectionName.Text" xml:space="preserve">
|
||||
<value>Collection Name</value>
|
||||
</data>
|
||||
<data name="gvRDSServerName.Header" xml:space="preserve">
|
||||
<value>Server Name</value>
|
||||
</data>
|
||||
<data name="gvRDSServers.Empty" xml:space="preserve">
|
||||
<value>No RDS Servers have been added yet. To add a new RDS Servers click "Add RDS Server" button.</value>
|
||||
</data>
|
||||
</root>
|
|
@ -0,0 +1,144 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="btnCreate.OnClientClick" xml:space="preserve">
|
||||
<value>ShowProgressDialog('Adding RDS Server ...');</value>
|
||||
</data>
|
||||
<data name="btnSave.Text" xml:space="preserve">
|
||||
<value>Save Changes</value>
|
||||
</data>
|
||||
<data name="FormComments.Text" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="Text.PageName" xml:space="preserve">
|
||||
<value>Edit RDS Collection</value>
|
||||
</data>
|
||||
<data name="locTitle.Text" xml:space="preserve">
|
||||
<value>Edit RDS Collection</value>
|
||||
</data>
|
||||
<data name="locCollectionName.Text" xml:space="preserve">
|
||||
<value>Collection Name:</value>
|
||||
</data>
|
||||
<data name="gvRDSServerName.Header" xml:space="preserve">
|
||||
<value>Server Name</value>
|
||||
</data>
|
||||
<data name="gvRDSServers.Empty" xml:space="preserve">
|
||||
<value>No RDS Servers have been added yet. To add a new RDS Servers click "Add RDS Server" button.</value>
|
||||
</data>
|
||||
</root>
|
|
@ -0,0 +1,144 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="btnCreate.OnClientClick" xml:space="preserve">
|
||||
<value>ShowProgressDialog('Adding RDS Server ...');</value>
|
||||
</data>
|
||||
<data name="btnSave.Text" xml:space="preserve">
|
||||
<value>Save Changes</value>
|
||||
</data>
|
||||
<data name="FormComments.Text" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="Text.PageName" xml:space="preserve">
|
||||
<value>Edit RDS Collection</value>
|
||||
</data>
|
||||
<data name="locTitle.Text" xml:space="preserve">
|
||||
<value>Edit RDS Collection</value>
|
||||
</data>
|
||||
<data name="locCollectionName.Text" xml:space="preserve">
|
||||
<value>Collection Name:</value>
|
||||
</data>
|
||||
<data name="gvRDSServerName.Header" xml:space="preserve">
|
||||
<value>Server Name</value>
|
||||
</data>
|
||||
<data name="gvRDSServers.Empty" xml:space="preserve">
|
||||
<value>No RDS Servers have been added yet. To add a new RDS Servers click "Add RDS Server" button.</value>
|
||||
</data>
|
||||
</root>
|
|
@ -0,0 +1,79 @@
|
|||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="AssignedRDSServers.ascx.cs" Inherits="WebsitePanel.Portal.RDS.AssignedRDSServers" %>
|
||||
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
|
||||
<%@ Register Src="../UserControls/QuotaViewer.ascx" TagName="QuotaViewer" TagPrefix="wsp" %>
|
||||
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
|
||||
|
||||
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
|
||||
|
||||
<div id="ExchangeContainer">
|
||||
<div class="Module">
|
||||
<div class="Left">
|
||||
</div>
|
||||
<div class="Content">
|
||||
<div class="Center">
|
||||
<div class="Title">
|
||||
<asp:Image ID="imgRDSServers" SkinID="AssignedRDSServers48" runat="server" />
|
||||
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Assigned RDS Servers"></asp:Localize>
|
||||
</div>
|
||||
<div class="FormContentRDS">
|
||||
<wsp:SimpleMessageBox id="messageBox" runat="server" />
|
||||
|
||||
<div class="FormButtonsBarClean">
|
||||
<div class="FormButtonsBarCleanLeft">
|
||||
<asp:Button ID="btnAddServerToOrg" runat="server" meta:resourcekey="btnAddServerToOrg"
|
||||
Text="Add..." CssClass="Button2" OnClick="btnAddServerToOrg_Click" />
|
||||
</div>
|
||||
<div class="FormButtonsBarCleanRight">
|
||||
<asp:Panel ID="SearchPanel" runat="server" DefaultButton="cmdSearch">
|
||||
<asp:Localize ID="locSearch" runat="server" meta:resourcekey="locSearch" Visible="false"></asp:Localize>
|
||||
<asp:DropDownList ID="ddlPageSize" runat="server" AutoPostBack="True"
|
||||
onselectedindexchanged="ddlPageSize_SelectedIndexChanged">
|
||||
<asp:ListItem>10</asp:ListItem>
|
||||
<asp:ListItem Selected="True">20</asp:ListItem>
|
||||
<asp:ListItem>50</asp:ListItem>
|
||||
<asp:ListItem>100</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
<asp:TextBox ID="txtSearchValue" runat="server" CssClass="NormalTextBox" Width="100">
|
||||
</asp:TextBox><asp:ImageButton ID="cmdSearch" Runat="server" meta:resourcekey="cmdSearch" SkinID="SearchButton" CausesValidation="false"/>
|
||||
</asp:Panel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="gvRDSAssignedServers" runat="server" AutoGenerateColumns="False" EnableViewState="true"
|
||||
Width="100%" EmptyDataText="gvRDSAssignedServers" CssSelectorClass="NormalGridView"
|
||||
OnRowCommand="gvRDSAssignedServers_RowCommand" AllowPaging="True" AllowSorting="True"
|
||||
DataSourceID="odsRDSAssignedServersPaged" PageSize="20">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="gvRDSServerName" SortExpression="Name">
|
||||
<ItemStyle Width="90%"></ItemStyle>
|
||||
<ItemTemplate>
|
||||
<asp:Label id="litRDSServerName" runat="server">
|
||||
<%# Eval("Name") %>
|
||||
</asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgRemove1" runat="server" Text="Remove"
|
||||
CommandName="DeleteItem" CommandArgument='<%# Eval("Id") %>'
|
||||
meta:resourcekey="cmdDelete" OnClientClick="return confirm('Are you sure you want to remove selected server?')"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:ObjectDataSource ID="odsRDSAssignedServersPaged" runat="server" EnablePaging="True"
|
||||
SelectCountMethod="GetOrganizationRdsServersPagedCount"
|
||||
SelectMethod="GetOrganizationRdsServersPaged"
|
||||
SortParameterName="sortColumn"
|
||||
TypeName="WebsitePanel.Portal.RDSHelper">
|
||||
<SelectParameters>
|
||||
<asp:QueryStringParameter Name="itemId" QueryStringField="ItemID" DefaultValue="0" />
|
||||
<asp:ControlParameter Name="filterValue" ControlID="txtSearchValue" PropertyName="Text" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,94 @@
|
|||
// Copyright (c) 2014, Outercurve Foundation.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// - Redistributions of source code must retain the above copyright notice, this
|
||||
// list of conditions and the following disclaimer.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
using System;
|
||||
using System.Web.UI.WebControls;
|
||||
using WebsitePanel.EnterpriseServer;
|
||||
using WebsitePanel.Providers.Common;
|
||||
using WebsitePanel.Providers.HostedSolution;
|
||||
using WebsitePanel.Providers.OS;
|
||||
using WebsitePanel.WebPortal;
|
||||
|
||||
namespace WebsitePanel.Portal.RDS
|
||||
{
|
||||
public partial class AssignedRDSServers : WebsitePanelModuleBase
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||
if (cntx.Quotas.ContainsKey(Quotas.RDS_SERVERS))
|
||||
{
|
||||
btnAddServerToOrg.Enabled = (!(cntx.Quotas[Quotas.RDS_SERVERS].QuotaAllocatedValue <= gvRDSAssignedServers.Rows.Count) || (cntx.Quotas[Quotas.RDS_SERVERS].QuotaAllocatedValue == -1));
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnAddServerToOrg_Click(object sender, EventArgs e)
|
||||
{
|
||||
Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "rds_add_server",
|
||||
"SpaceID=" + PanelSecurity.PackageId));
|
||||
}
|
||||
|
||||
protected void gvRDSAssignedServers_RowCommand(object sender, GridViewCommandEventArgs e)
|
||||
{
|
||||
if (e.CommandName == "DeleteItem")
|
||||
{
|
||||
// delete RDS Server
|
||||
int rdsServerId = int.Parse(e.CommandArgument.ToString());
|
||||
|
||||
try
|
||||
{
|
||||
ResultObject result = ES.Services.RDS.RemoveRdsServerFromOrganization(rdsServerId);
|
||||
if (!result.IsSuccess)
|
||||
{
|
||||
messageBox.ShowMessage(result, "REMOTE_DESKTOP_SERVICES_UNASSIGN_SERVER_FROM_ORG", "RDS");
|
||||
return;
|
||||
}
|
||||
|
||||
gvRDSAssignedServers.DataBind();
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ShowErrorMessage("REMOTE_DESKTOP_SERVICES_UNASSIGN_SERVER_FROM_ORG", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
gvRDSAssignedServers.PageSize = Convert.ToInt16(ddlPageSize.SelectedValue);
|
||||
|
||||
gvRDSAssignedServers.DataBind();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,123 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebsitePanel.Portal.RDS {
|
||||
|
||||
|
||||
public partial class AssignedRDSServers {
|
||||
|
||||
/// <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>
|
||||
/// imgRDSServers 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 imgRDSServers;
|
||||
|
||||
/// <summary>
|
||||
/// locTitle control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize locTitle;
|
||||
|
||||
/// <summary>
|
||||
/// messageBox control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
|
||||
|
||||
/// <summary>
|
||||
/// btnAddServerToOrg 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 btnAddServerToOrg;
|
||||
|
||||
/// <summary>
|
||||
/// SearchPanel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Panel SearchPanel;
|
||||
|
||||
/// <summary>
|
||||
/// locSearch 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 locSearch;
|
||||
|
||||
/// <summary>
|
||||
/// ddlPageSize control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.DropDownList ddlPageSize;
|
||||
|
||||
/// <summary>
|
||||
/// txtSearchValue control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtSearchValue;
|
||||
|
||||
/// <summary>
|
||||
/// cmdSearch control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.ImageButton cmdSearch;
|
||||
|
||||
/// <summary>
|
||||
/// gvRDSAssignedServers control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.GridView gvRDSAssignedServers;
|
||||
|
||||
/// <summary>
|
||||
/// odsRDSAssignedServersPaged control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.ObjectDataSource odsRDSAssignedServersPaged;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,87 @@
|
|||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RDSCollections.ascx.cs" Inherits="WebsitePanel.Portal.RDS.RDSCollections" %>
|
||||
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
|
||||
<%@ Register Src="../UserControls/QuotaViewer.ascx" TagName="QuotaViewer" TagPrefix="wsp" %>
|
||||
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
|
||||
|
||||
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
|
||||
|
||||
<div id="ExchangeContainer">
|
||||
<div class="Module">
|
||||
<div class="Left">
|
||||
</div>
|
||||
<div class="Content">
|
||||
<div class="Center">
|
||||
<div class="Title">
|
||||
<asp:Image ID="imgRDSCollections" SkinID="EnterpriseStorageSpace48" runat="server" />
|
||||
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="RDS Collections"></asp:Localize>
|
||||
</div>
|
||||
<div class="FormBody">
|
||||
<wsp:SimpleMessageBox id="messageBox" runat="server" />
|
||||
|
||||
<div class="FormButtonsBarClean">
|
||||
<div class="FormButtonsBarCleanLeft">
|
||||
<asp:Button ID="btnAddCollection" runat="server" meta:resourcekey="btnAddCollection"
|
||||
Text="Create New RDS Collection" CssClass="Button1" OnClick="btnAddCollection_Click" />
|
||||
</div>
|
||||
<div class="FormButtonsBarCleanRight">
|
||||
<asp:Panel ID="SearchPanel" runat="server" DefaultButton="cmdSearch">
|
||||
<asp:Localize ID="locSearch" runat="server" meta:resourcekey="locSearch" Visible="false"></asp:Localize>
|
||||
<asp:DropDownList ID="ddlPageSize" runat="server" AutoPostBack="True"
|
||||
onselectedindexchanged="ddlPageSize_SelectedIndexChanged">
|
||||
<asp:ListItem>10</asp:ListItem>
|
||||
<asp:ListItem Selected="True">20</asp:ListItem>
|
||||
<asp:ListItem>50</asp:ListItem>
|
||||
<asp:ListItem>100</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
<asp:TextBox ID="txtSearchValue" runat="server" CssClass="NormalTextBox" Width="100">
|
||||
</asp:TextBox><asp:ImageButton ID="cmdSearch" Runat="server" meta:resourcekey="cmdSearch" SkinID="SearchButton" CausesValidation="false"/>
|
||||
</asp:Panel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="gvRDSCollections" runat="server" AutoGenerateColumns="False" EnableViewState="true"
|
||||
Width="100%" EmptyDataText="gvRDSCollections" CssSelectorClass="NormalGridView"
|
||||
OnRowCommand="gvRDSCollections_RowCommand" AllowPaging="True" AllowSorting="True"
|
||||
DataSourceID="odsRDSCollectionsPaged" PageSize="20">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="gvCollectionName" SortExpression="Name">
|
||||
<ItemStyle Width="40%"></ItemStyle>
|
||||
<ItemTemplate>
|
||||
<asp:Literal id="litCollectionName" runat="server" Text='<%# Eval("Name").ToString() %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="gvServer">
|
||||
<ItemStyle Width="40%"></ItemStyle>
|
||||
<ItemTemplate>
|
||||
<asp:Literal id="litServer" runat="server" Text='<%#GetServerName(Eval("Id").ToString())%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:hyperlink id="lnkApps" meta:resourcekey="lnkApps" runat="server" NavigateUrl='<%# GetCollectionAppsEditUrl(Eval("Id").ToString()) %>'>Applications</asp:hyperlink>
|
||||
|
|
||||
<asp:hyperlink id="lnkUsers" meta:resourcekey="lnkUsers" runat="server" NavigateUrl='<%# GetCollectionUsersEditUrl(Eval("Id").ToString()) %>'>Users</asp:hyperlink>
|
||||
|
|
||||
<asp:LinkButton ID="lnkRemove" runat="server" Text="Remove"
|
||||
CommandName="DeleteItem" CommandArgument='<%# Eval("Id") %>'
|
||||
meta:resourcekey="cmdDelete" OnClientClick="return confirm('Are you sure you want to remove selected rds collection?')"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:ObjectDataSource ID="odsRDSCollectionsPaged" runat="server" EnablePaging="True"
|
||||
SelectCountMethod="GetRDSCollectonsPagedCount"
|
||||
SelectMethod="GetRDSCollectonsPaged"
|
||||
SortParameterName="sortColumn"
|
||||
TypeName="WebsitePanel.Portal.RDSHelper">
|
||||
<SelectParameters>
|
||||
<asp:QueryStringParameter Name="itemId" QueryStringField="ItemID" DefaultValue="0" />
|
||||
<asp:ControlParameter Name="filterValue" ControlID="txtSearchValue" PropertyName="Text" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,115 @@
|
|||
// Copyright (c) 2014, Outercurve Foundation.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// - Redistributions of source code must retain the above copyright notice, this
|
||||
// list of conditions and the following disclaimer.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Web.UI.WebControls;
|
||||
using WebsitePanel.EnterpriseServer;
|
||||
using WebsitePanel.Providers.Common;
|
||||
using WebsitePanel.Providers.HostedSolution;
|
||||
using WebsitePanel.Providers.OS;
|
||||
using WebsitePanel.Providers.RemoteDesktopServices;
|
||||
using WebsitePanel.WebPortal;
|
||||
|
||||
namespace WebsitePanel.Portal.RDS
|
||||
{
|
||||
public partial class RDSCollections : WebsitePanelModuleBase
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public string GetServerName(string collectionId)
|
||||
{
|
||||
int id = int.Parse(collectionId);
|
||||
|
||||
RdsServer[] servers = ES.Services.RDS.GetCollectionRdsServers(id);
|
||||
|
||||
return servers.FirstOrDefault().FqdName;
|
||||
}
|
||||
|
||||
protected void btnAddCollection_Click(object sender, EventArgs e)
|
||||
{
|
||||
Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "rds_create_collection",
|
||||
"SpaceID=" + PanelSecurity.PackageId));
|
||||
}
|
||||
|
||||
protected void gvRDSCollections_RowCommand(object sender, GridViewCommandEventArgs e)
|
||||
{
|
||||
if (e.CommandName == "DeleteItem")
|
||||
{
|
||||
// delete RDS Collection
|
||||
int rdsCollectionId = int.Parse(e.CommandArgument.ToString());
|
||||
|
||||
try
|
||||
{
|
||||
RdsCollection collection = ES.Services.RDS.GetRdsCollection(rdsCollectionId);
|
||||
|
||||
ResultObject result = ES.Services.RDS.RemoveRdsCollection(PanelRequest.ItemID, collection);
|
||||
|
||||
if (!result.IsSuccess)
|
||||
{
|
||||
messageBox.ShowMessage(result, "REMOTE_DESKTOP_SERVICES_REMOVE_COLLECTION", "RDS");
|
||||
return;
|
||||
}
|
||||
|
||||
gvRDSCollections.DataBind();
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ShowErrorMessage("REMOTE_DESKTOP_SERVICES_REMOVE_COLLECTION", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
gvRDSCollections.PageSize = Convert.ToInt16(ddlPageSize.SelectedValue);
|
||||
|
||||
gvRDSCollections.DataBind();
|
||||
}
|
||||
|
||||
public string GetCollectionAppsEditUrl(string collectionId)
|
||||
{
|
||||
return EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "rds_collection_edit_apps",
|
||||
"CollectionId=" + collectionId,
|
||||
"ItemID=" + PanelRequest.ItemID);
|
||||
}
|
||||
|
||||
public string GetCollectionUsersEditUrl(string collectionId)
|
||||
{
|
||||
return EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "rds_collection_edit_users",
|
||||
"CollectionId=" + collectionId,
|
||||
"ItemID=" + PanelRequest.ItemID);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,123 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebsitePanel.Portal.RDS {
|
||||
|
||||
|
||||
public partial class RDSCollections {
|
||||
|
||||
/// <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>
|
||||
/// imgRDSCollections 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 imgRDSCollections;
|
||||
|
||||
/// <summary>
|
||||
/// locTitle control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize locTitle;
|
||||
|
||||
/// <summary>
|
||||
/// messageBox control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
|
||||
|
||||
/// <summary>
|
||||
/// btnAddCollection 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 btnAddCollection;
|
||||
|
||||
/// <summary>
|
||||
/// SearchPanel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Panel SearchPanel;
|
||||
|
||||
/// <summary>
|
||||
/// locSearch 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 locSearch;
|
||||
|
||||
/// <summary>
|
||||
/// ddlPageSize control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.DropDownList ddlPageSize;
|
||||
|
||||
/// <summary>
|
||||
/// txtSearchValue control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtSearchValue;
|
||||
|
||||
/// <summary>
|
||||
/// cmdSearch control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.ImageButton cmdSearch;
|
||||
|
||||
/// <summary>
|
||||
/// gvRDSCollections control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.GridView gvRDSCollections;
|
||||
|
||||
/// <summary>
|
||||
/// odsRDSCollectionsPaged control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.ObjectDataSource odsRDSCollectionsPaged;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RDSCreateCollection.ascx.cs" Inherits="WebsitePanel.Portal.RDS.RDSCreateCollection" %>
|
||||
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
|
||||
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
|
||||
<%@ Register Src="UserControls/RDSCollectionServers.ascx" TagName="CollectionServers" TagPrefix="wsp"%>
|
||||
<script type="text/javascript" src="/JavaScript/jquery.min.js?v=1.4.4"></script>
|
||||
|
||||
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
|
||||
|
||||
<div id="ExchangeContainer">
|
||||
<div class="Module">
|
||||
<div class="Left">
|
||||
</div>
|
||||
<div class="Content">
|
||||
<div class="Center">
|
||||
<div class="Title">
|
||||
<asp:Image ID="imgAddRDSServer" SkinID="AddRDSServer48" runat="server" />
|
||||
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Add Server To Organization"></asp:Localize>
|
||||
</div>
|
||||
<div class="FormContentRDS">
|
||||
<wsp:SimpleMessageBox id="messageBox" runat="server" />
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td class="FormLabel150" style="width: 100px;"><asp:Localize ID="locCollectionName" runat="server" meta:resourcekey="locCollectionName" Text="Collection Name"></asp:Localize></td>
|
||||
<td>
|
||||
<asp:TextBox ID="txtCollectionName" runat="server" CssClass="NormalTextBox" />
|
||||
<asp:RequiredFieldValidator ID="valCollectionName" runat="server" ErrorMessage="*" ControlToValidate="txtCollectionName"></asp:RequiredFieldValidator>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<fieldset id="RDSServersPanel" runat="server">
|
||||
<legend><asp:Localize ID="locRDSServersSection" runat="server" meta:resourcekey="locRDSServersSection" Text="RDS Servers"></asp:Localize></legend>
|
||||
<div style="padding: 10px;">
|
||||
<wsp:CollectionServers id="servers" runat="server" />
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<div class="FormFooter">
|
||||
<asp:Button id="btnSave" runat="server" Text="Save" CssClass="Button1" meta:resourcekey="btnSave" OnClick="btnSave_Click"></asp:Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,72 @@
|
|||
// Copyright (c) 2014, Outercurve Foundation.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// - Redistributions of source code must retain the above copyright notice, this
|
||||
// list of conditions and the following disclaimer.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
using System;
|
||||
using System.Web.UI.WebControls;
|
||||
using WebsitePanel.EnterpriseServer;
|
||||
using WebsitePanel.Providers.Common;
|
||||
using WebsitePanel.Providers.HostedSolution;
|
||||
using WebsitePanel.Providers.OS;
|
||||
using WebsitePanel.Providers.RemoteDesktopServices;
|
||||
|
||||
namespace WebsitePanel.Portal.RDS
|
||||
{
|
||||
public partial class RDSCreateCollection : WebsitePanelModuleBase
|
||||
{
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsValid)
|
||||
return;
|
||||
|
||||
try
|
||||
{
|
||||
if (servers.GetServers().Count < 1)
|
||||
{
|
||||
messageBox.ShowErrorMessage("RDS_CREATE_COLLECTION_RDSSERVER_REQUAIRED");
|
||||
return;
|
||||
}
|
||||
RdsCollection collection = new RdsCollection{ Name = txtCollectionName.Text, Servers = servers.GetServers(), Description = "" };
|
||||
|
||||
ES.Services.RDS.AddRdsCollection(PanelRequest.ItemID, collection);
|
||||
|
||||
Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "rds_collections",
|
||||
"SpaceID=" + PanelSecurity.PackageId));
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,114 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebsitePanel.Portal.RDS {
|
||||
|
||||
|
||||
public partial class RDSCreateCollection {
|
||||
|
||||
/// <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>
|
||||
/// imgAddRDSServer 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 imgAddRDSServer;
|
||||
|
||||
/// <summary>
|
||||
/// locTitle control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize locTitle;
|
||||
|
||||
/// <summary>
|
||||
/// messageBox control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
|
||||
|
||||
/// <summary>
|
||||
/// locCollectionName control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize locCollectionName;
|
||||
|
||||
/// <summary>
|
||||
/// txtCollectionName control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtCollectionName;
|
||||
|
||||
/// <summary>
|
||||
/// valCollectionName control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.RequiredFieldValidator valCollectionName;
|
||||
|
||||
/// <summary>
|
||||
/// RDSServersPanel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl RDSServersPanel;
|
||||
|
||||
/// <summary>
|
||||
/// locRDSServersSection control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize locRDSServersSection;
|
||||
|
||||
/// <summary>
|
||||
/// servers control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.RDS.UserControls.RDSCollectionServers servers;
|
||||
|
||||
/// <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;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RDSEditCollectionApps.ascx.cs" Inherits="WebsitePanel.Portal.RDS.RDSEditCollectionApps" %>
|
||||
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
|
||||
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
|
||||
<%@ Register Src="UserControls/RDSCollectionApps.ascx" TagName="CollectionApps" TagPrefix="wsp"%>
|
||||
<script type="text/javascript" src="/JavaScript/jquery.min.js?v=1.4.4"></script>
|
||||
|
||||
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
|
||||
|
||||
<div id="ExchangeContainer">
|
||||
<div class="Module">
|
||||
<div class="Left">
|
||||
</div>
|
||||
<div class="Content">
|
||||
<div class="Center">
|
||||
<div class="Title">
|
||||
<asp:Image ID="imgEditRDSCollection" SkinID="EnterpriseStorageSpace48" runat="server" />
|
||||
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Edit RDS Collection"></asp:Localize>
|
||||
</div>
|
||||
<div class="FormContentRDS">
|
||||
<wsp:SimpleMessageBox id="messageBox" runat="server" />
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td class="FormLabel150" style="width: 100px;"><asp:Localize ID="locCollectionName" runat="server" meta:resourcekey="locCollectionName" Text="Collection Name"></asp:Localize></td>
|
||||
<td class="FormLabel150">
|
||||
<asp:Localize ID="locCName" runat="server" Text="RDS Collection 1" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<fieldset id="RemoteAppsPanel" runat="server">
|
||||
<legend><asp:Localize ID="locRemoteAppsSection" runat="server" meta:resourcekey="locRemoteAppsSection" Text="Remote Applications"></asp:Localize></legend>
|
||||
<div style="padding: 10px;">
|
||||
<wsp:CollectionApps id="remoreApps" runat="server" />
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<div class="FormFooter">
|
||||
<asp:Button id="btnSave" runat="server" Text="Save Changes" CssClass="Button1" meta:resourcekey="btnSave" ValidationGroup="SaveRDSCollectoin" OnClick="btnSave_Click"></asp:Button>
|
||||
<asp:ValidationSummary ID="valSummary" runat="server" ShowMessageBox="True" ShowSummary="False" ValidationGroup="SaveRDSCollectoin" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,69 @@
|
|||
// Copyright (c) 2014, Outercurve Foundation.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// - Redistributions of source code must retain the above copyright notice, this
|
||||
// list of conditions and the following disclaimer.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
using System;
|
||||
using System.Web.UI.WebControls;
|
||||
using WebsitePanel.EnterpriseServer;
|
||||
using WebsitePanel.Providers.Common;
|
||||
using WebsitePanel.Providers.HostedSolution;
|
||||
using WebsitePanel.Providers.OS;
|
||||
using WebsitePanel.Providers.RemoteDesktopServices;
|
||||
|
||||
namespace WebsitePanel.Portal.RDS
|
||||
{
|
||||
public partial class RDSEditCollectionApps : WebsitePanelModuleBase
|
||||
{
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
RdsCollection collection = ES.Services.RDS.GetRdsCollection(PanelRequest.CollectionID);
|
||||
var collectionApps = ES.Services.RDS.GetCollectionRemoteApplications(PanelRequest.ItemID, collection.Name);
|
||||
|
||||
locCName.Text = collection.Name;
|
||||
|
||||
remoreApps.SetApps(collectionApps);
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsValid)
|
||||
return;
|
||||
try
|
||||
{
|
||||
ES.Services.RDS.SetRemoteApplicationsToRdsCollection(PanelRequest.ItemID, PanelRequest.CollectionID, remoreApps.GetApps());
|
||||
|
||||
Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "rds_collections",
|
||||
"SpaceID=" + PanelSecurity.PackageId));
|
||||
}
|
||||
catch (Exception ex) { }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,114 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebsitePanel.Portal.RDS {
|
||||
|
||||
|
||||
public partial class RDSEditCollectionApps {
|
||||
|
||||
/// <summary>
|
||||
/// asyncTasks control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks;
|
||||
|
||||
/// <summary>
|
||||
/// imgEditRDSCollection control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Image imgEditRDSCollection;
|
||||
|
||||
/// <summary>
|
||||
/// locTitle control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize locTitle;
|
||||
|
||||
/// <summary>
|
||||
/// 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>
|
||||
/// locCollectionName control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize locCollectionName;
|
||||
|
||||
/// <summary>
|
||||
/// locCName control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize locCName;
|
||||
|
||||
/// <summary>
|
||||
/// RemoteAppsPanel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl RemoteAppsPanel;
|
||||
|
||||
/// <summary>
|
||||
/// locRemoteAppsSection control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize locRemoteAppsSection;
|
||||
|
||||
/// <summary>
|
||||
/// remoreApps control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.RDS.UserControls.RDSCollectionApps remoreApps;
|
||||
|
||||
/// <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>
|
||||
/// valSummary control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.ValidationSummary valSummary;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RDSEditCollectionUsers.ascx.cs" Inherits="WebsitePanel.Portal.RDS.RDSEditCollectionUsers" %>
|
||||
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
|
||||
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
|
||||
<%@ Register Src="UserControls/RDSCollectionUsers.ascx" TagName="CollectionUsers" TagPrefix="wsp"%>
|
||||
<script type="text/javascript" src="/JavaScript/jquery.min.js?v=1.4.4"></script>
|
||||
|
||||
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
|
||||
|
||||
<div id="ExchangeContainer">
|
||||
<div class="Module">
|
||||
<div class="Left">
|
||||
</div>
|
||||
<div class="Content">
|
||||
<div class="Center">
|
||||
<div class="Title">
|
||||
<asp:Image ID="imgEditRDSCollection" SkinID="EnterpriseStorageSpace48" runat="server" />
|
||||
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Edit RDS Collection"></asp:Localize>
|
||||
</div>
|
||||
<div class="FormContentRDS">
|
||||
<wsp:SimpleMessageBox id="messageBox" runat="server" />
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td class="FormLabel150" style="width: 100px;"><asp:Localize ID="locCollectionName" runat="server" meta:resourcekey="locCollectionName" Text="Collection Name:"></asp:Localize></td>
|
||||
<td class="FormLabel150">
|
||||
<asp:Localize ID="locCName" runat="server" Text="RDS Collection 1" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<fieldset id="UsersPanel" runat="server">
|
||||
<legend><asp:Localize ID="locUsersSection" runat="server" meta:resourcekey="locUsersSection" Text="Users"></asp:Localize></legend>
|
||||
<div style="padding: 10px;">
|
||||
<wsp:CollectionUsers id="users" runat="server" />
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<div class="FormFooter">
|
||||
<asp:Button id="btnSave" runat="server" Text="Save" CssClass="Button1" meta:resourcekey="btnSave" ValidationGroup="SaveRDSCollectoin" OnClick="btnSave_Click"></asp:Button>
|
||||
<asp:ValidationSummary ID="valSummary" runat="server" ShowMessageBox="True" ShowSummary="False" ValidationGroup="SaveRDSCollectoin" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,68 @@
|
|||
// Copyright (c) 2014, Outercurve Foundation.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// - Redistributions of source code must retain the above copyright notice, this
|
||||
// list of conditions and the following disclaimer.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
using System;
|
||||
using System.Web.UI.WebControls;
|
||||
using WebsitePanel.EnterpriseServer;
|
||||
using WebsitePanel.Providers.Common;
|
||||
using WebsitePanel.Providers.HostedSolution;
|
||||
using WebsitePanel.Providers.OS;
|
||||
|
||||
namespace WebsitePanel.Portal.RDS
|
||||
{
|
||||
public partial class RDSEditCollectionUsers : WebsitePanelModuleBase
|
||||
{
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
var collectionUsers = ES.Services.RDS.GetRdsCollectionUsers(PanelRequest.CollectionID);
|
||||
var collection = ES.Services.RDS.GetRdsCollection(PanelRequest.CollectionID);
|
||||
|
||||
locCName.Text = collection.Name;
|
||||
|
||||
users.SetUsers(collectionUsers);
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsValid)
|
||||
return;
|
||||
try
|
||||
{
|
||||
ES.Services.RDS.SetUsersToRdsCollection(PanelRequest.ItemID, PanelRequest.CollectionID, users.GetUsers());
|
||||
|
||||
Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "rds_collections",
|
||||
"SpaceID=" + PanelSecurity.PackageId));
|
||||
}
|
||||
catch(Exception ex) { }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,114 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebsitePanel.Portal.RDS {
|
||||
|
||||
|
||||
public partial class RDSEditCollectionUsers {
|
||||
|
||||
/// <summary>
|
||||
/// asyncTasks control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks;
|
||||
|
||||
/// <summary>
|
||||
/// imgEditRDSCollection control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Image imgEditRDSCollection;
|
||||
|
||||
/// <summary>
|
||||
/// locTitle control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize locTitle;
|
||||
|
||||
/// <summary>
|
||||
/// 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>
|
||||
/// locCollectionName control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize locCollectionName;
|
||||
|
||||
/// <summary>
|
||||
/// locCName control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize locCName;
|
||||
|
||||
/// <summary>
|
||||
/// UsersPanel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl UsersPanel;
|
||||
|
||||
/// <summary>
|
||||
/// locUsersSection control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize locUsersSection;
|
||||
|
||||
/// <summary>
|
||||
/// users control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.RDS.UserControls.RDSCollectionUsers users;
|
||||
|
||||
/// <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>
|
||||
/// valSummary control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.ValidationSummary valSummary;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,147 @@
|
|||
<?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="btnAdd.Text" xml:space="preserve">
|
||||
<value>Add...</value>
|
||||
</data>
|
||||
<data name="btnAddSelected.Text" xml:space="preserve">
|
||||
<value>Add Apps</value>
|
||||
</data>
|
||||
<data name="btnCancel.Text" xml:space="preserve">
|
||||
<value>Cancel</value>
|
||||
</data>
|
||||
<data name="btnDelete.Text" xml:space="preserve">
|
||||
<value>Delete</value>
|
||||
</data>
|
||||
<data name="gvAppName.HeaderText" xml:space="preserve">
|
||||
<value>Remote Application Name</value>
|
||||
</data>
|
||||
<data name="gvApps.EmptyDataText" xml:space="preserve">
|
||||
<value>The list of remote apps is empty. Click "Add..." button.</value>
|
||||
</data>
|
||||
<data name="gvPopupAppName.HeaderText" xml:space="preserve">
|
||||
<value>Remote App Name</value>
|
||||
</data>
|
||||
<data name="gvPopupApps.EmptyDataText" xml:space="preserve">
|
||||
<value>No remote apps found.</value>
|
||||
</data>
|
||||
<data name="headerAddApps.Text" xml:space="preserve">
|
||||
<value>Available Remote Applications</value>
|
||||
</data>
|
||||
</root>
|
|
@ -0,0 +1,147 @@
|
|||
<?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="btnAdd.Text" xml:space="preserve">
|
||||
<value>Add...</value>
|
||||
</data>
|
||||
<data name="btnAddSelected.Text" xml:space="preserve">
|
||||
<value>Add Servers</value>
|
||||
</data>
|
||||
<data name="btnCancel.Text" xml:space="preserve">
|
||||
<value>Cancel</value>
|
||||
</data>
|
||||
<data name="btnDelete.Text" xml:space="preserve">
|
||||
<value>Delete</value>
|
||||
</data>
|
||||
<data name="gvPopupServerName.HeaderText" xml:space="preserve">
|
||||
<value>Server Name</value>
|
||||
</data>
|
||||
<data name="gvPopupServers.EmptyDataText" xml:space="preserve">
|
||||
<value>No servers found.</value>
|
||||
</data>
|
||||
<data name="gvServerName.HeaderText" xml:space="preserve">
|
||||
<value>Server Name</value>
|
||||
</data>
|
||||
<data name="gvServers.EmptyDataText" xml:space="preserve">
|
||||
<value>The list of servers is empty. Click "Add..." button.</value>
|
||||
</data>
|
||||
<data name="headerAddServers.Text" xml:space="preserve">
|
||||
<value>Enabled Servers</value>
|
||||
</data>
|
||||
</root>
|
|
@ -0,0 +1,156 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="btnAdd.Text" xml:space="preserve">
|
||||
<value>Add...</value>
|
||||
</data>
|
||||
<data name="btnAddSelected.Text" xml:space="preserve">
|
||||
<value>Add Accounts</value>
|
||||
</data>
|
||||
<data name="btnCancel.Text" xml:space="preserve">
|
||||
<value>Cancel</value>
|
||||
</data>
|
||||
<data name="btnDelete.Text" xml:space="preserve">
|
||||
<value>Delete</value>
|
||||
</data>
|
||||
<data name="ddlSearchColumnDisplayName.Text" xml:space="preserve">
|
||||
<value>Display Name</value>
|
||||
</data>
|
||||
<data name="ddlSearchColumnEmail.Text" xml:space="preserve">
|
||||
<value>E-mail Address</value>
|
||||
</data>
|
||||
<data name="gvAccountsDisplayName.HeaderText" xml:space="preserve">
|
||||
<value>Display Name</value>
|
||||
</data>
|
||||
<data name="gvAccountsEmail.HeaderText" xml:space="preserve">
|
||||
<value>Email</value>
|
||||
</data>
|
||||
<data name="gvPopupAccounts.EmptyDataText" xml:space="preserve">
|
||||
<value>No accounts found.</value>
|
||||
</data>
|
||||
<data name="gvUsers.EmptyDataText" xml:space="preserve">
|
||||
<value>The list of users is empty. Click "Add..." button.</value>
|
||||
</data>
|
||||
<data name="gvUsersAccount.HeaderText" xml:space="preserve">
|
||||
<value>Users</value>
|
||||
</data>
|
||||
<data name="headerAddAccounts.Text" xml:space="preserve">
|
||||
<value>Enabled Users</value>
|
||||
</data>
|
||||
</root>
|
|
@ -0,0 +1,95 @@
|
|||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RDSCollectionApps.ascx.cs" Inherits="WebsitePanel.Portal.RDS.UserControls.RDSCollectionApps" %>
|
||||
<%@ Register Src="../../UserControls/PopupHeader.ascx" TagName="PopupHeader" TagPrefix="wsp" %>
|
||||
|
||||
<asp:UpdatePanel ID="RDAppsUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
|
||||
<ContentTemplate>
|
||||
<div class="FormButtonsBarClean">
|
||||
<asp:Button ID="btnAdd" runat="server" Text="Add..." CssClass="Button2" OnClick="btnAdd_Click" meta:resourcekey="btnAdd" />
|
||||
<asp:Button ID="btnDelete" runat="server" Text="Delete" CssClass="Button2" OnClick="btnDelete_Click" meta:resourcekey="btnDelete"/>
|
||||
</div>
|
||||
<asp:GridView ID="gvApps" runat="server" meta:resourcekey="gvApps" AutoGenerateColumns="False"
|
||||
Width="600px" CssSelectorClass="NormalGridView"
|
||||
DataKeyNames="Alias">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:CheckBox ID="chkSelectAll" runat="server" onclick="javascript:SelectAllCheckboxes(this);" />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="chkSelect" runat="server" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="10px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField meta:resourcekey="gvAppName" HeaderText="gvAppName">
|
||||
<ItemStyle Width="60%" Wrap="false">
|
||||
</ItemStyle>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="litDisplayName" runat="server" Text='<%# Eval("DisplayName") %>'></asp:Literal>
|
||||
<asp:HiddenField ID="hfFilePath" runat="server" Value='<%# Eval("FilePath") %>'/>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
|
||||
|
||||
<asp:Panel ID="AddAppsPanel" runat="server" CssClass="Popup" style="display:none">
|
||||
<table class="Popup-Header" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td class="Popup-HeaderLeft"></td>
|
||||
<td class="Popup-HeaderTitle">
|
||||
<asp:Localize ID="headerAddApps" runat="server" meta:resourcekey="headerAddApps"></asp:Localize>
|
||||
</td>
|
||||
<td class="Popup-HeaderRight"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="Popup-Content">
|
||||
<div class="Popup-Body">
|
||||
<br />
|
||||
<asp:UpdatePanel ID="AddAppsUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
|
||||
<ContentTemplate>
|
||||
<div class="FormButtonsBarClean">
|
||||
</div>
|
||||
<div class="Popup-Scroll">
|
||||
<asp:GridView ID="gvPopupApps" runat="server" meta:resourcekey="gvPopupApps" AutoGenerateColumns="False"
|
||||
Width="100%" CssSelectorClass="NormalGridView"
|
||||
DataKeyNames="DisplayName">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:CheckBox ID="chkSelectAll" runat="server" onclick="javascript:SelectAllCheckboxes(this);" />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="chkSelect" runat="server" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="10px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField meta:resourcekey="gvPopupAppName">
|
||||
<ItemStyle Width="70%"></ItemStyle>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="litName" runat="server" Text='<%# Eval("DisplayName") %>'></asp:Literal>
|
||||
<asp:HiddenField ID="hfFilePathPopup" runat="server" Value='<%# Eval("FilePath") %>'/>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<div class="FormFooter">
|
||||
<asp:Button ID="btnAddSelected" runat="server" CssClass="Button1" meta:resourcekey="btnAddSelected" Text="Add Servers" OnClick="btnAddSelected_Click" />
|
||||
<asp:Button ID="btnCancelAdd" runat="server" CssClass="Button1" meta:resourcekey="btnCancel" Text="Cancel" CausesValidation="false" />
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
|
||||
<asp:Button ID="btnAddAppsFake" runat="server" style="display:none;" />
|
||||
<ajaxToolkit:ModalPopupExtender ID="AddAppsModal" runat="server"
|
||||
TargetControlID="btnAddAppsFake" PopupControlID="AddAppsPanel"
|
||||
BackgroundCssClass="modalBackground" DropShadow="false" CancelControlID="btnCancelAdd" />
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
|
@ -0,0 +1,222 @@
|
|||
// Copyright (c) 2014, Outercurve Foundation.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// - Redistributions of source code must retain the above copyright notice, this
|
||||
// list of conditions and the following disclaimer.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using WebsitePanel.Providers.HostedSolution;
|
||||
using System.Linq;
|
||||
using WebsitePanel.Providers.Web;
|
||||
using WebsitePanel.EnterpriseServer.Base.HostedSolution;
|
||||
using WebsitePanel.Providers.RemoteDesktopServices;
|
||||
|
||||
namespace WebsitePanel.Portal.RDS.UserControls
|
||||
{
|
||||
public partial class RDSCollectionApps : WebsitePanelControlBase
|
||||
{
|
||||
public const string DirectionString = "DirectionString";
|
||||
|
||||
protected enum SelectedState
|
||||
{
|
||||
All,
|
||||
Selected,
|
||||
Unselected
|
||||
}
|
||||
|
||||
public void SetApps(RemoteApplication[] apps)
|
||||
{
|
||||
BindApps(apps, false);
|
||||
}
|
||||
|
||||
public RemoteApplication[] GetApps()
|
||||
{
|
||||
return GetGridViewApps(SelectedState.All).ToArray();
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
// register javascript
|
||||
if (!Page.ClientScript.IsClientScriptBlockRegistered("SelectAllCheckboxes"))
|
||||
{
|
||||
string script = @" function SelectAllCheckboxes(box)
|
||||
{
|
||||
var state = box.checked;
|
||||
var elm = box.parentElement.parentElement.parentElement.parentElement.getElementsByTagName(""INPUT"");
|
||||
for(i = 0; i < elm.length; i++)
|
||||
if(elm[i].type == ""checkbox"" && elm[i].id != box.id && elm[i].checked != state && !elm[i].disabled)
|
||||
elm[i].checked = state;
|
||||
}";
|
||||
Page.ClientScript.RegisterClientScriptBlock(typeof(RDSCollectionUsers), "SelectAllCheckboxes",
|
||||
script, true);
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
// bind all servers
|
||||
BindPopupApps();
|
||||
|
||||
// show modal
|
||||
AddAppsModal.Show();
|
||||
}
|
||||
|
||||
protected void btnDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
List<RemoteApplication> selectedApps = GetGridViewApps(SelectedState.Unselected);
|
||||
|
||||
BindApps(selectedApps.ToArray(), false);
|
||||
}
|
||||
|
||||
protected void btnAddSelected_Click(object sender, EventArgs e)
|
||||
{
|
||||
List<RemoteApplication> selectedApps = GetPopUpGridViewApps();
|
||||
|
||||
BindApps(selectedApps.ToArray(), true);
|
||||
|
||||
}
|
||||
|
||||
protected void BindPopupApps()
|
||||
{
|
||||
RdsCollection collection = ES.Services.RDS.GetRdsCollection(PanelRequest.CollectionID);
|
||||
StartMenuApp[] apps = ES.Services.RDS.GetAvailableRemoteApplications(PanelRequest.ItemID, collection.Name);
|
||||
|
||||
apps = apps.Where(x => !GetApps().Select(p => p.DisplayName).Contains(x.DisplayName)).ToArray();
|
||||
Array.Sort(apps, CompareAccount);
|
||||
if (Direction == SortDirection.Ascending)
|
||||
{
|
||||
Array.Reverse(apps);
|
||||
Direction = SortDirection.Descending;
|
||||
}
|
||||
else
|
||||
Direction = SortDirection.Ascending;
|
||||
|
||||
gvPopupApps.DataSource = apps;
|
||||
gvPopupApps.DataBind();
|
||||
}
|
||||
|
||||
protected void BindApps(RemoteApplication[] newApps, bool preserveExisting)
|
||||
{
|
||||
// get binded addresses
|
||||
List<RemoteApplication> apps = new List<RemoteApplication>();
|
||||
if(preserveExisting)
|
||||
apps.AddRange(GetGridViewApps(SelectedState.All));
|
||||
|
||||
// add new servers
|
||||
if (newApps != null)
|
||||
{
|
||||
foreach (RemoteApplication newApp in newApps)
|
||||
{
|
||||
// check if exists
|
||||
bool exists = false;
|
||||
foreach (RemoteApplication app in apps)
|
||||
{
|
||||
if (app.DisplayName == newApp.DisplayName)
|
||||
{
|
||||
exists = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (exists)
|
||||
continue;
|
||||
|
||||
apps.Add(newApp);
|
||||
}
|
||||
}
|
||||
|
||||
gvApps.DataSource = apps;
|
||||
gvApps.DataBind();
|
||||
}
|
||||
|
||||
protected List<RemoteApplication> GetGridViewApps(SelectedState state)
|
||||
{
|
||||
List<RemoteApplication> apps = new List<RemoteApplication>();
|
||||
for (int i = 0; i < gvApps.Rows.Count; i++)
|
||||
{
|
||||
GridViewRow row = gvApps.Rows[i];
|
||||
CheckBox chkSelect = (CheckBox)row.FindControl("chkSelect");
|
||||
if (chkSelect == null)
|
||||
continue;
|
||||
|
||||
RemoteApplication app = new RemoteApplication();
|
||||
app.Alias = (string)gvApps.DataKeys[i][0];
|
||||
app.DisplayName = ((Literal)row.FindControl("litDisplayName")).Text;
|
||||
app.FilePath = ((HiddenField)row.FindControl("hfFilePath")).Value;
|
||||
|
||||
if (state == SelectedState.All ||
|
||||
(state == SelectedState.Selected && chkSelect.Checked) ||
|
||||
(state == SelectedState.Unselected && !chkSelect.Checked))
|
||||
apps.Add(app);
|
||||
}
|
||||
|
||||
return apps;
|
||||
}
|
||||
|
||||
protected List<RemoteApplication> GetPopUpGridViewApps()
|
||||
{
|
||||
List<RemoteApplication> apps = new List<RemoteApplication>();
|
||||
for (int i = 0; i < gvPopupApps.Rows.Count; i++)
|
||||
{
|
||||
GridViewRow row = gvPopupApps.Rows[i];
|
||||
CheckBox chkSelect = (CheckBox)row.FindControl("chkSelect");
|
||||
if (chkSelect == null)
|
||||
continue;
|
||||
|
||||
if (chkSelect.Checked)
|
||||
{
|
||||
apps.Add(new RemoteApplication
|
||||
{
|
||||
Alias = (string)gvPopupApps.DataKeys[i][0],
|
||||
DisplayName = ((Literal)row.FindControl("litName")).Text,
|
||||
FilePath = ((HiddenField)row.FindControl("hfFilePathPopup")).Value
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return apps;
|
||||
|
||||
}
|
||||
|
||||
protected void cmdSearch_Click(object sender, ImageClickEventArgs e)
|
||||
{
|
||||
BindPopupApps();
|
||||
}
|
||||
|
||||
protected SortDirection Direction
|
||||
{
|
||||
get { return ViewState[DirectionString] == null ? SortDirection.Descending : (SortDirection)ViewState[DirectionString]; }
|
||||
set { ViewState[DirectionString] = value; }
|
||||
}
|
||||
|
||||
protected static int CompareAccount(StartMenuApp app1, StartMenuApp app2)
|
||||
{
|
||||
return string.Compare(app1.DisplayName, app2.DisplayName);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,123 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebsitePanel.Portal.RDS.UserControls {
|
||||
|
||||
|
||||
public partial class RDSCollectionApps {
|
||||
|
||||
/// <summary>
|
||||
/// RDAppsUpdatePanel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.UpdatePanel RDAppsUpdatePanel;
|
||||
|
||||
/// <summary>
|
||||
/// btnAdd 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 btnAdd;
|
||||
|
||||
/// <summary>
|
||||
/// btnDelete 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 btnDelete;
|
||||
|
||||
/// <summary>
|
||||
/// gvApps control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.GridView gvApps;
|
||||
|
||||
/// <summary>
|
||||
/// AddAppsPanel 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 AddAppsPanel;
|
||||
|
||||
/// <summary>
|
||||
/// headerAddApps 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 headerAddApps;
|
||||
|
||||
/// <summary>
|
||||
/// AddAppsUpdatePanel 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 AddAppsUpdatePanel;
|
||||
|
||||
/// <summary>
|
||||
/// gvPopupApps control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.GridView gvPopupApps;
|
||||
|
||||
/// <summary>
|
||||
/// btnAddSelected 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 btnAddSelected;
|
||||
|
||||
/// <summary>
|
||||
/// btnCancelAdd 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 btnCancelAdd;
|
||||
|
||||
/// <summary>
|
||||
/// btnAddAppsFake 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 btnAddAppsFake;
|
||||
|
||||
/// <summary>
|
||||
/// AddAppsModal control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::AjaxControlToolkit.ModalPopupExtender AddAppsModal;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,100 @@
|
|||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RDSCollectionServers.ascx.cs" Inherits="WebsitePanel.Portal.RDS.UserControls.RDSCollectionServers" %>
|
||||
<%@ Register Src="../../UserControls/PopupHeader.ascx" TagName="PopupHeader" TagPrefix="wsp" %>
|
||||
|
||||
<asp:UpdatePanel ID="UsersUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
|
||||
<ContentTemplate>
|
||||
<div class="FormButtonsBarClean">
|
||||
<asp:Button ID="btnAdd" runat="server" Text="Add..." CssClass="Button2" OnClick="btnAdd_Click" meta:resourcekey="btnAdd" />
|
||||
<asp:Button ID="btnDelete" runat="server" Text="Delete" CssClass="Button2" OnClick="btnDelete_Click" meta:resourcekey="btnDelete"/>
|
||||
</div>
|
||||
<asp:GridView ID="gvServers" runat="server" meta:resourcekey="gvServers" AutoGenerateColumns="False"
|
||||
Width="600px" CssSelectorClass="NormalGridView"
|
||||
DataKeyNames="Id">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:CheckBox ID="chkSelectAll" runat="server" onclick="javascript:SelectAllCheckboxes(this);" />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="chkSelect" runat="server" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="10px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField meta:resourcekey="gvServerName" HeaderText="gvServerName">
|
||||
<ItemStyle Width="60%" Wrap="false">
|
||||
</ItemStyle>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="litFqdName" runat="server" Text='<%# Eval("FqdName") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
|
||||
|
||||
<asp:Panel ID="AddServersPanel" runat="server" CssClass="Popup" style="display:none">
|
||||
<table class="Popup-Header" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td class="Popup-HeaderLeft"></td>
|
||||
<td class="Popup-HeaderTitle">
|
||||
<asp:Localize ID="headerAddServers" runat="server" meta:resourcekey="headerAddServers"></asp:Localize>
|
||||
</td>
|
||||
<td class="Popup-HeaderRight"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="Popup-Content">
|
||||
<div class="Popup-Body">
|
||||
<br />
|
||||
<asp:UpdatePanel ID="AddServersUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="FormButtonsBarClean">
|
||||
<div class="FormButtonsBarCleanRight">
|
||||
<asp:Panel ID="SearchPanel" runat="server" DefaultButton="cmdSearch">
|
||||
<asp:TextBox ID="txtSearchValue" runat="server" CssClass="NormalTextBox" Width="100"></asp:TextBox><asp:ImageButton ID="cmdSearch" Runat="server" meta:resourcekey="cmdSearch" SkinID="SearchButton"
|
||||
CausesValidation="false" OnClick="cmdSearch_Click"/>
|
||||
</asp:Panel>
|
||||
</div>
|
||||
</div>
|
||||
<div class="Popup-Scroll">
|
||||
<asp:GridView ID="gvPopupServers" runat="server" meta:resourcekey="gvPopupServers" AutoGenerateColumns="False"
|
||||
Width="100%" CssSelectorClass="NormalGridView"
|
||||
DataKeyNames="Id">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:CheckBox ID="chkSelectAll" runat="server" onclick="javascript:SelectAllCheckboxes(this);" />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="chkSelect" runat="server" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="10px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField meta:resourcekey="gvPopupServerName">
|
||||
<ItemStyle Width="70%"></ItemStyle>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="litName" runat="server" Text='<%# Eval("FqdName") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<div class="FormFooter">
|
||||
<asp:Button ID="btnAddSelected" runat="server" CssClass="Button1" meta:resourcekey="btnAddSelected" Text="Add Servers" OnClick="btnAddSelected_Click" />
|
||||
<asp:Button ID="btnCancelAdd" runat="server" CssClass="Button1" meta:resourcekey="btnCancel" Text="Cancel" CausesValidation="false" />
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
|
||||
<asp:Button ID="btnAddServersFake" runat="server" style="display:none;" />
|
||||
<ajaxToolkit:ModalPopupExtender ID="AddServersModal" runat="server"
|
||||
TargetControlID="btnAddServersFake" PopupControlID="AddServersPanel"
|
||||
BackgroundCssClass="modalBackground" DropShadow="false" CancelControlID="btnCancelAdd" />
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
|
@ -0,0 +1,224 @@
|
|||
// Copyright (c) 2014, Outercurve Foundation.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// - Redistributions of source code must retain the above copyright notice, this
|
||||
// list of conditions and the following disclaimer.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using WebsitePanel.Providers.HostedSolution;
|
||||
using System.Linq;
|
||||
using WebsitePanel.Providers.Web;
|
||||
using WebsitePanel.EnterpriseServer.Base.HostedSolution;
|
||||
using WebsitePanel.Providers.RemoteDesktopServices;
|
||||
|
||||
namespace WebsitePanel.Portal.RDS.UserControls
|
||||
{
|
||||
public partial class RDSCollectionServers : WebsitePanelControlBase
|
||||
{
|
||||
public const string DirectionString = "DirectionString";
|
||||
|
||||
protected enum SelectedState
|
||||
{
|
||||
All,
|
||||
Selected,
|
||||
Unselected
|
||||
}
|
||||
|
||||
public void SetServers(RdsServer[] servers)
|
||||
{
|
||||
BindServers(servers, false);
|
||||
}
|
||||
|
||||
//public RdsServer[] GetServers()
|
||||
//{
|
||||
// return GetGridViewServers(SelectedState.All).ToArray();
|
||||
//}
|
||||
|
||||
public List<RdsServer> GetServers()
|
||||
{
|
||||
return GetGridViewServers(SelectedState.All);
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
// register javascript
|
||||
if (!Page.ClientScript.IsClientScriptBlockRegistered("SelectAllCheckboxes"))
|
||||
{
|
||||
string script = @" function SelectAllCheckboxes(box)
|
||||
{
|
||||
var state = box.checked;
|
||||
var elm = box.parentElement.parentElement.parentElement.parentElement.getElementsByTagName(""INPUT"");
|
||||
for(i = 0; i < elm.length; i++)
|
||||
if(elm[i].type == ""checkbox"" && elm[i].id != box.id && elm[i].checked != state && !elm[i].disabled)
|
||||
elm[i].checked = state;
|
||||
}";
|
||||
Page.ClientScript.RegisterClientScriptBlock(typeof(RDSCollectionUsers), "SelectAllCheckboxes",
|
||||
script, true);
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
// bind all servers
|
||||
BindPopupServers();
|
||||
|
||||
// show modal
|
||||
AddServersModal.Show();
|
||||
}
|
||||
|
||||
protected void btnDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
List<RdsServer> selectedServers = GetGridViewServers(SelectedState.Unselected);
|
||||
|
||||
BindServers(selectedServers.ToArray(), false);
|
||||
}
|
||||
|
||||
protected void btnAddSelected_Click(object sender, EventArgs e)
|
||||
{
|
||||
List<RdsServer> selectedServers = GetPopUpGridViewServers();
|
||||
|
||||
BindServers(selectedServers.ToArray(), true);
|
||||
|
||||
}
|
||||
|
||||
protected void BindPopupServers()
|
||||
{
|
||||
RdsServer[] servers = ES.Services.RDS.GetOrganizationFreeRdsServersPaged(PanelRequest.ItemID, "FqdName", txtSearchValue.Text, null, 0, 1000).Servers;
|
||||
|
||||
servers = servers.Where(x => !GetServers().Select(p => p.Id).Contains(x.Id)).ToArray();
|
||||
Array.Sort(servers, CompareAccount);
|
||||
if (Direction == SortDirection.Ascending)
|
||||
{
|
||||
Array.Reverse(servers);
|
||||
Direction = SortDirection.Descending;
|
||||
}
|
||||
else
|
||||
Direction = SortDirection.Ascending;
|
||||
|
||||
gvPopupServers.DataSource = servers;
|
||||
gvPopupServers.DataBind();
|
||||
}
|
||||
|
||||
protected void BindServers(RdsServer[] newServers, bool preserveExisting)
|
||||
{
|
||||
// get binded addresses
|
||||
List<RdsServer> servers = new List<RdsServer>();
|
||||
if(preserveExisting)
|
||||
servers.AddRange(GetGridViewServers(SelectedState.All));
|
||||
|
||||
// add new servers
|
||||
if (newServers != null)
|
||||
{
|
||||
foreach (RdsServer newServer in newServers)
|
||||
{
|
||||
// check if exists
|
||||
bool exists = false;
|
||||
foreach (RdsServer server in servers)
|
||||
{
|
||||
if (server.Id == newServer.Id)
|
||||
{
|
||||
exists = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (exists)
|
||||
continue;
|
||||
|
||||
servers.Add(newServer);
|
||||
}
|
||||
}
|
||||
|
||||
gvServers.DataSource = servers;
|
||||
gvServers.DataBind();
|
||||
}
|
||||
|
||||
protected List<RdsServer> GetGridViewServers(SelectedState state)
|
||||
{
|
||||
List<RdsServer> servers = new List<RdsServer>();
|
||||
for (int i = 0; i < gvServers.Rows.Count; i++)
|
||||
{
|
||||
GridViewRow row = gvServers.Rows[i];
|
||||
CheckBox chkSelect = (CheckBox)row.FindControl("chkSelect");
|
||||
if (chkSelect == null)
|
||||
continue;
|
||||
|
||||
RdsServer server = new RdsServer();
|
||||
server.Id = (int)gvServers.DataKeys[i][0];
|
||||
server.FqdName = ((Literal)row.FindControl("litFqdName")).Text;
|
||||
|
||||
if (state == SelectedState.All ||
|
||||
(state == SelectedState.Selected && chkSelect.Checked) ||
|
||||
(state == SelectedState.Unselected && !chkSelect.Checked))
|
||||
servers.Add(server);
|
||||
}
|
||||
|
||||
return servers;
|
||||
}
|
||||
|
||||
protected List<RdsServer> GetPopUpGridViewServers()
|
||||
{
|
||||
List<RdsServer> servers = new List<RdsServer>();
|
||||
for (int i = 0; i < gvPopupServers.Rows.Count; i++)
|
||||
{
|
||||
GridViewRow row = gvPopupServers.Rows[i];
|
||||
CheckBox chkSelect = (CheckBox)row.FindControl("chkSelect");
|
||||
if (chkSelect == null)
|
||||
continue;
|
||||
|
||||
if (chkSelect.Checked)
|
||||
{
|
||||
servers.Add(new RdsServer
|
||||
{
|
||||
Id = (int)gvPopupServers.DataKeys[i][0],
|
||||
FqdName = ((Literal)row.FindControl("litName")).Text
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return servers;
|
||||
|
||||
}
|
||||
|
||||
protected void cmdSearch_Click(object sender, ImageClickEventArgs e)
|
||||
{
|
||||
BindPopupServers();
|
||||
}
|
||||
|
||||
protected SortDirection Direction
|
||||
{
|
||||
get { return ViewState[DirectionString] == null ? SortDirection.Descending : (SortDirection)ViewState[DirectionString]; }
|
||||
set { ViewState[DirectionString] = value; }
|
||||
}
|
||||
|
||||
protected static int CompareAccount(RdsServer server1, RdsServer server2)
|
||||
{
|
||||
return string.Compare(server1.FqdName, server2.FqdName);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,150 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebsitePanel.Portal.RDS.UserControls {
|
||||
|
||||
|
||||
public partial class RDSCollectionServers {
|
||||
|
||||
/// <summary>
|
||||
/// UsersUpdatePanel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.UpdatePanel UsersUpdatePanel;
|
||||
|
||||
/// <summary>
|
||||
/// btnAdd 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 btnAdd;
|
||||
|
||||
/// <summary>
|
||||
/// btnDelete 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 btnDelete;
|
||||
|
||||
/// <summary>
|
||||
/// gvServers control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.GridView gvServers;
|
||||
|
||||
/// <summary>
|
||||
/// AddServersPanel 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 AddServersPanel;
|
||||
|
||||
/// <summary>
|
||||
/// headerAddServers 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 headerAddServers;
|
||||
|
||||
/// <summary>
|
||||
/// AddServersUpdatePanel 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 AddServersUpdatePanel;
|
||||
|
||||
/// <summary>
|
||||
/// SearchPanel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Panel SearchPanel;
|
||||
|
||||
/// <summary>
|
||||
/// txtSearchValue control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtSearchValue;
|
||||
|
||||
/// <summary>
|
||||
/// cmdSearch control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.ImageButton cmdSearch;
|
||||
|
||||
/// <summary>
|
||||
/// gvPopupServers control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.GridView gvPopupServers;
|
||||
|
||||
/// <summary>
|
||||
/// btnAddSelected 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 btnAddSelected;
|
||||
|
||||
/// <summary>
|
||||
/// btnCancelAdd 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 btnCancelAdd;
|
||||
|
||||
/// <summary>
|
||||
/// btnAddServersFake 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 btnAddServersFake;
|
||||
|
||||
/// <summary>
|
||||
/// AddServersModal control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::AjaxControlToolkit.ModalPopupExtender AddServersModal;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,111 @@
|
|||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RDSCollectionUsers.ascx.cs" Inherits="WebsitePanel.Portal.RDS.UserControls.RDSCollectionUsers" %>
|
||||
<%@ Register Src="../../UserControls/PopupHeader.ascx" TagName="PopupHeader" TagPrefix="wsp" %>
|
||||
|
||||
<asp:UpdatePanel ID="UsersUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
|
||||
<ContentTemplate>
|
||||
<div class="FormButtonsBarClean">
|
||||
<asp:Button ID="btnAdd" runat="server" Text="Add..." CssClass="Button2" OnClick="btnAdd_Click" meta:resourcekey="btnAdd" />
|
||||
<asp:Button ID="btnDelete" runat="server" Text="Delete" CssClass="Button2" OnClick="btnDelete_Click" meta:resourcekey="btnDelete"/>
|
||||
</div>
|
||||
<asp:GridView ID="gvUsers" runat="server" meta:resourcekey="gvUsers" AutoGenerateColumns="False"
|
||||
Width="600px" CssSelectorClass="NormalGridView"
|
||||
DataKeyNames="AccountName">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:CheckBox ID="chkSelectAll" runat="server" onclick="javascript:SelectAllCheckboxes(this);" />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="chkSelect" runat="server" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="10px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField meta:resourcekey="gvUsersAccount" HeaderText="gvUsersAccount">
|
||||
<ItemStyle Width="60%" Wrap="false">
|
||||
</ItemStyle>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="litAccount" runat="server" Text='<%# Eval("DisplayName") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
|
||||
|
||||
<asp:Panel ID="AddAccountsPanel" runat="server" CssClass="Popup" style="display:none">
|
||||
<table class="Popup-Header" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td class="Popup-HeaderLeft"></td>
|
||||
<td class="Popup-HeaderTitle">
|
||||
<asp:Localize ID="headerAddAccounts" runat="server" meta:resourcekey="headerAddAccounts"></asp:Localize>
|
||||
</td>
|
||||
<td class="Popup-HeaderRight"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="Popup-Content">
|
||||
<div class="Popup-Body">
|
||||
<br />
|
||||
<asp:UpdatePanel ID="AddAccountsUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="FormButtonsBarClean">
|
||||
<div class="FormButtonsBarCleanRight">
|
||||
<asp:Panel ID="SearchPanel" runat="server" DefaultButton="cmdSearch">
|
||||
<asp:DropDownList ID="ddlSearchColumn" runat="server" CssClass="NormalTextBox">
|
||||
<asp:ListItem Value="DisplayName" meta:resourcekey="ddlSearchColumnDisplayName">DisplayName</asp:ListItem>
|
||||
<asp:ListItem Value="PrimaryEmailAddress" meta:resourcekey="ddlSearchColumnEmail">Email</asp:ListItem>
|
||||
</asp:DropDownList><asp:TextBox ID="txtSearchValue" runat="server" CssClass="NormalTextBox" Width="100"></asp:TextBox><asp:ImageButton ID="cmdSearch" Runat="server" meta:resourcekey="cmdSearch" SkinID="SearchButton"
|
||||
CausesValidation="false" OnClick="cmdSearch_Click"/>
|
||||
</asp:Panel>
|
||||
</div>
|
||||
</div>
|
||||
<div class="Popup-Scroll">
|
||||
<asp:GridView ID="gvPopupAccounts" runat="server" meta:resourcekey="gvPopupAccounts" AutoGenerateColumns="False"
|
||||
Width="100%" CssSelectorClass="NormalGridView"
|
||||
DataKeyNames="AccountName">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:CheckBox ID="chkSelectAll" runat="server" onclick="javascript:SelectAllCheckboxes(this);" />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="chkSelect" runat="server" />
|
||||
<asp:Literal ID="litAccountType" runat="server" Visible="false" Text='<%# Eval("AccountType") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="10px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField meta:resourcekey="gvAccountsDisplayName">
|
||||
<ItemStyle Width="50%"></ItemStyle>
|
||||
<ItemTemplate>
|
||||
<asp:Image ID="imgAccount" runat="server" ImageUrl='<%# GetAccountImage((int)Eval("AccountType")) %>' ImageAlign="AbsMiddle" />
|
||||
<asp:Literal ID="litDisplayName" runat="server" Text='<%# Eval("DisplayName") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField meta:resourcekey="gvAccountsEmail">
|
||||
<ItemStyle Width="50%"></ItemStyle>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="litPrimaryEmailAddress" runat="server" Text='<%# Eval("PrimaryEmailAddress") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<div class="FormFooter">
|
||||
<asp:Button ID="btnAddSelected" runat="server" CssClass="Button1" meta:resourcekey="btnAddSelected" Text="Add Accounts" OnClick="btnAddSelected_Click" />
|
||||
<asp:Button ID="btnCancelAdd" runat="server" CssClass="Button1" meta:resourcekey="btnCancel" Text="Cancel" CausesValidation="false" />
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
|
||||
<asp:Button ID="btnAddAccountsFake" runat="server" style="display:none;" />
|
||||
<ajaxToolkit:ModalPopupExtender ID="AddAccountsModal" runat="server"
|
||||
TargetControlID="btnAddAccountsFake" PopupControlID="AddAccountsPanel"
|
||||
BackgroundCssClass="modalBackground" DropShadow="false" CancelControlID="btnCancelAdd" />
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
|
@ -0,0 +1,247 @@
|
|||
// Copyright (c) 2014, Outercurve Foundation.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// - Redistributions of source code must retain the above copyright notice, this
|
||||
// list of conditions and the following disclaimer.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using WebsitePanel.Providers.HostedSolution;
|
||||
using System.Linq;
|
||||
using WebsitePanel.Providers.Web;
|
||||
using WebsitePanel.EnterpriseServer.Base.HostedSolution;
|
||||
using WebsitePanel.EnterpriseServer;
|
||||
|
||||
namespace WebsitePanel.Portal.RDS.UserControls
|
||||
{
|
||||
public partial class RDSCollectionUsers : WebsitePanelControlBase
|
||||
{
|
||||
public const string DirectionString = "DirectionString";
|
||||
|
||||
protected enum SelectedState
|
||||
{
|
||||
All,
|
||||
Selected,
|
||||
Unselected
|
||||
}
|
||||
|
||||
public void SetUsers(OrganizationUser[] users)
|
||||
{
|
||||
BindAccounts(users, false);
|
||||
}
|
||||
|
||||
public OrganizationUser[] GetUsers()
|
||||
{
|
||||
return GetGridViewUsers(SelectedState.All).ToArray();
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
// register javascript
|
||||
if (!Page.ClientScript.IsClientScriptBlockRegistered("SelectAllCheckboxes"))
|
||||
{
|
||||
string script = @" function SelectAllCheckboxes(box)
|
||||
{
|
||||
var state = box.checked;
|
||||
var elm = box.parentElement.parentElement.parentElement.parentElement.getElementsByTagName(""INPUT"");
|
||||
for(i = 0; i < elm.length; i++)
|
||||
if(elm[i].type == ""checkbox"" && elm[i].id != box.id && elm[i].checked != state && !elm[i].disabled)
|
||||
elm[i].checked = state;
|
||||
}";
|
||||
Page.ClientScript.RegisterClientScriptBlock(typeof(RDSCollectionUsers), "SelectAllCheckboxes",
|
||||
script, true);
|
||||
}
|
||||
|
||||
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||
if (cntx.Quotas.ContainsKey(Quotas.RDS_USERS))
|
||||
{
|
||||
int rdsUsersCount = ES.Services.RDS.GetOrganizationRdsUsersCount(PanelRequest.ItemID);
|
||||
btnAdd.Enabled = (!(cntx.Quotas[Quotas.RDS_USERS].QuotaAllocatedValue <= rdsUsersCount) || (cntx.Quotas[Quotas.RDS_USERS].QuotaAllocatedValue == -1));
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
// bind all accounts
|
||||
BindPopupAccounts();
|
||||
|
||||
// show modal
|
||||
AddAccountsModal.Show();
|
||||
}
|
||||
|
||||
protected void btnDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
List<OrganizationUser> selectedAccounts = GetGridViewUsers(SelectedState.Unselected);
|
||||
|
||||
BindAccounts(selectedAccounts.ToArray(), false);
|
||||
}
|
||||
|
||||
protected void btnAddSelected_Click(object sender, EventArgs e)
|
||||
{
|
||||
List<OrganizationUser> selectedAccounts = GetGridViewAccounts();
|
||||
|
||||
BindAccounts(selectedAccounts.ToArray(), true);
|
||||
|
||||
}
|
||||
|
||||
public string GetAccountImage(int accountTypeId)
|
||||
{
|
||||
string imgName = string.Empty;
|
||||
|
||||
ExchangeAccountType accountType = (ExchangeAccountType)accountTypeId;
|
||||
switch (accountType)
|
||||
{
|
||||
case ExchangeAccountType.Room:
|
||||
imgName = "room_16.gif";
|
||||
break;
|
||||
case ExchangeAccountType.Equipment:
|
||||
imgName = "equipment_16.gif";
|
||||
break;
|
||||
default:
|
||||
imgName = "admin_16.png";
|
||||
break;
|
||||
}
|
||||
|
||||
return GetThemedImage("Exchange/" + imgName);
|
||||
}
|
||||
|
||||
protected void BindPopupAccounts()
|
||||
{
|
||||
OrganizationUser[] accounts = ES.Services.Organizations.GetOrganizationUsersPaged(PanelRequest.ItemID, null, null, null, 0, Int32.MaxValue).PageUsers;
|
||||
|
||||
accounts = accounts.Where(x => !GetUsers().Select(p => p.AccountName).Contains(x.AccountName)).ToArray();
|
||||
Array.Sort(accounts, CompareAccount);
|
||||
if (Direction == SortDirection.Ascending)
|
||||
{
|
||||
Array.Reverse(accounts);
|
||||
Direction = SortDirection.Descending;
|
||||
}
|
||||
else
|
||||
Direction = SortDirection.Ascending;
|
||||
|
||||
gvPopupAccounts.DataSource = accounts;
|
||||
gvPopupAccounts.DataBind();
|
||||
}
|
||||
|
||||
protected void BindAccounts(OrganizationUser[] newUsers, bool preserveExisting)
|
||||
{
|
||||
// get binded addresses
|
||||
List<OrganizationUser> users = new List<OrganizationUser>();
|
||||
if(preserveExisting)
|
||||
users.AddRange(GetGridViewUsers(SelectedState.All));
|
||||
|
||||
// add new accounts
|
||||
if (newUsers != null)
|
||||
{
|
||||
foreach (OrganizationUser newUser in newUsers)
|
||||
{
|
||||
// check if exists
|
||||
bool exists = false;
|
||||
foreach (OrganizationUser user in users)
|
||||
{
|
||||
if (String.Compare(user.AccountName, newUser.AccountName, true) == 0)
|
||||
{
|
||||
exists = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (exists)
|
||||
continue;
|
||||
|
||||
users.Add(newUser);
|
||||
}
|
||||
}
|
||||
|
||||
gvUsers.DataSource = users;
|
||||
gvUsers.DataBind();
|
||||
}
|
||||
|
||||
protected List<OrganizationUser> GetGridViewUsers(SelectedState state)
|
||||
{
|
||||
List<OrganizationUser> users = new List<OrganizationUser>();
|
||||
for (int i = 0; i < gvUsers.Rows.Count; i++)
|
||||
{
|
||||
GridViewRow row = gvUsers.Rows[i];
|
||||
CheckBox chkSelect = (CheckBox)row.FindControl("chkSelect");
|
||||
if (chkSelect == null)
|
||||
continue;
|
||||
|
||||
OrganizationUser user = new OrganizationUser();
|
||||
user.AccountName = (string)gvUsers.DataKeys[i][0];
|
||||
user.DisplayName = ((Literal)row.FindControl("litAccount")).Text;
|
||||
|
||||
if (state == SelectedState.All ||
|
||||
(state == SelectedState.Selected && chkSelect.Checked) ||
|
||||
(state == SelectedState.Unselected && !chkSelect.Checked))
|
||||
users.Add(user);
|
||||
}
|
||||
|
||||
return users;
|
||||
}
|
||||
|
||||
protected List<OrganizationUser> GetGridViewAccounts()
|
||||
{
|
||||
List<OrganizationUser> accounts = new List<OrganizationUser>();
|
||||
for (int i = 0; i < gvPopupAccounts.Rows.Count; i++)
|
||||
{
|
||||
GridViewRow row = gvPopupAccounts.Rows[i];
|
||||
CheckBox chkSelect = (CheckBox)row.FindControl("chkSelect");
|
||||
if (chkSelect == null)
|
||||
continue;
|
||||
|
||||
if (chkSelect.Checked)
|
||||
{
|
||||
accounts.Add(new OrganizationUser
|
||||
{
|
||||
AccountName = (string)gvPopupAccounts.DataKeys[i][0],
|
||||
DisplayName = ((Literal)row.FindControl("litDisplayName")).Text
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return accounts;
|
||||
|
||||
}
|
||||
|
||||
protected void cmdSearch_Click(object sender, ImageClickEventArgs e)
|
||||
{
|
||||
BindPopupAccounts();
|
||||
}
|
||||
|
||||
protected SortDirection Direction
|
||||
{
|
||||
get { return ViewState[DirectionString] == null ? SortDirection.Descending : (SortDirection)ViewState[DirectionString]; }
|
||||
set { ViewState[DirectionString] = value; }
|
||||
}
|
||||
|
||||
protected static int CompareAccount(OrganizationUser user1, OrganizationUser user2)
|
||||
{
|
||||
return string.Compare(user1.DisplayName, user2.DisplayName);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,159 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebsitePanel.Portal.RDS.UserControls {
|
||||
|
||||
|
||||
public partial class RDSCollectionUsers {
|
||||
|
||||
/// <summary>
|
||||
/// UsersUpdatePanel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.UpdatePanel UsersUpdatePanel;
|
||||
|
||||
/// <summary>
|
||||
/// btnAdd 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 btnAdd;
|
||||
|
||||
/// <summary>
|
||||
/// btnDelete 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 btnDelete;
|
||||
|
||||
/// <summary>
|
||||
/// gvUsers control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.GridView gvUsers;
|
||||
|
||||
/// <summary>
|
||||
/// AddAccountsPanel 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 AddAccountsPanel;
|
||||
|
||||
/// <summary>
|
||||
/// headerAddAccounts 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 headerAddAccounts;
|
||||
|
||||
/// <summary>
|
||||
/// AddAccountsUpdatePanel 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 AddAccountsUpdatePanel;
|
||||
|
||||
/// <summary>
|
||||
/// SearchPanel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Panel SearchPanel;
|
||||
|
||||
/// <summary>
|
||||
/// ddlSearchColumn control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.DropDownList ddlSearchColumn;
|
||||
|
||||
/// <summary>
|
||||
/// txtSearchValue control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtSearchValue;
|
||||
|
||||
/// <summary>
|
||||
/// cmdSearch control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.ImageButton cmdSearch;
|
||||
|
||||
/// <summary>
|
||||
/// gvPopupAccounts control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.GridView gvPopupAccounts;
|
||||
|
||||
/// <summary>
|
||||
/// btnAddSelected 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 btnAddSelected;
|
||||
|
||||
/// <summary>
|
||||
/// btnCancelAdd 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 btnCancelAdd;
|
||||
|
||||
/// <summary>
|
||||
/// btnAddAccountsFake 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 btnAddAccountsFake;
|
||||
|
||||
/// <summary>
|
||||
/// AddAccountsModal control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::AjaxControlToolkit.ModalPopupExtender AddAccountsModal;
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue