Decoupling of userprincipalName and PrimaryEmailAddress
OrganizationUsers updated with image buttons with the ability to go directly
to offering settings
When changing primaryemailaddress, sip address changes accordingly
Mailboxes list view updated with Login (=userprincipalName) with the ability
to go directly to user setting
Lync list view updated with Login (=userprincipalName) with the ability
to go directly to user setting
This commit is contained in:
robvde 2012-11-22 13:16:41 +04:00
parent bc1168a1a4
commit 6cf946b6b4
30 changed files with 869 additions and 121 deletions

View file

@ -569,6 +569,19 @@ UPDATE [dbo].[Quotas] SET [HideQuota] = 1 WHERE [QuotaName] = N'OS.DomainPointer
GO GO
/****** Object: Table [dbo].[ExchangeAccounts] Extend Exchange Accounts with UserPrincipalName ******/
IF NOT EXISTS(select 1 from sys.columns COLS INNER JOIN sys.objects OBJS ON OBJS.object_id=COLS.object_id and OBJS.type='U' AND OBJS.name='ExchangeAccounts' AND COLS.name='UserPrincipalName')
BEGIN
ALTER TABLE [dbo].[ExchangeAccounts] ADD
[UserPrincipalName] [nvarchar] (300) COLLATE Latin1_General_CI_AS NULL
END
GO
IF NOT EXISTS(SELECT * FROM [dbo].[ExchangeAccounts] WHERE UserPrincipalName IS NOT NULL)
BEGIN
UPDATE [dbo].[ExchangeAccounts] SET [UserPrincipalName] = PrimaryEmailAddress
END
GO
/****** Object: Table [dbo].[ExchangeAccounts] Extend Exchange Accounts with SubscriberNumber ******/ /****** Object: Table [dbo].[ExchangeAccounts] Extend Exchange Accounts with SubscriberNumber ******/
@ -1468,7 +1481,8 @@ INSERT INTO ExchangeAccounts
SamAccountName, SamAccountName,
AccountPassword, AccountPassword,
MailboxPlanId, MailboxPlanId,
SubscriberNumber SubscriberNumber,
UserPrincipalName
) )
VALUES VALUES
( (
@ -1482,7 +1496,8 @@ VALUES
@SamAccountName, @SamAccountName,
@AccountPassword, @AccountPassword,
@MailboxPlanId, @MailboxPlanId,
@SubscriberNumber @SubscriberNumber,
@PrimaryEmailAddress
) )
SET @AccountID = SCOPE_IDENTITY() SET @AccountID = SCOPE_IDENTITY()
@ -2157,7 +2172,8 @@ SELECT
E.MailEnabledPublicFolder, E.MailEnabledPublicFolder,
E.MailboxPlanId, E.MailboxPlanId,
P.MailboxPlan, P.MailboxPlan,
E.SubscriberNumber E.SubscriberNumber,
E.UserPrincipalName
FROM FROM
ExchangeAccounts AS E ExchangeAccounts AS E
LEFT OUTER JOIN ExchangeMailboxPlans AS P ON E.MailboxPlanId = P.MailboxPlanId LEFT OUTER JOIN ExchangeMailboxPlans AS P ON E.MailboxPlanId = P.MailboxPlanId
@ -2242,7 +2258,8 @@ WITH Accounts AS (
EA.PrimaryEmailAddress, EA.PrimaryEmailAddress,
EA.MailEnabledPublicFolder, EA.MailEnabledPublicFolder,
EA.MailboxPlanId, EA.MailboxPlanId,
EA.SubscriberNumber ' + @joincondition + EA.SubscriberNumber,
EA.UserPrincipalName ' + @joincondition +
' WHERE ' + @condition + ' ' WHERE ' + @condition + '
) )
@ -2291,7 +2308,8 @@ SELECT
E.AccountPassword, E.AccountPassword,
E.MailboxPlanId, E.MailboxPlanId,
P.MailboxPlan, P.MailboxPlan,
E.SubscriberNumber E.SubscriberNumber,
E.UserPrincipalName
FROM FROM
ExchangeAccounts AS E ExchangeAccounts AS E
LEFT OUTER JOIN ExchangeMailboxPlans AS P ON E.MailboxPlanId = P.MailboxPlanId LEFT OUTER JOIN ExchangeMailboxPlans AS P ON E.MailboxPlanId = P.MailboxPlanId
@ -2304,6 +2322,37 @@ GO
ALTER PROCEDURE [dbo].[GetExchangeAccountByAccountName]
(
@ItemID int,
@AccountName nvarchar(300)
)
AS
SELECT
E.AccountID,
E.ItemID,
E.AccountType,
E.AccountName,
E.DisplayName,
E.PrimaryEmailAddress,
E.MailEnabledPublicFolder,
E.MailboxManagerActions,
E.SamAccountName,
E.AccountPassword,
E.MailboxPlanId,
P.MailboxPlan,
E.SubscriberNumber,
E.UserPrincipalName
FROM
ExchangeAccounts AS E
LEFT OUTER JOIN ExchangeMailboxPlans AS P ON E.MailboxPlanId = P.MailboxPlanId
WHERE
E.ItemID = @ItemID AND
E.AccountName = @AccountName
RETURN
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'GetExchangeAccountByMailboxPlanId') IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'GetExchangeAccountByMailboxPlanId')
@ -2330,7 +2379,8 @@ SELECT
E.AccountPassword, E.AccountPassword,
E.MailboxPlanId, E.MailboxPlanId,
P.MailboxPlan, P.MailboxPlan,
E.SubscriberNumber E.SubscriberNumber,
E.UserPrincipalName
FROM FROM
ExchangeAccounts AS E ExchangeAccounts AS E
LEFT OUTER JOIN ExchangeMailboxPlans AS P ON E.MailboxPlanId = P.MailboxPlanId LEFT OUTER JOIN ExchangeMailboxPlans AS P ON E.MailboxPlanId = P.MailboxPlanId
@ -2357,7 +2407,8 @@ SELECT
E.AccountPassword, E.AccountPassword,
E.MailboxPlanId, E.MailboxPlanId,
P.MailboxPlan, P.MailboxPlan,
E.SubscriberNumber E.SubscriberNumber,
E.UserPrincipalName
FROM FROM
ExchangeAccounts AS E ExchangeAccounts AS E
LEFT OUTER JOIN ExchangeMailboxPlans AS P ON E.MailboxPlanId = P.MailboxPlanId LEFT OUTER JOIN ExchangeMailboxPlans AS P ON E.MailboxPlanId = P.MailboxPlanId
@ -2380,7 +2431,8 @@ SELECT
E.AccountPassword, E.AccountPassword,
E.MailboxPlanId, E.MailboxPlanId,
P.MailboxPlan, P.MailboxPlan,
E.SubscriberNumber E.SubscriberNumber,
E.UserPrincipalName
FROM FROM
ExchangeAccounts AS E ExchangeAccounts AS E
LEFT OUTER JOIN ExchangeMailboxPlans AS P ON E.MailboxPlanId = P.MailboxPlanId LEFT OUTER JOIN ExchangeMailboxPlans AS P ON E.MailboxPlanId = P.MailboxPlanId
@ -2420,7 +2472,8 @@ SELECT
E.AccountPassword, E.AccountPassword,
E.MailboxPlanId, E.MailboxPlanId,
P.MailboxPlan, P.MailboxPlan,
E.SubscriberNumber E.SubscriberNumber,
E.UserPrincipalName
FROM FROM
ExchangeAccounts AS E ExchangeAccounts AS E
LEFT OUTER JOIN ExchangeMailboxPlans AS P ON E.MailboxPlanId = P.MailboxPlanId LEFT OUTER JOIN ExchangeMailboxPlans AS P ON E.MailboxPlanId = P.MailboxPlanId
@ -2447,7 +2500,8 @@ SELECT
E.AccountPassword, E.AccountPassword,
E.MailboxPlanId, E.MailboxPlanId,
P.MailboxPlan, P.MailboxPlan,
E.SubscriberNumber E.SubscriberNumber,
E.UserPrincipalName
FROM FROM
ExchangeAccounts AS E ExchangeAccounts AS E
LEFT OUTER JOIN ExchangeMailboxPlans AS P ON E.MailboxPlanId = P.MailboxPlanId LEFT OUTER JOIN ExchangeMailboxPlans AS P ON E.MailboxPlanId = P.MailboxPlanId
@ -2470,7 +2524,8 @@ SELECT
E.AccountPassword, E.AccountPassword,
E.MailboxPlanId, E.MailboxPlanId,
P.MailboxPlan, P.MailboxPlan,
E.SubscriberNumber E.SubscriberNumber,
E.UserPrincipalName
FROM FROM
ExchangeAccounts AS E ExchangeAccounts AS E
LEFT OUTER JOIN ExchangeMailboxPlans AS P ON E.MailboxPlanId = P.MailboxPlanId LEFT OUTER JOIN ExchangeMailboxPlans AS P ON E.MailboxPlanId = P.MailboxPlanId
@ -2917,7 +2972,8 @@ SELECT
E.AccountPassword, E.AccountPassword,
E.MailboxPlanId, E.MailboxPlanId,
P.MailboxPlan, P.MailboxPlan,
E.SubscriberNumber E.SubscriberNumber,
E.UserPrincipalName
FROM FROM
ExchangeAccounts AS E ExchangeAccounts AS E
LEFT OUTER JOIN ExchangeMailboxPlans AS P ON E.MailboxPlanId = P.MailboxPlanId LEFT OUTER JOIN ExchangeMailboxPlans AS P ON E.MailboxPlanId = P.MailboxPlanId
@ -2947,7 +3003,8 @@ SELECT
DisplayName, DisplayName,
PrimaryEmailAddress, PrimaryEmailAddress,
MailEnabledPublicFolder, MailEnabledPublicFolder,
SubscriberNumber SubscriberNumber,
UserPrincipalName
FROM FROM
ExchangeAccounts ExchangeAccounts
WHERE WHERE
@ -3009,7 +3066,8 @@ SELECT
MailboxManagerActions, MailboxManagerActions,
SamAccountName, SamAccountName,
AccountPassword, AccountPassword,
SubscriberNumber SubscriberNumber,
UserPrincipalName
FROM ExchangeAccounts FROM ExchangeAccounts
WHERE AccountID = @AccountID WHERE AccountID = @AccountID
@ -3078,7 +3136,8 @@ SELECT
EA.DisplayName, EA.DisplayName,
EA.PrimaryEmailAddress, EA.PrimaryEmailAddress,
EA.MailEnabledPublicFolder, EA.MailEnabledPublicFolder,
EA.SubscriberNumber EA.SubscriberNumber,
EA.UserPrincipalName
FROM ExchangeAccounts AS EA FROM ExchangeAccounts AS EA
WHERE ' + @condition WHERE ' + @condition
@ -3151,7 +3210,8 @@ SELECT
EA.AccountName, EA.AccountName,
EA.DisplayName, EA.DisplayName,
EA.PrimaryEmailAddress, EA.PrimaryEmailAddress,
EA.SubscriberNumber EA.SubscriberNumber,
EA.UserPrincipalName
FROM ExchangeAccounts AS EA FROM ExchangeAccounts AS EA
WHERE ' + @condition WHERE ' + @condition
@ -3211,7 +3271,7 @@ AS
ea.ItemID, ea.ItemID,
ea.AccountName, ea.AccountName,
ea.DisplayName, ea.DisplayName,
ea.PrimaryEmailAddress, ea.UserPrincipalName,
ea.SamAccountName, ea.SamAccountName,
ou.LyncUserPlanId, ou.LyncUserPlanId,
lp.LyncUserPlanName lp.LyncUserPlanName
@ -3249,7 +3309,7 @@ AS
ea.ItemID, ea.ItemID,
ea.AccountName, ea.AccountName,
ea.DisplayName, ea.DisplayName,
ea.PrimaryEmailAddress, ea.UserPrincipalName,
ea.SamAccountName, ea.SamAccountName,
ou.LyncUserPlanId, ou.LyncUserPlanId,
lp.LyncUserPlanName lp.LyncUserPlanName
@ -3678,6 +3738,13 @@ RETURN
GO GO
IF NOT EXISTS(select 1 from sys.columns COLS INNER JOIN sys.objects OBJS ON OBJS.object_id=COLS.object_id and OBJS.type='U' AND OBJS.name='LyncUsers' AND COLS.name='SipAddress')
BEGIN
ALTER TABLE [dbo].[LyncUsers] ADD
[SipAddress] [nvarchar] (300) COLLATE Latin1_General_CI_AS NULL
END
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'GetLyncUsers') IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'GetLyncUsers')
@ -3699,7 +3766,8 @@ CREATE TABLE #TempLyncUsers
[ItemID] [int] NOT NULL, [ItemID] [int] NOT NULL,
[AccountName] [nvarchar](300) NOT NULL, [AccountName] [nvarchar](300) NOT NULL,
[DisplayName] [nvarchar](300) NOT NULL, [DisplayName] [nvarchar](300) NOT NULL,
[PrimaryEmailAddress] [nvarchar](300) NULL, [UserPrincipalName] [nvarchar](300) NULL,
[SipAddress] [nvarchar](300) NULL,
[SamAccountName] [nvarchar](100) NULL, [SamAccountName] [nvarchar](100) NULL,
[LyncUserPlanId] [int] NOT NULL, [LyncUserPlanId] [int] NOT NULL,
[LyncUserPlanName] [nvarchar] (300) NOT NULL, [LyncUserPlanName] [nvarchar] (300) NOT NULL,
@ -3714,11 +3782,17 @@ BEGIN
SET @condition = ''ORDER BY ea.DisplayName'' SET @condition = ''ORDER BY ea.DisplayName''
END END
IF (@SortColumn = ''PrimaryEmailAddress'') IF (@SortColumn = ''UserPrincipalName'')
BEGIN BEGIN
SET @condition = ''ORDER BY ea.PrimaryEmailAddress'' SET @condition = ''ORDER BY ea.UserPrincipalName''
END END
IF (@SortColumn = ''SipAddress'')
BEGIN
SET @condition = ''ORDER BY ou.SipAddress''
END
IF (@SortColumn = ''LyncUserPlanName'') IF (@SortColumn = ''LyncUserPlanName'')
BEGIN BEGIN
SET @condition = ''ORDER BY lp.LyncUserPlanName'' SET @condition = ''ORDER BY lp.LyncUserPlanName''
@ -3734,7 +3808,8 @@ set @sql = ''
ea.ItemID, ea.ItemID,
ea.AccountName, ea.AccountName,
ea.DisplayName, ea.DisplayName,
ea.PrimaryEmailAddress, ea.UserPrincipalName,
ou.SipAddress,
ea.SamAccountName, ea.SamAccountName,
ou.LyncUserPlanId, ou.LyncUserPlanId,
lp.LyncUserPlanName lp.LyncUserPlanName
@ -3770,11 +3845,17 @@ BEGIN
SELECT * FROM #TempLyncUsers SELECT * FROM #TempLyncUsers
WHERE ID >@RetCount - @Count - @StartRow AND ID <= @RetCount- @StartRow ORDER BY DisplayName DESC WHERE ID >@RetCount - @Count - @StartRow AND ID <= @RetCount- @StartRow ORDER BY DisplayName DESC
END END
IF (@SortColumn = ''PrimaryEmailAddress'') IF (@SortColumn = ''UserPrincipalName'')
BEGIN BEGIN
SELECT * FROM #TempLyncUsers SELECT * FROM #TempLyncUsers
WHERE ID >@RetCount - @Count - @StartRow AND ID <= @RetCount- @StartRow ORDER BY PrimaryEmailAddress DESC WHERE ID >@RetCount - @Count - @StartRow AND ID <= @RetCount- @StartRow ORDER BY UserPrincipalName DESC
END END
IF (@SortColumn = ''SipAddress'')
BEGIN
SELECT * FROM #TempLyncUsers
WHERE ID >@RetCount - @Count - @StartRow AND ID <= @RetCount- @StartRow ORDER BY SipAddress DESC
END
IF (@SortColumn = ''LyncUserPlanName'') IF (@SortColumn = ''LyncUserPlanName'')
BEGIN BEGIN
SELECT * FROM #TempLyncUsers SELECT * FROM #TempLyncUsers
@ -3784,7 +3865,7 @@ BEGIN
ELSE ELSE
BEGIN BEGIN
SELECT * FROM #TempLyncUsers SELECT * FROM #TempLyncUsers
WHERE ID >@RetCount - @Count - @StartRow AND ID <= @RetCount- @StartRow ORDER BY PrimaryEmailAddress DESC WHERE ID >@RetCount - @Count - @StartRow AND ID <= @RetCount- @StartRow ORDER BY UserPrincipalName DESC
END END
@ -3797,6 +3878,134 @@ GO
ALTER 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,
[UserPrincipalName] [nvarchar](300) NULL,
[SipAddress] [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 = 'UserPrincipalName')
BEGIN
SET @condition = 'ORDER BY ea.UserPrincipalName'
END
IF (@SortColumn = 'SipAddress')
BEGIN
SET @condition = 'ORDER BY ou.SipAddress'
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.UserPrincipalName,
ou.SipAddress,
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 = 'UserPrincipalName')
BEGIN
SELECT * FROM #TempLyncUsers
WHERE ID >@RetCount - @Count - @StartRow AND ID <= @RetCount- @StartRow ORDER BY UserPrincipalName DESC
END
IF (@SortColumn = 'SipAddress')
BEGIN
SELECT * FROM #TempLyncUsers
WHERE ID >@RetCount - @Count - @StartRow AND ID <= @RetCount- @StartRow ORDER BY SipAddress 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 UserPrincipalName DESC
END
END
DROP TABLE #TempLyncUsers
GO
@ -6596,4 +6805,129 @@ exec sp_executesql @sql, N'@StartRow int, @MaximumRows int, @UserID int, @Filter
@StartRow, @MaximumRows, @UserID, @FilterValue, @ItemTypeID, @ActorID @StartRow, @MaximumRows, @UserID, @FilterValue, @ItemTypeID, @ActorID
RETURN RETURN
GO GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'LyncUserExists')
BEGIN
EXEC sp_executesql N'
CREATE PROCEDURE [dbo].[LyncUserExists]
(
@AccountID int,
@SipAddress nvarchar(300),
@Exists bit OUTPUT
)
AS
SET @Exists = 0
IF EXISTS(SELECT * FROM [dbo].[ExchangeAccountEmailAddresses] WHERE [EmailAddress] = @SipAddress AND [AccountID] <> @AccountID)
BEGIN
SET @Exists = 1
END
ELSE IF EXISTS(SELECT * FROM [dbo].[ExchangeAccounts] WHERE [PrimaryEmailAddress] = @SipAddress AND [AccountID] <> @AccountID)
BEGIN
SET @Exists = 1
END
ELSE IF EXISTS(SELECT * FROM [dbo].[ExchangeAccounts] WHERE [UserPrincipalName] = @SipAddress AND [AccountID] <> @AccountID)
BEGIN
SET @Exists = 1
END
ELSE IF EXISTS(SELECT * FROM [dbo].[ExchangeAccounts] WHERE [AccountName] = @SipAddress AND [AccountID] <> @AccountID)
BEGIN
SET @Exists = 1
END
ELSE IF EXISTS(SELECT * FROM [dbo].[LyncUsers] WHERE [SipAddress] = @SipAddress)
BEGIN
SET @Exists = 1
END
RETURN'
END
GO
ALTER PROCEDURE [dbo].[LyncUserExists]
(
@AccountID int,
@SipAddress nvarchar(300),
@Exists bit OUTPUT
)
AS
SET @Exists = 0
IF EXISTS(SELECT * FROM [dbo].[ExchangeAccountEmailAddresses] WHERE [EmailAddress] = @SipAddress AND [AccountID] <> @AccountID)
BEGIN
SET @Exists = 1
END
ELSE IF EXISTS(SELECT * FROM [dbo].[ExchangeAccounts] WHERE [PrimaryEmailAddress] = @SipAddress AND [AccountID] <> @AccountID)
BEGIN
SET @Exists = 1
END
ELSE IF EXISTS(SELECT * FROM [dbo].[ExchangeAccounts] WHERE [UserPrincipalName] = @SipAddress AND [AccountID] <> @AccountID)
BEGIN
SET @Exists = 1
END
ELSE IF EXISTS(SELECT * FROM [dbo].[ExchangeAccounts] WHERE [AccountName] = @SipAddress AND [AccountID] <> @AccountID)
BEGIN
SET @Exists = 1
END
ELSE IF EXISTS(SELECT * FROM [dbo].[LyncUsers] WHERE [SipAddress] = @SipAddress)
BEGIN
SET @Exists = 1
END
RETURN
GO
ALTER PROCEDURE [dbo].[AddLyncUser]
@AccountID int,
@LyncUserPlanID int,
@SipAddress nvarchar(300)
AS
INSERT INTO
dbo.LyncUsers
(AccountID,
LyncUserPlanID,
CreatedDate,
ModifiedDate,
SipAddress)
VALUES
(
@AccountID,
@LyncUserPlanID,
getdate(),
getdate(),
@SipAddress
)
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'UpdateLyncUser')
BEGIN
EXEC sp_executesql N'CREATE PROCEDURE [dbo].[UpdateLyncUser]
(
@AccountID int,
@SipAddress nvarchar(300)
)
AS
UPDATE LyncUsers SET
SipAddress = @SipAddress
WHERE
AccountID = @AccountID AND AccountType IN (1,7)
RETURN'
END
GO

