Lync Server 2010 Multitenant Core Unified Communications Support Added

Enterprise voice support to follow soon
This commit is contained in:
robvde 2012-07-10 11:19:55 +04:00
parent 3732b2143c
commit a240fcebc6
94 changed files with 11276 additions and 39 deletions

View file

@ -3641,7 +3641,7 @@ INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDe
GO
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (75, 1, 8, N'OS.ExtraApplications', N'Extra Application Packs', 1, 0, NULL)
GO
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (77, 12, 2, N'Exchange2007.DiskSpace', N'Organization Disk Space, MB', 21, 0, NULL)
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (77, 12, 2, N'Exchange2007.DiskSpace', N'Organization Disk Space, MB', 2, 0, NULL)
GO
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (78, 12, 3, N'Exchange2007.Mailboxes', N'Mailboxes per Organization', 2, 0, NULL)
GO
@ -3851,6 +3851,26 @@ INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDe
GO
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (368, 12, 1, N'Exchange2007.IsConsumer',N'Is Consumer Organization',1, 0 , NULL)
GO
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (370, 41, 1, N'Lync.Users', N'Users',2 ,0 , NULL)
GO
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (371, 41, 2, N'Lync.Federation' , N'Allow Federation', 1, 0, NULL)
GO
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (372, 41, 3, N'Lync.Conferencing', N'Allow Conferencing', 1, 0, NULL)
GO
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (373, 41, 4, N'Lync.MaxParticipants', N'Maximum Conference Particiapants', 3, 0, NULL)
GO
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (374, 41, 5, N'Lync.AllowVideo', N'Allow Video in Conference', 1, 0, NULL)
GO
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (375, 41, 6, N'Lync.EnterpriseVoice', N'Allow EnterpriseVoice', 1, 0, NULL)
GO
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (376, 41, 7, N'Lync.EVUsers', N'Number of Enterprise Voice Users', 2, 0, NULL)
GO
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (377, 41, 8, N'Lync.EVNational', N'Allow National Calls', 1, 0, NULL)
GO
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (378, 41, 9, N'Lync.EVMobile', N'Allow Mobile Calls', 1, 0, NULL)
GO
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (379, 41, 10, N'Lync.EVInternational', N'Allow International Calls', 1, 0, NULL)
GO
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (400, 20, 3, N'HostedSharePoint.UseSharedSSL', N'Use shared SSL Root', 1, 0, NULL)
GO
@ -10631,6 +10651,8 @@ INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupContr
GO
INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController]) VALUES (32, N'OCS', 22, NULL)
GO
INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController]) VALUES (41, N'Lync',23, NULL)
GO
INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController]) VALUES (40, N'VPSForPC', 20, NULL)
GO
SET ANSI_NULLS ON
@ -13237,6 +13259,62 @@ GO
CREATE TABLE [dbo].[LyncUserPlans](
[LyncUserPlanId] [int] IDENTITY(1,1) NOT NULL,
[ItemID] [int] NOT NULL,
[LyncUserPlanName] [nvarchar](300) COLLATE Latin1_General_CI_AS NOT NULL,
[IM] [bit] NOT NULL,
[Mobility] [bit] NOT NULL,
[MobilityEnableOutsideVoice] [bit] NOT NULL,
[Federation] [bit] NOT NULL,
[Conferencing] [bit] NOT NULL,
[EnterpriseVoice] [bit] NOT NULL,
[VoicePolicy] [int] NOT NULL,
[IsDefault] [bit] NOT NULL,
CONSTRAINT [PK_LyncUserPlans] PRIMARY KEY CLUSTERED
(
[LyncUserPlanId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
CREATE TABLE [dbo].[LyncUsers](
[LyncUserID] [int] IDENTITY(1,1) NOT NULL,
[AccountID] [int] NOT NULL,
[LyncUserPlanID] [int] NOT NULL,
[CreatedDate] [datetime] NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_LyncUsers] PRIMARY KEY CLUSTERED
(
[LyncUserID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
@ -23372,6 +23450,8 @@ INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName]
GO
INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (209, 23, N'MsSQL', N'Microsoft SQL Server 2012', N'WebsitePanel.Providers.Database.MsSqlServer2012, WebsitePanel.Providers.Database.SqlServer', N'MSSQL', NULL)
GO
INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (250, 41, N'Lync2010', N'Microsoft Lync Server 2010 Multitenant Hosting Pack', 'WebsitePanel.Providers.HostedSolution.Lync2010, WebsitePanel.Providers.HostedSolution', 'Lync', 1)
GO
INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (300, 30, N'HyperV', N'Microsoft Hyper-V', N'WebsitePanel.Providers.Virtualization.HyperV, WebsitePanel.Providers.Virtualization.HyperV', N'HyperV', 1)
GO
INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (301, 11, N'MySQL', N'MySQL Server 5.5', N'WebsitePanel.Providers.Database.MySqlServer55, WebsitePanel.Providers.Database.MySQL', N'MySQL', NULL)
@ -25882,6 +25962,19 @@ AS
INNER JOIN ServiceItems si ON ea.ItemID = si.ItemID
INNER JOIN PackagesTreeCache pt ON si.PackageID = pt.PackageID
WHERE pt.ParentPackageID = @PackageID)
ELSE IF @QuotaID = 370 -- Lync.Users
SET @Result = (SELECT COUNT(ea.AccountID) FROM ExchangeAccounts AS ea
INNER JOIN LyncUsers lu ON ea.AccountID = lu.AccountID
INNER JOIN ServiceItems si ON ea.ItemID = si.ItemID
INNER JOIN PackagesTreeCache pt ON si.PackageID = pt.PackageID
WHERE pt.ParentPackageID = @PackageID)
ELSE IF @QuotaID = 376 -- Lync.EVUsers
SET @Result = (SELECT COUNT(ea.AccountID) FROM ExchangeAccounts AS ea
INNER JOIN LyncUsers lu ON ea.AccountID = lu.AccountID
INNER JOIN LyncUserPlans lp ON lu.LyncUserPlanId = lp.LyncUserPlanId
INNER JOIN ServiceItems si ON ea.ItemID = si.ItemID
INNER JOIN PackagesTreeCache pt ON si.PackageID = pt.PackageID
WHERE pt.ParentPackageID = @PackageID AND lp.EnterpriseVoice = 1)
ELSE
SET @Result = (SELECT COUNT(SI.ItemID) FROM Quotas AS Q
INNER JOIN ServiceItems AS SI ON SI.ItemTypeID = Q.ItemTypeID
@ -44831,6 +44924,496 @@ WHERE MailboxPlanId = @MailboxPlanId
RETURN
GO
CREATE PROCEDURE [dbo].[AddLyncUser]
@AccountID int,
@LyncUserPlanID int
AS
BEGIN
SET NOCOUNT ON;
INSERT INTO
dbo.LyncUsers
(
AccountID,
LyncUserPlanID,
CreatedDate,
ModifiedDate)
VALUES
(
@AccountID,
@LyncUserPlanID,
getdate(),
getdate()
)
END
GO
CREATE PROCEDURE [dbo].[AddLyncUserPlan]
(
@LyncUserPlanId int OUTPUT,
@ItemID int,
@LyncUserPlanName nvarchar(300),
@IM bit,
@Mobility bit,
@MobilityEnableOutsideVoice bit,
@Federation bit,
@Conferencing bit,
@EnterpriseVoice bit,
@VoicePolicy int,
@IsDefault bit
)
AS
INSERT INTO LyncUserPlans
(
ItemID,
LyncUserPlanName,
IM,
Mobility,
MobilityEnableOutsideVoice,
Federation,
Conferencing,
EnterpriseVoice,
VoicePolicy,
IsDefault
)
VALUES
(
@ItemID,
@LyncUserPlanName,
@IM,
@Mobility,
@MobilityEnableOutsideVoice,
@Federation,
@Conferencing,
@EnterpriseVoice,
@VoicePolicy,
@IsDefault
)
SET @LyncUserPlanId = SCOPE_IDENTITY()
RETURN
GO
CREATE PROCEDURE [dbo].[CheckLyncUserExists]
@AccountID int
AS
BEGIN
SELECT
COUNT(AccountID)
FROM
dbo.LyncUsers
WHERE AccountID = @AccountID
END
GO
CREATE PROCEDURE [dbo].[DeleteLyncUser]
(
@AccountId int
)
AS
DELETE FROM
LyncUsers
WHERE
AccountId = @AccountId
RETURN
GO
CREATE PROCEDURE [dbo].[DeleteLyncUserPlan]
(
@LyncUserPlanId int
)
AS
-- delete lyncuserplan
DELETE FROM LyncUserPlans
WHERE LyncUserPlanId = @LyncUserPlanId
RETURN
GO
CREATE PROCEDURE [dbo].[GetLyncUserPlan]
(
@LyncUserPlanId int
)
AS
SELECT
LyncUserPlanId,
ItemID,
LyncUserPlanName,
IM,
Mobility,
MobilityEnableOutsideVoice,
Federation,
Conferencing,
EnterpriseVoice,
VoicePolicy,
IsDefault
FROM
LyncUserPlans
WHERE
LyncUserPlanId = @LyncUserPlanId
RETURN
GO
CREATE PROCEDURE [dbo].[GetLyncUserPlanByAccountId]
(
@AccountID int
)
AS
SELECT
LyncUserPlanId,
ItemID,
LyncUserPlanName,
IM,
Mobility,
MobilityEnableOutsideVoice,
Federation,
Conferencing,
EnterpriseVoice,
VoicePolicy,
IsDefault
FROM
LyncUserPlans
WHERE
LyncUserPlanId IN (SELECT LyncUserPlanId FROM LyncUsers WHERE AccountID = @AccountID)
RETURN
GO
CREATE PROCEDURE [dbo].[GetLyncUserPlans]
(
@ItemID int
)
AS
SELECT
LyncUserPlanId,
ItemID,
LyncUserPlanName,
IM,
Mobility,
MobilityEnableOutsideVoice,
Federation,
Conferencing,
EnterpriseVoice,
VoicePolicy,
IsDefault
FROM
LyncUserPlans
WHERE
ItemID = @ItemID
ORDER BY LyncUserPlanName
RETURN
GO
CREATE PROCEDURE [dbo].[GetLyncUsers]
(
@ItemID int,
@SortColumn nvarchar(40),
@SortDirection nvarchar(20),
@StartRow int,
@Count int
)
AS
CREATE TABLE #TempLyncUsers
(
[ID] [int] IDENTITY(1,1) NOT NULL,
[AccountID] [int],
[ItemID] [int] NOT NULL,
[AccountName] [nvarchar](300) NOT NULL,
[DisplayName] [nvarchar](300) NOT NULL,
[PrimaryEmailAddress] [nvarchar](300) NULL,
[SamAccountName] [nvarchar](100) NULL,
[LyncUserPlanId] [int] NOT NULL,
[LyncUserPlanName] [nvarchar] (300) NOT NULL,
)
DECLARE @condition nvarchar(700)
SET @condition = ''
IF (@SortColumn = 'DisplayName')
BEGIN
SET @condition = 'ORDER BY ea.DisplayName'
END
IF (@SortColumn = 'PrimaryEmailAddress')
BEGIN
SET @condition = 'ORDER BY ea.PrimaryEmailAddress'
END
IF (@SortColumn = 'LyncUserPlanName')
BEGIN
SET @condition = 'ORDER BY lp.LyncUserPlanName'
END
DECLARE @sql nvarchar(3500)
set @sql = '
INSERT INTO
#TempLyncUsers
SELECT
ea.AccountID,
ea.ItemID,
ea.AccountName,
ea.DisplayName,
ea.PrimaryEmailAddress,
ea.SamAccountName,
ou.LyncUserPlanId,
lp.LyncUserPlanName
FROM
ExchangeAccounts ea
INNER JOIN
LyncUsers ou
INNER JOIN
LyncUserPlans lp
ON
ou.LyncUserPlanId = lp.LyncUserPlanId
ON
ea.AccountID = ou.AccountID
WHERE
ea.ItemID = @ItemID ' + @condition
exec sp_executesql @sql, N'@ItemID int',@ItemID
DECLARE @RetCount int
SELECT @RetCount = COUNT(ID) FROM #TempLyncUsers
IF (@SortDirection = 'ASC')
BEGIN
SELECT * FROM #TempLyncUsers
WHERE ID > @StartRow AND ID <= (@StartRow + @Count)
END
ELSE
BEGIN
IF @SortColumn <> '' AND @SortColumn IS NOT NULL
BEGIN
IF (@SortColumn = 'DisplayName')
BEGIN
SELECT * FROM #TempLyncUsers
WHERE ID >@RetCount - @Count - @StartRow AND ID <= @RetCount- @StartRow ORDER BY DisplayName DESC
END
IF (@SortColumn = 'PrimaryEmailAddress')
BEGIN
SELECT * FROM #TempLyncUsers
WHERE ID >@RetCount - @Count - @StartRow AND ID <= @RetCount- @StartRow ORDER BY PrimaryEmailAddress DESC
END
IF (@SortColumn = 'LyncUserPlanName')
BEGIN
SELECT * FROM #TempLyncUsers
WHERE ID >@RetCount - @Count - @StartRow AND ID <= @RetCount- @StartRow ORDER BY LyncUserPlanName DESC
END
END
ELSE
BEGIN
SELECT * FROM #TempLyncUsers
WHERE ID >@RetCount - @Count - @StartRow AND ID <= @RetCount- @StartRow ORDER BY PrimaryEmailAddress DESC
END
END
DROP TABLE #TempLyncUsers
GO
CREATE PROCEDURE [dbo].[GetLyncUsersCount]
(
@ItemID int
)
AS
SELECT
COUNT(ea.AccountID)
FROM
ExchangeAccounts ea
INNER JOIN
LyncUsers ou
ON
ea.AccountID = ou.AccountID
WHERE
ea.ItemID = @ItemID
GO
CREATE PROCEDURE [dbo].[SetLyncUserLyncUserPlan]
(
@AccountID int,
@LyncUserPlanId int
)
AS
UPDATE LyncUsers SET
LyncUserPlanId = @LyncUserPlanId
WHERE
AccountID = @AccountID
RETURN
GO
CREATE PROCEDURE [dbo].[SetOrganizationDefaultLyncUserPlan]
(
@ItemId int,
@LyncUserPlanId int
)
AS
UPDATE LyncUserPlans SET IsDefault=0 WHERE ItemId=@ItemId
UPDATE LyncUserPlans SET IsDefault=1 WHERE LyncUserPlanId=@LyncUserPlanId
RETURN
GO
@ -45502,5 +46085,34 @@ ON DELETE CASCADE
GO
ALTER TABLE [dbo].[ServiceProperties] CHECK CONSTRAINT [FK_ServiceProperties_Services]
GO

ALTER TABLE [dbo].[LyncUsers] ADD CONSTRAINT [DF_LyncUsers_CreatedDate] DEFAULT (getdate()) FOR [CreatedDate]
GO
ALTER TABLE [dbo].[LyncUsers] ADD CONSTRAINT [DF_LyncUsers_ChangedDate] DEFAULT (getdate()) FOR [ModifiedDate]
GO
ALTER TABLE [dbo].[LyncUsers] WITH CHECK ADD CONSTRAINT [FK_LyncUsers_LyncUserPlans] FOREIGN KEY([LyncUserPlanId])
REFERENCES [dbo].[LyncUserPlans] ([LyncUserPlanId])
GO
ALTER TABLE [dbo].[LyncUsers] CHECK CONSTRAINT [FK_LyncUsers_LyncUserPlans]
GO
ALTER TABLE dbo.LyncUserPlans ADD CONSTRAINT
IX_LyncUserPlans UNIQUE NONCLUSTERED
(
LyncUserPlanId
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
ALTER TABLE dbo.LyncUserPlans ADD CONSTRAINT
FK_LyncUserPlans_ExchangeOrganizations FOREIGN KEY
(
ItemID
) REFERENCES dbo.ExchangeOrganizations
(
ItemID
) ON UPDATE NO ACTION
ON DELETE CASCADE

View file

@ -1,18 +1,4 @@
USE [${install.database}]
GO
-- update database version
DECLARE @build_version nvarchar(10), @build_date datetime
SET @build_version = N'${release.version}'
SET @build_date = '${release.date}T00:00:00' -- ISO 8601 Format (YYYY-MM-DDTHH:MM:SS)
IF NOT EXISTS (SELECT * FROM [dbo].[Versions] WHERE [DatabaseVersion] = @build_version)
BEGIN
INSERT [dbo].[Versions] ([DatabaseVersion], [BuildDate]) VALUES (@build_version, @build_date)
END
GO
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE ([UserID] = 1) AND ([SettingsName] = 'WebPolicy') AND ([PropertyName] = 'EnableParkingPageTokens'))
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE ([UserID] = 1) AND ([SettingsName] = 'WebPolicy') AND ([PropertyName] = 'EnableParkingPageTokens'))
BEGIN
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'WebPolicy', N'EnableParkingPageTokens', N'False')
END
@ -66,6 +52,14 @@ GO
UPDATE [dbo].[ResourceGroups] SET [GroupOrder] = 21 WHERE [GroupName] = N'OCS'
GO
IF NOT EXISTS (SELECT * FROM [dbo].[ResourceGroups] WHERE [GroupName] = 'Lync')
BEGIN
INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController]) VALUES (41, N'Lync',22, NULL)
END
GO
IF NOT EXISTS (SELECT * FROM [dbo].[ServiceItemTypes] WHERE [DisplayName] = 'MsSQL2012Database')
BEGIN
INSERT [dbo].[ServiceItemTypes] ([ItemTypeID], [GroupID], [DisplayName], [TypeName], [TypeOrder], [CalculateDiskspace], [CalculateBandwidth], [Suspendable], [Disposable], [Searchable], [Importable], [Backupable]) VALUES (37, 23, N'MsSQL2012Database', N'WebsitePanel.Providers.Database.SqlDatabase, WebsitePanel.Providers.Base', 1, 1, 0, 0, 1, 1, 1, 1)
@ -164,6 +158,72 @@ INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDe
END
GO
IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'Lync.Users')
BEGIN
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (370, 41, 1, N'Lync.Users', N'Users',2 ,0 , NULL)
END
GO
IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'Lync.Federation')
BEGIN
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (371, 41, 2, N'Lync.Federation' , N'Allow Federation', 1, 0, NULL)
END
GO
IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'Lync.Conferencing')
BEGIN
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (372, 41, 3, N'Lync.Conferencing', N'Allow Conferencing', 1, 0, NULL)
END
GO
IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'Lync.MaxParticipants')
BEGIN
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (373, 41, 4, N'Lync.MaxParticipants', N'Maximum Conference Particiapants', 3, 0, NULL)
END
GO
IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'Lync.AllowVideo')
BEGIN
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (374, 41, 5, N'Lync.AllowVideo', N'Allow Video in Conference', 1, 0, NULL)
END
GO
IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'Lync.EnterpriseVoice')
BEGIN
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (375, 41, 6, N'Lync.EnterpriseVoice', N'Allow EnterpriseVoice', 1, 0, NULL)
END
GO
IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'Lync.EVUsers')
BEGIN
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (376, 41, 7, N'Lync.EVUsers', N'Number of Enterprise Voice Users', 2, 0, NULL)
END
GO
IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'Lync.EVNational')
BEGIN
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (377, 41, 8, N'Lync.EVNational', N'Allow National Calls', 1, 0, NULL)
END
GO
IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'Lync.EVMobile')
BEGIN
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (378, 41, 9, N'Lync.EVMobile', N'Allow Mobile Calls', 1, 0, NULL)
END
GO
IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'Lync.EVInternational')
BEGIN
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (379, 41, 10, N'Lync.EVInternational', N'Allow International Calls', 1, 0, NULL)
END
GO
IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'HostedSharePoint.UseSharedSSL')
BEGIN
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (400, 20, 3, N'HostedSharePoint.UseSharedSSL', N'Use shared SSL Root', 1, 0, NULL)
END
GO
IF NOT EXISTS (SELECT * FROM [dbo].[Providers] WHERE [DisplayName] = 'Hosted Microsoft Exchange Server 2010 SP2')
@ -172,6 +232,16 @@ INSERT [dbo].[Providers] ([ProviderId], [GroupId], [ProviderName], [DisplayName]
END
GO
IF NOT EXISTS (SELECT * FROM [dbo].[Providers] WHERE [DisplayName] = 'Microsoft Lync Server 2010 Multitenant Hosting Pack')
BEGIN
INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (250, 41, N'Lync2010', N'Microsoft Lync Server 2010 Multitenant Hosting Pack', 'WebsitePanel.Providers.HostedSolution.Lync2010, WebsitePanel.Providers.HostedSolution', 'Lync', 1)
END
GO
DELETE FROM [dbo].[HostingPlanQuotas] WHERE [QuotaID] IN (SELECT [QuotaID] FROM [dbo].[Quotas] WHERE [QuotaName] = N'Exchange2007.POP3Enabled')
DELETE FROM [dbo].[Quotas] WHERE [QuotaName] = N'Exchange2007.POP3Enabled'
DELETE FROM [dbo].[HostingPlanQuotas] WHERE [QuotaID] IN (SELECT [QuotaID] FROM [dbo].[Quotas] WHERE [QuotaName] = N'Exchange2007.IMAPEnabled')
@ -1683,6 +1753,82 @@ ALTER TABLE [dbo].[ExchangeOrganizations] ALTER COLUMN [OrganizationID] [nvarcha
GO
-- LyncUsers
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[LyncUsers]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[LyncUsers](
[LyncUserID] [int] IDENTITY(1,1) NOT NULL,
[AccountID] [int] NOT NULL,
[LyncUserPlanID] [int] NOT NULL,
[CreatedDate] [datetime] NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_LyncUsers] PRIMARY KEY CLUSTERED
(
[LyncUserID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
ALTER TABLE [dbo].[LyncUsers] ADD CONSTRAINT [DF_LyncUsers_CreatedDate] DEFAULT (getdate()) FOR [CreatedDate]
ALTER TABLE [dbo].[LyncUsers] ADD CONSTRAINT [DF_LyncUsers_ChangedDate] DEFAULT (getdate()) FOR [ModifiedDate]
END
GO
-- LyncUserPlans
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[LyncUserPlans]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[LyncUserPlans](
[LyncUserPlanId] [int] IDENTITY(1,1) NOT NULL,
[ItemID] [int] NOT NULL,
[LyncUserPlanName] [nvarchar](300) NOT NULL,
[IM] [bit] NOT NULL,
[Mobility] [bit] NOT NULL,
[MobilityEnableOutsideVoice] [bit] NOT NULL,
[Federation] [bit] NOT NULL,
[Conferencing] [bit] NOT NULL,
[EnterpriseVoice] [bit] NOT NULL,
[VoicePolicy] [int] NOT NULL,
[IsDefault] [bit] NOT NULL,
CONSTRAINT [PK_LyncUserPlans] PRIMARY KEY CLUSTERED
(
[LyncUserPlanId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
ALTER TABLE dbo.LyncUserPlans ADD CONSTRAINT
IX_LyncUserPlans UNIQUE NONCLUSTERED
(
LyncUserPlanId
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
ALTER TABLE dbo.LyncUserPlans ADD CONSTRAINT
FK_LyncUserPlans_ExchangeOrganizations FOREIGN KEY
(
ItemID
) REFERENCES dbo.ExchangeOrganizations
(
ItemID
) ON UPDATE NO ACTION
ON DELETE CASCADE
ALTER TABLE [dbo].[LyncUsers] WITH CHECK ADD CONSTRAINT [FK_LyncUsers_LyncUserPlans] FOREIGN KEY([LyncUserPlanId])
REFERENCES [dbo].[LyncUserPlans] ([LyncUserPlanId])
ALTER TABLE [dbo].[LyncUsers] CHECK CONSTRAINT [FK_LyncUsers_LyncUserPlans]
END
GO
/****** Object: Table [dbo].[AddExchangeAccount] ******/
ALTER PROCEDURE [dbo].[AddExchangeAccount]
(
@ -1955,6 +2101,19 @@ AS
INNER JOIN ServiceItems si ON ea.ItemID = si.ItemID
INNER JOIN PackagesTreeCache pt ON si.PackageID = pt.PackageID
WHERE pt.ParentPackageID = @PackageID)
ELSE IF @QuotaID = 370 -- Lync.Users
SET @Result = (SELECT COUNT(ea.AccountID) FROM ExchangeAccounts AS ea
INNER JOIN LyncUsers lu ON ea.AccountID = lu.AccountID
INNER JOIN ServiceItems si ON ea.ItemID = si.ItemID
INNER JOIN PackagesTreeCache pt ON si.PackageID = pt.PackageID
WHERE pt.ParentPackageID = @PackageID)
ELSE IF @QuotaID = 376 -- Lync.EVUsers
SET @Result = (SELECT COUNT(ea.AccountID) FROM ExchangeAccounts AS ea
INNER JOIN LyncUsers lu ON ea.AccountID = lu.AccountID
INNER JOIN LyncUserPlans lp ON lu.LyncUserPlanId = lp.LyncUserPlanId
INNER JOIN ServiceItems si ON ea.ItemID = si.ItemID
INNER JOIN PackagesTreeCache pt ON si.PackageID = pt.PackageID
WHERE pt.ParentPackageID = @PackageID AND lp.EnterpriseVoice = 1)
ELSE
SET @Result = (SELECT COUNT(SI.ItemID) FROM Quotas AS Q
INNER JOIN ServiceItems AS SI ON SI.ItemTypeID = Q.ItemTypeID
@ -2808,5 +2967,480 @@ exec sp_executesql @sql, N'@ItemID int, @IncludeMailboxes bit',
RETURN
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'AddLyncUser')
BEGIN
EXEC sp_executesql N'CREATE PROCEDURE [dbo].[AddLyncUser]
@AccountID int,
@LyncUserPlanID int
AS
INSERT INTO
dbo.LyncUsers
(AccountID,
LyncUserPlanID,
CreatedDate,
ModifiedDate)
VALUES
(
@AccountID,
@LyncUserPlanID,
getdate(),
getdate()
)'
END
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'AddLyncUserPlan')
BEGIN
EXEC sp_executesql N'CREATE PROCEDURE [dbo].[AddLyncUserPlan]
(
@LyncUserPlanId int OUTPUT,
@ItemID int,
@LyncUserPlanName nvarchar(300),
@IM bit,
@Mobility bit,
@MobilityEnableOutsideVoice bit,
@Federation bit,
@Conferencing bit,
@EnterpriseVoice bit,
@VoicePolicy int,
@IsDefault bit
)
AS
INSERT INTO LyncUserPlans
(
ItemID,
LyncUserPlanName,
IM,
Mobility,
MobilityEnableOutsideVoice,
Federation,
Conferencing,
EnterpriseVoice,
VoicePolicy,
IsDefault
)
VALUES
(
@ItemID,
@LyncUserPlanName,
@IM,
@Mobility,
@MobilityEnableOutsideVoice,
@Federation,
@Conferencing,
@EnterpriseVoice,
@VoicePolicy,
@IsDefault
)
SET @LyncUserPlanId = SCOPE_IDENTITY()
RETURN'
END
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'CheckLyncUserExists')
BEGIN
EXEC sp_executesql N'CREATE PROCEDURE [dbo].[CheckLyncUserExists]
@AccountID int
AS
SELECT
COUNT(AccountID)
FROM
dbo.LyncUsers
WHERE AccountID = @AccountID'
END
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'CheckLyncUserExists')
BEGIN
EXEC sp_executesql N'CREATE PROCEDURE [dbo].[CheckLyncUserExists]
@AccountID int
AS
BEGIN
SELECT
COUNT(AccountID)
FROM
dbo.LyncUsers
WHERE AccountID = @AccountID'
END
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'DeleteLyncUser')
BEGIN
EXEC sp_executesql N'CREATE PROCEDURE [dbo].[DeleteLyncUser]
(
@AccountId int
)
AS
DELETE FROM
LyncUsers
WHERE
AccountId = @AccountId
RETURN'
END
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'DeleteLyncUserPlan')
BEGIN
EXEC sp_executesql N'CREATE PROCEDURE [dbo].[DeleteLyncUserPlan]
(
@LyncUserPlanId int
)
AS
-- delete lyncuserplan
DELETE FROM LyncUserPlans
WHERE LyncUserPlanId = @LyncUserPlanId
RETURN'
END
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'GetLyncUserPlan')
BEGIN
EXEC sp_executesql N'CREATE PROCEDURE [dbo].[GetLyncUserPlan]
(
@LyncUserPlanId int
)
AS
SELECT
LyncUserPlanId,
ItemID,
LyncUserPlanName,
IM,
Mobility,
MobilityEnableOutsideVoice,
Federation,
Conferencing,
EnterpriseVoice,
VoicePolicy,
IsDefault
FROM
LyncUserPlans
WHERE
LyncUserPlanId = @LyncUserPlanId
RETURN'
END
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'GetLyncUserPlanByAccountId')
BEGIN
EXEC sp_executesql N'CREATE PROCEDURE [dbo].[GetLyncUserPlanByAccountId]
(
@AccountID int
)
AS
SELECT
LyncUserPlanId,
ItemID,
LyncUserPlanName,
IM,
Mobility,
MobilityEnableOutsideVoice,
Federation,
Conferencing,
EnterpriseVoice,
VoicePolicy,
IsDefault
FROM
LyncUserPlans
WHERE
LyncUserPlanId IN (SELECT LyncUserPlanId FROM LyncUsers WHERE AccountID = @AccountID)
RETURN'
END
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'GetLyncUserPlans')
BEGIN
EXEC sp_executesql N'CREATE PROCEDURE [dbo].[GetLyncUserPlans]
(
@ItemID int
)
AS
SELECT
LyncUserPlanId,
ItemID,
LyncUserPlanName,
IM,
Mobility,
MobilityEnableOutsideVoice,
Federation,
Conferencing,
EnterpriseVoice,
VoicePolicy,
IsDefault
FROM
LyncUserPlans
WHERE
ItemID = @ItemID
ORDER BY LyncUserPlanName
RETURN'
END
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'GetLyncUsers')
BEGIN
EXEC sp_executesql N'CREATE PROCEDURE [dbo].[GetLyncUsers]
(
@ItemID int,
@SortColumn nvarchar(40),
@SortDirection nvarchar(20),
@StartRow int,
@Count int
)
AS
CREATE TABLE #TempLyncUsers
(
[ID] [int] IDENTITY(1,1) NOT NULL,
[AccountID] [int],
[ItemID] [int] NOT NULL,
[AccountName] [nvarchar](300) NOT NULL,
[DisplayName] [nvarchar](300) NOT NULL,
[PrimaryEmailAddress] [nvarchar](300) NULL,
[SamAccountName] [nvarchar](100) NULL,
[LyncUserPlanId] [int] NOT NULL,
[LyncUserPlanName] [nvarchar] (300) NOT NULL,
)
DECLARE @condition nvarchar(700)
SET @condition = ''''
IF (@SortColumn = ''DisplayName'')
BEGIN
SET @condition = ''ORDER BY ea.DisplayName''
END
IF (@SortColumn = ''PrimaryEmailAddress'')
BEGIN
SET @condition = ''ORDER BY ea.PrimaryEmailAddress''
END
IF (@SortColumn = ''LyncUserPlanName'')
BEGIN
SET @condition = ''ORDER BY lp.LyncUserPlanName''
END
DECLARE @sql nvarchar(3500)
set @sql = ''
INSERT INTO
#TempLyncUsers
SELECT
ea.AccountID,
ea.ItemID,
ea.AccountName,
ea.DisplayName,
ea.PrimaryEmailAddress,
ea.SamAccountName,
ou.LyncUserPlanId,
lp.LyncUserPlanName
FROM
ExchangeAccounts ea
INNER JOIN
LyncUsers ou
INNER JOIN
LyncUserPlans lp
ON
ou.LyncUserPlanId = lp.LyncUserPlanId
ON
ea.AccountID = ou.AccountID
WHERE
ea.ItemID = @ItemID '' + @condition
exec sp_executesql @sql, N''@ItemID int'',@ItemID
DECLARE @RetCount int
SELECT @RetCount = COUNT(ID) FROM #TempLyncUsers
IF (@SortDirection = ''ASC'')
BEGIN
SELECT * FROM #TempLyncUsers
WHERE ID > @StartRow AND ID <= (@StartRow + @Count)
END
ELSE
BEGIN
IF @SortColumn <> '''' AND @SortColumn IS NOT NULL
BEGIN
IF (@SortColumn = ''DisplayName'')
BEGIN
SELECT * FROM #TempLyncUsers
WHERE ID >@RetCount - @Count - @StartRow AND ID <= @RetCount- @StartRow ORDER BY DisplayName DESC
END
IF (@SortColumn = ''PrimaryEmailAddress'')
BEGIN
SELECT * FROM #TempLyncUsers
WHERE ID >@RetCount - @Count - @StartRow AND ID <= @RetCount- @StartRow ORDER BY PrimaryEmailAddress DESC
END
IF (@SortColumn = ''LyncUserPlanName'')
BEGIN
SELECT * FROM #TempLyncUsers
WHERE ID >@RetCount - @Count - @StartRow AND ID <= @RetCount- @StartRow ORDER BY LyncUserPlanName DESC
END
END
ELSE
BEGIN
SELECT * FROM #TempLyncUsers
WHERE ID >@RetCount - @Count - @StartRow AND ID <= @RetCount- @StartRow ORDER BY PrimaryEmailAddress DESC
END
END
DROP TABLE #TempLyncUsers'
END
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'GetLyncUsersCount')
BEGIN
EXEC sp_executesql N'CREATE PROCEDURE [dbo].[GetLyncUsersCount]
(
@ItemID int
)
AS
SELECT
COUNT(ea.AccountID)
FROM
ExchangeAccounts ea
INNER JOIN
LyncUsers ou
ON
ea.AccountID = ou.AccountID
WHERE
ea.ItemID = @ItemID'
END
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'SetLyncUserLyncUserPlan')
BEGIN
EXEC sp_executesql N'CREATE PROCEDURE [dbo].[SetLyncUserLyncUserPlan]
(
@AccountID int,
@LyncUserPlanId int
)
AS
UPDATE LyncUsers SET
LyncUserPlanId = @LyncUserPlanId
WHERE
AccountID = @AccountID
RETURN'
END
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'SetOrganizationDefaultLyncUserPlan')
BEGIN
EXEC sp_executesql N'CREATE PROCEDURE [dbo].[SetOrganizationDefaultLyncUserPlan]
(
@ItemId int,
@LyncUserPlanId int
)
AS
UPDATE LyncUserPlans SET IsDefault=0 WHERE ItemId=@ItemId
UPDATE LyncUserPlans SET IsDefault=1 WHERE LyncUserPlanId=@LyncUserPlanId
RETURN'
END
GO

