diff --git a/WebsitePanel/Database/install_db.sql b/WebsitePanel/Database/install_db.sql index 69cb0d2a..91872432 100644 --- a/WebsitePanel/Database/install_db.sql +++ b/WebsitePanel/Database/install_db.sql @@ -13460,6 +13460,7 @@ 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, + [LyncUserPlanType] [int] NULL, [IM] [bit] NOT NULL, [Mobility] [bit] NOT NULL, [MobilityEnableOutsideVoice] [bit] NOT NULL, @@ -45269,6 +45270,7 @@ CREATE PROCEDURE [dbo].[AddLyncUserPlan] @LyncUserPlanId int OUTPUT, @ItemID int, @LyncUserPlanName nvarchar(300), + @LyncUserPlanType int, @IM bit, @Mobility bit, @MobilityEnableOutsideVoice bit, @@ -45298,6 +45300,7 @@ INSERT INTO LyncUserPlans ( ItemID, LyncUserPlanName, + LyncUserPlanType, IM, Mobility, MobilityEnableOutsideVoice, @@ -45311,6 +45314,7 @@ VALUES ( @ItemID, @LyncUserPlanName, + @LyncUserPlanType, @IM, @Mobility, @MobilityEnableOutsideVoice, @@ -45333,6 +45337,45 @@ GO +CREATE PROCEDURE [dbo].[UpdateLyncUserPlan] +( + @LyncUserPlanId int, + @LyncUserPlanName nvarchar(300), + @LyncUserPlanType int, + @IM bit, + @Mobility bit, + @MobilityEnableOutsideVoice bit, + @Federation bit, + @Conferencing bit, + @EnterpriseVoice bit, + @VoicePolicy int, + @IsDefault bit +) +AS + +UPDATE LyncUserPlans SET + LyncUserPlanName = @LyncUserPlanName, + LyncUserPlanType = @LyncUserPlanType, + IM = @IM, + Mobility = @Mobility, + MobilityEnableOutsideVoice = @MobilityEnableOutsideVoice, + Federation = @Federation, + Conferencing =@Conferencing, + EnterpriseVoice = @EnterpriseVoice, + VoicePolicy = @VoicePolicy, + IsDefault = @IsDefault +WHERE LyncUserPlanId = @LyncUserPlanId + + +RETURN +GO + + + + + + + CREATE PROCEDURE [dbo].[GetLyncUsersByPlanId] ( @@ -45456,6 +45499,7 @@ SELECT LyncUserPlanId, ItemID, LyncUserPlanName, + LyncUserPlanType, IM, Mobility, MobilityEnableOutsideVoice, @@ -45491,6 +45535,7 @@ SELECT LyncUserPlanId, ItemID, LyncUserPlanName, + LyncUserPlanType, IM, Mobility, MobilityEnableOutsideVoice, @@ -45525,6 +45570,7 @@ SELECT LyncUserPlanId, ItemID, LyncUserPlanName, + LyncUserPlanType, IM, Mobility, MobilityEnableOutsideVoice, diff --git a/WebsitePanel/Database/update_db.sql b/WebsitePanel/Database/update_db.sql index a875f37b..3c626821 100644 --- a/WebsitePanel/Database/update_db.sql +++ b/WebsitePanel/Database/update_db.sql @@ -1869,7 +1869,6 @@ GO - -- LyncUserPlans IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[LyncUserPlans]') AND type in (N'U')) BEGIN @@ -1877,6 +1876,7 @@ CREATE TABLE [dbo].[LyncUserPlans]( [LyncUserPlanId] [int] IDENTITY(1,1) NOT NULL, [ItemID] [int] NOT NULL, [LyncUserPlanName] [nvarchar](300) NOT NULL, + [LyncUserPlanType] [int] NULL, [IM] [bit] NOT NULL, [Mobility] [bit] NOT NULL, [MobilityEnableOutsideVoice] [bit] NOT NULL, @@ -1917,6 +1917,15 @@ 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='LyncUserPlans' AND COLS.name='LyncUserPlanType') +BEGIN +ALTER TABLE [dbo].[LyncUserPlans] ADD + [LyncUserPlanType] [int] NULL +END +GO + + + /****** Object: Table [dbo].[AddExchangeAccount] ******/ ALTER PROCEDURE [dbo].[AddExchangeAccount] @@ -3671,7 +3680,7 @@ AS ea.PrimaryEmailAddress, ea.SamAccountName, ou.LyncUserPlanId, - lp.LyncUserPlanName + lp.LyncUserPlanName FROM ExchangeAccounts ea INNER JOIN @@ -3694,6 +3703,42 @@ GO +ALTER PROCEDURE [dbo].[GetLyncUsersByPlanId] +( + @ItemID int, + @PlanId int +) +AS + + 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 AND + ou.LyncUserPlanId = @PlanId +GO + + + + + + IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'AddLyncUserPlan') BEGIN @@ -3702,6 +3747,7 @@ EXEC sp_executesql N'CREATE PROCEDURE [dbo].[AddLyncUserPlan] @LyncUserPlanId int OUTPUT, @ItemID int, @LyncUserPlanName nvarchar(300), + @LyncUserPlanType int, @IM bit, @Mobility bit, @MobilityEnableOutsideVoice bit, @@ -3713,13 +3759,15 @@ EXEC sp_executesql N'CREATE PROCEDURE [dbo].[AddLyncUserPlan] ) AS -IF ((SELECT Count(*) FROM LyncUserPlans WHERE ItemId = @ItemID) = 0) + + +IF (((SELECT Count(*) FROM LyncUserPlans WHERE ItemId = @ItemID) = 0) AND (@LyncUserPlanType=0)) BEGIN SET @IsDefault = 1 END ELSE BEGIN - IF @IsDefault = 1 + IF ((@IsDefault = 1) AND (@LyncUserPlanType=0)) BEGIN UPDATE LyncUserPlans SET IsDefault = 0 WHERE ItemID = @ItemID END @@ -3730,6 +3778,7 @@ INSERT INTO LyncUserPlans ( ItemID, LyncUserPlanName, + LyncUserPlanType, IM, Mobility, MobilityEnableOutsideVoice, @@ -3743,6 +3792,7 @@ VALUES ( @ItemID, @LyncUserPlanName, + @LyncUserPlanType, @IM, @Mobility, @MobilityEnableOutsideVoice, @@ -3761,11 +3811,18 @@ GO + + + + + + ALTER PROCEDURE [dbo].[AddLyncUserPlan] ( @LyncUserPlanId int OUTPUT, @ItemID int, @LyncUserPlanName nvarchar(300), + @LyncUserPlanType int, @IM bit, @Mobility bit, @MobilityEnableOutsideVoice bit, @@ -3777,24 +3834,24 @@ ALTER PROCEDURE [dbo].[AddLyncUserPlan] ) AS -IF ((SELECT Count(*) FROM LyncUserPlans WHERE ItemId = @ItemID) = 0) +IF (((SELECT Count(*) FROM LyncUserPlans WHERE ItemId = @ItemID) = 0) AND (@LyncUserPlanType=0)) BEGIN SET @IsDefault = 1 END ELSE BEGIN - IF @IsDefault = 1 + IF ((@IsDefault = 1) AND (@LyncUserPlanType=0)) BEGIN UPDATE LyncUserPlans SET IsDefault = 0 WHERE ItemID = @ItemID END END - INSERT INTO LyncUserPlans ( ItemID, LyncUserPlanName, + LyncUserPlanType, IM, Mobility, MobilityEnableOutsideVoice, @@ -3808,6 +3865,7 @@ VALUES ( @ItemID, @LyncUserPlanName, + @LyncUserPlanType, @IM, @Mobility, @MobilityEnableOutsideVoice, @@ -3824,8 +3882,6 @@ RETURN 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] @@ -3915,6 +3971,7 @@ SELECT LyncUserPlanId, ItemID, LyncUserPlanName, + LyncUserPlanType, IM, Mobility, MobilityEnableOutsideVoice, @@ -3935,6 +3992,31 @@ GO +ALTER PROCEDURE [dbo].[GetLyncUserPlan] +( + @LyncUserPlanId int +) +AS +SELECT + LyncUserPlanId, + ItemID, + LyncUserPlanName, + LyncUserPlanType, + IM, + Mobility, + MobilityEnableOutsideVoice, + Federation, + Conferencing, + EnterpriseVoice, + VoicePolicy, + IsDefault +FROM + LyncUserPlans +WHERE + LyncUserPlanId = @LyncUserPlanId +RETURN +GO + @@ -3950,6 +4032,7 @@ SELECT LyncUserPlanId, ItemID, LyncUserPlanName, + LyncUserPlanType, IM, Mobility, MobilityEnableOutsideVoice, @@ -3972,6 +4055,30 @@ GO +ALTER PROCEDURE [dbo].[GetLyncUserPlanByAccountId] +( + @AccountID int +) +AS +SELECT + LyncUserPlanId, + ItemID, + LyncUserPlanName, + LyncUserPlanType, + IM, + Mobility, + MobilityEnableOutsideVoice, + Federation, + Conferencing, + EnterpriseVoice, + VoicePolicy, + IsDefault +FROM + LyncUserPlans +WHERE + LyncUserPlanId IN (SELECT LyncUserPlanId FROM LyncUsers WHERE AccountID = @AccountID) +RETURN +GO @@ -3987,6 +4094,7 @@ SELECT LyncUserPlanId, ItemID, LyncUserPlanName, + LyncUserPlanType, IM, Mobility, MobilityEnableOutsideVoice, @@ -4009,6 +4117,32 @@ GO +ALTER PROCEDURE [dbo].[GetLyncUserPlans] +( + @ItemID int +) +AS +SELECT + LyncUserPlanId, + ItemID, + LyncUserPlanName, + LyncUserPlanType, + IM, + Mobility, + MobilityEnableOutsideVoice, + Federation, + Conferencing, + EnterpriseVoice, + VoicePolicy, + IsDefault +FROM + LyncUserPlans +WHERE + ItemID = @ItemID +ORDER BY LyncUserPlanName +RETURN +GO + @@ -5181,6 +5315,46 @@ END GO + +IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'UpdateLyncUserPlan') +BEGIN +EXEC sp_executesql N' CREATE PROCEDURE [dbo].[UpdateLyncUserPlan] +( + @LyncUserPlanId int, + @LyncUserPlanName nvarchar(300), + @LyncUserPlanType int, + @IM bit, + @Mobility bit, + @MobilityEnableOutsideVoice bit, + @Federation bit, + @Conferencing bit, + @EnterpriseVoice bit, + @VoicePolicy int, + @IsDefault bit +) +AS + +UPDATE LyncUserPlans SET + LyncUserPlanName = @LyncUserPlanName, + LyncUserPlanType = @LyncUserPlanType, + IM = @IM, + Mobility = @Mobility, + MobilityEnableOutsideVoice = @MobilityEnableOutsideVoice, + Federation = @Federation, + Conferencing =@Conferencing, + EnterpriseVoice = @EnterpriseVoice, + VoicePolicy = @VoicePolicy, + IsDefault = @IsDefault +WHERE LyncUserPlanId = @LyncUserPlanId + + +RETURN' +END +GO + + + + IF NOT EXISTS (SELECT * FROM [dbo].[Providers] WHERE [DisplayName] = 'SmarterMail 10.x') BEGIN INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (66, 4, N'SmarterMail', N'SmarterMail 10.x', N'WebsitePanel.Providers.Mail.SmarterMail10, WebsitePanel.Providers.Mail.SmarterMail10', N'SmarterMail60', NULL) diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/LyncProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/LyncProxy.cs index f1c5f802..be6850c0 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/LyncProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/LyncProxy.cs @@ -1,35 +1,7 @@ -// Copyright (c) 2012, Outercurve Foundation. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, -// are permitted provided that the following conditions are met: -// -// - Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// - Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// - Neither the name of the Outercurve Foundation nor the names of its -// contributors may be used to endorse or promote products derived from this -// software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.5456 +// Runtime Version:2.0.50727.6387 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -37,7 +9,7 @@ //------------------------------------------------------------------------------ // -// This source code was auto-generated by wsdl, Version=2.0.50727.42. +// This source code was auto-generated by wsdl, Version=2.0.50727.3038. // namespace WebsitePanel.EnterpriseServer { using System.Xml.Serialization; @@ -50,10 +22,12 @@ namespace WebsitePanel.EnterpriseServer { using WebsitePanel.Providers.Common; using WebsitePanel.Providers.HostedSolution; using WebsitePanel.Providers.ResultObjects; + + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Web.Services.WebServiceBindingAttribute(Name="esLyncSoap", Namespace="http://tempuri.org/")] @@ -75,6 +49,8 @@ namespace WebsitePanel.EnterpriseServer { private System.Threading.SendOrPostCallback AddLyncUserPlanOperationCompleted; + private System.Threading.SendOrPostCallback UpdateLyncUserPlanOperationCompleted; + private System.Threading.SendOrPostCallback DeleteLyncUserPlanOperationCompleted; private System.Threading.SendOrPostCallback SetOrganizationDefaultLyncUserPlanOperationCompleted; @@ -91,7 +67,7 @@ namespace WebsitePanel.EnterpriseServer { /// public esLync() { - this.Url = "http://localhost:9005/esLync.asmx"; + this.Url = "http://localhost:9002/esLync.asmx"; } /// @@ -118,6 +94,9 @@ namespace WebsitePanel.EnterpriseServer { /// public event AddLyncUserPlanCompletedEventHandler AddLyncUserPlanCompleted; + /// + public event UpdateLyncUserPlanCompletedEventHandler UpdateLyncUserPlanCompleted; + /// public event DeleteLyncUserPlanCompletedEventHandler DeleteLyncUserPlanCompleted; @@ -497,6 +476,50 @@ namespace WebsitePanel.EnterpriseServer { } } + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/UpdateLyncUserPlan", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int UpdateLyncUserPlan(int itemId, LyncUserPlan lyncUserPlan) { + object[] results = this.Invoke("UpdateLyncUserPlan", new object[] { + itemId, + lyncUserPlan}); + return ((int)(results[0])); + } + + /// + public System.IAsyncResult BeginUpdateLyncUserPlan(int itemId, LyncUserPlan lyncUserPlan, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("UpdateLyncUserPlan", new object[] { + itemId, + lyncUserPlan}, callback, asyncState); + } + + /// + public int EndUpdateLyncUserPlan(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((int)(results[0])); + } + + /// + public void UpdateLyncUserPlanAsync(int itemId, LyncUserPlan lyncUserPlan) { + this.UpdateLyncUserPlanAsync(itemId, lyncUserPlan, null); + } + + /// + public void UpdateLyncUserPlanAsync(int itemId, LyncUserPlan lyncUserPlan, object userState) { + if ((this.UpdateLyncUserPlanOperationCompleted == null)) { + this.UpdateLyncUserPlanOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateLyncUserPlanOperationCompleted); + } + this.InvokeAsync("UpdateLyncUserPlan", new object[] { + itemId, + lyncUserPlan}, this.UpdateLyncUserPlanOperationCompleted, userState); + } + + private void OnUpdateLyncUserPlanOperationCompleted(object arg) { + if ((this.UpdateLyncUserPlanCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.UpdateLyncUserPlanCompleted(this, new UpdateLyncUserPlanCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + /// [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteLyncUserPlan", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] public int DeleteLyncUserPlan(int itemId, int lyncUserPlanId) { @@ -815,11 +838,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void CreateLyncUserCompletedEventHandler(object sender, CreateLyncUserCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class CreateLyncUserCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -841,11 +864,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void DeleteLyncUserCompletedEventHandler(object sender, DeleteLyncUserCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class DeleteLyncUserCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -867,11 +890,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void GetLyncUsersPagedCompletedEventHandler(object sender, GetLyncUsersPagedCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetLyncUsersPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -893,11 +916,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void GetLyncUsersByPlanIdCompletedEventHandler(object sender, GetLyncUsersByPlanIdCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetLyncUsersByPlanIdCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -919,11 +942,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void GetLyncUserCountCompletedEventHandler(object sender, GetLyncUserCountCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetLyncUserCountCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -945,11 +968,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void GetLyncUserPlansCompletedEventHandler(object sender, GetLyncUserPlansCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetLyncUserPlansCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -971,11 +994,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void GetLyncUserPlanCompletedEventHandler(object sender, GetLyncUserPlanCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetLyncUserPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -997,11 +1020,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void AddLyncUserPlanCompletedEventHandler(object sender, AddLyncUserPlanCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class AddLyncUserPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -1023,11 +1046,37 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + public delegate void UpdateLyncUserPlanCompletedEventHandler(object sender, UpdateLyncUserPlanCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class UpdateLyncUserPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal UpdateLyncUserPlanCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public int Result { + get { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void DeleteLyncUserPlanCompletedEventHandler(object sender, DeleteLyncUserPlanCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class DeleteLyncUserPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -1049,11 +1098,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void SetOrganizationDefaultLyncUserPlanCompletedEventHandler(object sender, SetOrganizationDefaultLyncUserPlanCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class SetOrganizationDefaultLyncUserPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -1075,11 +1124,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void GetLyncUserGeneralSettingsCompletedEventHandler(object sender, GetLyncUserGeneralSettingsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetLyncUserGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -1101,11 +1150,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void SetUserLyncPlanCompletedEventHandler(object sender, SetUserLyncPlanCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class SetUserLyncPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -1127,11 +1176,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void GetFederationDomainsCompletedEventHandler(object sender, GetFederationDomainsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetFederationDomainsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -1153,11 +1202,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void AddFederationDomainCompletedEventHandler(object sender, AddFederationDomainCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class AddFederationDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -1179,11 +1228,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void RemoveFederationDomainCompletedEventHandler(object sender, RemoveFederationDomainCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class RemoveFederationDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Data/DataProvider.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Data/DataProvider.cs index 712764f3..336f9a1c 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Data/DataProvider.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Data/DataProvider.cs @@ -3296,6 +3296,7 @@ namespace WebsitePanel.EnterpriseServer new SqlParameter("@ItemID", itemID), new SqlParameter("@LyncUserPlanName", lyncUserPlan.LyncUserPlanName), + new SqlParameter("@LyncUserPlanType", lyncUserPlan.LyncUserPlanType), new SqlParameter("@IM", lyncUserPlan.IM), new SqlParameter("@Mobility", lyncUserPlan.Mobility), new SqlParameter("@MobilityEnableOutsideVoice", lyncUserPlan.MobilityEnableOutsideVoice), @@ -3309,6 +3310,27 @@ namespace WebsitePanel.EnterpriseServer return Convert.ToInt32(outParam.Value); } + + public static void UpdateLyncUserPlan(int itemID, LyncUserPlan lyncUserPlan) + { + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "UpdateLyncUserPlan", + new SqlParameter("@LyncUserPlanId", lyncUserPlan.LyncUserPlanId), + new SqlParameter("@LyncUserPlanName", lyncUserPlan.LyncUserPlanName), + new SqlParameter("@LyncUserPlanType", lyncUserPlan.LyncUserPlanType), + 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) + ); + } + public static void DeleteLyncUserPlan(int lyncUserPlanId) { SqlHelper.ExecuteNonQuery( diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/LyncController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/LyncController.cs index 7bc57248..d0526ed3 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/LyncController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/LyncController.cs @@ -539,6 +539,16 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution try { + List plans = new List(); + + UserInfo user = ObjectUtils.FillObjectFromDataReader(DataProvider.GetUserByExchangeOrganizationIdInternally(itemId)); + + LyncController.GetLyncUserPlansByUser(user, ref plans); + + return plans; + + + return ObjectUtils.CreateListFromDataReader( DataProvider.GetLyncUserPlans(itemId)); } @@ -552,6 +562,43 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution } } + private static void GetLyncUserPlansByUser(UserInfo user, ref List plans) + { + if ((user != null)) + { + List orgs = null; + + if (user.UserId != 1) + { + List Packages = PackageController.GetPackages(user.UserId); + + if ((Packages != null) & (Packages.Count > 0)) + { + orgs = ExchangeServerController.GetExchangeOrganizations(Packages[0].PackageId, false); + } + } + else + { + orgs = ExchangeServerController.GetExchangeOrganizations(1, false); + } + + if ((orgs != null) & (orgs.Count > 0)) + { + List Plans = ObjectUtils.CreateListFromDataReader(DataProvider.GetLyncUserPlans(orgs[0].Id)); + + foreach (LyncUserPlan p in Plans) + { + plans.Add(p); + } + } + + UserInfo owner = UserController.GetUserInternally(user.OwnerId); + + GetLyncUserPlansByUser(owner, ref plans); + } + } + + public static LyncUserPlan GetLyncUserPlan(int itemID, int lyncUserPlanId) { @@ -611,6 +658,50 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution } + + + + + public static int UpdateLyncUserPlan(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; + + DataProvider.UpdateLyncUserPlan(itemID, lyncUserPlan); + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + + + return 0; + } + + public static int DeleteLyncUserPlan(int itemID, int lyncUserPlanId) { int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esLync.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esLync.asmx.cs index bf9df2da..9996fb3d 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esLync.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esLync.asmx.cs @@ -94,6 +94,13 @@ namespace WebsitePanel.EnterpriseServer return LyncController.AddLyncUserPlan(itemId, lyncUserPlan); } + [WebMethod] + public int UpdateLyncUserPlan(int itemId, LyncUserPlan lyncUserPlan) + { + return LyncController.UpdateLyncUserPlan(itemId, lyncUserPlan); + } + + [WebMethod] public int DeleteLyncUserPlan(int itemId, int lyncUserPlanId) { diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/LyncUserPlan.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/LyncUserPlan.cs index 27b236ec..75fac709 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/LyncUserPlan.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/LyncUserPlan.cs @@ -35,6 +35,7 @@ namespace WebsitePanel.Providers.HostedSolution public class LyncUserPlan { int lyncUserPlanId; + int itemId; string lyncUserPlanName; bool im; @@ -44,9 +45,16 @@ namespace WebsitePanel.Providers.HostedSolution bool mobility; bool mobilityEnableOutsideVoice; LyncVoicePolicyType voicePolicy; + int lyncUserPlanType; bool isDefault; + public int ItemId + { + get { return this.itemId; } + set { this.itemId = value; } + } + public int LyncUserPlanId { get { return this.lyncUserPlanId; } @@ -59,6 +67,13 @@ namespace WebsitePanel.Providers.HostedSolution set { this.lyncUserPlanName = value; } } + public int LyncUserPlanType + { + get { return this.lyncUserPlanType; } + set { this.lyncUserPlanType = value; } + } + + public bool IM { get { return this.im; } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/LyncUserPlanType.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/LyncUserPlanType.cs new file mode 100644 index 00000000..e88c8df7 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/LyncUserPlanType.cs @@ -0,0 +1,37 @@ +// 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 LyncUserPlanType + { + User = 0, + Reseller = 1, + Administrator = 2 + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/WebsitePanel.Providers.Base.csproj b/WebsitePanel/Sources/WebsitePanel.Providers.Base/WebsitePanel.Providers.Base.csproj index b23b1846..3fed47eb 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/WebsitePanel.Providers.Base.csproj +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/WebsitePanel.Providers.Base.csproj @@ -88,6 +88,7 @@ + diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncAddLyncUserPlan.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncAddLyncUserPlan.ascx.cs index 0c208db5..82648d9d 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncAddLyncUserPlan.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncAddLyncUserPlan.ascx.cs @@ -40,6 +40,9 @@ namespace WebsitePanel.Portal.Lync if (!IsPostBack) { + + PackageContext cntx = ES.Services.Packages.GetPackageContext(PanelSecurity.PackageId); + if (PanelRequest.GetInt("LyncUserPlanId") != 0) { Providers.HostedSolution.LyncUserPlan plan = ES.Services.Lync.GetLyncUserPlan(PanelRequest.ItemID, PanelRequest.GetInt("LyncUserPlanId")); @@ -81,7 +84,6 @@ namespace WebsitePanel.Portal.Lync 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) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncUserPlans.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncUserPlans.ascx index 6a9d2353..8b76162a 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncUserPlans.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncUserPlans.ascx @@ -34,6 +34,11 @@ + + + + + diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncUserPlans.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncUserPlans.ascx.cs index b4456b9e..922c9420 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncUserPlans.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncUserPlans.ascx.cs @@ -106,6 +106,16 @@ namespace WebsitePanel.Portal.Lync try { + LyncUserPlan plan = ES.Services.Lync.GetLyncUserPlan(PanelRequest.ItemID, planId); + + if (plan.LyncUserPlanType > 0) + { + ShowErrorMessage("EXCHANGE_UNABLE_USE_SYSTEMPLAN"); + BindPlans(); + return; + } + + int result = ES.Services.Lync.DeleteLyncUserPlan(PanelRequest.ItemID, planId); if (result < 0) @@ -113,6 +123,9 @@ namespace WebsitePanel.Portal.Lync messageBox.ShowResultMessage(result); return; } + else + ShowSuccessMessage("REQUEST_COMPLETED_SUCCESFULLY"); + } catch (Exception) @@ -131,8 +144,19 @@ namespace WebsitePanel.Portal.Lync try { + LyncUserPlan plan = ES.Services.Lync.GetLyncUserPlan(PanelRequest.ItemID, planId); + + if (plan.LyncUserPlanType > 0) + { + ShowErrorMessage("EXCHANGE_UNABLE_USE_SYSTEMPLAN"); + BindPlans(); + return; + } + ES.Services.Lync.SetOrganizationDefaultLyncUserPlan(PanelRequest.ItemID, planId); + ShowSuccessMessage("REQUEST_COMPLETED_SUCCESFULLY"); + // rebind domains BindPlans(); } @@ -170,5 +194,29 @@ namespace WebsitePanel.Portal.Lync } } + + + public string GetPlanType(int planType) + { + string imgName = string.Empty; + + LyncUserPlanType type = (LyncUserPlanType)planType; + switch (type) + { + case LyncUserPlanType.Reseller: + imgName = "company24.png"; + break; + case LyncUserPlanType.Administrator: + imgName = "company24.png"; + break; + default: + imgName = "admin_16.png"; + break; + } + + return GetThemedImage("Exchange/" + imgName); + } + + } } \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncUserPlans.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncUserPlans.ascx.designer.cs index 0c4b5fd3..df06fccf 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncUserPlans.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncUserPlans.ascx.designer.cs @@ -1,31 +1,3 @@ -// 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. - //------------------------------------------------------------------------------ // // This code was generated by a tool. diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsLyncUserPlansPolicy.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsLyncUserPlansPolicy.ascx index 3ac10731..55701dac 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsLyncUserPlansPolicy.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsLyncUserPlansPolicy.ascx @@ -13,19 +13,17 @@ + + + + + <%# Eval("LyncUserPlanName")%> - - -
- /> -
-
-
  + + + + +

-
- -
@@ -131,14 +131,29 @@
-
- -
-
- -
+ + + + + +
+
+ +
+
+
+ +
+
+ +
+ + + + + diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsLyncUserPlansPolicy.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsLyncUserPlansPolicy.ascx.cs index a68f007b..76d92469 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsLyncUserPlansPolicy.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsLyncUserPlansPolicy.ascx.cs @@ -55,34 +55,43 @@ namespace WebsitePanel.Portal internal static List list; + public void BindSettings(UserSettings settings) { + BindPlans(); - if (list == null) - list = new List(); - - if (!string.IsNullOrEmpty(settings[UserSettings.DEFAULT_LYNCUSERPLANS])) - { - - XmlSerializer serializer = new XmlSerializer(list.GetType()); - - StringReader reader = new StringReader(settings[UserSettings.DEFAULT_LYNCUSERPLANS]); - - list = (List)serializer.Deserialize(reader); - } - - gvPlans.DataSource = list; - gvPlans.DataBind(); - - if (gvPlans.Rows.Count <= 1) - { - btnSetDefaultPlan.Enabled = false; - } - else - btnSetDefaultPlan.Enabled = true; + txtStatus.Visible = false; } + private void BindPlans() + { + Providers.HostedSolution.Organization[] orgs = null; + + if (PanelSecurity.SelectedUserId != 1) + { + PackageInfo[] Packages = ES.Services.Packages.GetPackages(PanelSecurity.SelectedUserId); + + if ((Packages != null) & (Packages.GetLength(0) > 0)) + { + orgs = ES.Services.ExchangeServer.GetExchangeOrganizations(Packages[0].PackageId, false); + } + } + else + { + orgs = ES.Services.ExchangeServer.GetExchangeOrganizations(1, false); + } + + if ((orgs != null) & (orgs.GetLength(0) > 0)) + { + LyncUserPlan[] list = ES.Services.Lync.GetLyncUserPlans(orgs[0].Id); + + gvPlans.DataSource = list; + gvPlans.DataBind(); + } + + btnUpdatePlan.Enabled = (string.IsNullOrEmpty(txtPlan.Text)) ? false : true; + } @@ -133,142 +142,316 @@ namespace WebsitePanel.Portal plan.VoicePolicy = LyncVoicePolicyType.None; } + + if (PanelSecurity.SelectedUser.Role == UserRole.Administrator) + plan.LyncUserPlanType = (int)LyncUserPlanType.Administrator; + else + if (PanelSecurity.SelectedUser.Role == UserRole.Reseller) + plan.LyncUserPlanType = (int)LyncUserPlanType.Reseller; - if (list == null) - list = new List(); - list.Add(plan); - gvPlans.DataSource = list; - gvPlans.DataBind(); + Providers.HostedSolution.Organization[] orgs = null; - if (gvPlans.Rows.Count <= 1) + if (PanelSecurity.SelectedUserId != 1) { - btnSetDefaultPlan.Enabled = false; + PackageInfo[] Packages = ES.Services.Packages.GetPackages(PanelSecurity.SelectedUserId); + + if ((Packages != null) & (Packages.GetLength(0) > 0)) + { + orgs = ES.Services.ExchangeServer.GetExchangeOrganizations(Packages[0].PackageId, false); + } } else - btnSetDefaultPlan.Enabled = true; + { + orgs = ES.Services.ExchangeServer.GetExchangeOrganizations(1, false); + } + + if ((orgs != null) & (orgs.GetLength(0) > 0)) + { + int result = ES.Services.Lync.AddLyncUserPlan(orgs[0].Id, plan); + + if (result < 0) + { + messageBox.ShowResultMessage(result); + return; + } + } + + BindPlans(); } protected void gvPlan_RowCommand(object sender, GridViewCommandEventArgs e) { int planId = Utils.ParseInt(e.CommandArgument.ToString(), 0); + Providers.HostedSolution.Organization[] orgs = null; + Providers.HostedSolution.LyncUserPlan plan; + int result = 0; + switch (e.CommandName) { case "DeleteItem": - - foreach (LyncUserPlan p in list) + try { - if (p.LyncUserPlanId == planId) + + if (PanelSecurity.SelectedUserId != 1) { - list.Remove(p); - break; + PackageInfo[] Packages = ES.Services.Packages.GetPackages(PanelSecurity.SelectedUserId); + + if ((Packages != null) & (Packages.GetLength(0) > 0)) + { + orgs = ES.Services.ExchangeServer.GetExchangeOrganizations(Packages[0].PackageId, false); + } } + else + { + orgs = ES.Services.ExchangeServer.GetExchangeOrganizations(1, false); + } + + plan = ES.Services.Lync.GetLyncUserPlan(orgs[0].Id, planId); + + if (plan.ItemId != orgs[0].Id) + { + messageBox.ShowErrorMessage("EXCHANGE_UNABLE_USE_SYSTEMPLAN"); + BindPlans(); + return; + } + + + result = ES.Services.ExchangeServer.DeleteExchangeMailboxPlan(orgs[0].Id, planId); + if (result < 0) + { + messageBox.ShowResultMessage(result); + return; + } + ViewState["LyncUserPlanID"] = null; + + txtPlan.Text = string.Empty; + + btnUpdatePlan.Enabled = (string.IsNullOrEmpty(txtPlan.Text)) ? false : true; + } - - gvPlans.DataSource = list; - gvPlans.DataBind(); - - if (gvPlans.Rows.Count <= 1) + catch (Exception) { - btnSetDefaultPlan.Enabled = false; + messageBox.ShowErrorMessage("EXCHANGE_DELETE_MAILBOXPLAN"); } - else - btnSetDefaultPlan.Enabled = true; + + BindPlans(); + break; case "EditItem": - foreach (LyncUserPlan plan in list) + try { - if (plan.LyncUserPlanId == planId) + + ViewState["LyncUserPlanID"] = planId; + + if (PanelSecurity.SelectedUserId != 1) { + PackageInfo[] Packages = ES.Services.Packages.GetPackages(PanelSecurity.SelectedUserId); - 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) + if ((Packages != null) & (Packages.GetLength(0) > 0)) { - 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; + orgs = ES.Services.ExchangeServer.GetExchangeOrganizations(Packages[0].PackageId, false); } - - break; } + else + { + orgs = ES.Services.ExchangeServer.GetExchangeOrganizations(1, false); + } + + + plan = ES.Services.Lync.GetLyncUserPlan(orgs[0].Id, planId); + + 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; + } + + btnUpdatePlan.Enabled = (string.IsNullOrEmpty(txtPlan.Text)) ? false : true; + + break; + } + catch (Exception) + { + messageBox.ShowErrorMessage("EXCHANGE_DELETE_MAILBOXPLAN"); } + BindPlans(); + + break; + case "RestampItem": + RestampLyncUsers(planId, planId); break; } } - protected void btnSetDefaultPlan_Click(object sender, EventArgs e) + + public string GetPlanType(int planType) { - // get domain - int planId = Utils.ParseInt(Request.Form["DefaultLyncUserPlan"], 0); + string imgName = string.Empty; - - - foreach (LyncUserPlan p in list) + LyncUserPlanType type = (LyncUserPlanType)planType; + switch (type) { - p.IsDefault = false; - } - - foreach (LyncUserPlan p in list) - { - if (p.LyncUserPlanId == planId) - { - p.IsDefault = true; + case LyncUserPlanType.Reseller: + imgName = "company24.png"; + break; + case LyncUserPlanType.Administrator: + imgName = "company24.png"; + break; + default: + imgName = "admin_16.png"; break; - } } - gvPlans.DataSource = list; - gvPlans.DataBind(); + return GetThemedImage("Exchange/" + imgName); } + public void SaveSettings(UserSettings settings) { - XmlSerializer serializer = new XmlSerializer(list.GetType()); - - StringWriter writer = new StringWriter(); - - serializer.Serialize(writer, list); - - settings[UserSettings.DEFAULT_LYNCUSERPLANS] = writer.ToString(); - } - - protected void btnAddPlanToOrganizations_Click(object sender, EventArgs e) - { - AddPlanToOrganizations("ServerAdmin"); + settings["LyncUserPlansPolicy"] = ""; } - private void AddPlanToOrganizations(string serverAdmin) + protected void btnUpdatePlan_Click(object sender, EventArgs e) { - UserInfo ServerAdminInfo = ES.Services.Users.GetUserByUsername(serverAdmin); - if (ServerAdminInfo == null) return; + if (ViewState["LyncUserPlanID"] == null) + return; - UserInfo[] UsersInfo = ES.Services.Users.GetUsers(ServerAdminInfo.UserId, true); + int planId = (int)ViewState["LyncUserPlanID"]; + Providers.HostedSolution.Organization[] orgs = null; + Providers.HostedSolution.LyncUserPlan plan; + + + if (PanelSecurity.SelectedUserId != 1) + { + PackageInfo[] Packages = ES.Services.Packages.GetPackages(PanelSecurity.SelectedUserId); + + if ((Packages != null) & (Packages.GetLength(0) > 0)) + { + orgs = ES.Services.ExchangeServer.GetExchangeOrganizations(Packages[0].PackageId, false); + } + } + else + { + orgs = ES.Services.ExchangeServer.GetExchangeOrganizations(1, false); + } + + plan = ES.Services.Lync.GetLyncUserPlan(orgs[0].Id, planId); + + if (plan.ItemId != orgs[0].Id) + { + messageBox.ShowErrorMessage("EXCHANGE_UNABLE_USE_SYSTEMPLAN"); + BindPlans(); + return; + } + + plan = new Providers.HostedSolution.LyncUserPlan(); + plan.LyncUserPlanId = (int)ViewState["LyncUserPlanID"]; + + 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; + } + else + { + if (chkEmergency.Checked) + plan.VoicePolicy = LyncVoicePolicyType.Emergency; + else if (chkNational.Checked) + plan.VoicePolicy = LyncVoicePolicyType.National; + else if (chkMobile.Checked) + plan.VoicePolicy = LyncVoicePolicyType.Mobile; + else if (chkInternational.Checked) + plan.VoicePolicy = LyncVoicePolicyType.International; + else + plan.VoicePolicy = LyncVoicePolicyType.None; + + } + + if (PanelSecurity.SelectedUser.Role == UserRole.Administrator) + plan.LyncUserPlanType = (int)LyncUserPlanType.Administrator; + else + if (PanelSecurity.SelectedUser.Role == UserRole.Reseller) + plan.LyncUserPlanType = (int)LyncUserPlanType.Reseller; + + + if ((orgs != null) & (orgs.GetLength(0) > 0)) + { + int result = ES.Services.Lync.UpdateLyncUserPlan(orgs[0].Id, plan); + + if (result < 0) + { + messageBox.ShowErrorMessage("EXCHANGE_UPDATEPLANS"); + } + else + { + messageBox.ShowSuccessMessage("EXCHANGE_UPDATEPLANS"); + } + } + + BindPlans(); + } + + + private bool PlanExists(LyncUserPlan plan, LyncUserPlan[] plans) + { + bool result = false; + + foreach (LyncUserPlan p in plans) + { + if (p.LyncUserPlanName.ToLower() == plan.LyncUserPlanName.ToLower()) + { + result = true; + break; + } + } + return result; + } + + protected void txtMailboxPlan_TextChanged(object sender, EventArgs e) + { + btnUpdatePlan.Enabled = (string.IsNullOrEmpty(txtPlan.Text)) ? false : true; + } + + private void RestampLyncUsers(int sourcePlanId, int destinationPlanId) + { + UserInfo[] UsersInfo = ES.Services.Users.GetUsers(PanelSecurity.SelectedUserId, true); try { @@ -290,11 +473,19 @@ namespace WebsitePanel.Portal { if (!string.IsNullOrEmpty(org.LyncTenantId)) { - LyncUserPlan[] plans = ES.Services.Lync.GetLyncUserPlans(org.Id); + LyncUser[] Accounts = ES.Services.Lync.GetLyncUsersByPlanId(org.Id, sourcePlanId); - foreach (LyncUserPlan p in list) + foreach (LyncUser a in Accounts) { - if (!PlanExists(p, plans)) ES.Services.Lync.AddLyncUserPlan(org.Id, p); + txtStatus.Text = "Completed"; + Providers.ResultObjects.LyncUserResult result = ES.Services.Lync.SetUserLyncPlan(org.Id, a.AccountID, destinationPlanId); + if (!result.IsSuccess) + { + BindPlans(); + txtStatus.Text = "Error: " + a.DisplayName; + messageBox.ShowErrorMessage("EXCHANGE_STAMPMAILBOXES"); + return; + } } } } @@ -302,30 +493,16 @@ namespace WebsitePanel.Portal } } } - messageBox.ShowSuccessMessage("LYNC_APPLYPLANTEMPLATE"); + messageBox.ShowSuccessMessage("EXCHANGE_STAMPMAILBOXES"); } catch (Exception ex) { - messageBox.ShowErrorMessage("LYNC_APPLYPLANTEMPLATE", ex); + messageBox.ShowErrorMessage("EXCHANGE_FAILED_TO_STAMP", ex); } + + BindPlans(); } - private bool PlanExists(LyncUserPlan plan, LyncUserPlan[] plans) - { - bool result = false; - - foreach (LyncUserPlan p in plans) - { - if (p.LyncUserPlanName.ToLower() == plan.LyncUserPlanName.ToLower()) - { - result = true; - break; - } - } - return result; - } - - } } \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsLyncUserPlansPolicy.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsLyncUserPlansPolicy.ascx.designer.cs index 813d06c8..22501825 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsLyncUserPlansPolicy.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsLyncUserPlansPolicy.ascx.designer.cs @@ -39,15 +39,6 @@ namespace WebsitePanel.Portal { ///
protected global::System.Web.UI.WebControls.GridView gvPlans; - /// - /// btnSetDefaultPlan control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Button btnSetDefaultPlan; - /// /// secPlan control. /// @@ -220,12 +211,21 @@ namespace WebsitePanel.Portal { protected global::System.Web.UI.WebControls.Button btnAddPlan; /// - /// btnAddPlanToOrganizations control. + /// btnUpdatePlan control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Button btnAddPlanToOrganizations; + protected global::System.Web.UI.WebControls.Button btnUpdatePlan; + + /// + /// txtStatus control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtStatus; } } diff --git a/WebsitePanel/Sources/generate_es_proxies.bat b/WebsitePanel/Sources/generate_es_proxies.bat index 0663c36f..0f50b419 100644 --- a/WebsitePanel/Sources/generate_es_proxies.bat +++ b/WebsitePanel/Sources/generate_es_proxies.bat @@ -35,8 +35,8 @@ REM %WSE_CLEAN% .\WebsitePanel.EnterpriseServer.Client\ecStorefrontProxy.cs REM %WSDL% %SERVER_URL%/ecStorehouse.asmx /out:.\WebsitePanel.EnterpriseServer.Client\ecStorehouseProxy.cs /namespace:WebsitePanel.Ecommerce.EnterpriseServer /type:webClient REM %WSE_CLEAN% .\WebsitePanel.EnterpriseServer.Client\ecStorehouseProxy.cs -%WSDL% %SERVER_URL%/esExchangeServer.asmx /out:.\WebsitePanel.EnterpriseServer.Client\ExchangeServerProxy.cs /namespace:WebsitePanel.EnterpriseServer /type:webClient -%WSE_CLEAN% .\WebsitePanel.EnterpriseServer.Client\ExchangeServerProxy.cs +REM %WSDL% %SERVER_URL%/esExchangeServer.asmx /out:.\WebsitePanel.EnterpriseServer.Client\ExchangeServerProxy.cs /namespace:WebsitePanel.EnterpriseServer /type:webClient +REM %WSE_CLEAN% .\WebsitePanel.EnterpriseServer.Client\ExchangeServerProxy.cs REM %WSDL% %SERVER_URL%/esExchangeHostedEdition.asmx /out:.\WebsitePanel.EnterpriseServer.Client\ExchangeHostedEditionProxy.cs /namespace:WebsitePanel.EnterpriseServer /type:webClient REM %WSE_CLEAN% .\WebsitePanel.EnterpriseServer.Client\ExchangeHostedEditionProxy.cs @@ -92,8 +92,8 @@ REM %WSE_CLEAN% .\WebsitePanel.EnterpriseServer.Client\WebServersProxy.cs REM %WSDL% %SERVER_URL%/esVirtualizationServerForPrivateCloud.asmx /out:.\WebsitePanel.EnterpriseServer.Client\VirtualizationServerProxyForPrivateCloud.cs /namespace:WebsitePanel.EnterpriseServer /type:webClient REM %WSE_CLEAN% .\WebsitePanel.EnterpriseServer.Client\VirtualizationServerProxyForPrivateCloud.cs -REM %WSDL% %SERVER_URL%/esLync.asmx /out:.\WebsitePanel.EnterpriseServer.Client\LyncProxy.cs /namespace:WebsitePanel.EnterpriseServer /type:webClient -REM %WSE_CLEAN% .\WebsitePanel.EnterpriseServer.Client\LyncProxy.cs +%WSDL% %SERVER_URL%/esLync.asmx /out:.\WebsitePanel.EnterpriseServer.Client\LyncProxy.cs /namespace:WebsitePanel.EnterpriseServer /type:webClient +%WSE_CLEAN% .\WebsitePanel.EnterpriseServer.Client\LyncProxy.cs