View file

@ -52,6 +52,7 @@ namespace WebsitePanel.EnterpriseServer {
using WebsitePanel.Providers.ResultObjects; using WebsitePanel.Providers.ResultObjects;
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()]
@ -685,13 +686,13 @@ namespace WebsitePanel.EnterpriseServer {
/// <remarks/> /// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetLyncUserGeneralSettings", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetLyncUserGeneralSettings", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public bool SetLyncUserGeneralSettings(int itemId, int accountId, string sipAddress, string lineUri) { public LyncUserResult SetLyncUserGeneralSettings(int itemId, int accountId, string sipAddress, string lineUri) {
object[] results = this.Invoke("SetLyncUserGeneralSettings", new object[] { object[] results = this.Invoke("SetLyncUserGeneralSettings", new object[] {
itemId, itemId,
accountId, accountId,
sipAddress, sipAddress,
lineUri}); lineUri});
return ((bool)(results[0])); return ((LyncUserResult)(results[0]));
} }
/// <remarks/> /// <remarks/>
@ -704,9 +705,9 @@ namespace WebsitePanel.EnterpriseServer {
} }
/// <remarks/> /// <remarks/>
public bool EndSetLyncUserGeneralSettings(System.IAsyncResult asyncResult) { public LyncUserResult EndSetLyncUserGeneralSettings(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult); object[] results = this.EndInvoke(asyncResult);
return ((bool)(results[0])); return ((LyncUserResult)(results[0]));
} }
/// <remarks/> /// <remarks/>
@ -1248,10 +1249,10 @@ namespace WebsitePanel.EnterpriseServer {
} }
/// <remarks/> /// <remarks/>
public bool Result { public LyncUserResult Result {
get { get {
this.RaiseExceptionIfNecessary(); this.RaiseExceptionIfNecessary();
return ((bool)(this.results[0])); return ((LyncUserResult)(this.results[0]));
} }
} }
} }