View file

@ -336,6 +336,10 @@ namespace WebsitePanel.EnterpriseServer
public const int ERROR_FILE_MOVE_PATH_ALREADY_EXISTS = -3004;
#endregion
#region Lync Server
public const int ERROR_LYNC_DELETE_SOME_PROBLEMS = -2806;
#endregion
public static string ToText(int code)
{
switch (code)

View file

@ -209,5 +209,17 @@ order by rg.groupOrder
public const string OCS_PresenceAllowedByDefault = "OCS.PresenceAllowedByDefault";
public const string LYNC_USERS = "Lync.Users";
public const string LYNC_FEDERATION = "Lync.Federation";
public const string LYNC_CONFERENCING = "Lync.Conferencing";
public const string LYNC_MAXPARTICIPANTS = "Lync.MaxParticipants";
public const string LYNC_ALLOWVIDEO = "Lync.AllowVideo";
public const string LYNC_ENTERPRISEVOICE = "Lync.EnterpriseVoice";
public const string LYNC_EVUSERS = "Lync.EVUsers";
public const string LYNC_EVNATIONAL = "Lync.EVNational";
public const string LYNC_EVMOBILE = "Lync.EVMobile";
public const string LYNC_EVINTERNATIONAL = "Lync.EVInternational";
}
}

View file

@ -51,5 +51,6 @@ namespace WebsitePanel.EnterpriseServer
public const string BlackBerry = "BlackBerry";
public const string OCS = "OCS";
public const string VPSForPC = "VPSForPC";
public const string Lync = "Lync";
}
}

File diff suppressed because it is too large Load diff

View file

@ -87,6 +87,7 @@
<Compile Include="ExchangeServerProxy.cs">
<SubType>code</SubType>
</Compile>
<Compile Include="LyncProxy.cs" />
<Compile Include="VirtualizationServerProxyForPrivateCloud.cs" />
<Compile Include="CRMProxy.cs" />
<Compile Include="DatabaseServersProxy.cs" />

View file

@ -3140,5 +3140,163 @@ namespace WebsitePanel.EnterpriseServer
return Convert.ToBoolean(prmId.Value);
}
#endregion
#region Lync
public static void AddLyncUser(int accountId, int lyncUserPlanId)
{
SqlHelper.ExecuteNonQuery(ConnectionString,
CommandType.StoredProcedure,
"AddLyncUser",
new[]
{
new SqlParameter("@AccountID", accountId),
new SqlParameter("@LyncUserPlanID", lyncUserPlanId)
});
}
public static bool CheckLyncUserExists(int accountId)
{
int res = (int)SqlHelper.ExecuteScalar(ConnectionString, CommandType.StoredProcedure, "CheckLyncUserExists",
new SqlParameter("@AccountID", accountId));
return res > 0;
}
public static IDataReader GetLyncUsers(int itemId, string sortColumn, string sortDirection, int startRow, int count)
{
SqlParameter[] sqlParams = new SqlParameter[]
{
new SqlParameter("@ItemID", itemId),
new SqlParameter("@SortColumn", sortColumn),
new SqlParameter("@SortDirection", sortDirection),
new SqlParameter("@StartRow", startRow),
new SqlParameter("Count", count)
};
return SqlHelper.ExecuteReader(
ConnectionString,
CommandType.StoredProcedure,
"GetLyncUsers", sqlParams);
}
public static int GetLyncUsersCount(int itemId)
{
SqlParameter[] sqlParams = new SqlParameter[]
{
new SqlParameter("@ItemID", itemId)
};
return
(int)
SqlHelper.ExecuteScalar(ConnectionString, CommandType.StoredProcedure, "GetLyncUsersCount", sqlParams);
}
public static void DeleteLyncUser(int accountId)
{
SqlHelper.ExecuteNonQuery(ConnectionString,
CommandType.StoredProcedure,
"DeleteLyncUser",
new[]
{
new SqlParameter("@AccountId", accountId)
});
}
public static int AddLyncUserPlan(int itemID, LyncUserPlan lyncUserPlan)
{
SqlParameter outParam = new SqlParameter("@LyncUserPlanId", SqlDbType.Int);
outParam.Direction = ParameterDirection.Output;
SqlHelper.ExecuteNonQuery(
ConnectionString,
CommandType.StoredProcedure,
"AddLyncUserPlan",
outParam,
new SqlParameter("@ItemID", itemID),
new SqlParameter("@LyncUserPlanName", lyncUserPlan.LyncUserPlanName),
new SqlParameter("@IM", lyncUserPlan.IM),
new SqlParameter("@Mobility", lyncUserPlan.Mobility),
new SqlParameter("@MobilityEnableOutsideVoice", lyncUserPlan.MobilityEnableOutsideVoice),
new SqlParameter("@Federation", lyncUserPlan.Federation),
new SqlParameter("@Conferencing", lyncUserPlan.Conferencing),
new SqlParameter("@EnterpriseVoice", lyncUserPlan.EnterpriseVoice),
new SqlParameter("@VoicePolicy", lyncUserPlan.VoicePolicy),
new SqlParameter("@IsDefault", lyncUserPlan.IsDefault)
);
return Convert.ToInt32(outParam.Value);
}
public static void DeleteLyncUserPlan(int lyncUserPlanId)
{
SqlHelper.ExecuteNonQuery(
ConnectionString,
CommandType.StoredProcedure,
"DeleteLyncUserPlan",
new SqlParameter("@LyncUserPlanId", lyncUserPlanId)
);
}
public static IDataReader GetLyncUserPlan(int lyncUserPlanId)
{
return SqlHelper.ExecuteReader(
ConnectionString,
CommandType.StoredProcedure,
"GetLyncUserPlan",
new SqlParameter("@LyncUserPlanId", lyncUserPlanId)
);
}
public static IDataReader GetLyncUserPlans(int itemId)
{
return SqlHelper.ExecuteReader(
ConnectionString,
CommandType.StoredProcedure,
"GetLyncUserPlans",
new SqlParameter("@ItemID", itemId)
);
}
public static void SetOrganizationDefaultLyncUserPlan(int itemId, int lyncUserPlanId)
{
SqlHelper.ExecuteNonQuery(
ConnectionString,
CommandType.StoredProcedure,
"SetOrganizationDefaultLyncUserPlan",
new SqlParameter("@ItemID", itemId),
new SqlParameter("@LyncUserPlanId", lyncUserPlanId)
);
}
public static IDataReader GetLyncUserPlanByAccountId(int AccountId)
{
return SqlHelper.ExecuteReader(
ConnectionString,
CommandType.StoredProcedure,
"GetLyncUserPlanByAccountId",
new SqlParameter("@AccountID", AccountId)
);
}
public static void SetLyncUserLyncUserplan(int accountId, int lyncUserPlanId)
{
SqlHelper.ExecuteNonQuery(
ConnectionString,
CommandType.StoredProcedure,
"SetLyncUserLyncUserplan",
new SqlParameter("@AccountID", accountId),
new SqlParameter("@LyncUserPlanId", (lyncUserPlanId == 0) ? (object)DBNull.Value : (object)lyncUserPlanId)
);
}
#endregion
}
}

View file