View file

@ -3257,7 +3257,7 @@ namespace WebsitePanel.EnterpriseServer
#region Lync #region Lync
public static void AddLyncUser(int accountId, int lyncUserPlanId) public static void AddLyncUser(int accountId, int lyncUserPlanId, string sipAddress)
{ {
SqlHelper.ExecuteNonQuery(ConnectionString, SqlHelper.ExecuteNonQuery(ConnectionString,
CommandType.StoredProcedure, CommandType.StoredProcedure,
@ -3265,10 +3265,24 @@ namespace WebsitePanel.EnterpriseServer
new[] new[]
{ {
new SqlParameter("@AccountID", accountId), new SqlParameter("@AccountID", accountId),
new SqlParameter("@LyncUserPlanID", lyncUserPlanId) new SqlParameter("@LyncUserPlanID", lyncUserPlanId),
new SqlParameter("@SipAddress", sipAddress)
}); });
} }
public static void UpdateLyncUser(int accountId, string sipAddress)
{
SqlHelper.ExecuteNonQuery(ConnectionString,
CommandType.StoredProcedure,
"UpdateLyncUser",
new[]
{
new SqlParameter("@AccountID", accountId),
new SqlParameter("@SipAddress", sipAddress)
});
}
public static bool CheckLyncUserExists(int accountId) public static bool CheckLyncUserExists(int accountId)
{ {
int res = (int)SqlHelper.ExecuteScalar(ConnectionString, CommandType.StoredProcedure, "CheckLyncUserExists", int res = (int)SqlHelper.ExecuteScalar(ConnectionString, CommandType.StoredProcedure, "CheckLyncUserExists",
@ -3276,6 +3290,25 @@ namespace WebsitePanel.EnterpriseServer
return res > 0; return res > 0;
} }
public static bool LyncUserExists(int accountId, string sipAddress)
{
SqlParameter outParam = new SqlParameter("@Exists", SqlDbType.Bit);
outParam.Direction = ParameterDirection.Output;
SqlHelper.ExecuteNonQuery(
ConnectionString,
CommandType.StoredProcedure,
"LyncUserExists",
new SqlParameter("@AccountID", accountId),
new SqlParameter("@SipAddress", sipAddress),
outParam
);
return Convert.ToBoolean(outParam.Value);
}
public static IDataReader GetLyncUsers(int itemId, string sortColumn, string sortDirection, int startRow, int count) public static IDataReader GetLyncUsers(int itemId, string sortColumn, string sortDirection, int startRow, int count)
{ {
SqlParameter[] sqlParams = new SqlParameter[] SqlParameter[] sqlParams = new SqlParameter[]

View file

@ -2119,6 +2119,11 @@ namespace WebsitePanel.EnterpriseServer
ocs.SetUserPrimaryUri(instanceId, emailAddress); ocs.SetUserPrimaryUri(instanceId, emailAddress);
} }
if (DataProvider.CheckLyncUserExists(account.AccountId))
{
LyncController.SetLyncUserGeneralSettings(itemId, accountId, emailAddress, null);
}
// save account // save account
UpdateAccount(account); UpdateAccount(account);

View file

@ -250,7 +250,7 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
try try
{ {
DataProvider.AddLyncUser(accountId, lyncUserPlanId); DataProvider.AddLyncUser(accountId, lyncUserPlanId, user.UserPrincipalName);
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -341,12 +341,11 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
} }
public static bool SetLyncUserGeneralSettings(int itemId, int accountId, string sipAddress, string lineUri) public static LyncUserResult SetLyncUserGeneralSettings(int itemId, int accountId, string sipAddress, string lineUri)
{ {
TaskManager.StartTask("LYNC", "SET_LYNC_USER_GENERAL_SETTINGS"); LyncUserResult res = TaskManager.StartResultTask<LyncUserResult>("LYNC", "SET_LYNC_USER_GENERAL_SETTINGS");
LyncUser user = null; LyncUser user = null;
bool ret = true;
try try
{ {
@ -376,19 +375,38 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
user.LyncUserPlanName = plan.LyncUserPlanName; user.LyncUserPlanName = plan.LyncUserPlanName;
} }
user.PrimaryUri = sipAddress;
user.LineUri = lineUri; if (!string.IsNullOrEmpty(sipAddress))
{
if (sipAddress != usr.UserPrincipalName)
{
if (DataProvider.LyncUserExists(accountId, sipAddress))
{
TaskManager.CompleteResultTask(res, LyncErrorCodes.ADDRESS_ALREADY_USED);
return res;
}
}
user.SipAddress = sipAddress;
}
if (!string.IsNullOrEmpty(lineUri)) user.LineUri = lineUri;
lync.SetLyncUserGeneralSettings(org.OrganizationId, usr.UserPrincipalName, user); lync.SetLyncUserGeneralSettings(org.OrganizationId, usr.UserPrincipalName, user);
DataProvider.UpdateLyncUser(accountId, sipAddress);
} }
} }
catch (Exception ex) catch (Exception ex)
{ {
ret = false; TaskManager.CompleteResultTask(res, LyncErrorCodes.FAILED_SET_SETTINGS, ex);
throw TaskManager.WriteError(ex); return res;
} }
TaskManager.CompleteTask();
return ret; res.IsSuccess = true;
TaskManager.CompleteResultTask();
return res;
} }

View file

@ -511,7 +511,7 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
try try
{ {
stats.SipAddress = lyncUser.PrimaryEmailAddress; stats.SipAddress = lyncUser.SipAddress;
if (string.IsNullOrEmpty(lyncUser.LineUri)) stats.PhoneNumber = string.Empty; else stats.PhoneNumber = lyncUser.LineUri; if (string.IsNullOrEmpty(lyncUser.LineUri)) stats.PhoneNumber = string.Empty; else stats.PhoneNumber = lyncUser.LineUri;
LyncUserPlan plan = LyncController.GetLyncUserPlan(org.Id, lyncUser.LyncUserPlanId); LyncUserPlan plan = LyncController.GetLyncUserPlan(org.Id, lyncUser.LyncUserPlanId);

View file

@ -120,7 +120,7 @@ namespace WebsitePanel.EnterpriseServer
} }
[WebMethod] [WebMethod]
public bool SetLyncUserGeneralSettings(int itemId, int accountId, string sipAddress, string lineUri) public LyncUserResult SetLyncUserGeneralSettings(int itemId, int accountId, string sipAddress, string lineUri)
{ {
return LyncController.SetLyncUserGeneralSettings(itemId, accountId, sipAddress, lineUri); return LyncController.SetLyncUserGeneralSettings(itemId, accountId, sipAddress, lineUri);
} }

View file

@ -49,6 +49,7 @@ namespace WebsitePanel.Providers.HostedSolution
int mailboxPlanId; int mailboxPlanId;
string mailboxPlan; string mailboxPlan;
string publicFolderPermission; string publicFolderPermission;
string userPrincipalName;
public int AccountId public int AccountId
{ {
@ -142,5 +143,11 @@ namespace WebsitePanel.Providers.HostedSolution
} }
public string UserPrincipalName
{
get { return this.userPrincipalName; }
set { this.userPrincipalName = value; }
}
} }
} }

View file

@ -70,5 +70,8 @@
public const string CANNOT_REMOVE_LYNC_FEDERATIONDOMAIN = "CANNOT_REMOVE_LYNC_FEDERATIONDOMAIN"; public const string CANNOT_REMOVE_LYNC_FEDERATIONDOMAIN = "CANNOT_REMOVE_LYNC_FEDERATIONDOMAIN";
public const string FAILED_SET_SETTINGS = "FAILED_SET_SETTINGS";
public const string ADDRESS_ALREADY_USED = "ADDRESS_ALREADY_USED";
} }
} }

View file