@ -0,0 +1,821 @@
// 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.Collections.Generic;
using System.Collections.Specialized;
using System.Data;
using System.Xml;
using WebsitePanel.Providers;
using WebsitePanel.Providers.Common;
using WebsitePanel.Providers.HostedSolution;
using WebsitePanel.Providers.ResultObjects;
using WebsitePanel.Providers.Lync;
namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
{
public class LyncController
{
public static LyncServer GetLyncServer(int lyncServiceId, int organizationServiceId)
{
LyncServer ws = new LyncServer();
ServiceProviderProxy.Init(ws, lyncServiceId);
string[] lyncSettings = ws.ServiceProviderSettingsSoapHeaderValue.Settings;
List<string> resSettings = new List<string>(lyncSettings);
ExtendLyncSettings(resSettings, "primarydomaincontroller", GetProviderProperty(organizationServiceId, "primarydomaincontroller"));
ExtendLyncSettings(resSettings, "rootou", GetProviderProperty(organizationServiceId, "rootou"));
ws.ServiceProviderSettingsSoapHeaderValue.Settings = resSettings.ToArray();
return ws;
}
private static string GetProviderProperty(int organizationServiceId, string property)
{
Organizations orgProxy = new Organizations();
ServiceProviderProxy.Init(orgProxy, organizationServiceId);
string[] organizationSettings = orgProxy.ServiceProviderSettingsSoapHeaderValue.Settings;
string value = string.Empty;
foreach (string str in organizationSettings)
{
string[] props = str.Split('=');
if (props[0].ToLower() == property)
{
value = str;
break;
}
}
return value;
}
private static void ExtendLyncSettings(List<string> lyncSettings, string property, string value)
{
bool isAdded = false;
for (int i = 0; i < lyncSettings.Count; i++)
{
string[] props = lyncSettings[i].Split('=');
if (props[0].ToLower() == property)
{
lyncSettings[i] = value;
isAdded = true;
break;
}
}
if (!isAdded)
{
lyncSettings.Add(value);
}
}
private static int GetLyncServiceID(int packageId)
{
return PackageController.GetPackageServiceId(packageId, ResourceGroups.Lync);
}
private static bool CheckQuota(int itemId)
{
Organization org = OrganizationController.GetOrganization(itemId);
PackageContext cntx = PackageController.GetPackageContext(org.PackageId);
IntResult userCount = GetLyncUsersCount(itemId);
int allocatedUsers = cntx.Quotas[Quotas.LYNC_USERS].QuotaAllocatedValue;
return allocatedUsers == -1 || allocatedUsers > userCount.Value;
}
public static LyncUserResult CreateLyncUser(int itemId, int accountId, int lyncUserPlanId)
{
LyncUserResult res = TaskManager.StartResultTask<LyncUserResult>("LYNC", "CREATE_LYNC_USER");
int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive);
if (accountCheck < 0)
{
TaskManager.CompleteResultTask(res, LyncErrorCodes.NOT_AUTHORIZED);
return res;
}
LyncUser retLyncUser = new LyncUser();
bool isLyncUser;
isLyncUser = DataProvider.CheckLyncUserExists(accountId);
if (isLyncUser)
{
TaskManager.CompleteResultTask(res, LyncErrorCodes.USER_IS_ALREADY_LYNC_USER);
return res;
}
OrganizationUser user;
user = OrganizationController.GetAccount(itemId, accountId);
if (user == null)
{
TaskManager.CompleteResultTask(res, ErrorCodes.CANNOT_GET_ACCOUNT);
return res;
}
user = OrganizationController.GetUserGeneralSettings(itemId, accountId);
if (string.IsNullOrEmpty(user.FirstName))
{
TaskManager.CompleteResultTask(res, LyncErrorCodes.USER_FIRST_NAME_IS_NOT_SPECIFIED);
return res;
}
if (string.IsNullOrEmpty(user.LastName))
{
TaskManager.CompleteResultTask(res, LyncErrorCodes.USER_LAST_NAME_IS_NOT_SPECIFIED);
return res;
}
bool quota = CheckQuota(itemId);
if (!quota)
{
TaskManager.CompleteResultTask(res, LyncErrorCodes.USER_QUOTA_HAS_BEEN_REACHED);
return res;
}
LyncServer lync;
try
{
bool bReloadConfiguration = false;
Organization org = (Organization)PackageController.GetPackageItem(itemId);
if (org == null)
{
throw new ApplicationException(
string.Format("Organization is null. ItemId={0}", itemId));
}
int lyncServiceId = GetLyncServiceID(org.PackageId);
lync = GetLyncServer(lyncServiceId, org.ServiceId);
if (string.IsNullOrEmpty(org.LyncTenantId))
{
PackageContext cntx = PackageController.GetPackageContext(org.PackageId);
org.LyncTenantId = lync.CreateOrganization(org.OrganizationId,
org.DefaultDomain,
Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_CONFERENCING].QuotaAllocatedValue),
Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_ALLOWVIDEO].QuotaAllocatedValue),
Convert.ToInt32(cntx.Quotas[Quotas.LYNC_MAXPARTICIPANTS].QuotaAllocatedValue),
Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_CONFERENCING].QuotaAllocatedValue),
Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_CONFERENCING].QuotaAllocatedValue));
if (string.IsNullOrEmpty(org.LyncTenantId))
{
TaskManager.CompleteResultTask(res, LyncErrorCodes.CANNOT_ENABLE_ORG);
return res;
}
else
{
PackageController.UpdatePackageItem(org);
bReloadConfiguration = true;
}
}
LyncUserPlan plan = GetLyncUserPlan(itemId, lyncUserPlanId);
if (!lync.CreateUser(org.OrganizationId, user.PrimaryEmailAddress, plan))
{
TaskManager.CompleteResultTask(res, LyncErrorCodes.CANNOT_ADD_LYNC_USER);
return res;
}
if (bReloadConfiguration)
{
LyncControllerAsync userWorker = new LyncControllerAsync();
userWorker.LyncServiceId = lyncServiceId;
userWorker.OrganizationServiceId = org.ServiceId;
userWorker.Enable_CsComputerAsync();
}
}
catch (Exception ex)
{
TaskManager.CompleteResultTask(res, LyncErrorCodes.CANNOT_ADD_LYNC_USER, ex);
return res;
}
try
{
DataProvider.AddLyncUser(accountId, lyncUserPlanId);
}
catch (Exception ex)
{
TaskManager.CompleteResultTask(res, LyncErrorCodes.CANNOT_ADD_LYNC_USER_TO_DATABASE, ex);
return res;
}
res.IsSuccess = true;
TaskManager.CompleteResultTask();
return res;
}
private static int[] ParseMultiSetting(int lyncServiceId, string settingName)
{
List<int> retIds = new List<int>();
StringDictionary settings = ServerController.GetServiceSettings(lyncServiceId);
if (!String.IsNullOrEmpty(settings[settingName]))
{
string[] ids = settings[settingName].Split(',');
int res;
foreach (string id in ids)
{
if (int.TryParse(id, out res))
retIds.Add(res);
}
}
if (retIds.Count == 0)
retIds.Add(lyncServiceId);
return retIds.ToArray();
}
public static void GetLyncServices(int lyncServiceId, out int[] lyncServiceIds)
{
lyncServiceIds = ParseMultiSetting(lyncServiceId, "LyncServersServiceID");
}
public static LyncUser GetLyncUserGeneralSettings(int itemId, int accountId)
{
TaskManager.StartTask("LYNC", "GET_LYNC_USER_GENERAL_SETTINGS");
LyncUser user = null;
try
{
Organization org = (Organization)PackageController.GetPackageItem(itemId);
if (org == null)
{
throw new ApplicationException(
string.Format("Organization is null. ItemId={0}", itemId));
}
int lyncServiceId = GetLyncServiceID(org.PackageId);
LyncServer lync = GetLyncServer(lyncServiceId, org.ServiceId);
OrganizationUser usr;
usr = OrganizationController.GetAccount(itemId, accountId);
if (usr != null)
user = lync.GetLyncUserGeneralSettings(org.OrganizationId, usr.PrimaryEmailAddress);
if (user != null)
{
LyncUserPlan plan = ObjectUtils.FillObjectFromDataReader<LyncUserPlan>(DataProvider.GetLyncUserPlanByAccountId(accountId));
if (plan != null)
{
user.LyncUserPlanId = plan.LyncUserPlanId;
user.LyncUserPlanName = plan.LyncUserPlanName;
}
}
}
catch (Exception ex)
{
throw TaskManager.WriteError(ex);
}
TaskManager.CompleteTask();
return user;
}
public static int DeleteOrganization(int itemId)
{
// check account
int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive);
if (accountCheck < 0) return accountCheck;
// place log record
TaskManager.StartTask("LYNC", "DELETE_ORG");
TaskManager.ItemId = itemId;
try
{
// delete organization in Exchange
//System.Threading.Thread.Sleep(5000);
Organization org = (Organization)PackageController.GetPackageItem(itemId);
int lyncServiceId = GetLyncServiceID(org.PackageId);
LyncServer lync = GetLyncServer(lyncServiceId, org.ServiceId);
bool successful = lync.DeleteOrganization(org.OrganizationId, org.DefaultDomain);
return successful ? 0 : BusinessErrorCodes.ERROR_LYNC_DELETE_SOME_PROBLEMS;
}
catch (Exception ex)
{
throw TaskManager.WriteError(ex);
}
finally
{
TaskManager.CompleteTask();
}
}
public static LyncUserResult SetUserLyncPlan(int itemId, int accountId, int lyncUserPlanId)
{
LyncUserResult res = TaskManager.StartResultTask<LyncUserResult>("LYNC", "SET_LYNC_USER_LYNCPLAN");
int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive);
if (accountCheck < 0)
{
TaskManager.CompleteResultTask(res, LyncErrorCodes.NOT_AUTHORIZED);
return res;
}
try
{
Organization org = (Organization)PackageController.GetPackageItem(itemId);
if (org == null)
{
throw new ApplicationException(
string.Format("Organization is null. ItemId={0}", itemId));
}
int lyncServiceId = GetLyncServiceID(org.PackageId);
LyncServer lync = GetLyncServer(lyncServiceId, org.ServiceId);
LyncUserPlan plan = GetLyncUserPlan(itemId, lyncUserPlanId);
OrganizationUser user;
user = OrganizationController.GetAccount(itemId, accountId);
if (!lync.SetLyncUserPlan(org.OrganizationId, user.PrimaryEmailAddress, plan))
{
TaskManager.CompleteResultTask(res, LyncErrorCodes.CANNOT_ADD_LYNC_USER);
return res;
}
try
{
DataProvider.SetLyncUserLyncUserplan(accountId, lyncUserPlanId);
}
catch (Exception ex)
{
TaskManager.CompleteResultTask(res, LyncErrorCodes.CANNOT_ADD_LYNC_USER_TO_DATABASE, ex);
return res;
}
res.IsSuccess = true;
TaskManager.CompleteResultTask();
return res;
}
catch (Exception ex)
{
TaskManager.CompleteResultTask(res, LyncErrorCodes.CANNOT_UPDATE_LYNC_USER, ex);
return res;
}
}
public static LyncUsersPagedResult GetLyncUsers(int itemId, string sortColumn, string sortDirection, int startRow, int count)
{
LyncUsersPagedResult res = TaskManager.StartResultTask<LyncUsersPagedResult>("LYNC", "GET_LYNC_USERS");
try
{
IDataReader reader =
DataProvider.GetLyncUsers(itemId, sortColumn, sortDirection, startRow, count);
List<LyncUser> accounts = new List<LyncUser>();
ObjectUtils.FillCollectionFromDataReader(accounts, reader);
res.Value = new LyncUsersPaged { PageUsers = accounts.ToArray() };
}
catch (Exception ex)
{
TaskManager.CompleteResultTask(res, LyncErrorCodes.GET_LYNC_USERS, ex);
return res;
}
IntResult intRes = GetLyncUsersCount(itemId);
res.ErrorCodes.AddRange(intRes.ErrorCodes);
if (!intRes.IsSuccess)
{
TaskManager.CompleteResultTask(res);
return res;
}
res.Value.RecordsCount = intRes.Value;
TaskManager.CompleteResultTask();
return res;
}
public static IntResult GetLyncUsersCount(int itemId)
{
IntResult res = TaskManager.StartResultTask<IntResult>("LYNC", "GET_LYNC_USERS_COUNT");
try
{
res.Value = DataProvider.GetLyncUsersCount(itemId);
}
catch (Exception ex)
{
TaskManager.CompleteResultTask(res, LyncErrorCodes.GET_LYNC_USER_COUNT, ex);
return res;
}
TaskManager.CompleteResultTask();
return res;
}
public static LyncUserResult DeleteLyncUser(int itemId, int accountId)
{
LyncUserResult res = TaskManager.StartResultTask<LyncUserResult>("LYNC", "DELETE_LYNC_USER");
int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive);
if (accountCheck < 0)
{
TaskManager.CompleteResultTask(res, LyncErrorCodes.NOT_AUTHORIZED);
return res;
}
LyncServer lync;
try
{
Organization org = (Organization)PackageController.GetPackageItem(itemId);
if (org == null)
{
throw new ApplicationException(
string.Format("Organization is null. ItemId={0}", itemId));
}
int lyncServiceId = GetLyncServiceID(org.PackageId);
lync = GetLyncServer(lyncServiceId, org.ServiceId);
OrganizationUser user;
user = OrganizationController.GetAccount(itemId, accountId);
if (user != null)
lync.DeleteUser(user.PrimaryEmailAddress);
}
catch (Exception ex)
{
TaskManager.CompleteResultTask(res, LyncErrorCodes.CANNOT_DELETE_LYNC_USER, ex);
return res;
}
try
{
DataProvider.DeleteLyncUser(accountId);
}
catch (Exception ex)
{
TaskManager.CompleteResultTask(res, LyncErrorCodes.CANNOT_DELETE_LYNC_USER_FROM_METADATA, ex);
return res;
}
TaskManager.CompleteResultTask();
return res;
}
public static Organization GetOrganization(int itemId)
{
return (Organization)PackageController.GetPackageItem(itemId);
}
#region Lync Plans
public static List<LyncUserPlan> GetLyncUserPlans(int itemId)
{
// place log record
TaskManager.StartTask("LYNC", "GET_LYNC_LYNCUSERPLANS");
TaskManager.ItemId = itemId;
try
{
return ObjectUtils.CreateListFromDataReader<LyncUserPlan>(
DataProvider.GetLyncUserPlans(itemId));
}
catch (Exception ex)
{
throw TaskManager.WriteError(ex);
}
finally
{
TaskManager.CompleteTask();
}
}
public static LyncUserPlan GetLyncUserPlan(int itemID, int lyncUserPlanId)
{
// place log record
TaskManager.StartTask("LYNC", "GET_LYNC_LYNCUSERPLAN");
TaskManager.ItemId = lyncUserPlanId;
try
{
return ObjectUtils.FillObjectFromDataReader<LyncUserPlan>(
DataProvider.GetLyncUserPlan(lyncUserPlanId));
}
catch (Exception ex)
{
throw TaskManager.WriteError(ex);
}
finally
{
TaskManager.CompleteTask();
}
}
public static int AddLyncUserPlan(int itemID, LyncUserPlan lyncUserPlan)
{
int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive);
if (accountCheck < 0) return accountCheck;
// place log record
TaskManager.StartTask("LYNC", "ADD_LYNC_LYNCUSERPLAN");
TaskManager.ItemId = itemID;
try
{
Organization org = GetOrganization(itemID);
if (org == null)
return -1;
// load package context
PackageContext cntx = PackageController.GetPackageContext(org.PackageId);
lyncUserPlan.Conferencing = lyncUserPlan.Conferencing & Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_CONFERENCING].QuotaAllocatedValue);
lyncUserPlan.EnterpriseVoice = lyncUserPlan.EnterpriseVoice & Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_ENTERPRISEVOICE].QuotaAllocatedValue);
if (!lyncUserPlan.EnterpriseVoice)
lyncUserPlan.VoicePolicy = LyncVoicePolicyType.None;
lyncUserPlan.IM = true;
return DataProvider.AddLyncUserPlan(itemID, lyncUserPlan);
}
catch (Exception ex)
{
throw TaskManager.WriteError(ex);
}
finally
{
TaskManager.CompleteTask();
}
}
public static int DeleteLyncUserPlan(int itemID, int lyncUserPlanId)
{
int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive);
if (accountCheck < 0) return accountCheck;
TaskManager.StartTask("LYNC", "DELETE_LYNC_LYNCPLAN");
TaskManager.ItemId = itemID;
try
{
DataProvider.DeleteLyncUserPlan(lyncUserPlanId);
return 0;
}
catch (Exception ex)
{
throw TaskManager.WriteError(ex);
}
finally
{
TaskManager.CompleteTask();
}
}
public static int SetOrganizationDefaultLyncUserPlan(int itemId, int lyncUserPlanId)
{
int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive);
if (accountCheck < 0) return accountCheck;
TaskManager.StartTask("LYNC", "SET_LYNC_LYNCUSERPLAN");
TaskManager.ItemId = itemId;
try
{
DataProvider.SetOrganizationDefaultLyncUserPlan(itemId, lyncUserPlanId);
}
catch (Exception ex)
{
throw TaskManager.WriteError(ex);
}
finally
{
TaskManager.CompleteTask();
}
return 1;
}
#endregion
#region Federation Domains
public static LyncFederationDomain[] GetFederationDomains(int itemId)
{
// place log record
TaskManager.StartTask("LYNC", "GET_LYNC_FEDERATIONDOMAINS");
TaskManager.ItemId = itemId;
LyncFederationDomain[] lyncFederationDomains = null;
try
{
Organization org = (Organization)PackageController.GetPackageItem(itemId);
int lyncServiceId = GetLyncServiceID(org.PackageId);
LyncServer lync = GetLyncServer(lyncServiceId, org.ServiceId);
lyncFederationDomains = lync.GetFederationDomains(org.OrganizationId);
}
catch (Exception ex)
{
throw TaskManager.WriteError(ex);
}
finally
{
TaskManager.CompleteTask();
}
return lyncFederationDomains;
}
public static LyncUserResult AddFederationDomain(int itemId, string domainName, string proxyFqdn)
{
LyncUserResult res = TaskManager.StartResultTask<LyncUserResult>("LYNC", "ADD_LYNC_FEDERATIONDOMAIN");
TaskManager.ItemId = itemId;
TaskManager.TaskParameters["domainName"] = domainName;
TaskManager.TaskParameters["proxyFqdn"] = proxyFqdn;
int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive);
if (accountCheck < 0)
{
TaskManager.CompleteResultTask(res, LyncErrorCodes.NOT_AUTHORIZED);
return res;
}
try
{
Organization org = (Organization)PackageController.GetPackageItem(itemId);
if (org == null)
{
throw new ApplicationException(
string.Format("Organization is null. ItemId={0}", itemId));
}
int lyncServiceId = GetLyncServiceID(org.PackageId);
LyncServer lync = GetLyncServer(lyncServiceId, org.ServiceId);
if (string.IsNullOrEmpty(org.LyncTenantId))
{
PackageContext cntx = PackageController.GetPackageContext(org.PackageId);
org.LyncTenantId = lync.CreateOrganization(org.OrganizationId,
org.DefaultDomain,
Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_CONFERENCING].QuotaAllocatedValue),
Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_ALLOWVIDEO].QuotaAllocatedValue),
Convert.ToInt32(cntx.Quotas[Quotas.LYNC_MAXPARTICIPANTS].QuotaAllocatedValue),
Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_CONFERENCING].QuotaAllocatedValue),
Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_CONFERENCING].QuotaAllocatedValue));
if (string.IsNullOrEmpty(org.LyncTenantId))
{
TaskManager.CompleteResultTask(res, LyncErrorCodes.CANNOT_ENABLE_ORG);
return res;
}
else
PackageController.UpdatePackageItem(org);
}
lync = GetLyncServer(lyncServiceId, org.ServiceId);
lync.AddFederationDomain(org.OrganizationId, domainName, proxyFqdn);
}
catch (Exception ex)
{
TaskManager.CompleteResultTask(res, LyncErrorCodes.CANNOT_ADD_LYNC_FEDERATIONDOMAIN, ex);
return res;
}
TaskManager.CompleteResultTask();
return res;
}
public static LyncUserResult RemoveFederationDomain(int itemId, string domainName)
{
LyncUserResult res = TaskManager.StartResultTask<LyncUserResult>("LYNC", "REMOVE_LYNC_FEDERATIONDOMAIN");
TaskManager.ItemId = itemId;
TaskManager.TaskParameters["domainName"] = domainName;
int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive);
if (accountCheck < 0)
{
TaskManager.CompleteResultTask(res, LyncErrorCodes.NOT_AUTHORIZED);
return res;
}
try
{
Organization org = (Organization)PackageController.GetPackageItem(itemId);
if (org == null)
{
throw new ApplicationException(
string.Format("Organization is null. ItemId={0}", itemId));
}
int lyncServiceId = GetLyncServiceID(org.PackageId);
LyncServer lync = GetLyncServer(lyncServiceId, org.ServiceId);
if (org.OrganizationId.ToLower() == domainName.ToLower())
{
TaskManager.CompleteResultTask(res, LyncErrorCodes.CANNOT_REMOVE_LYNC_FEDERATIONDOMAIN);
return res;
}
lync.RemoveFederationDomain(org.OrganizationId, domainName);
}
catch (Exception ex)
{
TaskManager.CompleteResultTask(res, LyncErrorCodes.CANNOT_REMOVE_LYNC_FEDERATIONDOMAIN, ex);
return res;
}
TaskManager.CompleteResultTask();
return res;
}
#endregion
#region Private methods
public static UInt64 ConvertPhoneNumberToLong(string ip)
{
return Convert.ToUInt64(ip);
}
public static string ConvertLongToPhoneNumber(UInt64 ip)
{
if (ip == 0)
return "";
return ip.ToString();
}
#endregion
}
}

View file

@ -0,0 +1,97 @@
// 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.Threading;
using System.Collections.Generic;
using System.Text;
using WebsitePanel.Providers;
using WebsitePanel.Providers.Common;
using WebsitePanel.Providers.HostedSolution;
using WebsitePanel.Providers.ResultObjects;
using WebsitePanel.Providers.Lync;
using WebsitePanel.EnterpriseServer.Code.HostedSolution;
namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
{
public class LyncControllerAsync
{
private int lyncServiceId;
private int organizationServiceId;
public int LyncServiceId
{
get { return this.lyncServiceId; }
set { this.lyncServiceId = value; }
}
public int OrganizationServiceId
{
get { return this.organizationServiceId; }
set { this.organizationServiceId = value; }
}
public void Enable_CsComputerAsync()
{
// start asynchronously
Thread t = new Thread(new ThreadStart(Enable_CsComputer));
t.Start();
}
private void Enable_CsComputer()
{
int[] lyncServiceIds;
LyncController.GetLyncServices(lyncServiceId, out lyncServiceIds);
foreach (int id in lyncServiceIds)
{
LyncServer lync = null;
try
{
lync = LyncController.GetLyncServer(id, organizationServiceId);
if (lync != null)
{
lync.ReloadConfiguration();
}
}
catch (Exception exe)
{
TaskManager.WriteError(exe);
continue;
}
}
}
}
}

View file

@ -482,6 +482,66 @@ namespace WebsitePanel.EnterpriseServer
}
}
private static bool DeleteLyncUsers(int itemId)
{
bool successful = false;
try
{
LyncUsersPagedResult res = LyncController.GetLyncUsers(itemId, string.Empty, string.Empty, 0, int.MaxValue);
if (res.IsSuccess)
{
successful = true;
foreach (LyncUser user in res.Value.PageUsers)
{
try
{
ResultObject delUserResult = LyncController.DeleteLyncUser(itemId, user.AccountID);
if (!delUserResult.IsSuccess)
{
StringBuilder sb = new StringBuilder();
foreach (string str in delUserResult.ErrorCodes)
{
sb.Append(str);
sb.Append('\n');
}
throw new ApplicationException(sb.ToString());
}
}
catch (Exception ex)
{
successful = false;
TaskManager.WriteError(ex);
}
}
return successful;
}
else
{
StringBuilder sb = new StringBuilder();
foreach (string str in res.ErrorCodes)
{
sb.Append(str);
sb.Append('\n');
}
throw new ApplicationException(sb.ToString());
}
}
catch (Exception ex)
{
successful = false;
TaskManager.WriteError(ex);
}
return successful;
}
public static int DeleteOrganization(int itemId)
{
// check account
@ -571,6 +631,21 @@ namespace WebsitePanel.EnterpriseServer
TaskManager.WriteError(ex);
}
//Cleanup Lync
try
{
if (!string.IsNullOrEmpty(org.LyncTenantId))
if (DeleteLyncUsers(itemId))
LyncController.DeleteOrganization(itemId);
}
catch (Exception ex)
{
successful = false;
TaskManager.WriteError(ex);
}
//Cleanup Exchange
try
{
if (!string.IsNullOrEmpty(org.GlobalAddressList))
@ -791,6 +866,11 @@ namespace WebsitePanel.EnterpriseServer
stats.AllocatedOCSUsers = cntx.Quotas[Quotas.OCS_USERS].QuotaAllocatedValue;
}
if (cntx.Groups.ContainsKey(ResourceGroups.Lync))
{
stats.CreatedLyncUsers = LyncController.GetLyncUsersCount(org.Id).Value;
stats.AllocatedLyncUsers = cntx.Quotas[Quotas.LYNC_USERS].QuotaAllocatedValue;
}
return stats;
}
@ -1371,7 +1451,7 @@ namespace WebsitePanel.EnterpriseServer
retUser.AccountType = account.AccountType;
retUser.CrmUserId = CRMController.GetCrmUserId(accountId);
retUser.IsOCSUser = DataProvider.CheckOCSUserExists(accountId);
//retUser.IsLyncUser = DataProvider.CheckLyncUserExists(accountId);
retUser.IsLyncUser = DataProvider.CheckLyncUserExists(accountId);
retUser.IsBlackBerryUser = BlackBerryController.CheckBlackBerryUserExists(accountId);
retUser.SubscriberNumber = account.SubscriberNumber;

View file

@ -78,6 +78,7 @@
</Reference>
</ItemGroup>
<ItemGroup>
<Content Include="esLync.asmx" />
<Content Include="esVirtualizationServerForPrivateCloud.asmx" />
<Content Include="Default.aspx" />
<Content Include="ecStorefront.asmx" />
@ -130,6 +131,8 @@
<Compile Include="Code\Common\ServiceUsernameTokenManager.cs" />
<Compile Include="Code\Common\UsernameAssertion.cs" />
<Compile Include="Code\Common\Utils.cs" />
<Compile Include="Code\HostedSolution\LyncController.cs" />
<Compile Include="Code\HostedSolution\LyncControllerAsync.cs" />
<Compile Include="Code\VirtualizationForPrivateCloud\CreateAsyncVMfromVM.cs" />
<Compile Include="Code\VirtualizationForPrivateCloud\CreateServerAsyncWorkerForPrivateCloud.cs" />
<Compile Include="Code\VirtualizationForPrivateCloud\VirtualizationServerControllerForPrivateCloud.cs" />
@ -235,6 +238,10 @@
<Compile Include="Code\WebServers\WebServerController.cs" />
<Compile Include="Code\Wizards\UserCreationWizard.cs" />
<Compile Include="Code\Wizards\WebApplicationsInstaller.cs" />
<Compile Include="esLync.asmx.cs">
<DependentUpon>esLync.asmx</DependentUpon>
<SubType>Component</SubType>
</Compile>
<Compile Include="esVirtualizationServerForPrivateCloud.asmx.cs">
<DependentUpon>esVirtualizationServerForPrivateCloud.asmx</DependentUpon>
<SubType>Component</SubType>

View file

@ -0,0 +1 @@
<%@ WebService Language="C#" CodeBehind="esLync.asmx.cs" Class="WebsitePanel.EnterpriseServer.esLync" %>

View file

@ -0,0 +1,135 @@
// 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.Web.Services;
using WebsitePanel.EnterpriseServer.Code.HostedSolution;
using WebsitePanel.Providers.Common;
using WebsitePanel.Providers.HostedSolution;
using WebsitePanel.Providers.ResultObjects;
using System.Collections.Generic;
namespace WebsitePanel.EnterpriseServer
{
/// <summary>
/// Summary description for esLync
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
public class esLync : WebService
{
[WebMethod]
public LyncUserResult CreateLyncUser(int itemId, int accountId, int lyncUserPlanId)
{
return LyncController.CreateLyncUser(itemId, accountId, lyncUserPlanId);
}
[WebMethod]
public ResultObject DeleteLyncUser(int itemId, int accountId)
{
return LyncController.DeleteLyncUser(itemId, accountId);
}
[WebMethod]
public LyncUsersPagedResult GetLyncUsersPaged(int itemId, string sortColumn, string sortDirection, int startRow, int maximumRows)
{
return LyncController.GetLyncUsers(itemId, sortColumn, sortDirection, startRow, maximumRows);
}
[WebMethod]
public IntResult GetLyncUserCount(int itemId)
{
return LyncController.GetLyncUsersCount(itemId);
}
#region Lync User Plans
[WebMethod]
public List<LyncUserPlan> GetLyncUserPlans(int itemId)
{
return LyncController.GetLyncUserPlans(itemId);
}
[WebMethod]
public LyncUserPlan GetLyncUserPlan(int itemId, int lyncUserPlanId)
{
return LyncController.GetLyncUserPlan(itemId, lyncUserPlanId);
}
[WebMethod]
public int AddLyncUserPlan(int itemId, LyncUserPlan lyncUserPlan)
{
return LyncController.AddLyncUserPlan(itemId, lyncUserPlan);
}
[WebMethod]
public int DeleteLyncUserPlan(int itemId, int lyncUserPlanId)
{
return LyncController.DeleteLyncUserPlan(itemId, lyncUserPlanId);
}
[WebMethod]
public int SetOrganizationDefaultLyncUserPlan(int itemId, int lyncUserPlanId)
{
return LyncController.SetOrganizationDefaultLyncUserPlan(itemId, lyncUserPlanId);
}
[WebMethod]
public LyncUser GetLyncUserGeneralSettings(int itemId, int accountId)
{
return LyncController.GetLyncUserGeneralSettings(itemId, accountId);
}
[WebMethod]
public LyncUserResult SetUserLyncPlan(int itemId, int accountId, int lyncUserPlanId)
{
return LyncController.SetUserLyncPlan(itemId, accountId, lyncUserPlanId);
}
[WebMethod]
public LyncFederationDomain[] GetFederationDomains(int itemId)
{
return LyncController.GetFederationDomains(itemId);
}
[WebMethod]
public LyncUserResult AddFederationDomain(int itemId, string domainName, string proxyFqdn)
{
return LyncController.AddFederationDomain(itemId, domainName, proxyFqdn);
}
[WebMethod]
public LyncUserResult RemoveFederationDomain(int itemId, string domainName)
{
return LyncController.RemoveFederationDomain(itemId, domainName);
}
#endregion
}
}

View file

@ -0,0 +1,51 @@
// 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.Collections.Generic;
using System.Text;
namespace WebsitePanel.Providers.HostedSolution
{
public interface ILyncServer
{
string CreateOrganization(string organizationId, string sipDomain, bool enableConferencing, bool enableConferencingVideo, int maxConferenceSize, bool enabledFederation, bool enabledEnterpriseVoice);
bool DeleteOrganization(string organizationId, string sipDomain);
bool CreateUser(string organizationId, string userUpn, LyncUserPlan plan);
LyncUser GetLyncUserGeneralSettings(string organizationId, string userUpn);
bool SetLyncUserPlan(string organizationId, string userUpn, LyncUserPlan plan);
bool DeleteUser(string userUpn);
LyncFederationDomain[] GetFederationDomains(string organizationId);
bool AddFederationDomain(string organizationId, string domainName, string proxyFqdn);
bool RemoveFederationDomain(string organizationId, string domainName);
void ReloadConfiguration();
}
}

View file

@ -0,0 +1,36 @@
// 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.
namespace WebsitePanel.Providers.HostedSolution
{
public class LyncConstants
{
public const string PoolFQDN = "PoolFQDN";
public const string SimpleUrlRoot = "SimpleUrlRoot";
}
}

View file

@ -0,0 +1,74 @@
// 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.
namespace WebsitePanel.Providers.HostedSolution
{
public class LyncErrorCodes
{
public const string CANNOT_CHECK_IF_LYNC_USER_EXISTS = "CANNOT_CHECK_IF_LYNC_USER_EXISTS";
public const string USER_IS_ALREADY_LYNC_USER = "USER_IS_ALREADY_LYNC_USER";
public const string USER_FIRST_NAME_IS_NOT_SPECIFIED = "USER_FIRST_NAME_IS_NOT_SPECIFIED";
public const string USER_LAST_NAME_IS_NOT_SPECIFIED = "USER_LAST_NAME_IS_NOT_SPECIFIED";
public const string CANNOT_GET_USER_GENERAL_SETTINGS = "CANNOT_GET_USER_GENERAL_SETTINGS";
public const string CANNOT_ADD_LYNC_USER_TO_DATABASE = "CANNOT_ADD_LYNC_USER_TO_DATABASE";
public const string GET_LYNC_USER_COUNT = "GET_LYNC_USER_COUNT";
public const string GET_LYNC_USERS = "GET_LYNC_USERS";
public const string CANNOT_DELETE_LYNC_USER_FROM_METADATA = "CANNOT_DELETE_LYNC_USER_FROM_METADATA";
public const string CANNOT_DELETE_LYNC_USER = "CANNOT_DELETE_LYNC_USER";
public const string CANNOT_GET_LYNC_PROXY = "CANNOT_GET_LYNC_PROXY";
public const string USER_QUOTA_HAS_BEEN_REACHED = "USER_QUOTA_HAS_BEEN_REACHED";
public const string CANNOT_CHECK_QUOTA = "CANNOT_CHECK_QUOTA";
public const string CANNOT_SET_DEFAULT_SETTINGS = "CANNOT_SET_DEFAULT_SETTINGS";
public const string CANNOT_ADD_LYNC_USER = "CANNOT_ADD_LYNC_USER";
public const string CANNOT_UPDATE_LYNC_USER = "CANNOT_UPDATE_LYNC_USER";
public const string CANNOT_ENABLE_ORG = "CANNOT_ENABLE_ORG";
public const string NOT_AUTHORIZED = "NOT_AUTHORIZED";
public const string CANNOT_ADD_LYNC_FEDERATIONDOMAIN = "CANNOT_ADD_LYNC_FEDERATIONDOMAIN";
public const string CANNOT_REMOVE_LYNC_FEDERATIONDOMAIN = "CANNOT_REMOVE_LYNC_FEDERATIONDOMAIN";
}
}

View file

@ -0,0 +1,66 @@
// 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.Collections.Generic;
using System.Text;
namespace WebsitePanel.Providers.HostedSolution
{
public class LyncFederationDomain
{
string domainName;
string comment;
bool markForMonitoring;
string proxyFqdn;
public string DomainName
{
get { return this.domainName; }
set { this.domainName = value; }
}
public string Comment
{
get { return this.comment; }
set { this.comment = value; }
}
public bool MarkForMonitoring
{
get { return this.markForMonitoring; }
set { this.markForMonitoring = value; }
}
public string ProxyFqdn
{
get { return this.proxyFqdn; }
set { this.proxyFqdn = value; }
}
}
}

View file

@ -0,0 +1,45 @@
// 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.Collections.Generic;
using System.Text;
namespace WebsitePanel.Providers.HostedSolution
{
public class LyncUser
{
public string PrimaryUri { get; set; }
public string PrimaryEmailAddress { get; set; }
public string DisplayName { get; set; }
public string LineUri { get; set; }
public int AccountID { get; set; }
public int LyncUserPlanId { get; set; }
public string LyncUserPlanName { get; set; }
}
}

View file

@ -0,0 +1,112 @@
// 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.Collections.Generic;
using System.Text;
namespace WebsitePanel.Providers.HostedSolution
{
public class LyncUserPlan
{
int lyncUserPlanId;
string lyncUserPlanName;
bool im;
bool federation;
bool conferencing;
bool enterpriseVoice;
bool mobility;
bool mobilityEnableOutsideVoice;
LyncVoicePolicyType voicePolicy;
bool isDefault;
public int LyncUserPlanId
{
get { return this.lyncUserPlanId; }
set { this.lyncUserPlanId = value; }
}
public string LyncUserPlanName
{
get { return this.lyncUserPlanName; }
set { this.lyncUserPlanName = value; }
}
public bool IM
{
get { return this.im; }
set { this.im = value; }
}
public bool IsDefault
{
get { return this.isDefault; }
set { this.isDefault = value; }
}
public bool Federation
{
get { return this.federation; }
set { this.federation = value; }
}
public bool Conferencing
{
get { return this.conferencing; }
set { this.conferencing = value; }
}
public bool EnterpriseVoice
{
get { return this.enterpriseVoice; }
set { this.enterpriseVoice = value; }
}
public bool Mobility
{
get { return this.mobility; }
set { this.mobility = value; }
}
public bool MobilityEnableOutsideVoice
{
get { return this.mobilityEnableOutsideVoice; }
set { this.mobilityEnableOutsideVoice = value; }
}
public LyncVoicePolicyType VoicePolicy
{
get { return this.voicePolicy; }
set { this.voicePolicy = value; }
}
}
}

View file

@ -0,0 +1,50 @@
// 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.

namespace WebsitePanel.Providers.HostedSolution
{
public class LyncUsersPaged
{
int recordsCount;
LyncUser[] pageUsers;
public int RecordsCount
{
get { return recordsCount; }
set { recordsCount = value; }
}
public LyncUser[] PageUsers
{
get { return pageUsers; }
set { pageUsers = value; }
}
}
}

View file

@ -0,0 +1,39 @@
// 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.
namespace WebsitePanel.Providers.HostedSolution
{
public enum LyncVoicePolicyType
{
None = 0,
Emergency = 1,
National = 2,
Mobile = 3,
International = 4
}
}

View file

@ -173,6 +173,8 @@ namespace WebsitePanel.Providers.HostedSolution
public int CreatedOCSUsers { get; set; }
public int AllocatedOCSUsers { get; set; }
public int CreatedLyncUsers { get; set; }
public int AllocatedLyncUsers { get; set; }
}
}

View file

@ -0,0 +1,36 @@
// 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 WebsitePanel.Providers.HostedSolution;
namespace WebsitePanel.Providers.ResultObjects
{
public class LyncUserResult : ValueResultObject<LyncUser>
{
}
}

View file

@ -0,0 +1,36 @@
// 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 WebsitePanel.Providers.HostedSolution;
namespace WebsitePanel.Providers.ResultObjects
{
public class LyncUsersPagedResult : ValueResultObject<LyncUsersPaged>
{
}
}

View file

@ -80,6 +80,14 @@
<Compile Include="HostedSolution\BlackBerryStatsItem.cs" />
<Compile Include="HostedSolution\BlackBerryUserDeleteState.cs" />
<Compile Include="HostedSolution\ExchangeMailboxPlan.cs" />
<Compile Include="HostedSolution\ILyncServer.cs" />
<Compile Include="HostedSolution\LyncConstants.cs" />
<Compile Include="HostedSolution\LyncErrorCodes.cs" />
<Compile Include="HostedSolution\LyncFederationDomain.cs" />
<Compile Include="HostedSolution\LyncUser.cs" />
<Compile Include="HostedSolution\LyncUserPlan.cs" />
<Compile Include="HostedSolution\LyncUsersPaged.cs" />
<Compile Include="HostedSolution\LyncVoicePolicyType.cs" />
<Compile Include="HostedSolution\TransactionAction.cs" />
<Compile Include="ResultObjects\HeliconApe.cs" />
<Compile Include="HostedSolution\ExchangeMobileDevice.cs" />
@ -118,6 +126,8 @@
<Compile Include="ResultObjects\IntResult.cs" />
<Compile Include="ResultObjects\JobsValue.cs" />
<Compile Include="HostedSolution\OCSUsersPaged.cs" />
<Compile Include="ResultObjects\LyncUserResult.cs" />
<Compile Include="ResultObjects\LyncUsersPagedResult.cs" />
<Compile Include="ResultObjects\OCSUserResult.cs" />
<Compile Include="ResultObjects\OCSUsersPagedResult.cs" />
<Compile Include="ResultObjects\OrganizationResult.cs" />

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,97 @@
// 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.Collections.Generic;
namespace WebsitePanel.Providers.HostedSolution
{
internal class LyncTransaction
{
List<TransactionAction> actions = null;
public LyncTransaction()
{
actions = new List<TransactionAction>();
}
internal List<TransactionAction> Actions
{
get { return actions; }
}
internal void RegisterNewSipDomain(string id)
{
TransactionAction action = new TransactionAction();
action.ActionType = TransactionAction.TransactionActionTypes.LyncNewSipDomain;
action.Id = id;
Actions.Add(action);
}
internal void RegisterNewSimpleUrl(string sipDomain, string tenantID)
{
TransactionAction action = new TransactionAction();
action.ActionType = TransactionAction.TransactionActionTypes.LyncNewSimpleUrl;
action.Id = sipDomain;
action.Account = tenantID;
Actions.Add(action);
}
internal void RegisterNewConferencingPolicy(string id)
{
TransactionAction action = new TransactionAction();
action.ActionType = TransactionAction.TransactionActionTypes.LyncNewConferencingPolicy;
action.Id = id;
Actions.Add(action);
}
internal void RegisterNewCsExternalAccessPolicy(string id)
{
TransactionAction action = new TransactionAction();
action.ActionType = TransactionAction.TransactionActionTypes.LyncNewExternalAccessPolicy;
action.Id = id;
Actions.Add(action);
}
internal void RegisterNewCsMobilityPolicy(string id)
{
TransactionAction action = new TransactionAction();
action.ActionType = TransactionAction.TransactionActionTypes.LyncNewMobilityPolicy;
action.Id = id;
Actions.Add(action);
}
internal void RegisterNewCsUser(string id)
{
TransactionAction action = new TransactionAction();
action.ActionType = TransactionAction.TransactionActionTypes.LyncNewUser;
action.Id = id;
Actions.Add(action);
}
}
}

View file

@ -106,6 +106,15 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Lib\References\Microsoft\Microsoft.Exchange.Net.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Rtc.Management.Core">
<HintPath>..\..\Lib\References\Microsoft\Microsoft.Rtc.Management.Core.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Rtc.Management.Hosted">
<HintPath>..\..\Lib\References\Microsoft\Microsoft.Rtc.Management.Hosted.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Rtc.Management.WritableConfig">
<HintPath>..\..\Lib\References\Microsoft\Microsoft.Rtc.Management.WritableConfig.dll</HintPath>
</Reference>
<Reference Include="Microsoft.SharePoint">
<HintPath>..\..\Lib\References\Microsoft\Microsoft.SharePoint.dll</HintPath>
<Private>False</Private>
@ -133,6 +142,8 @@
<Compile Include="Exchange2010.cs" />
<Compile Include="Exchange2010SP2.cs" />
<Compile Include="HostedSharePointServer2010.cs" />
<Compile Include="Lync2010.cs" />
<Compile Include="LyncTransaction.cs" />
<Compile Include="OCSEdge2007R2.cs" />
<Compile Include="OCS2007R2.cs" />
<Compile Include="CRMProvider.cs" />

View file