@ -34,8 +34,8 @@ namespace WebsitePanel.Providers.HostedSolution
{ {
public class LyncUser public class LyncUser
{ {
public string PrimaryUri { get; set; } public string SipAddress { get; set; }
public string PrimaryEmailAddress { get; set; } public string UserPrincipalName { get; set; }
public string DisplayName { get; set; } public string DisplayName { get; set; }
public string LineUri { get; set; } public string LineUri { get; set; }
public int AccountID { get; set; } public int AccountID { get; set; }

View file

@ -2592,7 +2592,7 @@ namespace WebsitePanel.Providers.HostedSolution
cmd.Parameters.Add("Identity", accountName); cmd.Parameters.Add("Identity", accountName);
cmd.Parameters.Add("PrimarySmtpAddress", primaryEmail); cmd.Parameters.Add("PrimarySmtpAddress", primaryEmail);
//cmd.Parameters.Add("UserPrincipalName", primaryEmail); //cmd.Parameters.Add("UserPrincipalName", primaryEmail);
cmd.Parameters.Add("WindowsEmailAddress", primaryEmail); //cmd.Parameters.Add("WindowsEmailAddress", primaryEmail);
ExecuteShellCommand(runSpace, cmd); ExecuteShellCommand(runSpace, cmd);
} }

View file

@ -514,8 +514,10 @@ namespace WebsitePanel.Providers.HostedSolution
PSObject user = result[0]; PSObject user = result[0];
lyncUser.DisplayName = (string)GetPSObjectProperty(user, "DisplayName"); lyncUser.DisplayName = (string)GetPSObjectProperty(user, "DisplayName");
lyncUser.PrimaryUri = (string)GetPSObjectProperty(user, "SipAddress"); lyncUser.SipAddress = (string)GetPSObjectProperty(user, "SipAddress");
lyncUser.LineUri = (string)GetPSObjectProperty(user, "LineURI"); lyncUser.LineUri = (string)GetPSObjectProperty(user, "LineURI");
lyncUser.SipAddress = lyncUser.SipAddress.ToLower().Replace("sip:", "");
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -538,22 +540,96 @@ namespace WebsitePanel.Providers.HostedSolution
bool ret = true; bool ret = true;
Runspace runSpace = null; Runspace runSpace = null;
Guid tenantId = Guid.Empty;
LyncTransaction transaction = StartTransaction();
try try
{ {
runSpace = OpenRunspace(); runSpace = OpenRunspace();
Command cmd = new Command("Get-CsTenant");
cmd.Parameters.Add("Identity", GetOrganizationPath(organizationId));
Collection<PSObject> result = ExecuteShellCommand(runSpace, cmd, false);
if ((result != null) && (result.Count > 0))
{
tenantId = (Guid)GetPSObjectProperty(result[0], "TenantId");
Command cmd = new Command("Set-CsUser"); string[] tmp = userUpn.Split('@');
if (tmp.Length < 2) return false;
// Get SipDomains and verify existence
bool bSipDomainExists = false;
cmd = new Command("Get-CsSipDomain");
Collection<PSObject> sipDomains = ExecuteShellCommand(runSpace, cmd, false);
foreach (PSObject domain in sipDomains)
{
string d = (string)GetPSObjectProperty(domain, "Name");
if (d.ToLower() == tmp[1].ToLower())
{
bSipDomainExists = true;
break;
}
}
string path = string.Empty;
if (!bSipDomainExists)
{
// Create Sip Domain
cmd = new Command("New-CsSipDomain");
cmd.Parameters.Add("Identity", tmp[1].ToLower());
ExecuteShellCommand(runSpace, cmd, false);
transaction.RegisterNewSipDomain(tmp[1].ToLower());
path = AddADPrefix(GetOrganizationPath(organizationId));
DirectoryEntry ou = ActiveDirectoryUtils.GetADObject(path);
string[] sipDs = (string[])ActiveDirectoryUtils.GetADObjectPropertyMultiValue(ou, "msRTCSIP-Domains");
List<string> listSipDs = new List<string>();
listSipDs.AddRange(sipDs);
listSipDs.Add(tmp[1]);
ActiveDirectoryUtils.SetADObjectPropertyValue(ou, "msRTCSIP-Domains", listSipDs.ToArray());
ou.CommitChanges();
//Create simpleurls
CreateSimpleUrl(runSpace, tmp[1].ToLower(), tenantId);
transaction.RegisterNewSimpleUrl(tmp[1].ToLower(), tenantId.ToString());
path = AddADPrefix(GetResultObjectDN(result));
DirectoryEntry user = ActiveDirectoryUtils.GetADObject(path);
if (tmp.Length > 0)
{
string Url = SimpleUrlRoot + tmp[1];
ActiveDirectoryUtils.SetADObjectPropertyValue(user, "msRTCSIP-BaseSimpleUrl", Url.ToLower());
}
user.CommitChanges();
}
}
cmd = new Command("Set-CsUser");
cmd.Parameters.Add("Identity", userUpn); cmd.Parameters.Add("Identity", userUpn);
if (!string.IsNullOrEmpty(lyncUser.PrimaryUri)) cmd.Parameters.Add("SipAddress", lyncUser.PrimaryUri); if (!string.IsNullOrEmpty(lyncUser.SipAddress)) cmd.Parameters.Add("SipAddress", "SIP:"+lyncUser.SipAddress);
if (!string.IsNullOrEmpty(lyncUser.PrimaryUri)) cmd.Parameters.Add("LineUri", lyncUser.LineUri); if (!string.IsNullOrEmpty(lyncUser.SipAddress)) cmd.Parameters.Add("LineUri", lyncUser.LineUri);
ExecuteShellCommand(runSpace, cmd, false); ExecuteShellCommand(runSpace, cmd, false);
//initiate addressbook generation
cmd = new Command("Update-CsAddressBook");
ExecuteShellCommand(runSpace, cmd, false);
//initiate user database replication
cmd = new Command("Update-CsUserDatabase");
ExecuteShellCommand(runSpace, cmd, false);
} }
catch (Exception ex) catch (Exception ex)
{ {
ret = false; ret = false;
HostedSolutionLog.LogError("SetLyncUserGeneralSettingsInternal", ex); HostedSolutionLog.LogError("SetLyncUserGeneralSettingsInternal", ex);
throw; RollbackTransaction(transaction);
} }
finally finally
{ {

View file

@ -174,4 +174,10 @@
<data name="Text.PageName" xml:space="preserve"> <data name="Text.PageName" xml:space="preserve">
<value>Mailboxes</value> <value>Mailboxes</value>
</data> </data>
<data name="ddlSearchColumnUserPrincipalName.Text" xml:space="preserve">
<value>Login</value>
</data>
<data name="gvUsersLogin.Header" xml:space="preserve">
<value>Login</value>
</data>
</root> </root>

View file

@ -180,4 +180,10 @@
<data name="locTenantQuota.Text" xml:space="preserve"> <data name="locTenantQuota.Text" xml:space="preserve">
<value>Total Users Created for this Tenant:</value> <value>Total Users Created for this Tenant:</value>
</data> </data>
<data name="ddlSearchColumnUserPrincipalName.Text" xml:space="preserve">
<value>Login</value>
</data>
<data name="gvUsersLogin.Header" xml:space="preserve">
<value>Login</value>
</data>
</root> </root>

View file

@ -46,6 +46,7 @@
<asp:ListItem Value="PrimaryEmailAddress" meta:resourcekey="ddlSearchColumnEmail">Email</asp:ListItem> <asp:ListItem Value="PrimaryEmailAddress" meta:resourcekey="ddlSearchColumnEmail">Email</asp:ListItem>
<asp:ListItem Value="AccountName" meta:resourcekey="ddlSearchColumnAccountName">AccountName</asp:ListItem> <asp:ListItem Value="AccountName" meta:resourcekey="ddlSearchColumnAccountName">AccountName</asp:ListItem>
<asp:ListItem Value="SubscriberNumber" meta:resourcekey="ddlSearchColumnSubscriberNumber">Account Number</asp:ListItem> <asp:ListItem Value="SubscriberNumber" meta:resourcekey="ddlSearchColumnSubscriberNumber">Account Number</asp:ListItem>
<asp:ListItem Value="UserPrincipalName" meta:resourcekey="ddlSearchColumnUserPrincipalName">Login</asp:ListItem>
</asp:DropDownList><asp:TextBox ID="txtSearchValue" runat="server" CssClass="NormalTextBox" Width="100"></asp:TextBox><asp:ImageButton ID="cmdSearch" Runat="server" meta:resourcekey="cmdSearch" SkinID="SearchButton" </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"/> CausesValidation="false"/>
</asp:Panel> </asp:Panel>
@ -67,6 +68,15 @@
</asp:hyperlink> </asp:hyperlink>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="gvUsersLogin" SortExpression="UserPrincipalName">
<ItemStyle></ItemStyle>
<ItemTemplate>
<asp:hyperlink id="lnk1" runat="server"
NavigateUrl='<%# GetOrganizationUserEditUrl(Eval("AccountId").ToString()) %>'>
<%# Eval("UserPrincipalName") %>
</asp:hyperlink>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="gvMailboxesEmail" DataField="PrimaryEmailAddress" SortExpression="PrimaryEmailAddress" ItemStyle-Width="25%" /> <asp:BoundField HeaderText="gvMailboxesEmail" DataField="PrimaryEmailAddress" SortExpression="PrimaryEmailAddress" ItemStyle-Width="25%" />
<asp:BoundField HeaderText="gvSubscriberNumber" DataField="SubscriberNumber" ItemStyle-Width="10%" /> <asp:BoundField HeaderText="gvSubscriberNumber" DataField="SubscriberNumber" ItemStyle-Width="10%" />
<asp:BoundField HeaderText="gvMailboxesMailboxPlan" DataField="MailboxPlan" SortExpression="MailboxPlan" ItemStyle-Width="50%" /> <asp:BoundField HeaderText="gvMailboxesMailboxPlan" DataField="MailboxPlan" SortExpression="MailboxPlan" ItemStyle-Width="50%" />

View file

@ -47,7 +47,7 @@ namespace WebsitePanel.Portal.ExchangeServer
{ {
if (cntx.Quotas[Quotas.EXCHANGE2007_ISCONSUMER].QuotaAllocatedValue != 1) if (cntx.Quotas[Quotas.EXCHANGE2007_ISCONSUMER].QuotaAllocatedValue != 1)
{ {
gvMailboxes.Columns[2].Visible = false; gvMailboxes.Columns[3].Visible = false;
} }
} }
} }
@ -139,7 +139,15 @@ namespace WebsitePanel.Portal.ExchangeServer
// bind stats // bind stats
BindStats(); BindStats();
} }
public string GetOrganizationUserEditUrl(string accountId)
{
return EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "edit_user",
"AccountID=" + accountId,
"ItemID=" + PanelRequest.ItemID,
"Context=User");
}
} }
} }