@ -0,0 +1,912 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.5456
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
//
// This source code was auto-generated by wsdl, Version=2.0.50727.42.
//
using WebsitePanel.Providers.HostedSolution;
namespace WebsitePanel.Providers.Lync
{
using System.Xml.Serialization;
using System.Web.Services;
using System.ComponentModel;
using System.Web.Services.Protocols;
using System;
using System.Diagnostics;
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name = "LyncServerSoap", Namespace = "http://smbsaas/websitepanel/server/")]
public partial class LyncServer : Microsoft.Web.Services3.WebServicesClientProtocol
{
public ServiceProviderSettingsSoapHeader ServiceProviderSettingsSoapHeaderValue;
private System.Threading.SendOrPostCallback CreateOrganizationOperationCompleted;
private System.Threading.SendOrPostCallback DeleteOrganizationOperationCompleted;
private System.Threading.SendOrPostCallback CreateUserOperationCompleted;
private System.Threading.SendOrPostCallback GetLyncUserGeneralSettingsOperationCompleted;
private System.Threading.SendOrPostCallback SetLyncUserPlanOperationCompleted;
private System.Threading.SendOrPostCallback DeleteUserOperationCompleted;
private System.Threading.SendOrPostCallback GetFederationDomainsOperationCompleted;
private System.Threading.SendOrPostCallback AddFederationDomainOperationCompleted;
private System.Threading.SendOrPostCallback RemoveFederationDomainOperationCompleted;
private System.Threading.SendOrPostCallback ReloadConfigurationOperationCompleted;
/// <remarks/>
public LyncServer()
{
this.Url = "http://localhost:9003/LyncServer.asmx";
}
/// <remarks/>
public event CreateOrganizationCompletedEventHandler CreateOrganizationCompleted;
/// <remarks/>
public event DeleteOrganizationCompletedEventHandler DeleteOrganizationCompleted;
/// <remarks/>
public event CreateUserCompletedEventHandler CreateUserCompleted;
/// <remarks/>
public event GetLyncUserGeneralSettingsCompletedEventHandler GetLyncUserGeneralSettingsCompleted;
/// <remarks/>
public event SetLyncUserPlanCompletedEventHandler SetLyncUserPlanCompleted;
/// <remarks/>
public event DeleteUserCompletedEventHandler DeleteUserCompleted;
/// <remarks/>
public event GetFederationDomainsCompletedEventHandler GetFederationDomainsCompleted;
/// <remarks/>
public event AddFederationDomainCompletedEventHandler AddFederationDomainCompleted;
/// <remarks/>
public event RemoveFederationDomainCompletedEventHandler RemoveFederationDomainCompleted;
/// <remarks/>
public event ReloadConfigurationCompletedEventHandler ReloadConfigurationCompleted;
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CreateOrganization", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public string CreateOrganization(string organizationId, string sipDomain, bool enableConferencing, bool enableConferencingVideo, int maxConferenceSize, bool enabledFederation, bool enabledEnterpriseVoice)
{
object[] results = this.Invoke("CreateOrganization", new object[] {
organizationId,
sipDomain,
enableConferencing,
enableConferencingVideo,
maxConferenceSize,
enabledFederation,
enabledEnterpriseVoice});
return ((string)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginCreateOrganization(string organizationId, string sipDomain, bool enableConferencing, bool enableConferencingVideo, int maxConferenceSize, bool enabledFederation, bool enabledEnterpriseVoice, System.AsyncCallback callback, object asyncState)
{
return this.BeginInvoke("CreateOrganization", new object[] {
organizationId,
sipDomain,
enableConferencing,
enableConferencingVideo,
maxConferenceSize,
enabledFederation,
enabledEnterpriseVoice}, callback, asyncState);
}
/// <remarks/>
public string EndCreateOrganization(System.IAsyncResult asyncResult)
{
object[] results = this.EndInvoke(asyncResult);
return ((string)(results[0]));
}
/// <remarks/>
public void CreateOrganizationAsync(string organizationId, string sipDomain, bool enableConferencing, bool enableConferencingVideo, int maxConferenceSize, bool enabledFederation, bool enabledEnterpriseVoice)
{
this.CreateOrganizationAsync(organizationId, sipDomain, enableConferencing, enableConferencingVideo, maxConferenceSize, enabledFederation, enabledEnterpriseVoice, null);
}
/// <remarks/>
public void CreateOrganizationAsync(string organizationId, string sipDomain, bool enableConferencing, bool enableConferencingVideo, int maxConferenceSize, bool enabledFederation, bool enabledEnterpriseVoice, object userState)
{
if ((this.CreateOrganizationOperationCompleted == null))
{
this.CreateOrganizationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateOrganizationOperationCompleted);
}
this.InvokeAsync("CreateOrganization", new object[] {
organizationId,
sipDomain,
enableConferencing,
enableConferencingVideo,
maxConferenceSize,
enabledFederation,
enabledEnterpriseVoice}, this.CreateOrganizationOperationCompleted, userState);
}
private void OnCreateOrganizationOperationCompleted(object arg)
{
if ((this.CreateOrganizationCompleted != null))
{
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.CreateOrganizationCompleted(this, new CreateOrganizationCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/DeleteOrganization", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public bool DeleteOrganization(string organizationId, string sipDomain)
{
object[] results = this.Invoke("DeleteOrganization", new object[] {
organizationId,
sipDomain});
return ((bool)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginDeleteOrganization(string organizationId, string sipDomain, System.AsyncCallback callback, object asyncState)
{
return this.BeginInvoke("DeleteOrganization", new object[] {
organizationId,
sipDomain}, callback, asyncState);
}
/// <remarks/>
public bool EndDeleteOrganization(System.IAsyncResult asyncResult)
{
object[] results = this.EndInvoke(asyncResult);
return ((bool)(results[0]));
}
/// <remarks/>
public void DeleteOrganizationAsync(string organizationId, string sipDomain)
{
this.DeleteOrganizationAsync(organizationId, sipDomain, null);
}
/// <remarks/>
public void DeleteOrganizationAsync(string organizationId, string sipDomain, object userState)
{
if ((this.DeleteOrganizationOperationCompleted == null))
{
this.DeleteOrganizationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteOrganizationOperationCompleted);
}
this.InvokeAsync("DeleteOrganization", new object[] {
organizationId,
sipDomain}, this.DeleteOrganizationOperationCompleted, userState);
}
private void OnDeleteOrganizationOperationCompleted(object arg)
{
if ((this.DeleteOrganizationCompleted != null))
{
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.DeleteOrganizationCompleted(this, new DeleteOrganizationCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CreateUser", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public bool CreateUser(string organizationId, string userUpn, LyncUserPlan plan)
{
object[] results = this.Invoke("CreateUser", new object[] {
organizationId,
userUpn,
plan});
return ((bool)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginCreateUser(string organizationId, string userUpn, LyncUserPlan plan, System.AsyncCallback callback, object asyncState)
{
return this.BeginInvoke("CreateUser", new object[] {
organizationId,
userUpn,
plan}, callback, asyncState);
}
/// <remarks/>
public bool EndCreateUser(System.IAsyncResult asyncResult)
{
object[] results = this.EndInvoke(asyncResult);
return ((bool)(results[0]));
}
/// <remarks/>
public void CreateUserAsync(string organizationId, string userUpn, LyncUserPlan plan)
{
this.CreateUserAsync(organizationId, userUpn, plan, null);
}
/// <remarks/>
public void CreateUserAsync(string organizationId, string userUpn, LyncUserPlan plan, object userState)
{
if ((this.CreateUserOperationCompleted == null))
{
this.CreateUserOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateUserOperationCompleted);
}
this.InvokeAsync("CreateUser", new object[] {
organizationId,
userUpn,
plan}, this.CreateUserOperationCompleted, userState);
}
private void OnCreateUserOperationCompleted(object arg)
{
if ((this.CreateUserCompleted != null))
{
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.CreateUserCompleted(this, new CreateUserCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetLyncUserGeneralSettings", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public LyncUser GetLyncUserGeneralSettings(string organizationId, string userUpn)
{
object[] results = this.Invoke("GetLyncUserGeneralSettings", new object[] {
organizationId,
userUpn});
return ((LyncUser)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginGetLyncUserGeneralSettings(string organizationId, string userUpn, System.AsyncCallback callback, object asyncState)
{
return this.BeginInvoke("GetLyncUserGeneralSettings", new object[] {
organizationId,
userUpn}, callback, asyncState);
}
/// <remarks/>
public LyncUser EndGetLyncUserGeneralSettings(System.IAsyncResult asyncResult)
{
object[] results = this.EndInvoke(asyncResult);
return ((LyncUser)(results[0]));
}
/// <remarks/>
public void GetLyncUserGeneralSettingsAsync(string organizationId, string userUpn)
{
this.GetLyncUserGeneralSettingsAsync(organizationId, userUpn, null);
}
/// <remarks/>
public void GetLyncUserGeneralSettingsAsync(string organizationId, string userUpn, object userState)
{
if ((this.GetLyncUserGeneralSettingsOperationCompleted == null))
{
this.GetLyncUserGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetLyncUserGeneralSettingsOperationCompleted);
}
this.InvokeAsync("GetLyncUserGeneralSettings", new object[] {
organizationId,
userUpn}, this.GetLyncUserGeneralSettingsOperationCompleted, userState);
}
private void OnGetLyncUserGeneralSettingsOperationCompleted(object arg)
{
if ((this.GetLyncUserGeneralSettingsCompleted != null))
{
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.GetLyncUserGeneralSettingsCompleted(this, new GetLyncUserGeneralSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetLyncUserPlan", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public bool SetLyncUserPlan(string organizationId, string userUpn, LyncUserPlan plan)
{
object[] results = this.Invoke("SetLyncUserPlan", new object[] {
organizationId,
userUpn,
plan});
return ((bool)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginSetLyncUserPlan(string organizationId, string userUpn, LyncUserPlan plan, System.AsyncCallback callback, object asyncState)
{
return this.BeginInvoke("SetLyncUserPlan", new object[] {
organizationId,
userUpn,
plan}, callback, asyncState);
}
/// <remarks/>
public bool EndSetLyncUserPlan(System.IAsyncResult asyncResult)
{
object[] results = this.EndInvoke(asyncResult);
return ((bool)(results[0]));
}
/// <remarks/>
public void SetLyncUserPlanAsync(string organizationId, string userUpn, LyncUserPlan plan)
{
this.SetLyncUserPlanAsync(organizationId, userUpn, plan, null);
}
/// <remarks/>
public void SetLyncUserPlanAsync(string organizationId, string userUpn, LyncUserPlan plan, object userState)
{
if ((this.SetLyncUserPlanOperationCompleted == null))
{
this.SetLyncUserPlanOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetLyncUserPlanOperationCompleted);
}
this.InvokeAsync("SetLyncUserPlan", new object[] {
organizationId,
userUpn,
plan}, this.SetLyncUserPlanOperationCompleted, userState);
}
private void OnSetLyncUserPlanOperationCompleted(object arg)
{
if ((this.SetLyncUserPlanCompleted != null))
{
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.SetLyncUserPlanCompleted(this, new SetLyncUserPlanCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/DeleteUser", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public bool DeleteUser(string userUpn)
{
object[] results = this.Invoke("DeleteUser", new object[] {
userUpn});
return ((bool)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginDeleteUser(string userUpn, System.AsyncCallback callback, object asyncState)
{
return this.BeginInvoke("DeleteUser", new object[] {
userUpn}, callback, asyncState);
}
/// <remarks/>
public bool EndDeleteUser(System.IAsyncResult asyncResult)
{
object[] results = this.EndInvoke(asyncResult);
return ((bool)(results[0]));
}
/// <remarks/>
public void DeleteUserAsync(string userUpn)
{
this.DeleteUserAsync(userUpn, null);
}
/// <remarks/>
public void DeleteUserAsync(string userUpn, object userState)
{
if ((this.DeleteUserOperationCompleted == null))
{
this.DeleteUserOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteUserOperationCompleted);
}
this.InvokeAsync("DeleteUser", new object[] {
userUpn}, this.DeleteUserOperationCompleted, userState);
}
private void OnDeleteUserOperationCompleted(object arg)
{
if ((this.DeleteUserCompleted != null))
{
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.DeleteUserCompleted(this, new DeleteUserCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetFederationDomains", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public LyncFederationDomain[] GetFederationDomains(string organizationId)
{
object[] results = this.Invoke("GetFederationDomains", new object[] {
organizationId});
return ((LyncFederationDomain[])(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginGetFederationDomains(string organizationId, System.AsyncCallback callback, object asyncState)
{
return this.BeginInvoke("GetFederationDomains", new object[] {
organizationId}, callback, asyncState);
}
/// <remarks/>
public LyncFederationDomain[] EndGetFederationDomains(System.IAsyncResult asyncResult)
{
object[] results = this.EndInvoke(asyncResult);
return ((LyncFederationDomain[])(results[0]));
}
/// <remarks/>
public void GetFederationDomainsAsync(string organizationId)
{
this.GetFederationDomainsAsync(organizationId, null);
}
/// <remarks/>
public void GetFederationDomainsAsync(string organizationId, object userState)
{
if ((this.GetFederationDomainsOperationCompleted == null))
{
this.GetFederationDomainsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetFederationDomainsOperationCompleted);
}
this.InvokeAsync("GetFederationDomains", new object[] {
organizationId}, this.GetFederationDomainsOperationCompleted, userState);
}
private void OnGetFederationDomainsOperationCompleted(object arg)
{
if ((this.GetFederationDomainsCompleted != null))
{
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.GetFederationDomainsCompleted(this, new GetFederationDomainsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/AddFederationDomain", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public bool AddFederationDomain(string organizationId, string domainName, string proxyFqdn)
{
object[] results = this.Invoke("AddFederationDomain", new object[] {
organizationId,
domainName,
proxyFqdn});
return ((bool)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginAddFederationDomain(string organizationId, string domainName, string proxyFqdn, System.AsyncCallback callback, object asyncState)
{
return this.BeginInvoke("AddFederationDomain", new object[] {
organizationId,
domainName,
proxyFqdn}, callback, asyncState);
}
/// <remarks/>
public bool EndAddFederationDomain(System.IAsyncResult asyncResult)
{
object[] results = this.EndInvoke(asyncResult);
return ((bool)(results[0]));
}
/// <remarks/>
public void AddFederationDomainAsync(string organizationId, string domainName, string proxyFqdn)
{
this.AddFederationDomainAsync(organizationId, domainName, proxyFqdn, null);
}
/// <remarks/>
public void AddFederationDomainAsync(string organizationId, string domainName, string proxyFqdn, object userState)
{
if ((this.AddFederationDomainOperationCompleted == null))
{
this.AddFederationDomainOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddFederationDomainOperationCompleted);
}
this.InvokeAsync("AddFederationDomain", new object[] {
organizationId,
domainName,
proxyFqdn}, this.AddFederationDomainOperationCompleted, userState);
}
private void OnAddFederationDomainOperationCompleted(object arg)
{
if ((this.AddFederationDomainCompleted != null))
{
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.AddFederationDomainCompleted(this, new AddFederationDomainCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/RemoveFederationDomain", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public bool RemoveFederationDomain(string organizationId, string domainName)
{
object[] results = this.Invoke("RemoveFederationDomain", new object[] {
organizationId,
domainName});
return ((bool)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginRemoveFederationDomain(string organizationId, string domainName, System.AsyncCallback callback, object asyncState)
{
return this.BeginInvoke("RemoveFederationDomain", new object[] {
organizationId,
domainName}, callback, asyncState);
}
/// <remarks/>
public bool EndRemoveFederationDomain(System.IAsyncResult asyncResult)
{
object[] results = this.EndInvoke(asyncResult);
return ((bool)(results[0]));
}
/// <remarks/>
public void RemoveFederationDomainAsync(string organizationId, string domainName)
{
this.RemoveFederationDomainAsync(organizationId, domainName, null);
}
/// <remarks/>
public void RemoveFederationDomainAsync(string organizationId, string domainName, object userState)
{
if ((this.RemoveFederationDomainOperationCompleted == null))
{
this.RemoveFederationDomainOperationCompleted = new System.Threading.SendOrPostCallback(this.OnRemoveFederationDomainOperationCompleted);
}
this.InvokeAsync("RemoveFederationDomain", new object[] {
organizationId,
domainName}, this.RemoveFederationDomainOperationCompleted, userState);
}
private void OnRemoveFederationDomainOperationCompleted(object arg)
{
if ((this.RemoveFederationDomainCompleted != null))
{
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.RemoveFederationDomainCompleted(this, new RemoveFederationDomainCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/ReloadConfiguration", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public void ReloadConfiguration()
{
this.Invoke("ReloadConfiguration", new object[0]);
}
/// <remarks/>
public System.IAsyncResult BeginReloadConfiguration(System.AsyncCallback callback, object asyncState)
{
return this.BeginInvoke("ReloadConfiguration", new object[0], callback, asyncState);
}
/// <remarks/>
public void EndReloadConfiguration(System.IAsyncResult asyncResult)
{
this.EndInvoke(asyncResult);
}
/// <remarks/>
public void ReloadConfigurationAsync()
{
this.ReloadConfigurationAsync(null);
}
/// <remarks/>
public void ReloadConfigurationAsync(object userState)
{
if ((this.ReloadConfigurationOperationCompleted == null))
{
this.ReloadConfigurationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnReloadConfigurationOperationCompleted);
}
this.InvokeAsync("ReloadConfiguration", new object[0], this.ReloadConfigurationOperationCompleted, userState);
}
private void OnReloadConfigurationOperationCompleted(object arg)
{
if ((this.ReloadConfigurationCompleted != null))
{
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.ReloadConfigurationCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
public new void CancelAsync(object userState)
{
base.CancelAsync(userState);
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void CreateOrganizationCompletedEventHandler(object sender, CreateOrganizationCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class CreateOrganizationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
{
private object[] results;
internal CreateOrganizationCompletedEventArgs(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 DeleteOrganizationCompletedEventHandler(object sender, DeleteOrganizationCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class DeleteOrganizationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
{
private object[] results;
internal DeleteOrganizationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState)
{
this.results = results;
}
/// <remarks/>
public bool Result
{
get
{
this.RaiseExceptionIfNecessary();
return ((bool)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void CreateUserCompletedEventHandler(object sender, CreateUserCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class CreateUserCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
{
private object[] results;
internal CreateUserCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState)
{
this.results = results;
}
/// <remarks/>
public bool Result
{
get
{
this.RaiseExceptionIfNecessary();
return ((bool)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void GetLyncUserGeneralSettingsCompletedEventHandler(object sender, GetLyncUserGeneralSettingsCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetLyncUserGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
{
private object[] results;
internal GetLyncUserGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState)
{
this.results = results;
}
/// <remarks/>
public LyncUser Result
{
get
{
this.RaiseExceptionIfNecessary();
return ((LyncUser)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void SetLyncUserPlanCompletedEventHandler(object sender, SetLyncUserPlanCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class SetLyncUserPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
{
private object[] results;
internal SetLyncUserPlanCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState)
{
this.results = results;
}
/// <remarks/>
public bool Result
{
get
{
this.RaiseExceptionIfNecessary();
return ((bool)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void DeleteUserCompletedEventHandler(object sender, DeleteUserCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class DeleteUserCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
{
private object[] results;
internal DeleteUserCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState)
{
this.results = results;
}
/// <remarks/>
public bool Result
{
get
{
this.RaiseExceptionIfNecessary();
return ((bool)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void GetFederationDomainsCompletedEventHandler(object sender, GetFederationDomainsCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetFederationDomainsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
{
private object[] results;
internal GetFederationDomainsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState)
{
this.results = results;
}
/// <remarks/>
public LyncFederationDomain[] Result
{
get
{
this.RaiseExceptionIfNecessary();
return ((LyncFederationDomain[])(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void AddFederationDomainCompletedEventHandler(object sender, AddFederationDomainCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class AddFederationDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
{
private object[] results;
internal AddFederationDomainCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState)
{
this.results = results;
}
/// <remarks/>
public bool Result
{
get
{
this.RaiseExceptionIfNecessary();
return ((bool)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void RemoveFederationDomainCompletedEventHandler(object sender, RemoveFederationDomainCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class RemoveFederationDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
{
private object[] results;
internal RemoveFederationDomainCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState)
{
this.results = results;
}
/// <remarks/>
public bool Result
{
get
{
this.RaiseExceptionIfNecessary();
return ((bool)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void ReloadConfigurationCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
}

View file

@ -81,6 +81,7 @@
<Compile Include="ExchangeServerProxy.cs" />
<Compile Include="FtpServerProxy.cs" />
<Compile Include="HostedSharePointServerProxy.cs" />
<Compile Include="LyncServerProxy.cs" />
<Compile Include="OCSEdgeServerProxy.cs" />
<Compile Include="OCSServerProxy.cs" />
<Compile Include="OrganizationProxy.cs" />

View file

@ -0,0 +1 @@
<%@ WebService Language="C#" CodeBehind="LyncServer.asmx.cs" Class="WebsitePanel.Server.LyncServer" %>

View file

@ -0,0 +1,236 @@
// 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.ComponentModel;
using System.Web.Services;
using System.Web.Services.Protocols;
using WebsitePanel.Providers;
using WebsitePanel.Providers.HostedSolution;
using WebsitePanel.Server.Utils;
using Microsoft.Web.Services3;
namespace WebsitePanel.Server
{
/// <summary>
/// OCS Web Service
/// </summary>
[WebService(Namespace = "http://smbsaas/websitepanel/server/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[Policy("ServerPolicy")]
[ToolboxItem(false)]
public class LyncServer : HostingServiceProviderWebService
{
private ILyncServer Lync
{
get { return (ILyncServer)Provider; }
}
#region Organization
[WebMethod, SoapHeader("settings")]
public string CreateOrganization(string organizationId, string sipDomain, bool enableConferencing, bool enableConferencingVideo, int maxConferenceSize, bool enabledFederation, bool enabledEnterpriseVoice)
{
try
{
Log.WriteStart("{0}.CreateOrganization", ProviderSettings.ProviderName);
string ret = Lync.CreateOrganization(organizationId, sipDomain, enableConferencing, enableConferencingVideo, maxConferenceSize, enabledFederation, enabledEnterpriseVoice);
Log.WriteEnd("{0}.CreateOrganization", ProviderSettings.ProviderName);
return ret;
}
catch (Exception ex)
{
Log.WriteError(String.Format("Error: {0}.CreateOrganization", ProviderSettings.ProviderName), ex);
throw;
}
}
[WebMethod, SoapHeader("settings")]
public bool DeleteOrganization(string organizationId, string sipDomain)
{
try
{
Log.WriteStart("{0}.DeleteOrganization", ProviderSettings.ProviderName);
bool ret = Lync.DeleteOrganization(organizationId, sipDomain);
Log.WriteEnd("{0}.DeleteOrganization", ProviderSettings.ProviderName);
return ret;
}
catch (Exception ex)
{
Log.WriteError(String.Format("Error: {0}.DeleteOrganization", ProviderSettings.ProviderName), ex);
throw;
}
}
#endregion
#region Users
[WebMethod, SoapHeader("settings")]
public bool CreateUser(string organizationId, string userUpn, LyncUserPlan plan)
{
try
{
Log.WriteStart("{0}.CreateUser", ProviderSettings.ProviderName);
bool ret = Lync.CreateUser(organizationId, userUpn, plan);
Log.WriteEnd("{0}.CreateUser", ProviderSettings.ProviderName);
return ret;
}
catch (Exception ex)
{
Log.WriteError(String.Format("Error: {0}.CreateUser", ProviderSettings.ProviderName), ex);
throw;
}
}
[WebMethod, SoapHeader("settings")]
public LyncUser GetLyncUserGeneralSettings(string organizationId, string userUpn)
{
try
{
Log.WriteStart("{0}.GetLyncUserGeneralSettings", ProviderSettings.ProviderName);
LyncUser ret = Lync.GetLyncUserGeneralSettings(organizationId, userUpn);
Log.WriteEnd("{0}.GetLyncUserGeneralSettings", ProviderSettings.ProviderName);
return ret;
}
catch (Exception ex)
{
Log.WriteError(String.Format("Error: {0}.GetLyncUserGeneralSettings", ProviderSettings.ProviderName), ex);
throw;
}
}
[WebMethod, SoapHeader("settings")]
public bool SetLyncUserPlan(string organizationId, string userUpn, LyncUserPlan plan)
{
try
{
Log.WriteStart("{0}.SetLyncUserPlan", ProviderSettings.ProviderName);
bool ret = Lync.SetLyncUserPlan(organizationId, userUpn, plan);
Log.WriteEnd("{0}.SetLyncUserPlan", ProviderSettings.ProviderName);
return ret;
}
catch (Exception ex)
{
Log.WriteError(String.Format("Error: {0}.SetLyncUserPlan", ProviderSettings.ProviderName), ex);
throw;
}
}
[WebMethod, SoapHeader("settings")]
public bool DeleteUser(string userUpn)
{
try
{
Log.WriteStart("{0}.DeleteUser", ProviderSettings.ProviderName);
bool ret = Lync.DeleteUser(userUpn);
Log.WriteEnd("{0}.DeleteUser", ProviderSettings.ProviderName);
return ret;
}
catch (Exception ex)
{
Log.WriteError(String.Format("Error: {0}.DeleteUser", ProviderSettings.ProviderName), ex);
throw;
}
}
#endregion
#region Federation
[WebMethod, SoapHeader("settings")]
public LyncFederationDomain[] GetFederationDomains(string organizationId)
{
try
{
Log.WriteStart("{0}.GetFederationDomains", ProviderSettings.ProviderName);
LyncFederationDomain[] ret = Lync.GetFederationDomains(organizationId);
Log.WriteEnd("{0}.GetFederationDomains", ProviderSettings.ProviderName);
return ret;
}
catch (Exception ex)
{
Log.WriteError(String.Format("Error: {0}.GetFederationDomains", ProviderSettings.ProviderName), ex);
throw;
}
}
[WebMethod, SoapHeader("settings")]
public bool AddFederationDomain(string organizationId, string domainName, string proxyFqdn)
{
try
{
Log.WriteStart("{0}.AddFederationDomain", ProviderSettings.ProviderName);
bool ret = Lync.AddFederationDomain(organizationId, domainName, proxyFqdn);
Log.WriteEnd("{0}.AddFederationDomain", ProviderSettings.ProviderName);
return ret;
}
catch (Exception ex)
{
Log.WriteError(String.Format("Error: {0}.AddFederationDomain", ProviderSettings.ProviderName), ex);
throw;
}
}
[WebMethod, SoapHeader("settings")]
public bool RemoveFederationDomain(string organizationId, string domainName)
{
try
{
Log.WriteStart("{0}.RemoveFederationDomain", ProviderSettings.ProviderName);
bool ret = Lync.RemoveFederationDomain(organizationId, domainName);
Log.WriteEnd("{0}.RemoveFederationDomain", ProviderSettings.ProviderName);
return ret;
}
catch (Exception ex)
{
Log.WriteError(String.Format("Error: {0}.RemoveFederationDomain", ProviderSettings.ProviderName), ex);
throw;
}
}
#endregion
[WebMethod, SoapHeader("settings")]
public void ReloadConfiguration()
{
try
{
Log.WriteStart("{0}.ReloadConfiguration", ProviderSettings.ProviderName);
Lync.ReloadConfiguration();
Log.WriteEnd("{0}.ReloadConfiguration", ProviderSettings.ProviderName);
}
catch (Exception ex)
{
Log.WriteError(String.Format("Error: {0}.ReloadConfiguration", ProviderSettings.ProviderName), ex);
throw;
}
}
}
}

View file

@ -68,6 +68,7 @@
<Content Include="AutoDiscovery.asmx" />
<Content Include="BlackBerry.asmx" />
<EmbeddedResource Include="Images\logo.png" />
<Content Include="LyncServer.asmx" />
<Content Include="OCSEdgeServer.asmx" />
<Content Include="OCSServer.asmx" />
<Content Include="CRM.asmx" />
@ -108,6 +109,10 @@
<Compile Include="Code\ServerConfiguration.cs" />
<Compile Include="Code\ServerUsernameTokenManager.cs" />
<Compile Include="Code\UsernameAssertion.cs" />
<Compile Include="LyncServer.asmx.cs">
<DependentUpon>LyncServer.asmx</DependentUpon>
<SubType>Component</SubType>
</Compile>
<Compile Include="OCSEdgeServer.asmx.cs">
<DependentUpon>OCSEdgeServer.asmx</DependentUpon>
<SubType>Component</SubType>

View file

@ -511,7 +511,15 @@
<Control key="create_new_ocs_user" src="WebsitePanel/OCS/CreateOCSUser.ascx" title="Create New OCS User" type="View" />
<Control key="edit_ocs_user" src="WebsitePanel/OCS/EditOCSUser.ascx" title="Edit OCS User" type="View" />
</Controls>
<Control key="lync_users" src="WebsitePanel/Lync/LyncUsers.ascx" title="Lync Users" type="View" />
<Control key="create_new_lync_user" src="WebsitePanel/Lync/LyncCreateUser.ascx" title="Create New Lync User" type="View" />
<Control key="lync_userplans" src="WebsitePanel/Lync/LyncUserPlans.ascx" title="LyncUserPlans" type="View" />
<Control key="lync_federationdomains" src="WebsitePanel/Lync/LyncFederationDomains.ascx" title="LyncFederationDomains" type="View" />
<Control key="add_lyncfederation_domain" src="WebsitePanel/Lync/LyncAddFederationDomain.ascx" title="LyncAddFederationDomain" type="View" />
<Control key="add_lyncuserplan" src="WebsitePanel/Lync/LyncAddLyncUserPlan.ascx" title="LyncAddLyncUserPlan" type="View" />
<Control key="edit_lync_user" src="WebsitePanel/Lync/LyncEditUser.ascx" title="Edit Lync User" type="View" />
</Controls>
</ModuleDefinition>
<ModuleDefinition id="VPS">

View file

@ -5005,4 +5005,133 @@
<data name="Quota.Exchange2007.IsConsumer" xml:space="preserve">
<value>Consumer Organization Support</value>
</data>
<data name="Error.LYNC_DELETE_DOMAIN" xml:space="preserve">
<value>Error deleting organization domain name. See audit log for more details.</value>
</data>
<data name="Success.CREATE_LYNC_USER" xml:space="preserve">
<value>Lync successfully enabled for this user</value>
</data>
<data name="Error.CREATE_LYNC_USER" xml:space="preserve">
<value>Cannot enable Lync User. The following errors have been occured:</value>
</data>
<data name="Success.ADD_LYNC_FEDERATIONDOMAIN" xml:space="preserve">
<value>Lync successfully added the federation domain</value>
</data>
<data name="Error.ADD_LYNC_FEDERATIONDOMAIN" xml:space="preserve">
<value>Cannot add federation domain. The following errors have been occured:</value>
</data>
<data name="Success.DELETE_LYNC_USER" xml:space="preserve">
<value>Lync successfully disabled for this user</value>
</data>
<data name="Error.DELETE_LYNC_USER" xml:space="preserve">
<value>Cannot delete Lync User, the following errors have been occured:</value>
</data>
<data name="Success.UPDATE_LYNC_USER" xml:space="preserve">
<value>General Lync User settings have been successfully updated.</value>
</data>
<data name="Error.UPDATE_LYNC_USER" xml:space="preserve">
<value>Error updating general Lync User settings.</value>
</data>
<data name="Lync.CANNOT_ADD_LYNC_USER" xml:space="preserve">
<value>Unable to add Lync user.</value>
</data>
<data name="Lync.CANNOT_ADD_LYNC_USER_TO_DATABASE" xml:space="preserve">
<value>Unable to add Lync User to database.</value>
</data>
<data name="Lync.CANNOT_CHECK_IF_LYNC_USER_EXISTS" xml:space="preserve">
<value>Unable to check quota</value>
</data>
<data name="Lync.CANNOT_DELETE_LYNC_USER" xml:space="preserve">
<value>Unable to delete Lync User.</value>
</data>
<data name="Lync.CANNOT_DELETE_LYNC_USER_FROM_METADATA" xml:space="preserve">
<value>Unable to delete Lync User from metadata.</value>
</data>
<data name="Lync.CANNOT_GET_LYNC_PROXY" xml:space="preserve">
<value>Unable to get Lync proxy.</value>
</data>
<data name="Lync.CANNOT_GET_USER_GENERAL_SETTINGS" xml:space="preserve">
<value>Unable to get user general settings.</value>
</data>
<data name="Lync.CANNOT_SET_DEFAULT_SETTINGS" xml:space="preserve">
<value>Unable to set default settings.</value>
</data>
<data name="Lync.GET_LYNC_USERS" xml:space="preserve">
<value>Unable to get Lync Users.</value>
</data>
<data name="Lync.GET_LYNC_USER_COUNT" xml:space="preserve">
<value>Unable to get Lync Users count.</value>
</data>
<data name="Lync.USER_FIRST_NAME_IS_NOT_SPECIFIED" xml:space="preserve">
<value>User first name is not specified.</value>
</data>
<data name="Lync.USER_IS_ALREADY_LYNC_USER" xml:space="preserve">
<value>Current user account is already enabled for Office Communications Server.</value>
</data>
<data name="Lync.USER_LAST_NAME_IS_NOT_SPECIFIED" xml:space="preserve">
<value>User last name is not specified.</value>
</data>
<data name="Lync.USER_QUOTA_HAS_BEEN_REACHED" xml:space="preserve">
<value>Lync users quota has been reached.</value>
</data>
<data name="Quota.Lync.Federation" xml:space="preserve">
<value>Federation Allowed</value>
</data>
<data name="Quota.Lync.Users" xml:space="preserve">
<value>Lync Users per Organization</value>
</data>
<data name="Quota.Lync.Conferencing" xml:space="preserve">
<value>Conferencing Allowed</value>
</data>
<data name="Quota.Lync.MaxParticipants" xml:space="preserve">
<value>Maximum participants per conference</value>
</data>
<data name="Quota.Lync.AllowVideo" xml:space="preserve">
<value>Conference Video Allowed</value>
</data>
<data name="Quota.Lync.EnterpriseVoice" xml:space="preserve">
<value>Enterprise Voice Allowed</value>
</data>
<data name="Quota.Lync.EVUsers" xml:space="preserve">
<value>Enterprise Voice users</value>
</data>
<data name="Quota.Lync.EVNational" xml:space="preserve">
<value>National Calls Allowed</value>
</data>
<data name="Quota.Lync.EVMobile" xml:space="preserve">
<value>Mobile Calls Allowed</value>
</data>
<data name="Quota.Lync.EVInternational" xml:space="preserve">
<value>International Calls Allowed</value>
</data>
<data name="ResourceGroup.Lync" xml:space="preserve">
<value>Lync Server</value>
</data>
<data name="Success.UPDATE_LYNC_USER" xml:space="preserve">
<value>General Lync User settings have been successfully updated.</value>
</data>
<data name="Warning.CREATE_LYNC_USER" xml:space="preserve">
<value>Lync User has been successfully created but the following errors have been occured:</value>
</data>
<data name="Warning.ADD_LYNC_FEDERATIONDOMAIN" xml:space="preserve">
<value>Lync federation domain has been successfully created but the following errors have been occured:</value>
</data>
<data name="Warning.DELETE_LYNC_USER" xml:space="preserve">
<value>Lync User has been successfully deleted but the following errors have been occured:</value>
</data>
<data name="Error.LYNC_SET_DEFAULT_PLAN" xml:space="preserve">
<value>Error setting default organization lync user plan. See audit log for more details.</value>
</data>
<data name="AuditLogTask.LYNC_ADD_PLAN" xml:space="preserve">
<value>Add organization lync user plan</value>
</data>
<data name="AuditLogTask.LYNC_DELETE_PLAN" xml:space="preserve">
<value>Delete plan</value>
</data>
<data name="Error.LYNC_DELETE_PLAN" xml:space="preserve">
<value>Unable to delete plan. Make sure the plan is not assigned to any user</value>
</data>
<data name="Error.LYNC_ADD_PLAN" xml:space="preserve">
<value>Error creating organization plan. See audit log for more details.</value>
</data>
</root>

View file

@ -66,6 +66,13 @@ Default skin template. The following skins are provided as examples only.
<asp:Image SkinID="CRMLogo" runat="server" ImageUrl="images/crm_48.png" ImageAlign="AbsMiddle"/>
<asp:Image SkinID="OCSLogo" runat="server" ImageUrl="images/ocs48.png" ImageAlign="AbsMiddle"/>
<%-- Lync Icons --%>
<asp:Image SkinID="LyncLogo" runat="server" ImageUrl="images/lync48.png" ImageAlign="AbsMiddle"/>
<asp:Image SkinID="LyncUserPlan48" runat="server" ImageUrl="images/lyncuserplan48.png" ImageAlign="AbsMiddle" Width="48" Height="48"></asp:Image>
<asp:Image SkinID="LyncUserPlanAdd48" runat="server" ImageUrl="images/lyncuserplanadd48.png" ImageAlign="AbsMiddle" Width="48" Height="48"></asp:Image>
<asp:Image SkinID="LyncUser" runat="server" ImageUrl="images/lyncuser.png" ImageAlign="AbsMiddle" Width="48" Height="48"/>
<asp:Image SkinID="LyncFederationDomains48" runat="server" ImageUrl="images/LyncFederationDomains48.png" ImageAlign="AbsMiddle" Width="48" Height="48"></asp:Image>
<%-- BlackBerry Icons --%>
<asp:Image SkinID="BlackBerryUsersLogo" runat="server" ImageUrl="images/bbuser48.png" ImageAlign="AbsMiddle"/>
<%-- VPS Icons --%>

Binary file not shown.

After

Width:  |  Height:  |  Size: 602 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 602 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

View file

@ -171,4 +171,22 @@
<data name="lblHyperVForPC.Text" xml:space="preserve">
<value>Number of VM:</value>
</data>
<data name="lblBlackBerryUsers.Text" xml:space="preserve">
<value>BlackBerry Users:</value>
</data>
<data name="lblDatabases" xml:space="preserve">
<value>Databases:</value>
</data>
<data name="lblOCSUsers.Text" xml:space="preserve">
<value>OCS Users:</value>
</data>
<data name="lblSharepointSites" xml:space="preserve">
<value>Sharepoint Sites:</value>
</data>
<data name="lblUserAccounts.Text" xml:space="preserve">
<value>User Accounts:</value>
</data>
<data name="lblLyncUsers.Text" xml:space="preserve">
<value>Lync Users:</value>
</data>
</root>

View file

@ -83,6 +83,13 @@ namespace WebsitePanel.Portal
get { return GetCachedProxy<esOCS>(); }
}
public esLync Lync
{
get { return GetCachedProxy<esLync>(); }
}
public esOrganizations Organizations
{
get

View file

@ -0,0 +1,85 @@
// 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 WebsitePanel.Providers.HostedSolution;
using WebsitePanel.Providers.ResultObjects;
namespace WebsitePanel.Portal
{
public class LyncHelper
{
public LyncUser[] GetLyncUsersPaged(int itemId,
string filterColumn, string filterValue,
int maximumRows, int startRowIndex, string sortColumn)
{
if (!String.IsNullOrEmpty(filterValue))
filterValue = filterValue + "%";
if (maximumRows == 0)
{
maximumRows = Int32.MaxValue;
}
string name = string.Empty;
string email = string.Empty;
if (filterColumn == "DisplayName")
name = filterValue;
else
email = filterValue;
string[] data = sortColumn.Split(' ');
string direction = data.Length > 1 ? "DESC" : "ASC";
LyncUsersPagedResult res =
ES.Services.Lync.GetLyncUsersPaged(itemId, data[0], direction, startRowIndex, maximumRows);
return res.Value.PageUsers;
}
public int GetLyncUsersPagedCount(int itemId, string filterColumn, string filterValue)
{
string name = string.Empty;
string email = string.Empty;
if (!string.IsNullOrEmpty(filterValue))
filterValue = filterValue + "%";
if (filterColumn == "DisplayName")
name = filterValue;
else
email = filterValue;
IntResult res = ES.Services.Lync.GetLyncUserCount(itemId);
return res.Value;
}
}
}

View file

@ -143,14 +143,13 @@ namespace WebsitePanel.Portal.ExchangeServer
}
else
besStatsPanel.Visible = false;
/*
if (cntx.Groups.ContainsKey(ResourceGroups.Lync))
{
lyncStatsPanel.Visible = true;
BindLyncStats();
}
else
*/
lyncStatsPanel.Visible = false;

View file

@ -183,4 +183,16 @@
<data name="Text.MailboxPlans" xml:space="preserve">
<value>Mailbox Plans</value>
</data>
<data name="Text.LyncGroup" xml:space="preserve">
<value>Lync</value>
</data>
<data name="Text.LyncUserPlans" xml:space="preserve">
<value>Lync User Plans</value>
</data>
<data name="Text.LyncUsers" xml:space="preserve">
<value>Lync Users</value>
</data>
<data name="Text.LyncFederationDomains" xml:space="preserve">
<value>Lync Federation Domains</value>
</data>
</root>

View file

@ -202,6 +202,21 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
groups.Add(ocsGroup);
}
private void PrepareLyncMenu(PackageContext cntx, List<MenuGroup> groups, string imagePath)
{
MenuGroup lyncGroup =
new MenuGroup(GetLocalizedString("Text.LyncGroup"), imagePath + "lync16.png");
lyncGroup.MenuItems.Add(CreateMenuItem("LyncUsers", "lync_users"));
lyncGroup.MenuItems.Add(CreateMenuItem("LyncUserPlans", "lync_userplans"));
if (CheckQouta(Quotas.LYNC_FEDERATION, cntx))
lyncGroup.MenuItems.Add(CreateMenuItem("LyncFederationDomains", "lync_federationdomains"));
groups.Add(lyncGroup);
}
private List<MenuGroup> PrepareMenu()
{
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
@ -238,6 +253,9 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
if (cntx.Groups.ContainsKey(ResourceGroups.OCS))
PrepareOCSMenu(cntx, groups, imagePath);
//Lync Menu
if (cntx.Groups.ContainsKey(ResourceGroups.Lync))
PrepareLyncMenu(cntx, groups, imagePath);
return groups;
}

View file

@ -0,0 +1,138 @@
<?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 Domain</value>
</data>
<data name="btnCancel.Text" xml:space="preserve">
<value>Cancel</value>
</data>
<data name="DomainFormatValidator.ErrorMessage" xml:space="preserve">
<value>Please, enter correct domain name, for example "mydomain.com" or "sub.mydomain.com".</value>
</data>
<data name="DomainFormatValidator.Text" xml:space="preserve">
<value>*</value>
</data>
<data name="DomainRequiredValidator.ErrorMessage" xml:space="preserve">
<value>Please enter domain name</value>
</data>
<data name="DomainRequiredValidator.Text" xml:space="preserve">
<value>*</value>
</data>
</root>

View file

@ -0,0 +1,183 @@
<?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="FormComments.Text" xml:space="preserve">
<value>&lt;p&gt; A plan is a template that defines the characteristics of a lync users &lt;/p&gt; &lt;p&gt;The plan name needs to be unique. A plan cannot be modified. In case a user needs a plan with another characteristics, a new plan needs to be created and assigned to the user. A plan can only be deleted when the plan is not assigned to any users. &lt;/p&gt;</value>
</data>
<data name="locTitle.Text" xml:space="preserve">
<value>Add Lync User Plan</value>
</data>
<data name="Text.PageName" xml:space="preserve">
<value>Lync User Plan</value>
</data>
<data name="valRequirePlan.ErrorMessage" xml:space="preserve">
<value>Please enter correct plan</value>
</data>
<data name="valRequirePlan.Text" xml:space="preserve">
<value>*</value>
</data>
<data name="chkIM.Text" xml:space="preserve">
<value>Instant Messaging</value>
</data>
<data name="chkConferencing.Text" xml:space="preserve">
<value>Conferencing</value>
</data>
<data name="chkEnterpriseVoice.Text" xml:space="preserve">
<value>Enterprise Voice</value>
</data>
<data name="chkEmergency.Text" xml:space="preserve">
<value>Emergency Calls</value>
</data>
<data name="chkNational.Text" xml:space="preserve">
<value>National Calls</value>
</data>
<data name="secPlanFeatures.Text" xml:space="preserve">
<value>Plan Features</value>
</data>
<data name="secPlan.Text" xml:space="preserve">
<value>Lync User Plan</value>
</data>
<data name="chkFederation.Text" xml:space="preserve">
<value>Federation</value>
</data>
<data name="secConferencing.Text" xml:space="preserve">
<value>Conferencing Settings</value>
</data>
<data name="btnAdd" xml:space="preserve">
<value>Add New Plan</value>
</data>
<data name="chkInternational.Text" xml:space="preserve">
<value>International Calls</value>
</data>
<data name="chkMobile.Text" xml:space="preserve">
<value>Mobile Calls</value>
</data>
<data name="chkNone.Text" xml:space="preserve">
<value>None</value>
</data>
<data name="locConferencingSize.Text" xml:space="preserve">
<value>Maximum Conference Size</value>
</data>
<data name="secEnterpriseVoice.Text" xml:space="preserve">
<value>Enterprise Voice Policy</value>
</data>
<data name="chkMobility.Text" xml:space="preserve">
<value>Mobile Access</value>
</data>
</root>

View file

@ -0,0 +1,138 @@
<?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="breadcrumb.PageName" xml:space="preserve">
<value>Create Lync User</value>
</data>
<data name="btnCreate.Text" xml:space="preserve">
<value>Create</value>
</data>
<data name="FormComments.Text" xml:space="preserve">
<value>Select an existing Organization user and click the “Create” button to enable an individual user account for Microsoft Lync Server.</value>
</data>
<data name="locDisplayName.Text" xml:space="preserve">
<value>Display name* :</value>
</data>
<data name="locTitle.Text" xml:space="preserve">
<value>Create Lync User</value>
</data>
<data name="locPlanName.Text" xml:space="preserve">
<value>Plan Name* :</value>
</data>
</root>

View file

@ -0,0 +1,138 @@
<?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="breadcrumb.PageName" xml:space="preserve">
<value>Edit Lync User</value>
</data>
<data name="btnSave.Text" xml:space="preserve">
<value>Save changes</value>
</data>
<data name="FormComments.Text" xml:space="preserve">
<value>&lt;p&gt; A plan is a template that defines the capabilities of a lync user. In order to change the plan assigned to this user, select a plan and click the Save Changes button &lt;/p&gt;</value>
</data>
<data name="locDisplayName.Text" xml:space="preserve">
<value>Display name:</value>
</data>
<data name="locTitle.Text" xml:space="preserve">
<value>Edit Lync User</value>
</data>
<data name="locPlanName.Text" xml:space="preserve">
<value>Plan Name :</value>
</data>
</root>

View file

@ -0,0 +1,151 @@
<?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="btnAddDomain.Text" xml:space="preserve">
<value>Add New Domain</value>
</data>
<data name="cmdDelete.OnClientClick" xml:space="preserve">
<value>if(!confirm('Are you sure you want to delete selected federation domain?')) return false; else ShowProgressDialog('Deleting Federation Domain...');</value>
</data>
<data name="cmdDelete.Text" xml:space="preserve">
<value>Delete</value>
</data>
<data name="cmdDelete.ToolTip" xml:space="preserve">
<value>Delete Federation DOmain</value>
</data>
<data name="gvDomains.Empty" xml:space="preserve">
<value>No domains have been added yet. To add a new domain click "Add New Domain" button.</value>
</data>
<data name="gvDomainsName.Header" xml:space="preserve">
<value>Domain Name</value>
</data>
<data name="HSFormComments.Text" xml:space="preserve">
<value>&lt;p&gt;By adding a federation domain you allow your users, that are enabled for federation, to interact through Lync with users from the specified domain. Your users as well as the users from the federated domain will see eachother status. &lt;/p&gt;
&lt;p&gt;Federation is a mutual agreement between you and your federation partner (owner of the domain you want to federate with). Once you have added the federation domain to your list, your partner will need to do the same from his side&lt;/p&gt;
</value>
</data>
<data name="locTitle.Text" xml:space="preserve">
<value>Lync Federation Domains</value>
</data>
<data name="Text.PageName" xml:space="preserve">
<value>Lync Federation Domains</value>
</data>
</root>

View file

@ -0,0 +1,153 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="btnAddPlan.Text" xml:space="preserve">
<value>Add New Plan</value>
</data>
<data name="btnSetDefaultPlan.Text" xml:space="preserve">
<value>Set Default Plan</value>
</data>
<data name="cmdDelete.OnClientClick" xml:space="preserve">
<value>if(!confirm('Are you sure you want to delete selected plan?')) return false; else ShowProgressDialog('Deleting plan...');</value>
</data>
<data name="cmdDelete.Text" xml:space="preserve">
<value>Delete</value>
</data>
<data name="cmdDelete.ToolTip" xml:space="preserve">
<value>Delete Plan</value>
</data>
<data name="gvPlans.Empty" xml:space="preserve">
<value>No plans have been added yet. To add a new plan click "Add New Plan" button.</value>
</data>
<data name="gvPlanDefault.Header" xml:space="preserve">
<value>Default Plan</value>
</data>
<data name="gvPlan.Header" xml:space="preserve">
<value>Plan</value>
</data>
<data name="HSFormComments.Text" xml:space="preserve">
<value>&lt;p&gt; A plan is a template that defines the capabilities of a lync users &lt;/p&gt; &lt;p&gt;The plan name needs to be unique. A plan cannot be modified. In case a lync user needs a plan with another characteristics, a new plan needs to be created and assigned to the lync user. A plan can only be deleted when the plan is not assigned to any lync users. &lt;/p&gt;</value>
</data>
<data name="locTitle.Text" xml:space="preserve">
<value>Lync User Plans</value>
</data>
<data name="Text.PageName" xml:space="preserve">
<value>Lync User Plans</value>
</data>
</root>

View file

@ -0,0 +1,155 @@
<?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="breadcrumb.PageName" xml:space="preserve">
<value>Lync Users</value>
</data>
<data name="btnCreateUser.Text" xml:space="preserve">
<value>Create Lync User</value>
</data>
<data name="ddlSearchColumnDisplayName.Text" xml:space="preserve">
<value>Display name</value>
</data>
<data name="ddlSearchColumnEmail.Text" xml:space="preserve">
<value>Sign-in name</value>
</data>
<data name="FormComments.Text" xml:space="preserve">
<value>&lt;p&gt;Microsoft Lync Server delivers unified communications to the users, including software-powered VoIP, Web and audio/video conferencing, and enterprise instant messaging.&lt;/p&gt;
&lt;p&gt;Click the “Create Lync User” button to enable a user account for Microsoft Lync Server. &lt;/p&gt;
&lt;p&gt;If you delete an account in Microsoft Lync Server, the account is no longer available for use with Microsoft Lync Server unless you enable the account again. When you delete an account, all Lync Server settings for the account are lost, so you must configure the account again after enabling.&lt;/p&gt;</value>
</data>
<data name="gvUsersDisplayName.HeaderText" xml:space="preserve">
<value>Display name</value>
</data>
<data name="gvUsersEmail.HeaderText" xml:space="preserve">
<value>Sign-in name</value>
</data>
<data name="locTitle.Text" xml:space="preserve">
<value>Lync Users</value>
</data>
<data name="cmdDelete.OnClientClick" xml:space="preserve">
<value>return confirm('Are you sure you want to delete Lync User?');</value>
</data>
<data name="gvLyncUserPlan.HeaderText" xml:space="preserve">
<value>Lync User Plan</value>
</data>
<data name="gvUsers.Empty" xml:space="preserve">
<value>No users have been Lync enabled. To enable a user for Lync click "Create Lync User" button.</value>
</data>
</root>

View file

@ -0,0 +1,64 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="LyncAddFederationDomain.ascx.cs" Inherits="WebsitePanel.Portal.LyncAddFederationDomain" %>
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
<%@ Register Src="../ExchangeServer/UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %>
<%@ Register Src="../ExchangeServer/UserControls/Breadcrumb.ascx" TagName="Breadcrumb" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server" />
<div id="ExchangeContainer">
<div class="Module">
<div class="Header">
<wsp:Breadcrumb id="breadcrumb" runat="server" PageName="Text.PageName" meta:resourcekey="breadcrumb" />
</div>
<div class="Left">
<wsp:Menu id="menu" runat="server" />
</div>
<div class="Content">
<div class="Center">
<div class="Title">
<asp:Image ID="Image1" SkinID="LyncLogo" runat="server" />
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle"></asp:Localize>
</div>
<div class="FormBody">
<wsp:SimpleMessageBox id="messageBox" runat="server" />
<table id="AddFederationDomain" runat="server" width="100%">
<tr>
<td class="FormLabel150">
<asp:Localize ID="locDomainName" runat="server" meta:resourcekey="locDomainName" Text="Domain Name: *"></asp:Localize>
</td>
<td>
<asp:TextBox ID="DomainName" runat="server" Width="300" CssClass="HugeTextBox"></asp:TextBox>
<asp:RequiredFieldValidator id="DomainRequiredValidator" runat="server" meta:resourcekey="DomainRequiredValidator"
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>
</td>
</tr>
<tr>
<td class="FormLabel150">
<asp:Localize ID="locProxyFQDN" runat="server" meta:resourcekey="locProxyFQDN" Text="Proxy FQDN: "></asp:Localize>
</td>
<td>
<asp:TextBox ID="ProxyFQDN" runat="server" Width="300" CssClass="HugeTextBox"></asp:TextBox>
<asp:RegularExpressionValidator id="ProxyFqdnFormatValidator" runat="server" meta:resourcekey="ProxyFqdnFormatValidator"
ControlToValidate="ProxyFQDN" 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>
</td>
</tr>
</table>
<br />
<div class="FormButtonsBarClean">
<asp:Button ID="btnAdd" runat="server" meta:resourcekey="btnAdd" CssClass="Button2" Text="Add Domain" ValidationGroup="Domain" OnClick="btnAdd_Click" OnClientClick="ShowProgressDialog('Adding Domain...');"/>
<asp:Button ID="btnCancel" runat="server" meta:resourcekey="btnCancel" CssClass="Button1" Text="Cancel" CausesValidation="false" OnClick="btnCancel_Click" />
<asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True" ShowSummary="False" ValidationGroup="Domain" />
</div>
</div>
</div>
<div class="Right">
<asp:Localize ID="FormComments" runat="server" meta:resourcekey="HSFormComments"></asp:Localize>
</div>
</div>
</div>
</div>

View file

@ -0,0 +1,82 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using WebsitePanel.Providers.ResultObjects;
using WebsitePanel.EnterpriseServer;
namespace WebsitePanel.Portal
{
public partial class LyncAddFederationDomain : WebsitePanelModuleBase
{
protected void Page_Load(object sender, EventArgs e)
{
ProxyFQDN.Visible = ProxyFQDN.Enabled = false;
locProxyFQDN.Visible = false;
}
private void AddDomain()
{
if (!Page.IsValid)
return;
// get domain name
string domainName = DomainName.Text.Trim();
string proxyFQDN = ProxyFQDN.Text.Trim();
LyncUserResult res = ES.Services.Lync.AddFederationDomain(PanelRequest.ItemID, domainName, proxyFQDN);
if (!(res.IsSuccess && res.ErrorCodes.Count == 0))
{
messageBox.ShowMessage(res, "ADD_LYNC_FEDERATIONDOMAIN", "LYNC");
}
// return
RedirectBack();
}
private void RedirectBack()
{
Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "lync_federationdomains",
"SpaceID=" + PanelSecurity.PackageId));
}
protected void btnCancel_Click(object sender, EventArgs e)
{
// return
RedirectBack();
}
protected void btnAdd_Click(object sender, EventArgs e)
{
AddDomain();
}
}
}

View file

@ -0,0 +1,177 @@
//------------------------------------------------------------------------------
// <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 {
public partial class LyncAddFederationDomain {
/// <summary>
/// asyncTasks control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks;
/// <summary>
/// breadcrumb control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Breadcrumb breadcrumb;
/// <summary>
/// menu control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Menu menu;
/// <summary>
/// Image1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Image Image1;
/// <summary>
/// locTitle control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locTitle;
/// <summary>
/// messageBox control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
/// <summary>
/// AddFederationDomain control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTable AddFederationDomain;
/// <summary>
/// locDomainName control.
/// </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 locDomainName;
/// <summary>
/// DomainName control.
/// </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 DomainName;
/// <summary>
/// DomainRequiredValidator control.
/// </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 DomainRequiredValidator;
/// <summary>
/// DomainFormatValidator control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RegularExpressionValidator DomainFormatValidator;
/// <summary>
/// locProxyFQDN control.
/// </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 locProxyFQDN;
/// <summary>
/// ProxyFQDN control.
/// </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 ProxyFQDN;
/// <summary>
/// ProxyFqdnFormatValidator control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RegularExpressionValidator ProxyFqdnFormatValidator;
/// <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>
/// btnCancel control.
/// </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 btnCancel;
/// <summary>
/// ValidationSummary1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.ValidationSummary ValidationSummary1;
/// <summary>
/// FormComments control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize FormComments;
}
}

View file

@ -0,0 +1,132 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="LyncAddLyncUserPlan.ascx.cs" Inherits="WebsitePanel.Portal.Lync.LyncAddLyncUserPlan" %>
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
<%@ Register Src="../ExchangeServer/UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %>
<%@ Register Src="../ExchangeServer/UserControls/Breadcrumb.ascx" TagName="Breadcrumb" TagPrefix="wsp" %>
<%@ Register Src="../ExchangeServer/UserControls/SizeBox.ascx" TagName="SizeBox" TagPrefix="wsp" %>
<%@ Register Src="../ExchangeServer/UserControls/DaysBox.ascx" TagName="DaysBox" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/CollapsiblePanel.ascx" TagName="CollapsiblePanel" 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="Header">
<wsp:Breadcrumb id="breadcrumb" runat="server" PageName="Text.PageName" />
</div>
<div class="Left">
<wsp:Menu id="menu" runat="server" SelectedItem="mailboxplans" />
</div>
<div class="Content">
<div class="Center">
<div class="Title">
<asp:Image ID="Image1" SkinID="LyncUserPlanAdd48" runat="server" />
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Add Mailboxplan"></asp:Localize>
</div>
<div class="FormBody">
<wsp:SimpleMessageBox id="messageBox" runat="server" />
<wsp:CollapsiblePanel id="secPlan" runat="server"
TargetControlID="Plan" meta:resourcekey="secPlan" Text="Plan">
</wsp:CollapsiblePanel>
<asp:Panel ID="Plan" runat="server" Height="0" style="overflow:hidden;">
<table>
<tr>
<td class="FormLabel200" align="right">
</td>
<td>
<asp:TextBox ID="txtPlan" runat="server" CssClass="TextBox200" ></asp:TextBox>
<asp:RequiredFieldValidator ID="valRequirePlan" runat="server" meta:resourcekey="valRequirePlan" ControlToValidate="txtPlan"
ErrorMessage="Enter plan name" ValidationGroup="CreatePlan" Display="Dynamic" Text="*" SetFocusOnError="True"></asp:RequiredFieldValidator>
</td>
</tr>
</table>
<br />
</asp:Panel>
<wsp:CollapsiblePanel id="secPlanFeatures" runat="server"
TargetControlID="PlanFeatures" meta:resourcekey="secPlanFeatures" Text="Plan Features">
</wsp:CollapsiblePanel>
<asp:Panel ID="PlanFeatures" runat="server" Height="0" style="overflow:hidden;">
<table>
<tr>
<td>
<asp:CheckBox ID="chkIM" runat="server" meta:resourcekey="chkIM" Text="Instant Messaging"></asp:CheckBox>
</td>
</tr>
<tr>
<td>
<asp:CheckBox ID="chkMobility" runat="server" meta:resourcekey="chkMobility" Text="Mobility"></asp:CheckBox>
</td>
</tr>
<tr>
<td>
<asp:CheckBox ID="chkFederation" runat="server" meta:resourcekey="chkFederation" Text="Federation"></asp:CheckBox>
</td>
</tr>
<tr>
<td>
<asp:CheckBox ID="chkConferencing" runat="server" meta:resourcekey="chkConferencing" Text="Conferencing"></asp:CheckBox>
</td>
</tr>
<tr>
<td>
<asp:CheckBox ID="chkEnterpriseVoice" runat="server" meta:resourcekey="chkEnterpriseVoice" Text="Enterprise Voice"></asp:CheckBox>
</td>
</tr>
</table>
<br />
</asp:Panel>
<wsp:CollapsiblePanel id="secEnterpriseVoice" runat="server"
TargetControlID="EnterpriseVoice" meta:resourcekey="secEnterpriseVoice" Text="Enterprise Voice Policy">
</wsp:CollapsiblePanel>
<asp:Panel ID="EnterpriseVoice" runat="server" Height="0" style="overflow:hidden;">
<table>
<tr>
<td>
<asp:RadioButton ID="chkNone" groupName="VoicePolicy" runat="server" meta:resourcekey="chkNone" Text="None"></asp:RadioButton>
</td>
</tr>
<tr>
<td>
<asp:RadioButton ID="chkEmergency" groupName="VoicePolicy" runat="server" meta:resourcekey="chkEmergency" Text="Emergency Calls"></asp:RadioButton>
</td>
</tr>
<tr>
<td>
<asp:RadioButton ID="chkNational" groupName="VoicePolicy" runat="server" meta:resourcekey="chkNational" Text="National Calls"></asp:RadioButton>
</td>
</tr>
<tr>
<td>
<asp:RadioButton ID="chkMobile" groupName="VoicePolicy" runat="server" meta:resourcekey="chkMobile" Text="Mobile Calls"></asp:RadioButton>
</td>
</tr>
<tr>
<td>
<asp:RadioButton ID="chkInternational" groupName="VoicePolicy" runat="server" meta:resourcekey="chkInternational" Text="International Calls"></asp:RadioButton>
</td>
</tr>
</table>
<br />
</asp:Panel>
<br />
<div class="FormFooterClean">
<asp:Button id="btnAdd" runat="server" Text="Add Plan" CssClass="Button1" meta:resourcekey="btnAdd" ValidationGroup="CreatePlan" OnClick="btnAdd_Click" OnClientClick="ShowProgressDialog('Creating Plan...');"></asp:Button>
<asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True" ShowSummary="False" ValidationGroup="CreatePlan" />
</div>
</div>
</div>
<div class="Right">
<asp:Localize ID="FormComments" runat="server" meta:resourcekey="FormComments"></asp:Localize>
</div>
</div>
</div>
</div>

View file

@ -0,0 +1,157 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using WebsitePanel.EnterpriseServer;
using WebsitePanel.Providers.HostedSolution;
using WebsitePanel.Providers.ResultObjects;
namespace WebsitePanel.Portal.Lync
{
public partial class LyncAddLyncUserPlan : WebsitePanelModuleBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
if (PanelRequest.GetInt("LyncUserPlanId") != 0)
{
Providers.HostedSolution.LyncUserPlan plan = ES.Services.Lync.GetLyncUserPlan(PanelRequest.ItemID, PanelRequest.GetInt("LyncUserPlanId"));
txtPlan.Text = plan.LyncUserPlanName;
chkIM.Checked = plan.IM;
chkIM.Enabled = false;
chkFederation.Checked = plan.Federation;
chkConferencing.Checked = plan.Conferencing;
chkMobility.Checked = plan.Mobility;
chkEnterpriseVoice.Checked = plan.EnterpriseVoice;
switch (plan.VoicePolicy)
{
case LyncVoicePolicyType.None:
break;
case LyncVoicePolicyType.Emergency:
chkEmergency.Checked = true;
break;
case LyncVoicePolicyType.National:
chkNational.Checked = true;
break;
case LyncVoicePolicyType.Mobile:
chkMobile.Checked = true;
break;
case LyncVoicePolicyType.International:
chkInternational.Checked = true;
break;
default:
chkNone.Checked = true;
break;
}
locTitle.Text = plan.LyncUserPlanName;
this.DisableControls = true;
}
else
{
chkIM.Checked = true;
chkIM.Enabled = false;
chkNone.Checked = true;
PackageContext cntx = ES.Services.Packages.GetPackageContext(PanelSecurity.PackageId);
if (cntx != null)
{
foreach (QuotaValueInfo quota in cntx.QuotasArray)
{
switch (quota.QuotaId)
{
case 371:
chkFederation.Checked = Convert.ToBoolean(quota.QuotaAllocatedValue);
chkFederation.Enabled = Convert.ToBoolean(quota.QuotaAllocatedValue);
break;
case 372:
chkConferencing.Checked = Convert.ToBoolean(quota.QuotaAllocatedValue);
chkConferencing.Enabled = Convert.ToBoolean(quota.QuotaAllocatedValue);
break;
case 375:
chkEnterpriseVoice.Checked = Convert.ToBoolean(quota.QuotaAllocatedValue);
chkEnterpriseVoice.Enabled = Convert.ToBoolean(quota.QuotaAllocatedValue);
break;
}
}
}
else
this.DisableControls = true;
}
}
}
protected void btnAdd_Click(object sender, EventArgs e)
{
AddPlan();
}
private void AddPlan()
{
try
{
Providers.HostedSolution.LyncUserPlan plan = new Providers.HostedSolution.LyncUserPlan();
plan.LyncUserPlanName = txtPlan.Text;
plan.IsDefault = false;
plan.IM = true;
plan.Mobility = chkMobility.Checked;
plan.Federation = chkFederation.Checked;
plan.Conferencing = chkConferencing.Checked;
plan.EnterpriseVoice = chkEnterpriseVoice.Checked;
if (!plan.EnterpriseVoice)
{
plan.VoicePolicy = LyncVoicePolicyType.None;
}
int result = ES.Services.Lync.AddLyncUserPlan( PanelRequest.ItemID,
plan);
if (result < 0)
{
messageBox.ShowResultMessage(result);
return;
}
Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "lync_userplans",
"SpaceID=" + PanelSecurity.PackageId));
}
catch (Exception ex)
{
messageBox.ShowErrorMessage("LYNC_ADD_PLAN", ex);
}
}
}
}

View file

@ -0,0 +1,258 @@
//------------------------------------------------------------------------------
// <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.Lync {
public partial class LyncAddLyncUserPlan {
/// <summary>
/// asyncTasks control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks;
/// <summary>
/// breadcrumb control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Breadcrumb breadcrumb;
/// <summary>
/// menu control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Menu menu;
/// <summary>
/// Image1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Image Image1;
/// <summary>
/// locTitle control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locTitle;
/// <summary>
/// messageBox control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
/// <summary>
/// secPlan control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secPlan;
/// <summary>
/// Plan control.
/// </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 Plan;
/// <summary>
/// txtPlan control.
/// </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 txtPlan;
/// <summary>
/// valRequirePlan control.
/// </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 valRequirePlan;
/// <summary>
/// secPlanFeatures control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secPlanFeatures;
/// <summary>
/// PlanFeatures control.
/// </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 PlanFeatures;
/// <summary>
/// chkIM control.
/// </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 chkIM;
/// <summary>
/// chkMobility control.
/// </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 chkMobility;
/// <summary>
/// chkFederation control.
/// </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 chkFederation;
/// <summary>
/// chkConferencing control.
/// </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 chkConferencing;
/// <summary>
/// chkEnterpriseVoice control.
/// </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 chkEnterpriseVoice;
/// <summary>
/// secEnterpriseVoice control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secEnterpriseVoice;
/// <summary>
/// EnterpriseVoice control.
/// </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 EnterpriseVoice;
/// <summary>
/// chkNone control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RadioButton chkNone;
/// <summary>
/// chkEmergency control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RadioButton chkEmergency;
/// <summary>
/// chkNational control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RadioButton chkNational;
/// <summary>
/// chkMobile control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RadioButton chkMobile;
/// <summary>
/// chkInternational control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RadioButton chkInternational;
/// <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>
/// ValidationSummary1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.ValidationSummary ValidationSummary1;
/// <summary>
/// FormComments control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize FormComments;
}
}

View file

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

View file

@ -0,0 +1,66 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using WebsitePanel.Providers.ResultObjects;
using WebsitePanel.EnterpriseServer;
namespace WebsitePanel.Portal.Lync
{
public partial class CreateLyncUser : WebsitePanelModuleBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
WebsitePanel.Providers.HostedSolution.LyncUserPlan[] plans = ES.Services.Lync.GetLyncUserPlans(PanelRequest.ItemID);
if (plans.Length == 0)
btnCreate.Enabled = false;
}
}
protected void btnCreate_Click(object sender, EventArgs e)
{
int accountId = userSelector.GetAccountId();
LyncUserResult res = ES.Services.Lync.CreateLyncUser(PanelRequest.ItemID, accountId, Convert.ToInt32(planSelector.planId));
if (res.IsSuccess && res.ErrorCodes.Count == 0)
{
Response.Redirect(EditUrl("AccountID", accountId.ToString(), "edit_lync_user",
"SpaceID=" + PanelSecurity.PackageId,
"ItemID=" + PanelRequest.ItemID));
}
else
{
messageBox.ShowMessage(res, "CREATE_LYNC_USER", "LYNC");
}
}
}
}

View file

@ -0,0 +1,132 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace WebsitePanel.Portal.Lync {
public partial class CreateLyncUser {
/// <summary>
/// asyncTasks control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks;
/// <summary>
/// breadcrumb control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Breadcrumb breadcrumb;
/// <summary>
/// menu control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Menu menu;
/// <summary>
/// Image1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Image Image1;
/// <summary>
/// locTitle control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locTitle;
/// <summary>
/// messageBox control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
/// <summary>
/// ExistingUserTable control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTable ExistingUserTable;
/// <summary>
/// Localize1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize Localize1;
/// <summary>
/// userSelector control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.UserSelector userSelector;
/// <summary>
/// locPlanName control.
/// </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 locPlanName;
/// <summary>
/// planSelector control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.Lync.UserControls.LyncUserPlanSelector planSelector;
/// <summary>
/// btnCreate control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button btnCreate;
/// <summary>
/// FormComments control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize FormComments;
}
}

View file

@ -0,0 +1,54 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="LyncEditUser.ascx.cs" Inherits="WebsitePanel.Portal.Lync.EditLyncUser" %>
<%@ Register Src="../ExchangeServer/UserControls/UserSelector.ascx" TagName="UserSelector" TagPrefix="wsp" %>
<%@ Register Src="../ExchangeServer/UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %>
<%@ Register Src="../ExchangeServer/UserControls/Breadcrumb.ascx" TagName="Breadcrumb" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/QuotaViewer.ascx" TagName="QuotaViewer" TagPrefix="wsp" %>
<%@ Register src="../ExchangeServer/UserControls/MailboxSelector.ascx" tagname="MailboxSelector" tagprefix="uc1" %>
<%@ Register Src="UserControls/LyncUserPlanSelector.ascx" TagName="LyncUserPlanSelector" TagPrefix="wsp" %>
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server" />
<div id="ExchangeContainer">
<div class="Module">
<div class="Header">
<wsp:Breadcrumb id="breadcrumb" runat="server" PageName="Text.PageName" meta:resourcekey="breadcrumb" />
</div>
<div class="Left">
<wsp:Menu id="menu" runat="server" />
</div>
<div class="Content">
<div class="Center">
<div class="Title">
<asp:Image ID="Image1" SkinID="LyncLogo" runat="server" />
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle"></asp:Localize>
-
<asp:Literal ID="litDisplayName" runat="server" Text="John Smith" />
</div>
<div class="FormBody">
<wsp:SimpleMessageBox id="messageBox" runat="server" />
<table>
<tr>
<td class="FormLabel150">
<asp:Localize ID="locPlanName" runat="server" meta:resourcekey="locPlanName" Text="Plan Name: *"></asp:Localize>
</td>
<td>
<wsp:LyncUserPlanSelector ID="planSelector" runat="server" />
</td>
</tr>
</table>
<div class="FormFooterClean">
<asp:Button runat="server" ID="btnSave" meta:resourcekey="btnSave"
CssClass="Button1" onclick="btnSave_Click" />
</div>
</div>
</div>
<div class="Right">
<asp:Localize ID="FormComments" runat="server" meta:resourcekey="FormComments"></asp:Localize>
</div>
</div>
</div>
</div>

View file

@ -0,0 +1,76 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using WebsitePanel.EnterpriseServer;
using WebsitePanel.Providers.ResultObjects;
using WebsitePanel.Providers.HostedSolution;
namespace WebsitePanel.Portal.Lync
{
public partial class EditLyncUser : WebsitePanelModuleBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
BindItems();
}
private void BindItems()
{
// get settings
LyncUser lyncUser = ES.Services.Lync.GetLyncUserGeneralSettings(PanelRequest.ItemID, PanelRequest.AccountID);
// title
litDisplayName.Text = lyncUser.DisplayName;
planSelector.planId = lyncUser.LyncUserPlanId.ToString();
}
protected void btnSave_Click(object sender, EventArgs e)
{
if (!Page.IsValid)
return;
try
{
LyncUserResult res = ES.Services.Lync.SetUserLyncPlan(PanelRequest.ItemID, PanelRequest.AccountID, Convert.ToInt32(planSelector.planId));
if (res.IsSuccess && res.ErrorCodes.Count == 0)
{
messageBox.ShowSuccessMessage("UPDATE_LYNC_USER");
return;
}
}
catch(Exception ex)
{
messageBox.ShowErrorMessage("UPDATE_LYNC_USER", ex);
}
}
}
}

View file

@ -0,0 +1,114 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace WebsitePanel.Portal.Lync {
public partial class EditLyncUser {
/// <summary>
/// asyncTasks control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks;
/// <summary>
/// breadcrumb control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Breadcrumb breadcrumb;
/// <summary>
/// menu control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Menu menu;
/// <summary>
/// Image1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Image Image1;
/// <summary>
/// locTitle control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locTitle;
/// <summary>
/// litDisplayName control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Literal litDisplayName;
/// <summary>
/// messageBox control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
/// <summary>
/// locPlanName control.
/// </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 locPlanName;
/// <summary>
/// planSelector control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.Lync.UserControls.LyncUserPlanSelector planSelector;
/// <summary>
/// btnSave control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button btnSave;
/// <summary>
/// FormComments control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize FormComments;
}
}

View file

@ -0,0 +1,63 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="LyncFederationDomains.ascx.cs" Inherits="WebsitePanel.Portal.Lync.LyncFederationDomains" %>
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
<%@ Register Src="../ExchangeServer/UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %>
<%@ Register Src="../ExchangeServer/UserControls/Breadcrumb.ascx" TagName="Breadcrumb" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/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="Header">
<wsp:Breadcrumb id="breadcrumb" runat="server" PageName="Text.PageName" />
</div>
<div class="Left">
<wsp:Menu id="menu" runat="server" SelectedItem="domains" />
</div>
<div class="Content">
<div class="Center">
<div class="Title">
<asp:Image ID="Image1" SkinID="LyncFederationDomains48" runat="server" />
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Domain Names"></asp:Localize>
</div>
<div class="FormBody">
<wsp:SimpleMessageBox id="messageBox" runat="server" />
<div class="FormButtonsBarClean">
<asp:Button ID="btnAddDomain" runat="server" meta:resourcekey="btnAddDomain"
Text="Add New Domain" CssClass="Button1" OnClick="btnAddDomain_Click" />
</div>
<asp:GridView ID="gvDomains" runat="server" AutoGenerateColumns="False" EnableViewState="true"
Width="100%" EmptyDataText="gvDomains" CssSelectorClass="NormalGridView" OnRowCommand="gvDomains_RowCommand">
<Columns>
<asp:TemplateField HeaderText="gvDomainsName">
<ItemStyle Width="70%"></ItemStyle>
<ItemTemplate>
<asp:hyperlink id="lnkEditZone" runat="server" EnableViewState="false">
<%# Eval("DomainName") %>
</asp:hyperlink>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
&nbsp;<asp:ImageButton ID="imgDelDomain" runat="server" Text="Delete" SkinID="ExchangeDelete"
CommandName="DeleteItem" CommandArgument='<%# Eval("DomainName") %>'
meta:resourcekey="cmdDelete" OnClientClick="return confirm('Are you sure you want to delete selected domain?')"></asp:ImageButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<br />
<br />
</div>
</div>
<div class="Right">
<asp:Localize ID="FormComments" runat="server" meta:resourcekey="HSFormComments"></asp:Localize>
</div>
</div>
</div>
</div>

View file

@ -0,0 +1,87 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Web.UI.WebControls;
using WebsitePanel.EnterpriseServer;
using WebsitePanel.Providers.ResultObjects;
using WebsitePanel.Providers.HostedSolution;
namespace WebsitePanel.Portal.Lync
{
public partial class LyncFederationDomains : WebsitePanelModuleBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
// bind domain names
BindDomainNames();
}
}
private void BindDomainNames()
{
LyncFederationDomain[] list = ES.Services.Lync.GetFederationDomains(PanelRequest.ItemID);
gvDomains.DataSource = list;
gvDomains.DataBind();
}
protected void btnAddDomain_Click(object sender, EventArgs e)
{
Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "add_lyncfederation_domain",
"SpaceID=" + PanelSecurity.PackageId));
}
protected void gvDomains_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "DeleteItem")
{
try
{
LyncUserResult res = ES.Services.Lync.RemoveFederationDomain(PanelRequest.ItemID, e.CommandArgument.ToString());
if (!(res.IsSuccess && res.ErrorCodes.Count == 0))
{
messageBox.ShowMessage(res, "DELETE_LYNC_FEDERATIONDOMAIN", "LYNC");
return;
}
// rebind domains
BindDomainNames();
}
catch (Exception ex)
{
ShowErrorMessage("LYNC_DELETE_DOMAIN", ex);
}
}
}
}
}

View file

@ -0,0 +1,96 @@
//------------------------------------------------------------------------------
// <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.Lync {
public partial class LyncFederationDomains {
/// <summary>
/// asyncTasks control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks;
/// <summary>
/// breadcrumb control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Breadcrumb breadcrumb;
/// <summary>
/// menu control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Menu menu;
/// <summary>
/// Image1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Image Image1;
/// <summary>
/// locTitle control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locTitle;
/// <summary>
/// messageBox control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
/// <summary>
/// btnAddDomain control.
/// </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 btnAddDomain;
/// <summary>
/// gvDomains control.
/// </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 gvDomains;
/// <summary>
/// FormComments control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize FormComments;
}
}

View file

@ -0,0 +1,73 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="LyncUserPlans.ascx.cs" Inherits="WebsitePanel.Portal.Lync.LyncUserPlans" %>
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
<%@ Register Src="../ExchangeServer/UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %>
<%@ Register Src="../ExchangeServer/UserControls/Breadcrumb.ascx" TagName="Breadcrumb" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/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="Header">
<wsp:Breadcrumb id="breadcrumb" runat="server" PageName="Text.PageName" />
</div>
<div class="Left">
<wsp:Menu id="menu" runat="server" SelectedItem="domains" />
</div>
<div class="Content">
<div class="Center">
<div class="Title">
<asp:Image ID="Image1" SkinID="LyncUserPlan48" runat="server" />
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Domain Names"></asp:Localize>
</div>
<div class="FormBody">
<wsp:SimpleMessageBox id="messageBox" runat="server" />
<div class="FormButtonsBarClean">
<asp:Button ID="btnAddPlan" runat="server" meta:resourcekey="btnAddPlan"
Text="Add New Plan" CssClass="Button1" OnClick="btnAddPlan_Click" />
</div>
<asp:GridView ID="gvPlans" runat="server" AutoGenerateColumns="False" EnableViewState="true"
Width="100%" EmptyDataText="gvPlans" CssSelectorClass="NormalGridView" OnRowCommand="gvPlan_RowCommand">
<Columns>
<asp:TemplateField HeaderText="gvPlan">
<ItemStyle Width="70%"></ItemStyle>
<ItemTemplate>
<asp:hyperlink id="lnkDisplayPlan" runat="server" EnableViewState="false"
NavigateUrl='<%# GetPlanDisplayUrl(Eval("LyncUserPlanId").ToString()) %>'>
<%# Eval("LyncUserPlanName")%>
</asp:hyperlink>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="gvPlanDefault">
<ItemTemplate>
<div style="text-align:center">
<input type="radio" name="DefaultPlan" value='<%# Eval("LyncUserPlanId") %>' <%# IsChecked((bool)Eval("IsDefault")) %> />
</div>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
&nbsp;<asp:ImageButton ID="imgDelMailboxPlan" runat="server" Text="Delete" SkinID="ExchangeDelete"
CommandName="DeleteItem" CommandArgument='<%# Eval("LyncUserPlanId") %>'
meta:resourcekey="cmdDelete" OnClientClick="return confirm('Are you sure you want to delete selected plan?')"></asp:ImageButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<br />
<div style="text-align: center">
<asp:Button ID="btnSetDefaultPlan" runat="server" meta:resourcekey="btnSetDefaultPlan"
Text="Set Default Plan" CssClass="Button1" OnClick="btnSetDefaultPlan_Click" />
</div>
</div>
</div>
<div class="Right">
<asp:Localize ID="FormComments" runat="server" meta:resourcekey="HSFormComments"></asp:Localize>
</div>
</div>
</div>
</div>

View file

@ -0,0 +1,125 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Web.UI.WebControls;
using WebsitePanel.EnterpriseServer;
using WebsitePanel.Providers.HostedSolution;
namespace WebsitePanel.Portal.Lync
{
public partial class LyncUserPlans : WebsitePanelModuleBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindPlans();
}
}
public string GetPlanDisplayUrl(string LyncUserPlanId)
{
return EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "add_lyncuserplan",
"LyncUserPlanId=" + LyncUserPlanId,
"ItemID=" + PanelRequest.ItemID);
}
private void BindPlans()
{
LyncUserPlan[] list = ES.Services.Lync.GetLyncUserPlans(PanelRequest.ItemID);
gvPlans.DataSource = list;
gvPlans.DataBind();
//check if organization has only one default domain
if (gvPlans.Rows.Count == 1)
{
btnSetDefaultPlan.Enabled = false;
}
}
public string IsChecked(bool val)
{
return val ? "checked" : "";
}
protected void btnAddPlan_Click(object sender, EventArgs e)
{
btnSetDefaultPlan.Enabled = true;
Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "add_lyncuserplan",
"SpaceID=" + PanelSecurity.PackageId));
}
protected void gvPlan_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "DeleteItem")
{
int planId = Utils.ParseInt(e.CommandArgument.ToString(), 0);
try
{
int result = ES.Services.Lync.DeleteLyncUserPlan(PanelRequest.ItemID, planId);
if (result < 0)
{
messageBox.ShowResultMessage(result);
return;
}
}
catch (Exception)
{
messageBox.ShowErrorMessage("LYNC_DELETE_PLAN");
}
BindPlans();
}
}
protected void btnSetDefaultPlan_Click(object sender, EventArgs e)
{
// get domain
int planId = Utils.ParseInt(Request.Form["DefaultPlan"], 0);
try
{
ES.Services.Lync.SetOrganizationDefaultLyncUserPlan(PanelRequest.ItemID, planId);
// rebind domains
BindPlans();
}
catch (Exception ex)
{
ShowErrorMessage("LYNC_SET_DEFAULT_PLAN", ex);
}
}
}
}

View file

@ -0,0 +1,105 @@
//------------------------------------------------------------------------------
// <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.Lync {
public partial class LyncUserPlans {
/// <summary>
/// asyncTasks control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks;
/// <summary>
/// breadcrumb control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Breadcrumb breadcrumb;
/// <summary>
/// menu control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Menu menu;
/// <summary>
/// Image1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Image Image1;
/// <summary>
/// locTitle control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locTitle;
/// <summary>
/// messageBox control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
/// <summary>
/// btnAddPlan control.
/// </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 btnAddPlan;
/// <summary>
/// gvPlans control.
/// </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 gvPlans;
/// <summary>
/// btnSetDefaultPlan control.
/// </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 btnSetDefaultPlan;
/// <summary>
/// FormComments control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize FormComments;
}
}

View file

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

View file

@ -0,0 +1,100 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using WebsitePanel.Providers.Common;
using WebsitePanel.Providers.HostedSolution;
namespace WebsitePanel.Portal.Lync
{
public partial class LyncUsers : WebsitePanelModuleBase
{
protected void Page_Load(object sender, EventArgs e)
{
BindStats();
}
private void BindStats()
{
OrganizationStatistics stats = ES.Services.Organizations.GetOrganizationStatistics(PanelRequest.ItemID);
int allocatedLyncUsers = stats.AllocatedLyncUsers;
int usedUsers = stats.CreatedLyncUsers;
usersQuota.QuotaUsedValue = usedUsers;
usersQuota.QuotaValue = allocatedLyncUsers;
}
protected void btnCreateUser_Click(object sender, EventArgs e)
{
Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "create_new_lync_user",
"SpaceID=" + PanelSecurity.PackageId));
}
public string GetAccountImage()
{
return GetThemedImage("Exchange/admin_16.png");
}
public string GetUserEditUrl(string accountId)
{
return EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "edit_lync_user",
"AccountID=" + accountId,
"ItemID=" + PanelRequest.ItemID);
}
protected void odsAccountsPaged_Selected(object sender, System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs e)
{
}
protected void gvUsers_RowCommand(object sender, System.Web.UI.WebControls.GridViewCommandEventArgs e)
{
if (e.CommandName == "DeleteItem")
{
try
{
ResultObject res = ES.Services.Lync.DeleteLyncUser(PanelRequest.ItemID, Convert.ToInt32(e.CommandArgument));
messageBox.ShowMessage(res, "DELETE_LYNC_USER", "LYNC");
// rebind grid
gvUsers.DataBind();
BindStats();
}
catch (Exception ex)
{
messageBox.ShowErrorMessage("DELETE_LYNC_USERS", ex);
}
}
}
}
}

View file

@ -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.Lync {
public partial class LyncUsers {
/// <summary>
/// asyncTasks control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks;
/// <summary>
/// breadcrumb control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Breadcrumb breadcrumb;
/// <summary>
/// menu control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Menu menu;
/// <summary>
/// Image1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Image Image1;
/// <summary>
/// locTitle control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locTitle;
/// <summary>
/// messageBox control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
/// <summary>
/// btnCreateUser control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button btnCreateUser;
/// <summary>
/// SearchPanel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel SearchPanel;
/// <summary>
/// ddlSearchColumn control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddlSearchColumn;
/// <summary>
/// txtSearchValue control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtSearchValue;
/// <summary>
/// cmdSearch control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.ImageButton cmdSearch;
/// <summary>
/// gvUsers control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.GridView gvUsers;
/// <summary>
/// odsAccountsPaged control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource odsAccountsPaged;
/// <summary>
/// locQuota control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locQuota;
/// <summary>
/// usersQuota control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.QuotaViewer usersQuota;
/// <summary>
/// FormComments control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize FormComments;
}
}

View file

@ -0,0 +1,2 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="LyncUserPlanSelector.ascx.cs" Inherits="WebsitePanel.Portal.Lync.UserControls.LyncUserPlanSelector" %>
<asp:DropDownList ID="ddlPlan" runat="server" CssClass="NormalTextBox"></asp:DropDownList>

View file

@ -0,0 +1,100 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Web.UI.WebControls;
namespace WebsitePanel.Portal.Lync.UserControls
{
public partial class LyncUserPlanSelector : WebsitePanelControlBase
{
private string planToSelect;
public string planId
{
get { return ddlPlan.SelectedItem.Value; }
set
{
planToSelect = value;
foreach(ListItem li in ddlPlan.Items)
{
if (li.Value == value)
{
ddlPlan.ClearSelection();
li.Selected = true;
break;
}
}
}
}
public int plansCount
{
get
{
return this.ddlPlan.Items.Count;
}
}
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindPlans();
}
}
private void BindPlans()
{
WebsitePanel.Providers.HostedSolution.LyncUserPlan[] plans = ES.Services.Lync.GetLyncUserPlans(PanelRequest.ItemID);
foreach (WebsitePanel.Providers.HostedSolution.LyncUserPlan plan in plans)
{
ListItem li = new ListItem();
li.Text = plan.LyncUserPlanName;
li.Value = plan.LyncUserPlanId.ToString();
li.Selected = plan.IsDefault;
ddlPlan.Items.Add(li);
}
foreach (ListItem li in ddlPlan.Items)
{
if (li.Value == planToSelect)
{
ddlPlan.ClearSelection();
li.Selected = true;
break;
}
}
}
}
}

View file

@ -0,0 +1,24 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace WebsitePanel.Portal.Lync.UserControls {
public partial class LyncUserPlanSelector {
/// <summary>
/// ddlPlan control.
/// </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 ddlPlan;
}
}

View file

@ -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="btnAdd.Text" xml:space="preserve">
<value>Add</value>
</data>
<data name="gvLyncServers.EmptyDataText" xml:space="preserve">
<value>Located on the same server</value>
</data>
<data name="gvLyncServers.Text" xml:space="preserve">
<value>Lync Servers</value>
</data>
<data name="lblRootOU.Text" xml:space="preserve">
<value>Root OU:</value>
</data>
<data name="locLynServers.Text" xml:space="preserve">
<value>Lync Frontend and Director Servers</value>
</data>
<data name="locServerName.Text" xml:space="preserve">
<value>Enterprise pool or &lt;br/&gt;Standard Edition Server name:</value>
</data>
<data name="locSimpleUrlBase.Text" xml:space="preserve">
<value>Simple Url Base:</value>
</data>
<data name="UseDefault.Text" xml:space="preserve">
<value>&lt;Located on the same server&gt;</value>
</data>
</root>

View file

@ -0,0 +1,54 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Lync_Settings.ascx.cs" Inherits="WebsitePanel.Portal.ProviderControls.Lync_Settings" %>
<table>
<tr>
<td class="Normal" width="200" >
<asp:Localize runat="server" ID="locServerName" meta:resourcekey="locServerName"/>
</td>
<td >
<asp:TextBox runat="server" ID="txtServerName" CssClass="NormalTextBox" Width="200px"/>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtServerName" ErrorMessage="*" Display="Dynamic" />
</td>
</tr>
<tr>
<td class="Normal" width="200" >
<asp:Localize runat="server" ID="locSimpleUrlBase" meta:resourcekey="locSimpleUrlBase"/>
</td>
<td >
<asp:TextBox runat="server" ID="txtSimpleUrlBase" CssClass="NormalTextBox" Width="200px"/>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtSimpleUrlBase" ErrorMessage="*" Display="Dynamic" />
</td>
</tr>
<tr>
<td class="SubHead" width="200" nowrap valign="top">
<asp:Localize ID="locLynServers" runat="server" meta:resourcekey="locLynServers"
Text="Lync Servers:"></asp:Localize>
</td>
<td>
<asp:DropDownList ID="ddlLyncServers" runat="server" CssClass="NormalTextBox">
</asp:DropDownList>
<asp:Button runat="server" ID="btnAddLyncServer" OnClick="btnAddLyncServer_Click" meta:resourcekey="btnAdd"
CssClass="Button1" /><br />
<asp:GridView ID="gvLyncServers" runat="server" AutoGenerateColumns="False" EmptyDataText="gvRecords"
CssSelectorClass="NormalGridView" OnRowCommand="gvLyncServers_RowCommand" meta:resourcekey="gvLyncServers">
<Columns>
<asp:TemplateField meta:resourcekey="locServerNameColumn" ItemStyle-Width="100%" >
<ItemTemplate>
<asp:Label runat="server" ID="lblServiceName" Text='<%#Eval("ServiceName") + "(" + Eval("ServerName") +")"%>' />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:ImageButton ID="cmdDelete" runat="server" SkinID="DeleteSmall" CommandName="RemoveServer"
CommandArgument='<%#Eval("ServiceId") %>' meta:resourcekey="cmdDelete" AlternateText="Delete"
OnClientClick="return confirm('Delete?');"></asp:ImageButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</td>
</tr>
</table>

View file

@ -0,0 +1,181 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Data;
using System.Web.UI.WebControls;
using WebsitePanel.EnterpriseServer;
using WebsitePanel.Providers.HostedSolution;
namespace WebsitePanel.Portal.ProviderControls
{
public partial class Lync_Settings : WebsitePanelControlBase, IHostingServiceProviderSettings
{
public const string LyncServersData = "LyncServersData";
protected void Page_Load(object sender, EventArgs e)
{
}
public void BindSettings(System.Collections.Specialized.StringDictionary settings)
{
txtServerName.Text = settings[LyncConstants.PoolFQDN];
txtSimpleUrlBase.Text = settings[LyncConstants.SimpleUrlRoot];
LyncServers = settings["LyncServersServiceID"];
BindLyncServices(ddlLyncServers);
Utils.SelectListItem(ddlLyncServers, settings["LyncServersServiceID"]);
UpdateLyncServersGrid();
}
public void SaveSettings(System.Collections.Specialized.StringDictionary settings)
{
settings[LyncConstants.PoolFQDN] = txtServerName.Text.Trim();
settings[LyncConstants.SimpleUrlRoot] = txtSimpleUrlBase.Text.Trim();
settings["LyncServersServiceID"] = LyncServers;
}
public string LyncServers
{
get
{
return ViewState[LyncServersData] != null ? ViewState[LyncServersData].ToString() : string.Empty;
}
set
{
ViewState[LyncServersData] = value;
}
}
protected void btnAddLyncServer_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(LyncServers))
LyncServers += ",";
LyncServers += ddlLyncServers.SelectedItem.Value;
UpdateLyncServersGrid();
BindLyncServices(ddlLyncServers);
}
public List<ServiceInfo> GetServices(string data)
{
if (string.IsNullOrEmpty(data))
return null;
List<ServiceInfo> list = new List<ServiceInfo>();
string[] servicesIds = data.Split(',');
foreach (string current in servicesIds)
{
ServiceInfo serviceInfo = ES.Services.Servers.GetServiceInfo(Utils.ParseInt(current));
list.Add(serviceInfo);
}
return list;
}
private void UpdateLyncServersGrid()
{
gvLyncServers.DataSource = GetServices(LyncServers);
gvLyncServers.DataBind();
}
public void BindLyncServices(DropDownList ddl)
{
ddl.Items.Clear();
ServiceInfo serviceInfo = ES.Services.Servers.GetServiceInfo(PanelRequest.ServiceId);
DataView dvServices = ES.Services.Servers.GetRawServicesByGroupName(ResourceGroups.Lync).Tables[0].DefaultView;
foreach (DataRowView dr in dvServices)
{
int serviceId = (int)dr["ServiceID"];
ServiceInfo currentServiceInfo = ES.Services.Servers.GetServiceInfo(serviceId);
if (currentServiceInfo == null || currentServiceInfo.ProviderId != serviceInfo.ProviderId)
continue;
List<ServiceInfo> services = GetServices(LyncServers);
bool exists = false;
if (services != null)
foreach (ServiceInfo current in services)
{
if (current != null && current.ServiceId == serviceId)
{
exists = true;
break;
}
}
if (!exists)
ddl.Items.Add(new ListItem(dr["FullServiceName"].ToString(), serviceId.ToString()));
}
ddl.Visible = ddl.Items.Count != 0;
btnAddLyncServer.Visible = ddl.Items.Count != 0;
}
protected void gvLyncServers_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "RemoveServer")
{
string str = string.Empty;
List<ServiceInfo> services = GetServices(LyncServers);
foreach (ServiceInfo current in services)
{
if (current.ServiceId == Utils.ParseInt(e.CommandArgument.ToString()))
continue;
str += current.ServiceId + ",";
}
LyncServers = str.TrimEnd(',');
UpdateLyncServersGrid();
BindLyncServices(ddlLyncServers);
}
}
}
}

View file

@ -0,0 +1,105 @@
//------------------------------------------------------------------------------
// <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.ProviderControls {
public partial class Lync_Settings {
/// <summary>
/// locServerName control.
/// </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 locServerName;
/// <summary>
/// txtServerName control.
/// </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 txtServerName;
/// <summary>
/// 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 RequiredFieldValidator2;
/// <summary>
/// locSimpleUrlBase control.
/// </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 locSimpleUrlBase;
/// <summary>
/// txtSimpleUrlBase control.
/// </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 txtSimpleUrlBase;
/// <summary>
/// RequiredFieldValidator1 control.
/// </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;
/// <summary>
/// locLynServers control.
/// </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 locLynServers;
/// <summary>
/// ddlLyncServers control.
/// </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 ddlLyncServers;
/// <summary>
/// btnAddLyncServer control.
/// </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 btnAddLyncServer;
/// <summary>
/// gvLyncServers control.
/// </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 gvLyncServers;
}
}

View file

@ -26,6 +26,31 @@
<td class="SubHead" nowrap><asp:Label ID="lblDomainPointers" runat="server" meta:resourcekey="lblDomainPointers" Text="Domain Pointers:"></asp:Label></td>
<td class="Normal"><wsp:Quota ID="quotaDomainPointers" runat="server" QuotaName="OS.DomainPointers" DisplayGauge="True" /></td>
</tr>
<tr ID="pnlUserAccounts" runat="server">
<td class="SubHead" nowrap><asp:Label ID="lblUserAccounts" runat="server" meta:resourcekey="lblUserAccounts" Text="User Accounts:"></asp:Label></td>
<td class="Normal"><wsp:Quota ID="quotaUserAccounts" runat="server" QuotaName="HostedSolution.Users" DisplayGauge="True" /></td>
</tr>
<tr ID="pnlMailAccounts" runat="server">
<td class="SubHead" nowrap><asp:Label ID="lblMailAccounts" runat="server" meta:resourcekey="lblMailAccounts" Text="Mail Accounts:"></asp:Label></td>
<td class="Normal"><wsp:Quota ID="quotaMailAccounts" runat="server" QuotaName="Mail.Accounts" DisplayGauge="True" /></td>
</tr>
<tr ID="pnlOCSUsers" runat="server">
<td class="SubHead" nowrap><asp:Label ID="lblOCSUsers" runat="server" meta:resourcekey="lblOCSUsers" Text="OCS Users:"></asp:Label></td>
<td class="Normal"><wsp:Quota ID="quotaOCSUsers" runat="server" QuotaName="OCS.Users" DisplayGauge="True" /></td>
</tr>
<tr ID="pnlLyncUsers" runat="server">
<td class="SubHead" nowrap><asp:Label ID="lblLyncUsers" runat="server" meta:resourcekey="lblLyncUsers" Text="Lync Users:"></asp:Label></td>
<td class="Normal"><wsp:Quota ID="quotaLyncUsers" runat="server" QuotaName="Lync.Users" DisplayGauge="True" /></td>
</tr>
<tr ID="pnlBlackBerryUsers" runat="server">
<td class="SubHead" nowrap><asp:Label ID="lblBlackBerryUsers" runat="server" meta:resourcekey="lblBlackBerryUsers" Text="BlackBerry Users:"></asp:Label></td>
<td class="Normal"><wsp:Quota ID="quotaBlackBerryUsers" runat="server" QuotaName="BlackBerry.Users" DisplayGauge="True" /></td>
</tr>
<tr ID="pnlSharepointSites" runat="server">
<td class="SubHead" nowrap><asp:Label ID="lblSharepointSites" runat="server" meta:resourcekey="lblSharepointSites" Text="Sharepoint Sites:"></asp:Label></td>
<td class="Normal"><wsp:Quota ID="quotaSharepointSites" runat="server" QuotaName="HostedSharePoint.Sites" DisplayGauge="True" /></td>
</tr>
<tr ID="pnlWebSites" runat="server">
<td class="SubHead" nowrap><asp:Label ID="lblWebSites" runat="server" meta:resourcekey="lblWebSites" Text="Web Sites:"></asp:Label></td>
<td class="Normal"><wsp:Quota ID="quotaWebSites" runat="server" QuotaName="Web.Sites" DisplayGauge="True" /></td>
@ -34,9 +59,9 @@
<td class="SubHead" nowrap><asp:Label ID="lblFtpAccounts" runat="server" meta:resourcekey="lblFtpAccounts" Text="FTP Accounts:"></asp:Label></td>
<td class="Normal"><wsp:Quota ID="quotaFtpAccounts" runat="server" QuotaName="FTP.Accounts" DisplayGauge="True"/></td>
</tr>
<tr ID="pnlMailAccounts" runat="server">
<td class="SubHead" nowrap><asp:Label ID="lblMailAccounts" runat="server" meta:resourcekey="lblMailAccounts" Text="Mail Accounts:"></asp:Label></td>
<td class="Normal"><wsp:Quota ID="quotaMailAccounts" runat="server" QuotaName="Mail.Accounts" DisplayGauge="True" /></td>
<tr ID="pnlDatabases" runat="server">
<td class="SubHead" nowrap><asp:Label ID="lblDatabases" runat="server" meta:resourcekey="lblDatabases" Text="Databases:"></asp:Label></td>
<td class="Normal"><wsp:Quota ID="quotaDatabases" runat="server" QuotaName="MsSQL2008.Databases" DisplayGauge="True"/></td>
</tr>
<tr id="pnlHyperVForPC" runat="server">
<td class="SubHead" nowrap><asp:Label ID="lblHyperVForPC" runat="server" meta:resourcekey="lblHyperVForPC" Text="Number of VM:" /></td>

View file

@ -54,13 +54,18 @@ namespace WebsitePanel.Portal
{
// QUOTA CONTROL ID <=> TABLE ROW CONTROL ID
{ "quotaDiskspace", "pnlDiskspace" },
{ "quotaBandwidth", "pnlBandwidth" },
{ "quotaFtpAccounts", "pnlFtpAccounts" },
{ "quotaBandwidth", "pnlBandwidth" },
{ "quotaDomains", "pnlDomains" },
{ "quotaSubDomains", "pnlSubDomains" },
{ "quotaDomainPointers", "pnlDomainPointers" },
{ "quotaMailAccounts", "pnlMailAccounts" },
{ "quotaUserAccounts", "pnlUserAccounts" },
{ "quotaMailAccounts", "pnlMailboxes" },
{ "quotaOCSUsers", "pnlOCSUsers" },
{ "quotaLyncUsers", "pnlLyncUsers" },
{ "quotaBlackBerryUsers", "pnlBlackBerryUsers" },
{ "quotaSharepointSites", "pnlSharepointSites" },
{ "quotaWebSites", "pnlWebSites" },
{ "quotaDatabases", "pnlDatabases" },
{ "quotaNumberOfVm", "pnlHyperVForPC" }
};

View file

@ -147,6 +147,168 @@ namespace WebsitePanel.Portal {
/// </remarks>
protected global::WebsitePanel.Portal.Quota quotaDomainPointers;
/// <summary>
/// pnlUserAccounts control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlUserAccounts;
/// <summary>
/// lblUserAccounts control.
/// </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 lblUserAccounts;
/// <summary>
/// quotaUserAccounts control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.Quota quotaUserAccounts;
/// <summary>
/// pnlMailAccounts control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlMailAccounts;
/// <summary>
/// lblMailAccounts control.
/// </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 lblMailAccounts;
/// <summary>
/// quotaMailAccounts control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.Quota quotaMailAccounts;
/// <summary>
/// pnlOCSUsers control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlOCSUsers;
/// <summary>
/// lblOCSUsers control.
/// </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 lblOCSUsers;
/// <summary>
/// quotaOCSUsers control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.Quota quotaOCSUsers;
/// <summary>
/// pnlLyncUsers control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlLyncUsers;
/// <summary>
/// lblLyncUsers control.
/// </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 lblLyncUsers;
/// <summary>
/// quotaLyncUsers control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.Quota quotaLyncUsers;
/// <summary>
/// pnlBlackBerryUsers control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlBlackBerryUsers;
/// <summary>
/// lblBlackBerryUsers control.
/// </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 lblBlackBerryUsers;
/// <summary>
/// quotaBlackBerryUsers control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.Quota quotaBlackBerryUsers;
/// <summary>
/// pnlSharepointSites control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlSharepointSites;
/// <summary>
/// lblSharepointSites control.
/// </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 lblSharepointSites;
/// <summary>
/// quotaSharepointSites control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.Quota quotaSharepointSites;
/// <summary>
/// pnlWebSites control.
/// </summary>
@ -202,31 +364,31 @@ namespace WebsitePanel.Portal {
protected global::WebsitePanel.Portal.Quota quotaFtpAccounts;
/// <summary>
/// pnlMailAccounts control.
/// pnlDatabases control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlMailAccounts;
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlDatabases;
/// <summary>
/// lblMailAccounts control.
/// lblDatabases control.
/// </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 lblMailAccounts;
protected global::System.Web.UI.WebControls.Label lblDatabases;
/// <summary>
/// quotaMailAccounts control.
/// quotaDatabases control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.Quota quotaMailAccounts;
protected global::WebsitePanel.Portal.Quota quotaDatabases;
/// <summary>
/// pnlHyperVForPC control.

View file

@ -161,6 +161,7 @@
<Compile Include="Code\Framework\Utils.cs" />
<Compile Include="Code\Helpers\AuditLogHelper.cs" />
<Compile Include="Code\Helpers\BlackBerryHelper.cs" />
<Compile Include="Code\Helpers\LyncHelper.cs" />
<Compile Include="Code\Helpers\VirtualMachinesForPCHelper.cs" />
<Compile Include="Code\Helpers\CRMHelper.cs" />
<Compile Include="Code\Helpers\ExchangeHelper.cs" />
@ -224,6 +225,62 @@
<Compile Include="ExchangeServer\UserControls\MailboxPlanSelector.ascx.designer.cs">
<DependentUpon>MailboxPlanSelector.ascx</DependentUpon>
</Compile>
<Compile Include="Lync\LyncAddFederationDomain.ascx.cs">
<DependentUpon>LyncAddFederationDomain.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Lync\LyncAddFederationDomain.ascx.designer.cs">
<DependentUpon>LyncAddFederationDomain.ascx</DependentUpon>
</Compile>
<Compile Include="Lync\LyncAddLyncUserPlan.ascx.cs">
<DependentUpon>LyncAddLyncUserPlan.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Lync\LyncAddLyncUserPlan.ascx.designer.cs">
<DependentUpon>LyncAddLyncUserPlan.ascx</DependentUpon>
</Compile>
<Compile Include="Lync\LyncCreateUser.ascx.cs">
<DependentUpon>LyncCreateUser.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Lync\LyncCreateUser.ascx.designer.cs">
<DependentUpon>LyncCreateUser.ascx</DependentUpon>
</Compile>
<Compile Include="Lync\LyncEditUser.ascx.cs">
<DependentUpon>LyncEditUser.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Lync\LyncEditUser.ascx.designer.cs">
<DependentUpon>LyncEditUser.ascx</DependentUpon>
</Compile>
<Compile Include="Lync\LyncFederationDomains.ascx.cs">
<DependentUpon>LyncFederationDomains.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Lync\LyncFederationDomains.ascx.designer.cs">
<DependentUpon>LyncFederationDomains.ascx</DependentUpon>
</Compile>
<Compile Include="Lync\LyncUserPlans.ascx.cs">
<DependentUpon>LyncUserPlans.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Lync\LyncUserPlans.ascx.designer.cs">
<DependentUpon>LyncUserPlans.ascx</DependentUpon>
</Compile>
<Compile Include="Lync\LyncUsers.ascx.cs">
<DependentUpon>LyncUsers.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Lync\LyncUsers.ascx.designer.cs">
<DependentUpon>LyncUsers.ascx</DependentUpon>
</Compile>
<Compile Include="Lync\UserControls\LyncUserPlanSelector.ascx.cs">
<DependentUpon>LyncUserPlanSelector.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Lync\UserControls\LyncUserPlanSelector.ascx.designer.cs">
<DependentUpon>LyncUserPlanSelector.ascx</DependentUpon>
</Compile>
<Compile Include="ProviderControls\hMailServer5_EditAccount.ascx.cs">
<DependentUpon>hMailServer5_EditAccount.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@ -269,6 +326,13 @@
<Compile Include="ProviderControls\hMailServer5_Settings.ascx.designer.cs">
<DependentUpon>hMailServer5_Settings.ascx</DependentUpon>
</Compile>
<Compile Include="ProviderControls\Lync_Settings.ascx.cs">
<DependentUpon>Lync_Settings.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="ProviderControls\Lync_Settings.ascx.designer.cs">
<DependentUpon>Lync_Settings.ascx</DependentUpon>
</Compile>
<Compile Include="ScheduleTaskControls\NotifyOverusedDatabases.ascx.cs">
<DependentUpon>NotifyOverusedDatabases.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@ -3690,12 +3754,21 @@
<Content Include="ExchangeServer\ExchangeMailboxPlans.ascx" />
<Content Include="ExchangeServer\UserControls\AccountsListWithPermissions.ascx" />
<Content Include="ExchangeServer\UserControls\MailboxPlanSelector.ascx" />
<Content Include="Lync\LyncAddFederationDomain.ascx" />
<Content Include="Lync\LyncAddLyncUserPlan.ascx" />
<Content Include="Lync\LyncCreateUser.ascx" />
<Content Include="Lync\LyncEditUser.ascx" />
<Content Include="Lync\LyncFederationDomains.ascx" />
<Content Include="Lync\LyncUserPlans.ascx" />
<Content Include="Lync\LyncUsers.ascx" />
<Content Include="Lync\UserControls\LyncUserPlanSelector.ascx" />
<Content Include="ProviderControls\hMailServer5_EditAccount.ascx" />
<Content Include="ProviderControls\hMailServer5_EditDomain.ascx" />
<Content Include="ProviderControls\hMailServer5_EditForwarding.ascx" />
<Content Include="ProviderControls\hMailServer5_EditGroup.ascx" />
<Content Include="ProviderControls\hMailServer5_EditList.ascx" />
<Content Include="ProviderControls\hMailServer5_Settings.ascx" />
<Content Include="ProviderControls\Lync_Settings.ascx" />
<Content Include="ScheduleTaskControls\NotifyOverusedDatabases.ascx" />
<Content Include="VPSForPC\MonitoringPage.aspx" />
<Content Include="VPSForPC\VdcAccountVLanAdd.ascx" />
@ -4813,6 +4886,14 @@
</Content>
<Content Include="ExchangeServer\App_LocalResources\ExchangeAddMailboxPlan.ascx.resx" />
<Content Include="ExchangeServer\App_LocalResources\ExchangeMailboxPlans.ascx.resx" />
<Content Include="Lync\App_LocalResources\LyncAddFederationDomain.ascx.resx" />
<Content Include="Lync\App_LocalResources\LyncAddLyncUserPlan.ascx.resx" />
<Content Include="Lync\App_LocalResources\LyncCreateUser.ascx.resx" />
<Content Include="Lync\App_LocalResources\LyncEditUser.ascx.resx" />
<Content Include="Lync\App_LocalResources\LyncFederationDomains.ascx.resx" />
<Content Include="Lync\App_LocalResources\LyncUserPlans.ascx.resx" />
<Content Include="Lync\App_LocalResources\LyncUsers.ascx.resx" />
<Content Include="ProviderControls\App_LocalResources\Lync_Settings.ascx.resx" />
<EmbeddedResource Include="UserControls\App_LocalResources\EditDomainsList.ascx.resx">
<SubType>Designer</SubType>
</EmbeddedResource>
@ -5766,7 +5847,9 @@
<SubType>Designer</SubType>
</None>
</ItemGroup>
<ItemGroup />
<ItemGroup>
<Folder Include="Lync\UserControls\App_LocalResources\" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\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.

View file

@ -107,6 +107,12 @@
<Content Include="App_Themes\Default\Images\Exchange\disabled_16.png" />
<Content Include="App_Themes\Default\Images\Exchange\enabled.png" />
<Content Include="App_Themes\Default\Images\FileManager\vbhtml.png" />
<Content Include="App_Themes\Default\Images\lync16.png" />
<Content Include="App_Themes\Default\Images\lync48.png" />
<Content Include="App_Themes\Default\Images\lyncfederationdomains48.png" />
<Content Include="App_Themes\Default\Images\lyncuser.png" />
<Content Include="App_Themes\Default\Images\lyncuserplan48.png" />
<Content Include="App_Themes\Default\Images\lyncuserplanadd48.png" />
<Content Include="App_Themes\Default\Images\VPSForPC\vlan_icon.png" />
<Content Include="App_Themes\Default\Images\VPSForPC\private_cloud_module_header_vps.gif" />
<Content Include="App_Themes\Default\Images\FileManager\cshtml.png" />

View file

@ -2,5 +2,5 @@ SET WSDL="C:\Program Files (x86)\Microsoft WSE\v3.0\Tools\WseWsdl3.exe"
SET WSE_CLEAN=..\Tools\WseClean.exe
SET SERVER_URL=http://localhost:9005
%WSDL% %SERVER_URL%/esExchangeServer.asmx /out:.\WebsitePanel.EnterpriseServer.Client\ExchangeServerProxy.cs /namespace:WebsitePanel.EnterpriseServer /type:webClient
%WSE_CLEAN% .\WebsitePanel.EnterpriseServer.Client\ExchangeServerProxy.cs
%WSDL% %SERVER_URL%/esLync.asmx /out:.\WebsitePanel.EnterpriseServer.Client\LyncProxy.cs /namespace:WebsitePanel.EnterpriseServer /type:webClient
%WSE_CLEAN% .\WebsitePanel.EnterpriseServer.Client\LyncProxy.cs