View file

@ -47,6 +47,7 @@
<asp:ListItem Value="PrimaryEmailAddress" meta:resourcekey="ddlSearchColumnEmail">Email</asp:ListItem> <asp:ListItem Value="PrimaryEmailAddress" meta:resourcekey="ddlSearchColumnEmail">Email</asp:ListItem>
<asp:ListItem Value="AccountName" meta:resourcekey="ddlSearchColumnAccountName">AccountName</asp:ListItem> <asp:ListItem Value="AccountName" meta:resourcekey="ddlSearchColumnAccountName">AccountName</asp:ListItem>
<asp:ListItem Value="SubscriberNumber" meta:resourcekey="ddlSearchColumnSubscriberNumber">Account Number</asp:ListItem> <asp:ListItem Value="SubscriberNumber" meta:resourcekey="ddlSearchColumnSubscriberNumber">Account Number</asp:ListItem>
<asp:ListItem Value="UserPrincipalName" meta:resourcekey="ddlSearchColumnUserPrincipalName">Login</asp:ListItem>
</asp:DropDownList><asp:TextBox ID="txtSearchValue" runat="server" CssClass="NormalTextBox" Width="100"></asp:TextBox><asp:ImageButton ID="cmdSearch" Runat="server" meta:resourcekey="cmdSearch" SkinID="SearchButton" </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"/> CausesValidation="false"/>
</asp:Panel> </asp:Panel>
@ -74,14 +75,15 @@
</asp:hyperlink> </asp:hyperlink>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:BoundField HeaderText="gvUsersEmail" DataField="PrimaryEmailAddress" SortExpression="PrimaryEmailAddress" ItemStyle-Width="50%" /> <asp:BoundField HeaderText="gvUsersLogin" DataField="UserPrincipalName" SortExpression="UserPrincipalName" ItemStyle-Width="25%" />
<asp:BoundField HeaderText="gvSubscriberNumber" DataField="SubscriberNumber" ItemStyle-Width="25%" /> <asp:BoundField HeaderText="gvUsersEmail" DataField="PrimaryEmailAddress" SortExpression="PrimaryEmailAddress" ItemStyle-Width="25%" />
<asp:BoundField HeaderText="gvSubscriberNumber" DataField="SubscriberNumber" ItemStyle-Width="25%" />
<asp:TemplateField ItemStyle-Wrap="False"> <asp:TemplateField ItemStyle-Wrap="False">
<ItemTemplate> <ItemTemplate>
<asp:Image ID="Image2" runat="server" Width="16px" Height="16px" ToolTip="Mail" ImageUrl='<%# GetMailImage((int)Eval("AccountType")) %>' /> <asp:ImageButton ID="Image2" runat="server" Width="16px" Height="16px" ToolTip="Mail" ImageUrl='<%# GetMailImage((int)Eval("AccountType")) %>' CommandName="OpenMailProperties" CommandArgument='<%# Eval("AccountId") %>' Enabled=<%# EnableMailImageButton((int)Eval("AccountType")) %>/>
<asp:Image ID="Image3" runat="server" Width="16px" Height="16px" ToolTip="OCS" ImageUrl='<%# GetOCSImage((bool)Eval("IsOCSUser"),(bool)Eval("IsLyncUser")) %>' /> <asp:ImageButton ID="Image3" runat="server" Width="16px" Height="16px" ToolTip="UC" ImageUrl='<%# GetOCSImage((bool)Eval("IsOCSUser"),(bool)Eval("IsLyncUser")) %>' CommandName="OpenUCProperties" CommandArgument='<%# GetOCSArgument((int)Eval("AccountId"),(bool)Eval("IsOCSUser"),(bool)Eval("IsLyncUser")) %>' Enabled=<%# EnableOCSImageButton((bool)Eval("IsOCSUser"),(bool)Eval("IsLyncUser")) %>/>
<asp:Image ID="Image4" runat="server" Width="16px" Height="16px" ToolTip="BlackBerry" ImageUrl='<%# GetBlackBerryImage((bool)Eval("IsBlackBerryUser")) %>' /> <asp:ImageButton ID="Image4" runat="server" Width="16px" Height="16px" ToolTip="BlackBerry" ImageUrl='<%# GetBlackBerryImage((bool)Eval("IsBlackBerryUser")) %>' CommandName="OpenBlackBerryProperties" CommandArgument='<%# Eval("AccountId") %>' Enabled=<%# EnableBlackBerryImageButton((bool)Eval("IsBlackBerryUser")) %>/>
<asp:Image ID="Image5" runat="server" Width="16px" Height="16px" ToolTip="CRM" ImageUrl='<%# GetCRMImage((Guid)Eval("CrmUserId")) %>' /> <asp:Image ID="Image5" runat="server" Width="16px" Height="16px" ToolTip="CRM" ImageUrl='<%# GetCRMImage((Guid)Eval("CrmUserId")) %>' />
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField> <asp:TemplateField>

View file

@ -48,7 +48,7 @@ namespace WebsitePanel.Portal.HostedSolution
{ {
if (cntx.Quotas[Quotas.EXCHANGE2007_ISCONSUMER].QuotaAllocatedValue != 1) if (cntx.Quotas[Quotas.EXCHANGE2007_ISCONSUMER].QuotaAllocatedValue != 1)
{ {
gvUsers.Columns[3].Visible = false; gvUsers.Columns[4].Visible = false;
} }
} }
@ -115,6 +115,52 @@ namespace WebsitePanel.Portal.HostedSolution
messageBox.ShowErrorMessage("ORGANIZATIONS_DELETE_USERS", ex); messageBox.ShowErrorMessage("ORGANIZATIONS_DELETE_USERS", ex);
} }
} }
if (e.CommandName == "OpenMailProperties")
{
int accountId = Utils.ParseInt(e.CommandArgument.ToString(), 0);
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "mailbox_settings",
"AccountID=" + accountId,
"ItemID=" + PanelRequest.ItemID));
}
if (e.CommandName == "OpenBlackBerryProperties")
{
int accountId = Utils.ParseInt(e.CommandArgument.ToString(), 0);
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "edit_blackberry_user",
"AccountID=" + accountId,
"ItemID=" + PanelRequest.ItemID));
}
if (e.CommandName == "OpenCRMProperties")
{
int accountId = Utils.ParseInt(e.CommandArgument.ToString(), 0);
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "mailbox_settings",
"AccountID=" + accountId,
"ItemID=" + PanelRequest.ItemID));
}
if (e.CommandName == "OpenUCProperties")
{
string[] Tmp = e.CommandArgument.ToString().Split('|');
int accountId = Utils.ParseInt(Tmp[0], 0);
if (Tmp[1] == "True")
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "edit_ocs_user",
"AccountID=" + accountId,
"ItemID=" + PanelRequest.ItemID));
else
if (Tmp[2] == "True")
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "edit_lync_user",
"AccountID=" + accountId,
"ItemID=" + PanelRequest.ItemID));
}
} }
@ -208,7 +254,52 @@ namespace WebsitePanel.Portal.HostedSolution
// bind stats // bind stats
BindStats(); BindStats();
} }
public bool EnableMailImageButton(int accountTypeId)
{
bool imgName = true;
ExchangeAccountType accountType = (ExchangeAccountType)accountTypeId;
if (accountType == ExchangeAccountType.User)
imgName = false;
return imgName;
}
public bool EnableOCSImageButton(bool IsOCSUser, bool IsLyncUser)
{
bool imgName = false;
if (IsLyncUser)
imgName = true;
else
if ((IsOCSUser))
imgName = true;
return imgName;
}
public bool EnableBlackBerryImageButton(bool IsBlackBerryUser)
{
bool imgName = false;
if (IsBlackBerryUser)
imgName = true;
return imgName;
}
public string GetOCSArgument(int accountID, bool IsOCS, bool IsLync)
{
return accountID.ToString() + "|" + IsOCS.ToString() + "|" + IsLync.ToString();
}
} }
} }

View file

@ -135,4 +135,7 @@
<data name="locPlanName.Text" xml:space="preserve"> <data name="locPlanName.Text" xml:space="preserve">
<value>Plan Name :</value> <value>Plan Name :</value>
</data> </data>
<data name="locSipAddress.Text" xml:space="preserve">
<value>SIP Address:</value>
</data>
</root> </root>

View file

@ -126,8 +126,8 @@
<data name="ddlSearchColumnDisplayName.Text" xml:space="preserve"> <data name="ddlSearchColumnDisplayName.Text" xml:space="preserve">
<value>Display name</value> <value>Display name</value>
</data> </data>
<data name="ddlSearchColumnEmail.Text" xml:space="preserve"> <data name="ddlSearchColumnUserPrincipalName.Text" xml:space="preserve">
<value>Sign-in name</value> <value>Login</value>
</data> </data>
<data name="FormComments.Text" xml:space="preserve"> <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; <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;
@ -138,7 +138,7 @@
<value>Display name</value> <value>Display name</value>
</data> </data>
<data name="gvUsersEmail.HeaderText" xml:space="preserve"> <data name="gvUsersEmail.HeaderText" xml:space="preserve">
<value>Sign-in name</value> <value>SIP Address</value>
</data> </data>
<data name="locTitle.Text" xml:space="preserve"> <data name="locTitle.Text" xml:space="preserve">
<value>Lync Users</value> <value>Lync Users</value>
@ -152,4 +152,7 @@
<data name="gvUsers.Empty" xml:space="preserve"> <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> <value>No users have been Lync enabled. To enable a user for Lync click "Create Lync User" button.</value>
</data> </data>
<data name="gvUsersLogin.Header" xml:space="preserve">
<value>Login</value>
</data>
</root> </root>

View file

@ -7,6 +7,7 @@
<%@ Register Src="../UserControls/QuotaViewer.ascx" TagName="QuotaViewer" TagPrefix="wsp" %> <%@ Register Src="../UserControls/QuotaViewer.ascx" TagName="QuotaViewer" TagPrefix="wsp" %>
<%@ Register src="../ExchangeServer/UserControls/MailboxSelector.ascx" tagname="MailboxSelector" tagprefix="uc1" %> <%@ Register src="../ExchangeServer/UserControls/MailboxSelector.ascx" tagname="MailboxSelector" tagprefix="uc1" %>
<%@ Register Src="UserControls/LyncUserPlanSelector.ascx" TagName="LyncUserPlanSelector" TagPrefix="wsp" %> <%@ Register Src="UserControls/LyncUserPlanSelector.ascx" TagName="LyncUserPlanSelector" TagPrefix="wsp" %>
<%@ Register Src="UserControls/LyncUserSettings.ascx" TagName="LyncUserSettings" TagPrefix="wsp" %>
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server" /> <wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server" />
<div id="ExchangeContainer"> <div id="ExchangeContainer">
@ -38,6 +39,15 @@
<wsp:LyncUserPlanSelector ID="planSelector" runat="server" /> <wsp:LyncUserPlanSelector ID="planSelector" runat="server" />
</td> </td>
</tr> </tr>
<tr>
<td class="FormLabel150">
<asp:Localize ID="locSipAddress" runat="server" meta:resourcekey="locSipAddress" Text="SIP Address: *"></asp:Localize>
</td>
<td>
<wsp:LyncUserSettings ID="lyncUserSettings" runat="server" />
</td>
</tr>
</table> </table>
<div class="FormFooterClean"> <div class="FormFooterClean">

View file

@ -52,6 +52,8 @@ namespace WebsitePanel.Portal.Lync
litDisplayName.Text = lyncUser.DisplayName; litDisplayName.Text = lyncUser.DisplayName;
planSelector.planId = lyncUser.LyncUserPlanId.ToString(); planSelector.planId = lyncUser.LyncUserPlanId.ToString();
lyncUserSettings.sipAddress = lyncUser.SipAddress;
} }
protected void btnSave_Click(object sender, EventArgs e) protected void btnSave_Click(object sender, EventArgs e)
@ -61,11 +63,18 @@ namespace WebsitePanel.Portal.Lync
try try
{ {
LyncUserResult res = ES.Services.Lync.SetUserLyncPlan(PanelRequest.ItemID, PanelRequest.AccountID, Convert.ToInt32(planSelector.planId)); LyncUserResult res = ES.Services.Lync.SetUserLyncPlan(PanelRequest.ItemID, PanelRequest.AccountID, Convert.ToInt32(planSelector.planId));
if (res.IsSuccess && res.ErrorCodes.Count == 0)
{
res = ES.Services.Lync.SetLyncUserGeneralSettings(PanelRequest.ItemID, PanelRequest.AccountID, lyncUserSettings.sipAddress, string.Empty);
}
if (res.IsSuccess && res.ErrorCodes.Count == 0) if (res.IsSuccess && res.ErrorCodes.Count == 0)
{ {
messageBox.ShowSuccessMessage("UPDATE_LYNC_USER"); messageBox.ShowSuccessMessage("UPDATE_LYNC_USER");
return; return;
} }
else
messageBox.ShowMessage(res, "UPDATE_LYNC_USER", "LYNC");
} }
catch(Exception ex) catch(Exception ex)
{ {

View file

@ -1,33 +1,4 @@
// Copyright (c) 2012, Outercurve Foundation. //------------------------------------------------------------------------------
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
// //
@ -122,6 +93,24 @@ namespace WebsitePanel.Portal.Lync {
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.Lync.UserControls.LyncUserPlanSelector planSelector; protected global::WebsitePanel.Portal.Lync.UserControls.LyncUserPlanSelector planSelector;
/// <summary>
/// locSipAddress control.
/// </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 locSipAddress;
/// <summary>
/// lyncUserSettings 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.LyncUserSettings lyncUserSettings;
/// <summary> /// <summary>
/// btnSave control. /// btnSave control.
/// </summary> /// </summary>
@ -130,14 +119,5 @@ namespace WebsitePanel.Portal.Lync {
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Button btnSave; 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

@ -41,7 +41,7 @@
<asp:DropDownList ID="ddlSearchColumn" runat="server" CssClass="NormalTextBox"> <asp:DropDownList ID="ddlSearchColumn" runat="server" CssClass="NormalTextBox">
<asp:ListItem Value="DisplayName" meta:resourcekey="ddlSearchColumnDisplayName">DisplayName</asp:ListItem> <asp:ListItem Value="DisplayName" meta:resourcekey="ddlSearchColumnDisplayName">DisplayName</asp:ListItem>
<asp:ListItem Value="PrimaryEmailAddress" meta:resourcekey="ddlSearchColumnEmail">Email</asp:ListItem> <asp:ListItem Value="UserPrincipalName" meta:resourcekey="ddlSearchColumnUserPrincipalName">Email</asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
<asp:TextBox ID="txtSearchValue" runat="server" CssClass="NormalTextBox" Width="100"></asp:TextBox><asp:ImageButton <asp:TextBox ID="txtSearchValue" runat="server" CssClass="NormalTextBox" Width="100"></asp:TextBox><asp:ImageButton
ID="cmdSearch" runat="server" meta:resourcekey="cmdSearch" SkinID="SearchButton" ID="cmdSearch" runat="server" meta:resourcekey="cmdSearch" SkinID="SearchButton"
@ -64,10 +64,17 @@
</asp:HyperLink> </asp:HyperLink>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:BoundField HeaderText="gvUsersEmail" meta:resourcekey="gvUsersEmail" DataField="PrimaryEmailAddress" <asp:TemplateField HeaderText="gvUsersLogin" SortExpression="UserPrincipalName">
SortExpression="PrimaryEmailAddress" ItemStyle-Width="25%" /> <ItemStyle ></ItemStyle>
<asp:BoundField HeaderText="gvLyncUserPlan" meta:resourcekey="gvLyncUserPlan" DataField="LyncUserPlanName" <ItemTemplate>
SortExpression="LyncUserPlanName" ItemStyle-Width="50%" /> <asp:hyperlink id="lnk1" runat="server"
NavigateUrl='<%# GetOrganizationUserEditUrl(Eval("AccountId").ToString()) %>'>
<%# Eval("UserPrincipalName") %>
</asp:hyperlink>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="gvUsersEmail" meta:resourcekey="gvUsersEmail" DataField="SipAddress" SortExpression="PrimaryUri" ItemStyle-Width="25%" />
<asp:BoundField HeaderText="gvLyncUserPlan" meta:resourcekey="gvLyncUserPlan" DataField="LyncUserPlanName" SortExpression="LyncUserPlanName" ItemStyle-Width="25%" />
<asp:TemplateField> <asp:TemplateField>
<ItemTemplate> <ItemTemplate>
<asp:ImageButton ID="cmdDelete" runat="server" SkinID="ExchangeDelete" <asp:ImageButton ID="cmdDelete" runat="server" SkinID="ExchangeDelete"

View file

@ -108,8 +108,17 @@ namespace WebsitePanel.Portal.Lync
// bind stats // bind stats
BindStats(); BindStats();
} }
public string GetOrganizationUserEditUrl(string accountId)
{
return EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "edit_user",
"AccountID=" + accountId,
"ItemID=" + PanelRequest.ItemID,
"Context=User");
}
} }
} }

View file

@ -155,14 +155,5 @@ namespace WebsitePanel.Portal.Lync {
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.QuotaViewer usersQuota; 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="LyncUserSettings.ascx.cs" Inherits="WebsitePanel.Portal.Lync.UserControls.LyncUserSettings" %>
<asp:DropDownList ID="ddlSipAddresses" runat="server" CssClass="NormalTextBox"></asp:DropDownList>

View file

@ -0,0 +1,102 @@
// 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 EntServer = WebsitePanel.EnterpriseServer;
namespace WebsitePanel.Portal.Lync.UserControls
{
public partial class LyncUserSettings : WebsitePanelControlBase
{
private string sipAddressToSelect;
public string sipAddress
{
get { return ddlSipAddresses.SelectedItem.Value; }
set
{
sipAddressToSelect = value;
foreach (ListItem li in ddlSipAddresses.Items)
{
if (li.Value == value)
{
ddlSipAddresses.ClearSelection();
li.Selected = true;
break;
}
}
}
}
public int plansCount
{
get
{
return this.ddlSipAddresses.Items.Count;
}
}
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindAddresses();
}
}
private void BindAddresses()
{
EntServer.ExchangeEmailAddress[] emails = ES.Services.ExchangeServer.GetMailboxEmailAddresses(PanelRequest.ItemID, PanelRequest.AccountID);
foreach (EntServer.ExchangeEmailAddress email in emails)
{
ListItem li = new ListItem();
li.Text = email.EmailAddress;
li.Value = email.EmailAddress;
li.Selected = email.IsPrimary;
ddlSipAddresses.Items.Add(li);
}
foreach (ListItem li in ddlSipAddresses.Items)
{
if (li.Value == sipAddressToSelect)
{
ddlSipAddresses.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 LyncUserSettings {
/// <summary>
/// ddlSipAddresses control.
/// </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 ddlSipAddresses;
}
}

View file

@ -297,6 +297,13 @@
<Compile Include="Lync\LyncUsers.ascx.designer.cs"> <Compile Include="Lync\LyncUsers.ascx.designer.cs">
<DependentUpon>LyncUsers.ascx</DependentUpon> <DependentUpon>LyncUsers.ascx</DependentUpon>
</Compile> </Compile>
<Compile Include="Lync\UserControls\LyncUserSettings.ascx.cs">
<DependentUpon>LyncUserSettings.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Lync\UserControls\LyncUserSettings.ascx.designer.cs">
<DependentUpon>LyncUserSettings.ascx</DependentUpon>
</Compile>
<Compile Include="Lync\UserControls\LyncUserPlanSelector.ascx.cs"> <Compile Include="Lync\UserControls\LyncUserPlanSelector.ascx.cs">
<DependentUpon>LyncUserPlanSelector.ascx</DependentUpon> <DependentUpon>LyncUserPlanSelector.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType> <SubType>ASPXCodeBehind</SubType>
@ -3807,6 +3814,7 @@
<Content Include="ExchangeServer\OrganizationAddDomainName.ascx" /> <Content Include="ExchangeServer\OrganizationAddDomainName.ascx" />
<Content Include="ExchangeServer\OrganizationDomainNames.ascx" /> <Content Include="ExchangeServer\OrganizationDomainNames.ascx" />
<Content Include="ExchangeServer\ExchangeAddMailboxPlan.ascx" /> <Content Include="ExchangeServer\ExchangeAddMailboxPlan.ascx" />
<Content Include="Lync\UserControls\LyncUserSettings.ascx" />
<Content Include="ServersEditWebPlatformInstaller.ascx" /> <Content Include="ServersEditWebPlatformInstaller.ascx" />
<Content Include="ExchangeServer\ExchangeMailboxPlans.ascx" /> <Content Include="ExchangeServer\ExchangeMailboxPlans.ascx" />
<Content Include="ExchangeServer\UserControls\AccountsListWithPermissions.ascx" /> <Content Include="ExchangeServer\UserControls\AccountsListWithPermissions.ascx" />