diff --git a/WebsitePanel/Database/update_db.sql b/WebsitePanel/Database/update_db.sql index df041e71..0231b023 100644 --- a/WebsitePanel/Database/update_db.sql +++ b/WebsitePanel/Database/update_db.sql @@ -1638,3 +1638,325 @@ BEGIN INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID], [HideQuota]) VALUES (422, 12, 26, N'Exchange2007.DisclaimersAllowed', N'Disclaimers Allowed', 1, 0, NULL, NULL) END GO + +-- Lync Enterprise Voice + +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='TelephonyVoicePolicy') +BEGIN +ALTER TABLE [dbo].[LyncUserPlans] ADD + +[RemoteUserAccess] [bit] NOT NULL DEFAULT 0, +[PublicIMConnectivity] [bit] NOT NULL DEFAULT 0, + +[AllowOrganizeMeetingsWithExternalAnonymous] [bit] NOT NULL DEFAULT 0, + +[Telephony] [int] NULL, + +[ServerURI] [nvarchar](300) NULL, + +[ArchivePolicy] [nvarchar](300) NULL, +[TelephonyDialPlanPolicy] [nvarchar](300) NULL, +[TelephonyVoicePolicy] [nvarchar](300) NULL + + +END +Go + +-- + +DROP PROCEDURE GetLyncUserPlan; + +DROP PROCEDURE AddLyncUserPlan; + +DROP PROCEDURE UpdateLyncUserPlan; + +DROP PROCEDURE DeleteLyncUserPlan; + +-- + +IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'DeleteLyncUserPlan') +BEGIN +EXEC sp_executesql N'CREATE PROCEDURE [dbo].[DeleteLyncUserPlan] +( + @LyncUserPlanId int +) +AS + +-- delete lyncuserplan +DELETE FROM LyncUserPlans +WHERE LyncUserPlanId = @LyncUserPlanId + +RETURN' +END +GO + +-- + +IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'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, + + @RemoteUserAccess bit, + @PublicIMConnectivity bit, + + @AllowOrganizeMeetingsWithExternalAnonymous bit, + + @Telephony int, + + @ServerURI nvarchar(300), + + @ArchivePolicy nvarchar(300), + + @TelephonyDialPlanPolicy nvarchar(300), + @TelephonyVoicePolicy nvarchar(300) +) +AS + +UPDATE LyncUserPlans SET + LyncUserPlanName = @LyncUserPlanName, + LyncUserPlanType = @LyncUserPlanType, + IM = @IM, + Mobility = @Mobility, + MobilityEnableOutsideVoice = @MobilityEnableOutsideVoice, + Federation = @Federation, + Conferencing =@Conferencing, + EnterpriseVoice = @EnterpriseVoice, + VoicePolicy = @VoicePolicy, + IsDefault = @IsDefault, + + RemoteUserAccess = @RemoteUserAccess, + PublicIMConnectivity = @PublicIMConnectivity, + + AllowOrganizeMeetingsWithExternalAnonymous = @AllowOrganizeMeetingsWithExternalAnonymous, + + Telephony = @Telephony, + + ServerURI = @ServerURI, + + ArchivePolicy = @ArchivePolicy, + TelephonyDialPlanPolicy = @TelephonyDialPlanPolicy, + TelephonyVoicePolicy = @TelephonyVoicePolicy + +WHERE LyncUserPlanId = @LyncUserPlanId + + +RETURN' +END +GO + +-- + +IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'AddLyncUserPlan') +BEGIN +EXEC sp_executesql N'CREATE PROCEDURE [dbo].[AddLyncUserPlan] +( + @LyncUserPlanId int OUTPUT, + @ItemID int, + @LyncUserPlanName nvarchar(300), + @LyncUserPlanType int, + @IM bit, + @Mobility bit, + @MobilityEnableOutsideVoice bit, + @Federation bit, + @Conferencing bit, + @EnterpriseVoice bit, + @VoicePolicy int, + @IsDefault bit, + + @RemoteUserAccess bit, + @PublicIMConnectivity bit, + + @AllowOrganizeMeetingsWithExternalAnonymous bit, + + @Telephony int, + + @ServerURI nvarchar(300), + + @ArchivePolicy nvarchar(300), + @TelephonyDialPlanPolicy nvarchar(300), + @TelephonyVoicePolicy nvarchar(300) + +) +AS + + + +IF (((SELECT Count(*) FROM LyncUserPlans WHERE ItemId = @ItemID) = 0) AND (@LyncUserPlanType=0)) +BEGIN + SET @IsDefault = 1 +END +ELSE +BEGIN + 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, + Federation, + Conferencing, + EnterpriseVoice, + VoicePolicy, + IsDefault, + + RemoteUserAccess, + PublicIMConnectivity, + + AllowOrganizeMeetingsWithExternalAnonymous, + + Telephony, + + ServerURI, + + ArchivePolicy, + TelephonyDialPlanPolicy, + TelephonyVoicePolicy + +) +VALUES +( + @ItemID, + @LyncUserPlanName, + @LyncUserPlanType, + @IM, + @Mobility, + @MobilityEnableOutsideVoice, + @Federation, + @Conferencing, + @EnterpriseVoice, + @VoicePolicy, + @IsDefault, + + @RemoteUserAccess, + @PublicIMConnectivity, + + @AllowOrganizeMeetingsWithExternalAnonymous, + + @Telephony, + + @ServerURI, + + @ArchivePolicy, + @TelephonyDialPlanPolicy, + @TelephonyVoicePolicy + +) + +SET @LyncUserPlanId = SCOPE_IDENTITY() + +RETURN' +END +GO + +-- + + +IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'GetLyncUserPlan') +BEGIN +EXEC sp_executesql N'CREATE PROCEDURE [dbo].[GetLyncUserPlan] +( + @LyncUserPlanId int +) +AS +SELECT + LyncUserPlanId, + ItemID, + LyncUserPlanName, + LyncUserPlanType, + IM, + Mobility, + MobilityEnableOutsideVoice, + Federation, + Conferencing, + EnterpriseVoice, + VoicePolicy, + IsDefault, + + RemoteUserAccess, + PublicIMConnectivity, + + AllowOrganizeMeetingsWithExternalAnonymous, + + Telephony, + + ServerURI, + + ArchivePolicy, + TelephonyDialPlanPolicy, + TelephonyVoicePolicy + +FROM + LyncUserPlans +WHERE + LyncUserPlanId = @LyncUserPlanId +RETURN' +END +GO + + + + + +ALTER PROCEDURE [dbo].[GetLyncUserPlan] +( + @LyncUserPlanId int +) +AS +SELECT + LyncUserPlanId, + ItemID, + LyncUserPlanName, + LyncUserPlanType, + IM, + Mobility, + MobilityEnableOutsideVoice, + Federation, + Conferencing, + EnterpriseVoice, + VoicePolicy, + IsDefault, + + RemoteUserAccess, + PublicIMConnectivity, + + AllowOrganizeMeetingsWithExternalAnonymous, + + Telephony, + + ServerURI, + + ArchivePolicy, + TelephonyDialPlanPolicy, + TelephonyVoicePolicy + +FROM + LyncUserPlans +WHERE + LyncUserPlanId = @LyncUserPlanId +RETURN +GO + + + + diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/IPAddressPool.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/IPAddressPool.cs index d2a3656a..67a74266 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/IPAddressPool.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/IPAddressPool.cs @@ -38,6 +38,7 @@ namespace WebsitePanel.EnterpriseServer General = 1, WebSites = 2, VpsExternalNetwork = 3, - VpsManagementNetwork = 4 + VpsManagementNetwork = 4, + PhoneNumbers = 5 } } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/LyncProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/LyncProxy.cs index cce2aeac..952cc22f 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/LyncProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/LyncProxy.cs @@ -912,6 +912,15 @@ namespace WebsitePanel.EnterpriseServer { this.RemoveFederationDomainCompleted(this, new RemoveFederationDomainCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetPolicyList", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public string[] GetPolicyList(int itemId, LyncPolicyType type, string name) + { + object[] results = this.Invoke("GetPolicyList", new object[] { + itemId, type, name}); + return ((string[])(results[0])); + } /// public new void CancelAsync(object userState) { diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Data/DataProvider.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Data/DataProvider.cs index 1503bab5..1db00f99 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Data/DataProvider.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Data/DataProvider.cs @@ -3710,7 +3710,20 @@ namespace WebsitePanel.EnterpriseServer new SqlParameter("@Conferencing", lyncUserPlan.Conferencing), new SqlParameter("@EnterpriseVoice", lyncUserPlan.EnterpriseVoice), new SqlParameter("@VoicePolicy", lyncUserPlan.VoicePolicy), - new SqlParameter("@IsDefault", lyncUserPlan.IsDefault) + new SqlParameter("@IsDefault", lyncUserPlan.IsDefault), + + new SqlParameter("@RemoteUserAccess", lyncUserPlan.RemoteUserAccess), + new SqlParameter("@PublicIMConnectivity", lyncUserPlan.PublicIMConnectivity), + + new SqlParameter("@AllowOrganizeMeetingsWithExternalAnonymous", lyncUserPlan.AllowOrganizeMeetingsWithExternalAnonymous), + + new SqlParameter("@Telephony", lyncUserPlan.Telephony), + + new SqlParameter("@ServerURI", lyncUserPlan.ServerURI), + + new SqlParameter("@ArchivePolicy", lyncUserPlan.ArchivePolicy), + new SqlParameter("@TelephonyDialPlanPolicy", lyncUserPlan.TelephonyDialPlanPolicy), + new SqlParameter("@TelephonyVoicePolicy", lyncUserPlan.TelephonyVoicePolicy) ); return Convert.ToInt32(outParam.Value); @@ -3733,7 +3746,20 @@ namespace WebsitePanel.EnterpriseServer new SqlParameter("@Conferencing", lyncUserPlan.Conferencing), new SqlParameter("@EnterpriseVoice", lyncUserPlan.EnterpriseVoice), new SqlParameter("@VoicePolicy", lyncUserPlan.VoicePolicy), - new SqlParameter("@IsDefault", lyncUserPlan.IsDefault) + new SqlParameter("@IsDefault", lyncUserPlan.IsDefault), + + new SqlParameter("@RemoteUserAccess", lyncUserPlan.RemoteUserAccess), + new SqlParameter("@PublicIMConnectivity", lyncUserPlan.PublicIMConnectivity), + + new SqlParameter("@AllowOrganizeMeetingsWithExternalAnonymous", lyncUserPlan.AllowOrganizeMeetingsWithExternalAnonymous), + + new SqlParameter("@Telephony", lyncUserPlan.Telephony), + + new SqlParameter("@ServerURI", lyncUserPlan.ServerURI), + + new SqlParameter("@ArchivePolicy", lyncUserPlan.ArchivePolicy), + new SqlParameter("@TelephonyDialPlanPolicy", lyncUserPlan.TelephonyDialPlanPolicy), + new SqlParameter("@TelephonyVoicePolicy", lyncUserPlan.TelephonyVoicePolicy) ); } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/LyncController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/LyncController.cs index e78b8a10..d4f352f2 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/LyncController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/LyncController.cs @@ -53,8 +53,11 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution List resSettings = new List(lyncSettings); - ExtendLyncSettings(resSettings, "primarydomaincontroller", GetProviderProperty(organizationServiceId, "primarydomaincontroller")); - ExtendLyncSettings(resSettings, "rootou", GetProviderProperty(organizationServiceId, "rootou")); + if (organizationServiceId != -1) + { + ExtendLyncSettings(resSettings, "primarydomaincontroller", GetProviderProperty(organizationServiceId, "primarydomaincontroller")); + ExtendLyncSettings(resSettings, "rootou", GetProviderProperty(organizationServiceId, "rootou")); + } ws.ServiceProviderSettingsSoapHeaderValue.Settings = resSettings.ToArray(); return ws; } @@ -345,6 +348,13 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution { LyncUserResult res = TaskManager.StartResultTask("LYNC", "SET_LYNC_USER_GENERAL_SETTINGS"); + string PIN = ""; + + string[] uriAndPin = ("" + lineUri).Split(':'); + + if (uriAndPin.Length > 0) lineUri = uriAndPin[0]; + if (uriAndPin.Length > 1) PIN = uriAndPin[1]; + LyncUser user = null; try @@ -378,20 +388,22 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution if (!string.IsNullOrEmpty(sipAddress)) { - if (sipAddress != usr.UserPrincipalName) + if (user.SipAddress != sipAddress) { - if (DataProvider.LyncUserExists(accountId, sipAddress)) + if (sipAddress != usr.UserPrincipalName) { - TaskManager.CompleteResultTask(res, LyncErrorCodes.ADDRESS_ALREADY_USED); - return res; + if (DataProvider.LyncUserExists(accountId, sipAddress)) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.ADDRESS_ALREADY_USED); + return res; + } } + user.SipAddress = sipAddress; } - - user.SipAddress = sipAddress; - } - if (!string.IsNullOrEmpty(lineUri)) user.LineUri = lineUri; + user.LineUri = lineUri; + user.PIN = PIN; lync.SetLyncUserGeneralSettings(org.OrganizationId, usr.UserPrincipalName, user); @@ -1002,6 +1014,51 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution #endregion + public static string[] GetPolicyList(int itemId, LyncPolicyType type, string name) + { + string[] ret = null; + try + { + if (itemId == -1) + { + // policy list in all lync servers + List allpolicylist = new List(); + List servers = ServerController.GetAllServers(); + foreach (ServerInfo server in servers) + { + List services = ServerController.GetServicesByServerIdGroupName(server.ServerId, ResourceGroups.Lync); + foreach (ServiceInfo service in services) + { + LyncServer lync = GetLyncServer(service.ServiceId, -1); + string[] values = lync.GetPolicyList(type, name); + foreach (string val in values) + if (allpolicylist.IndexOf(val) == -1) + allpolicylist.Add(val); + } + + } + ret = allpolicylist.ToArray(); + } + else + { + + Organization org = (Organization)PackageController.GetPackageItem(itemId); + + int lyncServiceId = GetLyncServiceID(org.PackageId); + LyncServer lync = GetLyncServer(lyncServiceId, org.ServiceId); + + ret = lync.GetPolicyList(type, name); + } + } + catch (Exception ex) + { + } + finally + { + } + + return ret; + } #region Private methods public static UInt64 ConvertPhoneNumberToLong(string ip) diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Servers/ServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Servers/ServerController.cs index 61e838a6..39e13c75 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Servers/ServerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Servers/ServerController.cs @@ -965,38 +965,59 @@ namespace WebsitePanel.EnterpriseServer return res; } - var startExternalIP = IPAddress.Parse(externalIP); - var startInternalIP = IPAddress.Parse(internalIP); - var endExternalIP = IPAddress.Parse(endIP); - - // handle CIDR notation IP/Subnet addresses - if (startExternalIP.IsSubnet && endExternalIP == null) { - endExternalIP = startExternalIP.LastSubnetIP; - startExternalIP = startExternalIP.FirstSubnetIP; - } - - if (startExternalIP.V6 != startInternalIP.V6 && (startExternalIP.V6 != endExternalIP.V6 && endExternalIP != null)) throw new NotSupportedException("All IP addresses must be either V4 or V6."); - - int i = 0; - long step = ((endExternalIP - startExternalIP) > 0) ? 1 : -1; - - while (true) + if (pool == IPAddressPool.PhoneNumbers) { - if (i > MaxSubnet) - break; + string phoneFormat = "D" + Math.Max(externalIP.Length, endIP.Length); - // add IP address - DataProvider.AddIPAddress((int)pool, serverId, startExternalIP.ToString(), startInternalIP.ToString(), subnetMask, defaultGateway, comments); + UInt64 start = UInt64.Parse(externalIP); + UInt64 end = UInt64.Parse(endIP); - if (startExternalIP == endExternalIP) - break; + if (end < start) { UInt64 temp = start; start = end; end = temp; } - i++; + const UInt64 maxPhones = 1000; // TODO max? - startExternalIP += step; + end = Math.Min(end, start + maxPhones); - if (startInternalIP != 0) - startInternalIP += step; + for (UInt64 number = start; number <= end; number++) + DataProvider.AddIPAddress((int)pool, serverId, number.ToString(phoneFormat), "", subnetMask, defaultGateway, comments); + } + + else + { + var startExternalIP = IPAddress.Parse(externalIP); + var startInternalIP = IPAddress.Parse(internalIP); + var endExternalIP = IPAddress.Parse(endIP); + + // handle CIDR notation IP/Subnet addresses + if (startExternalIP.IsSubnet && endExternalIP == null) + { + endExternalIP = startExternalIP.LastSubnetIP; + startExternalIP = startExternalIP.FirstSubnetIP; + } + + if (startExternalIP.V6 != startInternalIP.V6 && (startExternalIP.V6 != endExternalIP.V6 && endExternalIP != null)) throw new NotSupportedException("All IP addresses must be either V4 or V6."); + + int i = 0; + long step = ((endExternalIP - startExternalIP) > 0) ? 1 : -1; + + while (true) + { + if (i > MaxSubnet) + break; + + // add IP address + DataProvider.AddIPAddress((int)pool, serverId, startExternalIP.ToString(), startInternalIP.ToString(), subnetMask, defaultGateway, comments); + + if (startExternalIP == endExternalIP) + break; + + i++; + + startExternalIP += step; + + if (startInternalIP != 0) + startInternalIP += step; + } } } catch (Exception ex) diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Web.config b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Web.config index 7a73a914..3a721fdd 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Web.config +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Web.config @@ -1,58 +1,58 @@ - + -
+
- + - + - + - + - - - + + + - + - + - + - - - + + + - + - + - + - - + + - + - + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esLync.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esLync.asmx.cs index 8006be54..3b35d88c 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esLync.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esLync.asmx.cs @@ -151,5 +151,12 @@ namespace WebsitePanel.EnterpriseServer } #endregion + + [WebMethod] + public string[] GetPolicyList(int itemId, LyncPolicyType type, string name) + { + return LyncController.GetPolicyList(itemId, type, name); + } + } } \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ILyncServer.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ILyncServer.cs index 16d7e005..39dee306 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ILyncServer.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ILyncServer.cs @@ -48,5 +48,7 @@ namespace WebsitePanel.Providers.HostedSolution bool RemoveFederationDomain(string organizationId, string domainName); void ReloadConfiguration(); + + string[] GetPolicyList(LyncPolicyType type, string name); } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/LyncPolicyType.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/LyncPolicyType.cs new file mode 100644 index 00000000..5a069a48 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/LyncPolicyType.cs @@ -0,0 +1,44 @@ +// Copyright (c) 2011, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace WebsitePanel.Providers.HostedSolution +{ + public enum LyncPolicyType + { + Archiving = 0, + DialPlan = 1, + Voice = 2, + Pin = 3 + } + +} diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/LyncUser.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/LyncUser.cs index e95a9436..dc5f7931 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/LyncUser.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/LyncUser.cs @@ -41,5 +41,7 @@ namespace WebsitePanel.Providers.HostedSolution public int AccountID { get; set; } public int LyncUserPlanId { get; set; } public string LyncUserPlanName { get; set; } + + public string PIN { get; set; } } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/LyncUserPlan.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/LyncUserPlan.cs index 75fac709..ea5ea424 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/LyncUserPlan.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/LyncUserPlan.cs @@ -122,6 +122,63 @@ namespace WebsitePanel.Providers.HostedSolution set { this.voicePolicy = value; } } + bool remoteUserAccess; + bool publicIMConnectivity; + bool allowOrganizeMeetingsWithExternalAnonymous; + + int telephony; + + string serverURI; + + string archivePolicy; + string telephonyDialPlanPolicy; + string telephonyVoicePolicy; + + public bool RemoteUserAccess + { + get { return this.remoteUserAccess; } + set { this.remoteUserAccess = value; } + } + public bool PublicIMConnectivity + { + get { return this.publicIMConnectivity; } + set { this.publicIMConnectivity = value; } + } + + public bool AllowOrganizeMeetingsWithExternalAnonymous + { + get { return this.allowOrganizeMeetingsWithExternalAnonymous; } + set { this.allowOrganizeMeetingsWithExternalAnonymous = value; } + } + + public int Telephony + { + get { return this.telephony; } + set { this.telephony = value; } + } + + public string ServerURI + { + get { return this.serverURI; } + set { this.serverURI = value; } + } + + public string ArchivePolicy + { + get { return this.archivePolicy; } + set { this.archivePolicy = value; } + } + + public string TelephonyDialPlanPolicy + { + get { return this.telephonyDialPlanPolicy; } + set { this.telephonyDialPlanPolicy = value; } + } + public string TelephonyVoicePolicy + { + get { return this.telephonyVoicePolicy; } + set { this.telephonyVoicePolicy = value; } + } } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/WebsitePanel.Providers.Base.csproj b/WebsitePanel/Sources/WebsitePanel.Providers.Base/WebsitePanel.Providers.Base.csproj index face836d..538ed17f 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/WebsitePanel.Providers.Base.csproj +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/WebsitePanel.Providers.Base.csproj @@ -94,6 +94,7 @@ + diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Lync2013/Lync2013.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Lync2013/Lync2013.cs index 97da4d68..68413a3d 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Lync2013/Lync2013.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Lync2013/Lync2013.cs @@ -269,7 +269,22 @@ namespace WebsitePanel.Providers.HostedSolution command.Parameters.Add("Identity", userUpn); ExecuteShellCommand(runspace, command, false); - SetLyncUserPlanInternal(organizationId, userUpn, plan, runspace); + command = new Command("Update-CsAddressBook"); + ExecuteShellCommand(runspace, command, false); + command = new Command("Update-CsUserDatabase"); + ExecuteShellCommand(runspace, command, false); + + int trySleep = 5000; int tryMaxCount = 10; bool PlanSet = false; + for (int tryCount = 0; (tryCount < tryMaxCount) && (!PlanSet); tryCount++ ) + { + try + { + PlanSet = SetLyncUserPlanInternal(organizationId, userUpn, plan, runspace); + } + catch { } + if (!PlanSet) System.Threading.Thread.Sleep(trySleep); + } + command = new Command("Update-CsAddressBook"); ExecuteShellCommand(runspace, command, false); command = new Command("Update-CsUserDatabase"); @@ -317,6 +332,8 @@ namespace WebsitePanel.Providers.HostedSolution lyncUser.LineUri = (string) GetPSObjectProperty(user, "LineURI"); lyncUser.SipAddress = lyncUser.SipAddress.ToLower().Replace("sip:", ""); + lyncUser.LineUri = lyncUser.LineUri.ToLower().Replace("tel:+", ""); + lyncUser.LineUri = lyncUser.LineUri.ToLower().Replace("tel:", ""); } catch (Exception ex) { @@ -404,13 +421,25 @@ namespace WebsitePanel.Providers.HostedSolution command.Parameters.Add("SipAddress", "SIP:" + lyncUser.SipAddress); } - if (!string.IsNullOrEmpty(lyncUser.SipAddress)) + if (!string.IsNullOrEmpty(lyncUser.LineUri)) { - command.Parameters.Add("LineUri", lyncUser.LineUri); + command.Parameters.Add("LineUri", "TEL:+" + lyncUser.LineUri); + } + else + { + command.Parameters.Add("LineUri", null); } ExecuteShellCommand(runspace, command, false); + if (!String.IsNullOrEmpty(lyncUser.PIN)) + { + command = new Command("Set-CsClientPin"); + command.Parameters.Add("Identity", userUpn); + command.Parameters.Add("Pin", lyncUser.PIN); + ExecuteShellCommand(runspace, command, false); + } + command = new Command("Update-CsAddressBook"); ExecuteShellCommand(runspace, command, false); @@ -454,7 +483,13 @@ namespace WebsitePanel.Providers.HostedSolution bCloseRunSpace = true; } - var command = new Command("Grant-CsExternalAccessPolicy"); + // EnterpriseVoice + var command = new Command("Set-CsUser"); + command.Parameters.Add("Identity", userUpn); + command.Parameters.Add("EnterpriseVoiceEnabled", plan.EnterpriseVoice); + ExecuteShellCommand(runspace, command, false); + + command = new Command("Grant-CsExternalAccessPolicy"); command.Parameters.Add("Identity", userUpn); command.Parameters.Add("PolicyName", plan.Federation ? organizationId : null); ExecuteShellCommand(runspace, command, false); @@ -466,7 +501,6 @@ namespace WebsitePanel.Providers.HostedSolution command = new Command("Grant-CsMobilityPolicy"); command.Parameters.Add("Identity", userUpn); - if (plan.Mobility) { command.Parameters.Add("PolicyName", plan.MobilityEnableOutsideVoice ? organizationId + " EnableOutSideVoice" : organizationId + " DisableOutSideVoice"); @@ -475,8 +509,26 @@ namespace WebsitePanel.Providers.HostedSolution { command.Parameters.Add("PolicyName", null); } - ExecuteShellCommand(runspace, command, false); + + // ArchivePolicy + command = new Command("Grant-CsArchivingPolicy"); + command.Parameters.Add("Identity", userUpn); + command.Parameters.Add("PolicyName", string.IsNullOrEmpty(plan.ArchivePolicy) ? null : plan.ArchivePolicy); + ExecuteShellCommand(runspace, command, false); + + // DialPlan + command = new Command("Grant-CsDialPlan"); + command.Parameters.Add("Identity", userUpn); + command.Parameters.Add("PolicyName", string.IsNullOrEmpty(plan.TelephonyDialPlanPolicy) ? null : plan.TelephonyDialPlanPolicy); + ExecuteShellCommand(runspace, command, false); + + // VoicePolicy + command = new Command("Grant-CsVoicePolicy"); + command.Parameters.Add("Identity", userUpn); + command.Parameters.Add("PolicyName", string.IsNullOrEmpty(plan.TelephonyVoicePolicy) ? null : plan.TelephonyVoicePolicy); + ExecuteShellCommand(runspace, command, false); + command = new Command("Update-CsUserDatabase"); ExecuteShellCommand(runspace, command, false); } @@ -744,6 +796,92 @@ namespace WebsitePanel.Providers.HostedSolution #endregion + #region Policy + + internal override string[] GetPolicyListInternal(LyncPolicyType type, string name) + { + List ret = new List(); + + switch (type) + { + case LyncPolicyType.Archiving: + { + Runspace runSpace = OpenRunspace(); + Command cmd = new Command("Get-CsArchivingPolicy"); + Collection result = ExecuteShellCommand(runSpace, cmd, false); + if ((result != null) && (result.Count > 0)) + { + foreach (PSObject res in result) + { + string Identity = GetPSObjectProperty(res, "Identity").ToString(); + ret.Add(Identity); + } + } + } + break; + case LyncPolicyType.DialPlan: + { + Runspace runSpace = OpenRunspace(); + Command cmd = new Command("Get-CsDialPlan"); + Collection result = ExecuteShellCommand(runSpace, cmd, false); + if ((result != null) && (result.Count > 0)) + { + foreach (PSObject res in result) + { + string Identity = GetPSObjectProperty(res, "Identity").ToString(); + string Description = "" + (string)GetPSObjectProperty(res, "Description"); + if (Description.ToLower().IndexOf(name.ToLower()) == -1) continue; + ret.Add(Identity); + } + + + } + } + break; + case LyncPolicyType.Voice: + { + Runspace runSpace = OpenRunspace(); + Command cmd = new Command("Get-CsVoicePolicy"); + Collection result = ExecuteShellCommand(runSpace, cmd, false); + if ((result != null) && (result.Count > 0)) + { + foreach (PSObject res in result) + { + string Identity = GetPSObjectProperty(res, "Identity").ToString(); + string Description = "" + (string)GetPSObjectProperty(res, "Description"); + if (Description.ToLower().IndexOf(name.ToLower()) == -1) continue; + + ret.Add(Identity); + } + + + } + } + break; + case LyncPolicyType.Pin: + { + Runspace runSpace = OpenRunspace(); + Command cmd = new Command("Get-CsPinPolicy"); + Collection result = ExecuteShellCommand(runSpace, cmd, false); + if ((result != null) && (result.Count > 0)) + { + foreach (PSObject res in result) + { + string Identity = GetPSObjectProperty(res, "Identity").ToString(); + string str = "" + GetPSObjectProperty(res, name); + ret.Add(str); + } + } + } + break; + + } + + return ret.ToArray(); + } + + #endregion + #endregion } } \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Lync2013/LyncBase.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Lync2013/LyncBase.cs index 9a4924f5..b8cd6a62 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Lync2013/LyncBase.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Lync2013/LyncBase.cs @@ -134,6 +134,11 @@ namespace WebsitePanel.Providers.HostedSolution ReloadConfigurationInternal(); } + public virtual string[] GetPolicyList(LyncPolicyType type, string name) + { + return GetPolicyListInternal(type, name); + } + public override bool IsInstalled() { bool bResult = false; @@ -209,6 +214,11 @@ namespace WebsitePanel.Providers.HostedSolution throw new NotImplementedException(); } + internal virtual string[] GetPolicyListInternal(LyncPolicyType type, string name) + { + throw new NotImplementedException(); + } + #region PowerShell integration /// Opens runspace. diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Lync2013/WebsitePanel.Providers.HostedSolution.Lync2013.csproj b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Lync2013/WebsitePanel.Providers.HostedSolution.Lync2013.csproj index 5efb9ece..0d14af54 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Lync2013/WebsitePanel.Providers.HostedSolution.Lync2013.csproj +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Lync2013/WebsitePanel.Providers.HostedSolution.Lync2013.csproj @@ -9,7 +9,7 @@ Properties WebsitePanel.Providers.HostedSolution.Lync2013 WebsitePanel.Providers.HostedSolution.Lync2013 - v4.5 + v4.0 512 diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/HostedSolutionLog.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/HostedSolutionLog.cs index 93b39b45..83257a78 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/HostedSolutionLog.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/HostedSolutionLog.cs @@ -50,12 +50,22 @@ namespace WebsitePanel.Providers.HostedSolution Log.WriteEnd("{0} {1}", LogPrefix, text); } + public static void LogInfo(string message) + { + Log.WriteInfo("{0} {1}", LogPrefix, message); + } + public static void LogInfo(string message, params object[] args) { string text = String.Format(message, args); Log.WriteInfo("{0} {1}", LogPrefix, text); } + public static void LogWarning(string message) + { + Log.WriteWarning("{0} {1}", LogPrefix, message); + } + public static void LogWarning(string message, params object[] args) { string text = String.Format(message, args); diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/Lync2010.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/Lync2010.cs index be5e9397..9b91a9fe 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/Lync2010.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/Lync2010.cs @@ -163,6 +163,11 @@ namespace WebsitePanel.Providers.HostedSolution ReloadConfigurationInternal(); } + public string[] GetPolicyList(LyncPolicyType type, string name) + { + return GetPolicyListInternal(type, name); + } + #endregion #region organization @@ -297,8 +302,8 @@ namespace WebsitePanel.Providers.HostedSolution string path = AddADPrefix(GetOrganizationPath(organizationId)); DirectoryEntry ou = ActiveDirectoryUtils.GetADObject(path); string[] sipDs = (string[])ActiveDirectoryUtils.GetADObjectPropertyMultiValue(ou, "msRTCSIP-Domains"); - - foreach (string sipD in sipDs) + + foreach (string sipD in sipDs) DeleteSipDomain(runSpace, sipD); //clear the msRTCSIP-Domains, TenantID, ObjectID @@ -518,6 +523,8 @@ namespace WebsitePanel.Providers.HostedSolution lyncUser.LineUri = (string)GetPSObjectProperty(user, "LineURI"); lyncUser.SipAddress = lyncUser.SipAddress.ToLower().Replace("sip:", ""); + lyncUser.LineUri = lyncUser.LineUri.ToLower().Replace("tel:+", ""); + lyncUser.LineUri = lyncUser.LineUri.ToLower().Replace("tel:", ""); } catch (Exception ex) { @@ -611,11 +618,20 @@ namespace WebsitePanel.Providers.HostedSolution cmd = new Command("Set-CsUser"); cmd.Parameters.Add("Identity", userUpn); - if (!string.IsNullOrEmpty(lyncUser.SipAddress)) cmd.Parameters.Add("SipAddress", "SIP:"+lyncUser.SipAddress); - if (!string.IsNullOrEmpty(lyncUser.SipAddress)) cmd.Parameters.Add("LineUri", lyncUser.LineUri); - + if (!string.IsNullOrEmpty(lyncUser.SipAddress)) cmd.Parameters.Add("SipAddress", "SIP:" + lyncUser.SipAddress); + if (!string.IsNullOrEmpty(lyncUser.LineUri)) cmd.Parameters.Add("LineUri", "TEL:+" + lyncUser.LineUri); + else cmd.Parameters.Add("LineUri", null); ExecuteShellCommand(runSpace, cmd, false); + if (!String.IsNullOrEmpty(lyncUser.PIN)) + { + cmd = new Command("Set-CsClientPin"); + cmd.Parameters.Add("Identity", userUpn); + cmd.Parameters.Add("Pin", lyncUser.PIN); + ExecuteShellCommand(runSpace, cmd, false); + } + + //initiate addressbook generation cmd = new Command("Update-CsAddressBook"); ExecuteShellCommand(runSpace, cmd, false); @@ -657,8 +673,14 @@ namespace WebsitePanel.Providers.HostedSolution bCloseRunSpace = true; } + // EnterpriseVoice + Command cmd = new Command("Set-CsUser"); + cmd.Parameters.Add("Identity", userUpn); + cmd.Parameters.Add("EnterpriseVoiceEnabled", plan.EnterpriseVoice); + ExecuteShellCommand(runSpace, cmd, false); + //CsExternalAccessPolicy - Command cmd = new Command("Grant-CsExternalAccessPolicy"); + cmd = new Command("Grant-CsExternalAccessPolicy"); cmd.Parameters.Add("Identity", userUpn); cmd.Parameters.Add("PolicyName", plan.Federation ? organizationId : null); ExecuteShellCommand(runSpace, cmd); @@ -678,6 +700,24 @@ namespace WebsitePanel.Providers.HostedSolution cmd.Parameters.Add("PolicyName", null); ExecuteShellCommand(runSpace, cmd); + // ArchivePolicy + cmd = new Command("Grant-CsArchivingPolicy"); + cmd.Parameters.Add("Identity", userUpn); + cmd.Parameters.Add("PolicyName", string.IsNullOrEmpty(plan.ArchivePolicy) ? null : plan.ArchivePolicy); + ExecuteShellCommand(runSpace, cmd); + + // DialPlan + cmd = new Command("Grant-CsDialPlan"); + cmd.Parameters.Add("Identity", userUpn); + cmd.Parameters.Add("PolicyName", string.IsNullOrEmpty(plan.TelephonyDialPlanPolicy) ? null : plan.TelephonyDialPlanPolicy); + ExecuteShellCommand(runSpace, cmd); + + // VoicePolicy + cmd = new Command("Grant-CsVoicePolicy"); + cmd.Parameters.Add("Identity", userUpn); + cmd.Parameters.Add("PolicyName", string.IsNullOrEmpty(plan.TelephonyVoicePolicy) ? null : plan.TelephonyVoicePolicy); + ExecuteShellCommand(runSpace, cmd); + //initiate user database replication cmd = new Command("Update-CsUserDatabase"); ExecuteShellCommand(runSpace, cmd, false); @@ -887,6 +927,90 @@ namespace WebsitePanel.Providers.HostedSolution HostedSolutionLog.LogEnd("DeleteMobilityPolicy"); } + internal string[] GetPolicyListInternal(LyncPolicyType type, string name) + { + List ret = new List(); + + switch (type) + { + case LyncPolicyType.Archiving: + { + Runspace runSpace = OpenRunspace(); + Command cmd = new Command("Get-CsArchivingPolicy"); + Collection result = ExecuteShellCommand(runSpace, cmd, false); + if ((result != null) && (result.Count > 0)) + { + foreach (PSObject res in result) + { + string Identity = GetPSObjectProperty(res, "Identity").ToString(); + ret.Add(Identity); + } + } + } + break; + case LyncPolicyType.DialPlan: + { + Runspace runSpace = OpenRunspace(); + Command cmd = new Command("Get-CsDialPlan"); + Collection result = ExecuteShellCommand(runSpace, cmd, false); + if ((result != null) && (result.Count > 0)) + { + foreach (PSObject res in result) + { + string Identity = GetPSObjectProperty(res, "Identity").ToString(); + string Description = "" + (string)GetPSObjectProperty(res, "Description"); + if (Description.ToLower().IndexOf(name.ToLower()) == -1) continue; + ret.Add(Identity); + } + + + } + } + break; + case LyncPolicyType.Voice: + { + Runspace runSpace = OpenRunspace(); + Command cmd = new Command("Get-CsVoicePolicy"); + Collection result = ExecuteShellCommand(runSpace, cmd, false); + if ((result != null) && (result.Count > 0)) + { + foreach (PSObject res in result) + { + string Identity = GetPSObjectProperty(res, "Identity").ToString(); + string Description = "" + (string)GetPSObjectProperty(res, "Description"); + if (Description.ToLower().IndexOf(name.ToLower()) == -1) continue; + + ret.Add(Identity); + } + + + } + } + break; + case LyncPolicyType.Pin: + { + Runspace runSpace = OpenRunspace(); + Command cmd = new Command("Get-CsPinPolicy"); + Collection result = ExecuteShellCommand(runSpace, cmd, false); + if ((result != null) && (result.Count > 0)) + { + foreach (PSObject res in result) + { + string Identity = GetPSObjectProperty(res, "Identity").ToString(); + string str = "" + GetPSObjectProperty(res, name); + ret.Add(str); + } + } + } + break; + + } + + + + return ret.ToArray(); + } + #endregion #region Sytsem Related Methods diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Client/LyncServerProxy.cs b/WebsitePanel/Sources/WebsitePanel.Server.Client/LyncServerProxy.cs index 299ccff6..afb3f428 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Client/LyncServerProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Client/LyncServerProxy.cs @@ -627,6 +627,16 @@ namespace WebsitePanel.Providers.Lync { this.ReloadConfigurationCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } + + /// + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetPolicyList", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public string[] GetPolicyList(LyncPolicyType type, string name) + { + object[] results = this.Invoke("GetPolicyList", new object[] { + type, name}); + return ((string[])(results[0])); + } /// public new void CancelAsync(object userState) { diff --git a/WebsitePanel/Sources/WebsitePanel.Server/LyncServer.asmx.cs b/WebsitePanel/Sources/WebsitePanel.Server/LyncServer.asmx.cs index b55428ec..9e0e09e6 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server/LyncServer.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server/LyncServer.asmx.cs @@ -247,7 +247,25 @@ namespace WebsitePanel.Server } } + [WebMethod, SoapHeader("settings")] + public string[] GetPolicyList(LyncPolicyType type, string name) + { + string[] ret = null; + try + { + Log.WriteStart("{0}.GetPolicyList", ProviderSettings.ProviderName); + ret = Lync.GetPolicyList(type, name); + Log.WriteEnd("{0}.GetPolicyList", ProviderSettings.ProviderName); + } + catch (Exception ex) + { + Log.WriteError(String.Format("Error: {0}.GetPolicyList", ProviderSettings.ProviderName), ex); + throw; + } + + return ret; + } } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/ModulesData.config b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/ModulesData.config index b2602ecb..c7d2f0d6 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/ModulesData.config +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/ModulesData.config @@ -81,7 +81,10 @@ - + + + + diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Modules.config b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Modules.config index 63db8671..fd56bbb9 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Modules.config +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Modules.config @@ -160,7 +160,17 @@ - + + + + + + + + + + + @@ -264,7 +274,13 @@ - + + + + + + + diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Pages.config b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Pages.config index e6277aa7..bb162c93 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Pages.config +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Pages.config @@ -212,6 +212,17 @@ + + + + + + + diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_Modules.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_Modules.ascx.resx index 4d4e954b..2a1aabc9 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_Modules.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_Modules.ascx.resx @@ -771,8 +771,19 @@ System Hard Quota - Helicon Zoo + + Phone Numbers + + + Add Phone Numbers + + + Edit Phone numbers + + + Phone Numbers + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_Pages.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_Pages.ascx.resx index 6b30cf6d..6e584424 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_Pages.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_Pages.ascx.resx @@ -462,4 +462,16 @@ System Hard Quota + + Phone Numbers + + + {user} - {space} - Phone Numbers + + + Phone Numbers + + + Phone Numbers + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx index 31481fc7..e188622e 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx @@ -3118,7 +3118,6 @@ Failed to update user login name. - Mailbox primary e-mail address has been changed. @@ -3371,7 +3370,6 @@ Please note not all email address are deleted - There are no public folders to delete @@ -3960,9 +3958,6 @@ IP Address could not be deleted - - IP Address could not be deleted because it is being used by Virtual Private Server. - Cannot add network adapter IP addresses @@ -5286,6 +5281,12 @@ Mailbox plan updated + + Lync plan update failed + + + Lync plan updated + Failed to apply plans template @@ -5313,4 +5314,19 @@ By clicking on the button 'Apply', you will apply the respective hard quota on each provisioned home folder. Note that this may take some time. + + Error adding Phone number + + + Cannot add Phone numbers range. + + + The following errors have been occurred: + + + Phone number have been successfully deallocated. + + + At least one Phone number must be selected. + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/LyncAllocatePhoneNumbers.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/LyncAllocatePhoneNumbers.ascx.resx new file mode 100644 index 00000000..1cf75868 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/LyncAllocatePhoneNumbers.ascx.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Number of Phone Numbers: + + + Quotas + + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/LyncPhoneNumbers.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/LyncPhoneNumbers.ascx.resx new file mode 100644 index 00000000..1cf75868 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/LyncPhoneNumbers.ascx.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Number of Phone Numbers: + + + Quotas + + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/PhoneNumbers.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/PhoneNumbers.ascx.resx new file mode 100644 index 00000000..8b997d67 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/PhoneNumbers.ascx.resx @@ -0,0 +1,204 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Add + + + Numbers + + + NAT Address + + + Server + + + User + + + Comments + + + No Phone Numbers found in the selected Pool. + + + Numbers + + + NAT Address + + + Server Name + + + Username + + + VPS + + + Default Gateway + + + VPS External Network IP + + + VPS Management Network IP + + + Web Sites IP + + + General IP + + + Page size: + + + Pool: + + + return confirm('Delete selected?'); + + + Delete selected + + + Edit selected... + + + Item + + + Space + + + User + + + Default Gateway + + + Item Name + + + Phone Numbers + + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/PhoneNumbersAddPhoneNumber.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/PhoneNumbersAddPhoneNumber.ascx.resx new file mode 100644 index 00000000..4be33be2 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/PhoneNumbersAddPhoneNumber.ascx.resx @@ -0,0 +1,172 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + IP Address: + + + NAT Address: + + + Server: + + + Comments: + + + Add + + + Cancel + + + <Not Assigned> + + + Settings: + + + to + + + Default Gateway: + + + Subnet Mask: + + + General IP + + + VPS External Network IP + + + VPS Management Network IP + + + Web Sites IP + + + + Phone Numbers + + + Phone Numbers: + + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/PhoneNumbersEditPhoneNumber.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/PhoneNumbersEditPhoneNumber.ascx.resx new file mode 100644 index 00000000..4411a1aa --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/PhoneNumbersEditPhoneNumber.ascx.resx @@ -0,0 +1,165 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Server: + + + Comments: + + + Update + + + Cancel + + + <Not Assigned> + + + Default Gateway: + + + Subnet Mask: + + + General IP + + + VPS External Network IP + + + VPS Management Network IP + + + Web Sites IP + + + IP Address: + + + NAT Address: + + + Phone Numbers + + + Phone Number: + + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDisclaimerGeneralSettings.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDisclaimerGeneralSettings.ascx.designer.cs index accdff07..e7de40fb 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDisclaimerGeneralSettings.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDisclaimerGeneralSettings.ascx.designer.cs @@ -1,10 +1,39 @@ -//------------------------------------------------------------------------------ -// <àâòîìàòè÷åñêè ñîçäàâàåìîå> -// Ýòîò êîä ñîçäàí ïðîãðàììîé. +// 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. + +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// + //------------------------------------------------------------------------------ namespace WebsitePanel.Portal.ExchangeServer { @@ -13,128 +42,142 @@ namespace WebsitePanel.Portal.ExchangeServer { public partial class ExchangeDisclaimerGeneralSettings { /// - /// asyncTasks ýëåìåíò óïðàâëåíèÿ. + /// asyncTasks control. /// /// - /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. - /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks; /// - /// breadcrumb ýëåìåíò óïðàâëåíèÿ. + /// breadcrumb control. /// /// - /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. - /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Breadcrumb breadcrumb; /// - /// menu ýëåìåíò óïðàâëåíèÿ. + /// menu control. /// /// - /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. - /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Menu menu; /// - /// Image1 ýëåìåíò óïðàâëåíèÿ. + /// Image1 control. /// /// - /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. - /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// protected global::System.Web.UI.WebControls.Image Image1; /// - /// locTitle ýëåìåíò óïðàâëåíèÿ. + /// locTitle control. /// /// - /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. - /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// protected global::System.Web.UI.WebControls.Localize locTitle; /// - /// litDisplayName ýëåìåíò óïðàâëåíèÿ. + /// litDisplayName control. /// /// - /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. - /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// protected global::System.Web.UI.WebControls.Literal litDisplayName; /// - /// messageBox ýëåìåíò óïðàâëåíèÿ. + /// messageBox control. /// /// - /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. - /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox; /// - /// locDisplayName ýëåìåíò óïðàâëåíèÿ. + /// locDisplayName control. /// /// - /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. - /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// protected global::System.Web.UI.WebControls.Localize locDisplayName; /// - /// txtDisplayName ýëåìåíò óïðàâëåíèÿ. + /// txtDisplayName control. /// /// - /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. - /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// protected global::System.Web.UI.WebControls.TextBox txtDisplayName; /// - /// valRequireDisplayName ýëåìåíò óïðàâëåíèÿ. + /// valRequireDisplayName control. /// /// - /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. - /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// protected global::System.Web.UI.WebControls.RequiredFieldValidator valRequireDisplayName; /// - /// locNotes ýëåìåíò óïðàâëåíèÿ. + /// locNotes control. /// /// - /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. - /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// protected global::System.Web.UI.WebControls.Localize locNotes; /// - /// txtNotes ýëåìåíò óïðàâëåíèÿ. + /// txtNotes control. /// /// - /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. - /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// protected global::System.Web.UI.WebControls.TextBox txtNotes; /// - /// btnSave ýëåìåíò óïðàâëåíèÿ. + /// btnSave control. /// /// - /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. - /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// protected global::System.Web.UI.WebControls.Button btnSave; /// - /// ValidationSummary1 ýëåìåíò óïðàâëåíèÿ. + /// ValidationSummary1 control. /// /// - /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. - /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// protected global::System.Web.UI.WebControls.ValidationSummary ValidationSummary1; } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncAddLyncUserPlan.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncAddLyncUserPlan.ascx index e68f1c13..3c9b8873 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncAddLyncUserPlan.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncAddLyncUserPlan.ascx @@ -60,11 +60,6 @@ - - - - - @@ -78,7 +73,136 @@
- + + + + + + + + + + + + + + + +
+ +
+ +
+ +
+
+
+ + + + + + + + + +
+ + + +
+
+
+ + + + + + + + +
+ +
+
+
+ + + + + + + + + +
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + +
+ + + + + + +
+ + + +
+ + + +
+
+ + + + + + + +
+ + + +
+
+ +
+
+ + + <%-- Disable because not used @@ -115,7 +239,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 58072ca2..684a2e06 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncAddLyncUserPlan.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncAddLyncUserPlan.ascx.cs @@ -30,6 +30,11 @@ using System; using WebsitePanel.EnterpriseServer; using WebsitePanel.Providers.HostedSolution; using WebsitePanel.Providers.ResultObjects; +using WebsitePanel.Providers; +using WebsitePanel.Providers.Web; +using WebsitePanel.Providers.Common; +using WebsitePanel.Portal.Code.Helpers; + namespace WebsitePanel.Portal.Lync { @@ -37,11 +42,22 @@ namespace WebsitePanel.Portal.Lync { protected void Page_Load(object sender, EventArgs e) { + PackageContext cntx = null; if (!IsPostBack) { + cntx = ES.Services.Packages.GetPackageContext(PanelSecurity.PackageId); - PackageContext cntx = ES.Services.Packages.GetPackageContext(PanelSecurity.PackageId); + string[] archivePolicy = ES.Services.Lync.GetPolicyList(PanelRequest.ItemID, LyncPolicyType.Archiving, null); + if (archivePolicy != null) + { + foreach (string policy in archivePolicy) + { + if (policy.ToLower()=="global") continue; + string txt = policy.Replace("Tag:",""); + ddArchivingPolicy.Items.Add( new System.Web.UI.WebControls.ListItem( txt, policy) ); + } + } if (PanelRequest.GetInt("LyncUserPlanId") != 0) { @@ -54,6 +70,8 @@ namespace WebsitePanel.Portal.Lync chkConferencing.Checked = plan.Conferencing; chkMobility.Checked = plan.Mobility; chkEnterpriseVoice.Checked = plan.EnterpriseVoice; + + /* because not used switch (plan.VoicePolicy) { case LyncVoicePolicyType.None: @@ -74,16 +92,40 @@ namespace WebsitePanel.Portal.Lync chkNone.Checked = true; break; } + */ + + chkRemoteUserAccess.Checked = plan.RemoteUserAccess; + chkPublicIMConnectivity.Checked = plan.PublicIMConnectivity; + + chkAllowOrganizeMeetingsWithExternalAnonymous.Checked = plan.AllowOrganizeMeetingsWithExternalAnonymous; + + ddTelephony.SelectedIndex = plan.Telephony; + + tbServerURI.Text = plan.ServerURI; locTitle.Text = plan.LyncUserPlanName; this.DisableControls = true; + string planArchivePolicy = ""; + if (plan.ArchivePolicy != null) planArchivePolicy = plan.ArchivePolicy; + string planTelephonyDialPlanPolicy = ""; + if (plan.TelephonyDialPlanPolicy != null) planTelephonyDialPlanPolicy = plan.TelephonyDialPlanPolicy; + string planTelephonyVoicePolicy = ""; + if (plan.TelephonyVoicePolicy != null) planTelephonyVoicePolicy = plan.TelephonyVoicePolicy; + + ddArchivingPolicy.Items.Clear(); + ddArchivingPolicy.Items.Add(new System.Web.UI.WebControls.ListItem(planArchivePolicy.Replace("Tag:", ""), planArchivePolicy)); + ddTelephonyDialPlanPolicy.Items.Clear(); + ddTelephonyDialPlanPolicy.Items.Add(new System.Web.UI.WebControls.ListItem(planTelephonyDialPlanPolicy.Replace("Tag:", ""), planTelephonyDialPlanPolicy)); + ddTelephonyVoicePolicy.Items.Clear(); + ddTelephonyVoicePolicy.Items.Add(new System.Web.UI.WebControls.ListItem(planTelephonyVoicePolicy.Replace("Tag:", ""), planTelephonyVoicePolicy)); + } else { chkIM.Checked = true; chkIM.Enabled = false; - chkNone.Checked = true; + // chkNone.Checked = true; because not used if (cntx != null) { foreach (QuotaValueInfo quota in cntx.QuotasArray) @@ -110,6 +152,33 @@ namespace WebsitePanel.Portal.Lync } } + chkEnterpriseVoice.Enabled = false; + chkEnterpriseVoice.Checked = false; + + pnEnterpriseVoice.Visible = false; + pnServerURI.Visible = false; + + switch (ddTelephony.SelectedIndex) + { + case 1: + break; + case 2: + pnEnterpriseVoice.Visible = true; + chkEnterpriseVoice.Checked = true; + break; + case 3: + pnServerURI.Visible = true; + break; + case 4: + pnServerURI.Visible = true; + break; + + } + + cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId); + PlanFeaturesTelephony.Visible = Utils.CheckQouta(Quotas.LYNC_ENTERPRISEVOICE, cntx); + secPlanFeaturesTelephony.Visible = PlanFeaturesTelephony.Visible; + } protected void btnAdd_Click(object sender, EventArgs e) @@ -117,6 +186,37 @@ namespace WebsitePanel.Portal.Lync AddPlan(); } + protected void btnAccept_Click(object sender, EventArgs e) + { + string name = tbTelephoneProvider.Text; + + if (string.IsNullOrEmpty(name)) return; + + ddTelephonyDialPlanPolicy.Items.Clear(); + string[] dialPlan = ES.Services.Lync.GetPolicyList(PanelRequest.ItemID, LyncPolicyType.DialPlan, name); + if (dialPlan != null) + { + foreach (string policy in dialPlan) + { + if (policy.ToLower() == "global") continue; + string txt = policy.Replace("Tag:", ""); + ddTelephonyDialPlanPolicy.Items.Add(new System.Web.UI.WebControls.ListItem(txt, policy)); + } + } + + ddTelephonyVoicePolicy.Items.Clear(); + string[] voicePolicy = ES.Services.Lync.GetPolicyList(PanelRequest.ItemID, LyncPolicyType.Voice, name); + if (voicePolicy != null) + { + foreach (string policy in voicePolicy) + { + if (policy.ToLower() == "global") continue; + string txt = policy.Replace("Tag:", ""); + ddTelephonyVoicePolicy.Items.Add(new System.Web.UI.WebControls.ListItem(txt, policy)); + } + } + } + private void AddPlan() { try @@ -132,6 +232,10 @@ namespace WebsitePanel.Portal.Lync plan.EnterpriseVoice = chkEnterpriseVoice.Checked; + + plan.VoicePolicy = LyncVoicePolicyType.None; + + /* because not used if (!plan.EnterpriseVoice) { plan.VoicePolicy = LyncVoicePolicyType.None; @@ -149,7 +253,21 @@ namespace WebsitePanel.Portal.Lync else plan.VoicePolicy = LyncVoicePolicyType.None; - } + } + */ + + plan.RemoteUserAccess = chkRemoteUserAccess.Checked; + plan.PublicIMConnectivity = chkPublicIMConnectivity.Checked; + + plan.AllowOrganizeMeetingsWithExternalAnonymous = chkAllowOrganizeMeetingsWithExternalAnonymous.Checked; + + plan.Telephony = ddTelephony.SelectedIndex; + + plan.ServerURI = tbServerURI.Text; + + plan.ArchivePolicy = ddArchivingPolicy.SelectedValue; + plan.TelephonyDialPlanPolicy = ddTelephonyDialPlanPolicy.SelectedValue; + plan.TelephonyVoicePolicy = ddTelephonyVoicePolicy.SelectedValue; int result = ES.Services.Lync.AddLyncUserPlan(PanelRequest.ItemID, plan); diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncAddLyncUserPlan.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncAddLyncUserPlan.ascx.designer.cs index d3a71282..1fc0acef 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncAddLyncUserPlan.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncAddLyncUserPlan.ascx.designer.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2012, Outercurve Foundation. +// Copyright (c) 2011, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -31,10 +31,9 @@ // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// the code is regenerated. // //------------------------------------------------------------------------------ - namespace WebsitePanel.Portal.Lync { @@ -166,15 +165,6 @@ namespace WebsitePanel.Portal.Lync { /// protected global::System.Web.UI.WebControls.CheckBox chkMobility; - /// - /// chkFederation control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.CheckBox chkFederation; - /// /// chkConferencing control. /// @@ -194,67 +184,256 @@ namespace WebsitePanel.Portal.Lync { protected global::System.Web.UI.WebControls.CheckBox chkEnterpriseVoice; /// - /// secEnterpriseVoice control. + /// secPlanFeaturesFederation control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::WebsitePanel.Portal.CollapsiblePanel secEnterpriseVoice; + protected global::WebsitePanel.Portal.CollapsiblePanel secPlanFeaturesFederation; /// - /// EnterpriseVoice control. + /// PlanFeaturesFederation control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Panel EnterpriseVoice; + protected global::System.Web.UI.WebControls.Panel PlanFeaturesFederation; /// - /// chkNone control. + /// chkFederation control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.RadioButton chkNone; + protected global::System.Web.UI.WebControls.CheckBox chkFederation; /// - /// chkEmergency control. + /// chkRemoteUserAccess control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.RadioButton chkEmergency; + protected global::System.Web.UI.WebControls.CheckBox chkRemoteUserAccess; /// - /// chkNational control. + /// chkPublicIMConnectivity control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.RadioButton chkNational; + protected global::System.Web.UI.WebControls.CheckBox chkPublicIMConnectivity; /// - /// chkMobile control. + /// secPlanFeaturesArchiving control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.RadioButton chkMobile; + protected global::WebsitePanel.Portal.CollapsiblePanel secPlanFeaturesArchiving; /// - /// chkInternational control. + /// PlanFeaturesArchiving control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.RadioButton chkInternational; + protected global::System.Web.UI.WebControls.Panel PlanFeaturesArchiving; + + /// + /// locArchivingPolicy control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Localize locArchivingPolicy; + + /// + /// ddArchivingPolicy control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList ddArchivingPolicy; + + /// + /// secPlanFeaturesMeeting control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.CollapsiblePanel secPlanFeaturesMeeting; + + /// + /// PlanFeaturesMeeting control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel PlanFeaturesMeeting; + + /// + /// chkAllowOrganizeMeetingsWithExternalAnonymous control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox chkAllowOrganizeMeetingsWithExternalAnonymous; + + /// + /// secPlanFeaturesTelephony control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.CollapsiblePanel secPlanFeaturesTelephony; + + /// + /// PlanFeaturesTelephony control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel PlanFeaturesTelephony; + + /// + /// locTelephony control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Localize locTelephony; + + /// + /// ddTelephony control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList ddTelephony; + + /// + /// pnEnterpriseVoice control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel pnEnterpriseVoice; + + /// + /// locTelephonyProvider control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Localize locTelephonyProvider; + + /// + /// tbTelephoneProvider control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox tbTelephoneProvider; + + /// + /// btnAccept control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button btnAccept; + + /// + /// AcceptRequiredValidator control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RequiredFieldValidator AcceptRequiredValidator; + + /// + /// locDialPlan control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Localize locDialPlan; + + /// + /// ddTelephonyDialPlanPolicy control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList ddTelephonyDialPlanPolicy; + + /// + /// locVoicePolicy control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Localize locVoicePolicy; + + /// + /// ddTelephonyVoicePolicy control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList ddTelephonyVoicePolicy; + + /// + /// pnServerURI control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel pnServerURI; + + /// + /// locServerURI control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Localize locServerURI; + + /// + /// tbServerURI control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox tbServerURI; /// /// btnAdd control. @@ -273,14 +452,5 @@ namespace WebsitePanel.Portal.Lync { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.ValidationSummary ValidationSummary1; - - /// - /// FormComments control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Localize FormComments; } } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncCreateUser.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncCreateUser.ascx index 4d36dcf4..1ca87bfe 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncCreateUser.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncCreateUser.ascx @@ -43,11 +43,42 @@ - + + + + + + + + + + + +
+ + + + + + +
+ + + + + +
+
-
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncCreateUser.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncCreateUser.ascx.cs index eabe3e15..74d1e604 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncCreateUser.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncCreateUser.ascx.cs @@ -30,6 +30,13 @@ using WebsitePanel.Providers.ResultObjects; using WebsitePanel.EnterpriseServer; +using WebsitePanel.Providers.HostedSolution; + +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + + namespace WebsitePanel.Portal.Lync { public partial class CreateLyncUser : WebsitePanelModuleBase @@ -40,10 +47,60 @@ namespace WebsitePanel.Portal.Lync { WebsitePanel.Providers.HostedSolution.LyncUserPlan[] plans = ES.Services.Lync.GetLyncUserPlans(PanelRequest.ItemID); + BindPhoneNumbers(); + if (plans.Length == 0) btnCreate.Enabled = false; } + } + private void BindPhoneNumbers() + { + + ddlPhoneNumber.Items.Add(new ListItem("", "")); + + PackageIPAddress[] ips = ES.Services.Servers.GetPackageUnassignedIPAddresses(PanelSecurity.PackageId, IPAddressPool.PhoneNumbers); + foreach (PackageIPAddress ip in ips) + { + string phone = ip.ExternalIP; + ddlPhoneNumber.Items.Add(new ListItem(phone, phone)); + } + + } + + + protected void Page_PreRender(object sender, EventArgs e) + { + bool EnterpriseVoice = false; + + WebsitePanel.Providers.HostedSolution.LyncUserPlan plan = planSelector.plan; + if (plan != null) + EnterpriseVoice = plan.EnterpriseVoice; + + pnEnterpriseVoice.Visible = EnterpriseVoice; + + if (!EnterpriseVoice) + { + ddlPhoneNumber.Text = ""; + tbPin.Text = ""; + } + + if (EnterpriseVoice) + { + string[] pinPolicy = ES.Services.Lync.GetPolicyList(PanelRequest.ItemID, LyncPolicyType.Pin, "MinPasswordLength"); + if (pinPolicy != null) + { + if (pinPolicy.Length > 0) + { + int MinPasswordLength = -1; + if (int.TryParse(pinPolicy[0], out MinPasswordLength)) + { + PinRegularExpressionValidator.ValidationExpression = "^([0-9]){" + MinPasswordLength.ToString() + ",}$"; + PinRegularExpressionValidator.ErrorMessage = "Must contain only numbers. Min. length " + MinPasswordLength.ToString(); + } + } + } + } } @@ -54,6 +111,7 @@ namespace WebsitePanel.Portal.Lync planSelector.planId = lyncUser.LyncUserPlanId.ToString(); lyncUserSettings.sipAddress = lyncUser.SipAddress; + Utils.SelectListItem(ddlPhoneNumber, lyncUser.LineUri); } protected void btnSave_Click(object sender, EventArgs e) @@ -65,7 +123,7 @@ namespace WebsitePanel.Portal.Lync 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); + res = ES.Services.Lync.SetLyncUserGeneralSettings(PanelRequest.ItemID, PanelRequest.AccountID, lyncUserSettings.sipAddress, ddlPhoneNumber.SelectedItem.Text + ":" + tbPin.Text); } if (res.IsSuccess && res.ErrorCodes.Count == 0) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncEditUser.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncEditUser.ascx.designer.cs index 52aaa081..73782c96 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncEditUser.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/LyncEditUser.ascx.designer.cs @@ -44,8 +44,9 @@ namespace WebsitePanel.Portal.Lync { /// asyncTasks control. ///
/// - /// Auto-generated field. + /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. + /// protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks; @@ -53,8 +54,9 @@ namespace WebsitePanel.Portal.Lync { /// breadcrumb control. /// /// - /// Auto-generated field. + /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. + /// protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Breadcrumb breadcrumb; @@ -62,8 +64,9 @@ namespace WebsitePanel.Portal.Lync { /// menu control. /// /// - /// Auto-generated field. + /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. + /// protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Menu menu; @@ -71,8 +74,9 @@ namespace WebsitePanel.Portal.Lync { /// Image1 control. /// /// - /// Auto-generated field. + /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. + /// protected global::System.Web.UI.WebControls.Image Image1; @@ -80,8 +84,9 @@ namespace WebsitePanel.Portal.Lync { /// locTitle control. /// /// - /// Auto-generated field. + /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. + /// protected global::System.Web.UI.WebControls.Localize locTitle; @@ -89,8 +94,9 @@ namespace WebsitePanel.Portal.Lync { /// litDisplayName control. /// /// - /// Auto-generated field. + /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. + /// protected global::System.Web.UI.WebControls.Literal litDisplayName; @@ -98,8 +104,9 @@ namespace WebsitePanel.Portal.Lync { /// messageBox control. /// /// - /// Auto-generated field. + /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. + /// protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox; @@ -107,8 +114,9 @@ namespace WebsitePanel.Portal.Lync { /// locPlanName control. /// /// - /// Auto-generated field. + /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. + /// protected global::System.Web.UI.WebControls.Localize locPlanName; @@ -116,8 +124,9 @@ namespace WebsitePanel.Portal.Lync { /// planSelector control. /// /// - /// Auto-generated field. + /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. + /// protected global::WebsitePanel.Portal.Lync.UserControls.LyncUserPlanSelector planSelector; @@ -125,8 +134,9 @@ namespace WebsitePanel.Portal.Lync { /// locSipAddress control. /// /// - /// Auto-generated field. + /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. + /// protected global::System.Web.UI.WebControls.Localize locSipAddress; @@ -134,17 +144,99 @@ namespace WebsitePanel.Portal.Lync { /// lyncUserSettings control. /// /// - /// Auto-generated field. + /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. + /// protected global::WebsitePanel.Portal.Lync.UserControls.LyncUserSettings lyncUserSettings; + /// + /// pnEnterpriseVoice control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.Panel pnEnterpriseVoice; + + /// + /// locPhoneNumber control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.Localize locPhoneNumber; + + /// + /// tb_PhoneNumber control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.TextBox tb_PhoneNumber; + + /// + /// ddlPhoneNumber control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.DropDownList ddlPhoneNumber; + + /// + /// PhoneFormatValidator control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.RegularExpressionValidator PhoneFormatValidator; + + /// + /// locLyncPin control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.Localize locLyncPin; + + /// + /// tbPin control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.TextBox tbPin; + + /// + /// PinRegularExpressionValidator control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.RegularExpressionValidator PinRegularExpressionValidator; + /// /// btnSave control. /// /// - /// Auto-generated field. + /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. + /// protected global::System.Web.UI.WebControls.Button btnSave; } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/UserControls/LyncUserPlanSelector.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/UserControls/LyncUserPlanSelector.ascx index c6d336f8..a68ff60a 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/UserControls/LyncUserPlanSelector.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/UserControls/LyncUserPlanSelector.ascx @@ -1,2 +1,2 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="LyncUserPlanSelector.ascx.cs" Inherits="WebsitePanel.Portal.Lync.UserControls.LyncUserPlanSelector" %> - \ No newline at end of file + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/UserControls/LyncUserPlanSelector.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/UserControls/LyncUserPlanSelector.ascx.cs index 31ba7eef..5867d11a 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/UserControls/LyncUserPlanSelector.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/UserControls/LyncUserPlanSelector.ascx.cs @@ -35,11 +35,14 @@ namespace WebsitePanel.Portal.Lync.UserControls { private string planToSelect; - + public string planId { - get { return ddlPlan.SelectedItem.Value; } + get { + if (ddlPlan.Items.Count == 0) return ""; + return ddlPlan.SelectedItem.Value; + } set { planToSelect = value; @@ -72,6 +75,19 @@ namespace WebsitePanel.Portal.Lync.UserControls } } + public WebsitePanel.Providers.HostedSolution.LyncUserPlan plan + { + get + { + WebsitePanel.Providers.HostedSolution.LyncUserPlan[] plans = ES.Services.Lync.GetLyncUserPlans(PanelRequest.ItemID); + foreach (WebsitePanel.Providers.HostedSolution.LyncUserPlan planitem in plans) + { + if (planitem.LyncUserPlanId.ToString() == planId) return planitem; + } + return null; + } + } + private void BindPlans() { WebsitePanel.Providers.HostedSolution.LyncUserPlan[] plans = ES.Services.Lync.GetLyncUserPlans(PanelRequest.ItemID); diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/UserControls/LyncUserPlanSelector.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/UserControls/LyncUserPlanSelector.ascx.designer.cs index 5f4303c8..8863bb48 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/UserControls/LyncUserPlanSelector.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Lync/UserControls/LyncUserPlanSelector.ascx.designer.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2012, Outercurve Foundation. +// Copyright (c) 2011, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -26,16 +26,14 @@ // (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. // // Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// the code is regenerated. // //------------------------------------------------------------------------------ - namespace WebsitePanel.Portal.Lync.UserControls { diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/LyncAllocatePhoneNumbers.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/LyncAllocatePhoneNumbers.ascx new file mode 100644 index 00000000..11b61237 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/LyncAllocatePhoneNumbers.ascx @@ -0,0 +1,11 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="LyncAllocatePhoneNumbers.ascx.cs" Inherits="WebsitePanel.Portal.LyncAllocatePhoneNumbers" %> +<%@ Register Src="UserControls/AllocatePackagePhoneNumbers.ascx" TagName="AllocatePackagePhoneNumbers" TagPrefix="wsp" %> + +
+ + + +
\ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/LyncAllocatePhoneNumbers.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/LyncAllocatePhoneNumbers.ascx.cs new file mode 100644 index 00000000..83622ff7 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/LyncAllocatePhoneNumbers.ascx.cs @@ -0,0 +1,44 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace WebsitePanel.Portal +{ + public partial class LyncAllocatePhoneNumbers : WebsitePanelModuleBase + { + protected void Page_Load(object sender, EventArgs e) + { + + } + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/LyncAllocatePhoneNumbers.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/LyncAllocatePhoneNumbers.ascx.designer.cs new file mode 100644 index 00000000..8ed64ed4 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/LyncAllocatePhoneNumbers.ascx.designer.cs @@ -0,0 +1,53 @@ +// 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. + +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WebsitePanel.Portal { + + + public partial class LyncAllocatePhoneNumbers { + + /// + /// allocatePhoneNumbers control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::WebsitePanel.Portal.UserControls.AllocatePackagePhoneNumbers allocatePhoneNumbers; + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/LyncPhoneNumbers.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/LyncPhoneNumbers.ascx new file mode 100644 index 00000000..6d0fcca5 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/LyncPhoneNumbers.ascx @@ -0,0 +1,30 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="LyncPhoneNumbers.ascx.cs" Inherits="WebsitePanel.Portal.LyncPhoneNumbers" %> +<%@ Register Src="UserControls/PackagePhoneNumbers.ascx" TagName="PackagePhoneNumbers" TagPrefix="wsp" %> +<%@ Register Src="UserControls/Quota.ascx" TagName="Quota" TagPrefix="wsp" %> +<%@ Register Src="UserControls/CollapsiblePanel.ascx" TagName="CollapsiblePanel" TagPrefix="wsp" %> + +
+ + +
+ + + + + + + + + +
+ + +
+
+ diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/LyncPhoneNumbers.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/LyncPhoneNumbers.ascx.cs new file mode 100644 index 00000000..dd0b1e40 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/LyncPhoneNumbers.ascx.cs @@ -0,0 +1,43 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace WebsitePanel.Portal +{ + public partial class LyncPhoneNumbers : WebsitePanelModuleBase + { + protected void Page_Load(object sender, EventArgs e) + { + } + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/LyncPhoneNumbers.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/LyncPhoneNumbers.ascx.designer.cs new file mode 100644 index 00000000..11db7c69 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/LyncPhoneNumbers.ascx.designer.cs @@ -0,0 +1,93 @@ +// 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. + +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WebsitePanel.Portal { + + + public partial class LyncPhoneNumbers { + + /// + /// webAddresses control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::WebsitePanel.Portal.UserControls.PackagePhoneNumbers webAddresses; + + /// + /// secQuotas control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::WebsitePanel.Portal.CollapsiblePanel secQuotas; + + /// + /// QuotasPanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.Panel QuotasPanel; + + /// + /// locIPQuota control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.Localize locIPQuota; + + /// + /// addressesQuota control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::WebsitePanel.Portal.Quota addressesQuota; + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/PhoneNumbers.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/PhoneNumbers.ascx new file mode 100644 index 00000000..31a176b6 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/PhoneNumbers.ascx @@ -0,0 +1,100 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="PhoneNumbers.ascx.cs" Inherits="WebsitePanel.Portal.PhoneNumbers" %> +<%@ Register Src="UserControls/SearchBox.ascx" TagName="SearchBox" TagPrefix="wsp" %> +<%@ Register Src="UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %> + + + + + + +
+ +
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + <%# Eval("ExternalIP") %> + + + + + + + <%# Eval("UserName") %>  + + + + + + <%# Eval("PackageName") %> +   + + + + + + + + + + + + + + + +
+
+ + +
+
+ + + 10 + 20 + 50 + 100 + +
+
\ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/PhoneNumbers.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/PhoneNumbers.ascx.cs new file mode 100644 index 00000000..48705d52 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/PhoneNumbers.ascx.cs @@ -0,0 +1,157 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Web.UI.WebControls; +using System.Collections.Generic; +using WebsitePanel.Providers.Common; +using System.Text; +using WebsitePanel.EnterpriseServer; + +namespace WebsitePanel.Portal +{ + public partial class PhoneNumbers : WebsitePanelModuleBase + { + protected void Page_Load(object sender, EventArgs e) + { + // set display preferences + if (!IsPostBack) + { + // page size + gvIPAddresses.PageSize = UsersHelper.GetDisplayItemsPerPage(); + ddlItemsPerPage.SelectedValue = gvIPAddresses.PageSize.ToString(); + + } + else + { + gvIPAddresses.PageSize = Utils.ParseInt(ddlItemsPerPage.SelectedValue, 10); + } + + + if (!IsPostBack) + { + searchBox.AddCriteria("ExternalIP", GetLocalizedString("SearchField.ExternalIP")); + searchBox.AddCriteria("ServerName", GetLocalizedString("SearchField.Server")); + searchBox.AddCriteria("ItemName", GetLocalizedString("SearchField.ItemName")); + searchBox.AddCriteria("Username", GetLocalizedString("SearchField.Username")); + } + + } + protected void odsIPAddresses_Selected(object sender, ObjectDataSourceStatusEventArgs e) + { + if (e.Exception != null) + { + ProcessException(e.Exception); + this.DisableControls = true; + e.ExceptionHandled = true; + } + } + + public string GetSpaceHomeUrl(int spaceId) + { + return PortalUtils.GetSpaceHomePageUrl(spaceId); + } + + + protected void btnAddItem_Click(object sender, EventArgs e) + { + Response.Redirect(EditUrl("PoolID", "PhoneNumbers", "add_phone"), true); + } + + protected void ddlItemsPerPage_SelectedIndexChanged(object sender, EventArgs e) + { + gvIPAddresses.PageSize = Utils.ParseInt(ddlItemsPerPage.SelectedValue, 10); + gvIPAddresses.DataBind(); + } + + protected void btnEditSelected_Click(object sender, EventArgs e) + { + int[] addresses = GetSelectedItems(gvIPAddresses); + if (addresses.Length == 0) + { + ShowWarningMessage("IP_EDIT_LIST_EMPTY_ERROR"); + return; + } + + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < addresses.Length; i++) + { + if (i > 0) sb.Append(","); + sb.Append(addresses[i]); + } + + // go to edit screen + Response.Redirect(EditUrl("Addresses", sb.ToString(), "edit_phone"), true); + } + + protected void btnDeleteSelected_Click(object sender, EventArgs e) + { + int[] addresses = GetSelectedItems(gvIPAddresses); + if (addresses.Length == 0) + { + ShowWarningMessage("IP_DELETE_LIST_EMPTY_ERROR"); + return; + } + + try + { + // delete selected IP addresses + ResultObject res = ES.Services.Servers.DeleteIPAddresses(addresses); + + if (!res.IsSuccess) + { + messageBox.ShowMessage(res, "IP_DELETE_RANGE_IP", "IP"); + return; + } + + // refresh grid + gvIPAddresses.DataBind(); + } + catch (Exception ex) + { + ShowErrorMessage("IP_DELETE_RANGE_IP", ex); + return; + } + } + + private int[] GetSelectedItems(GridView gv) + { + List items = new List(); + + for (int i = 0; i < gv.Rows.Count; i++) + { + GridViewRow row = gv.Rows[i]; + CheckBox chkSelect = (CheckBox)row.FindControl("chkSelect"); + if (chkSelect.Checked) + items.Add((int)gv.DataKeys[i].Value); + } + + return items.ToArray(); + } + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/PhoneNumbers.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/PhoneNumbers.ascx.designer.cs new file mode 100644 index 00000000..fc5338bd --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/PhoneNumbers.ascx.designer.cs @@ -0,0 +1,134 @@ +// 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. + +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// + +//------------------------------------------------------------------------------ + +namespace WebsitePanel.Portal { + + + public partial class PhoneNumbers { + + /// + /// messageBox control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox; + + /// + /// btnAddItem control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.Button btnAddItem; + + /// + /// searchBox control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::WebsitePanel.Portal.SearchBox searchBox; + + /// + /// gvIPAddresses control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.GridView gvIPAddresses; + + /// + /// odsIPAddresses control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.ObjectDataSource odsIPAddresses; + + /// + /// btnEditSelected control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.Button btnEditSelected; + + /// + /// btnDeleteSelected control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.Button btnDeleteSelected; + + /// + /// lblItemsPerPage control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.Label lblItemsPerPage; + + /// + /// ddlItemsPerPage control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.DropDownList ddlItemsPerPage; + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/PhoneNumbersAddPhoneNumber.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/PhoneNumbersAddPhoneNumber.ascx new file mode 100644 index 00000000..de4f9a51 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/PhoneNumbersAddPhoneNumber.ascx @@ -0,0 +1,43 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="PhoneNumbersAddPhoneNumber.ascx.cs" Inherits="WebsitePanel.Portal.PhoneNumbersAddPhoneNumber" %> +<%@ Register Src="UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %> +
+ + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + +    + + + +
+ +
+
+ + +
\ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/PhoneNumbersAddPhoneNumber.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/PhoneNumbersAddPhoneNumber.ascx.cs new file mode 100644 index 00000000..f050f67c --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/PhoneNumbersAddPhoneNumber.ascx.cs @@ -0,0 +1,173 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +using WebsitePanel.EnterpriseServer; +using WebsitePanel.Providers.ResultObjects; +using WebsitePanel.Providers.Common; + +namespace WebsitePanel.Portal +{ + public partial class PhoneNumbersAddPhoneNumber : WebsitePanelModuleBase + { + private void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + + // bind dropdowns + try + { + BindServers(); + + // set server if found in request + if (PanelRequest.ServerId != 0) + Utils.SelectListItem(ddlServer, PanelRequest.ServerId); + } + catch (Exception ex) + { + ShowErrorMessage("IP_ADD_INIT_FORM", ex); + return; + } + + ToggleControls(); + } + } + + private void BindServers() + { + try + { + ddlServer.DataSource = ES.Services.Servers.GetServers(); + ddlServer.DataBind(); + } + catch (Exception ex) + { + Response.Write(ex); + } + + // add "select" item + ddlServer.Items.Insert(0, new ListItem(GetLocalizedString("Text.NotAssigned"), "")); + } + + protected void btnAdd_Click(object sender, EventArgs e) + { + if (Page.IsValid) + { + int serverId = Utils.ParseInt(ddlServer.SelectedValue, 0); + IPAddressPool pool = IPAddressPool.PhoneNumbers; + string comments = txtComments.Text.Trim(); + + string start; + string end; + + start = startPhone.Text; + end = endPhone.Text; + + // add ip address + if (end != "" || start.Contains("/")) + { + string errorKey = "IP_ADD_PHONE_RANGE"; + + try + { + // add IP range + ResultObject res = ES.Services.Servers.AddIPAddressesRange(pool, serverId, start, end, + "", "", "", comments); + if (!res.IsSuccess) + { + // show error + messageBox.ShowMessage(res, errorKey, "IP"); + return; + } + } + catch (Exception ex) + { + ShowErrorMessage(errorKey, ex); + return; + } + } + else + { + string errorKey = "IP_ADD_PHONE"; + + // add single IP + try + { + IntResult res = ES.Services.Servers.AddIPAddress(pool, serverId, start, + "", "", "", comments); + if (!res.IsSuccess) + { + messageBox.ShowMessage(res, errorKey, "IP"); + return; + } + } + catch (Exception ex) + { + ShowErrorMessage(errorKey, ex); + return; + } + } + + // Redirect back to the portal home page + RedirectBack(); + } + } + protected void btnCancel_Click(object sender, EventArgs e) + { + // Redirect back to the portal home page + RedirectBack(); + } + + private void RedirectBack() + { + Response.Redirect(NavigateURL("PoolID", "PhoneNumbers")); + } + + protected void ddlPools_SelectedIndexChanged(object sender, EventArgs e) + { + ToggleControls(); + } + + private void ToggleControls() + { + requireStartPhoneValidator.Enabled = true; + } + + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/PhoneNumbersAddPhoneNumber.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/PhoneNumbersAddPhoneNumber.ascx.designer.cs new file mode 100644 index 00000000..ae27f15d --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/PhoneNumbersAddPhoneNumber.ascx.designer.cs @@ -0,0 +1,194 @@ +// 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. + +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// + +//------------------------------------------------------------------------------ + +namespace WebsitePanel.Portal { + + + public partial class PhoneNumbersAddPhoneNumber { + + /// + /// messageBox control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox; + + /// + /// validatorsSummary control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.ValidationSummary validatorsSummary; + + /// + /// consistentAddresses control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.CustomValidator consistentAddresses; + + /// + /// locServer control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.Localize locServer; + + /// + /// ddlServer control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.DropDownList ddlServer; + + /// + /// PhoneNumbersRow control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.HtmlControls.HtmlTableRow PhoneNumbersRow; + + /// + /// Localize1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.Localize Localize1; + + /// + /// startPhone control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.TextBox startPhone; + + /// + /// requireStartPhoneValidator control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.RequiredFieldValidator requireStartPhoneValidator; + + /// + /// Localize2 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.Localize Localize2; + + /// + /// endPhone control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.TextBox endPhone; + + /// + /// lblComments control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.Localize lblComments; + + /// + /// txtComments control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.TextBox txtComments; + + /// + /// btnAdd control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.Button btnAdd; + + /// + /// btnCancel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.Button btnCancel; + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/PhoneNumbersEditPhoneNumber.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/PhoneNumbersEditPhoneNumber.ascx new file mode 100644 index 00000000..1bd18e27 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/PhoneNumbersEditPhoneNumber.ascx @@ -0,0 +1,38 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="PhoneNumbersEditPhoneNumber.ascx.cs" Inherits="WebsitePanel.Portal.PhoneNumbersEditPhoneNumber" %> +<%@ Register Src="UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %> + +
+ + + + + + + + + + + + + + + + + + +
+ +
+ + + + +
+ +
+
+ + +
\ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/PhoneNumbersEditPhoneNumber.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/PhoneNumbersEditPhoneNumber.ascx.cs new file mode 100644 index 00000000..c056895d --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/PhoneNumbersEditPhoneNumber.ascx.cs @@ -0,0 +1,176 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +using WebsitePanel.EnterpriseServer; +using WebsitePanel.Providers.Common; + +namespace WebsitePanel.Portal +{ + public partial class PhoneNumbersEditPhoneNumber : WebsitePanelModuleBase + { + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + try + { + // bind dropdowns + BindServers(); + + // bind IP + BindPhone(); + } + catch (Exception ex) + { + ShowErrorMessage("IP_GET_IP", ex); + return; + } + } + } + + private void BindPhone() + { + int addressId = PanelRequest.AddressID; + + // check if multiple editing + if (!String.IsNullOrEmpty(PanelRequest.Addresses)) + { + string[] ids = PanelRequest.Addresses.Split(','); + addressId = Utils.ParseInt(ids[0], 0); + } + + // bind first address + IPAddressInfo addr = ES.Services.Servers.GetIPAddress(addressId); + + if (addr != null) + { + Utils.SelectListItem(ddlServer, addr.ServerId); + + Phone.Text = addr.ExternalIP; + txtComments.Text = addr.Comments; + + ToggleControls(); + } + else + { + // exit + RedirectBack(); + } + } + + private void BindServers() + { + ddlServer.DataSource = ES.Services.Servers.GetServers(); + ddlServer.DataBind(); + ddlServer.Items.Insert(0, new ListItem(GetLocalizedString("Text.NotAssigned"), "")); + } + + private void RedirectBack() + { + Response.Redirect(NavigateURL("PoolID", "PhoneNumbers")); + } + + protected void btnUpdate_Click(object sender, EventArgs e) + { + if (Page.IsValid) + { + try + { + int serverId = Utils.ParseInt(ddlServer.SelectedValue, 0); + IPAddressPool pool = IPAddressPool.PhoneNumbers; + + ResultObject res = null; + + // update single IP address + if (!String.IsNullOrEmpty(PanelRequest.Addresses)) + { + // update multiple IPs + string[] ids = PanelRequest.Addresses.Split(','); + int[] addresses = new int[ids.Length]; + for (int i = 0; i < ids.Length; i++) + addresses[i] = Utils.ParseInt(ids[i], 0); + + res = ES.Services.Servers.UpdateIPAddresses(addresses, + pool, serverId, "", "", txtComments.Text.Trim()); + } + else + { + string address = Phone.Text; + + // update single IP + res = ES.Services.Servers.UpdateIPAddress(PanelRequest.AddressID, + pool, serverId, address, "", "", "", txtComments.Text.Trim()); + } + + if (!res.IsSuccess) + { + messageBox.ShowMessage(res, "IP_UPDATE_IP", "IP"); + return; + } + + // Redirect back to the portal home page + RedirectBack(); + } + catch (Exception ex) + { + ShowErrorMessage("IP_UPDATE_IP", ex); + return; + } + } + } + + protected void btnCancel_Click(object sender, EventArgs e) + { + // Redirect back to the portal home page + RedirectBack(); + } + + protected void ddlPools_SelectedIndexChanged(object sender, EventArgs e) + { + ToggleControls(); + } + + private void ToggleControls() + { + bool multipleEdit = !String.IsNullOrEmpty(PanelRequest.Addresses); + PhoneNumbersRow.Visible = !multipleEdit; + requireStartPhoneValidator.Enabled = !multipleEdit; + } + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/PhoneNumbersEditPhoneNumber.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/PhoneNumbersEditPhoneNumber.ascx.designer.cs new file mode 100644 index 00000000..43eeebb6 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/PhoneNumbersEditPhoneNumber.ascx.designer.cs @@ -0,0 +1,164 @@ +// 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. + +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// + +//------------------------------------------------------------------------------ + +namespace WebsitePanel.Portal { + + + public partial class PhoneNumbersEditPhoneNumber { + + /// + /// messageBox control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox; + + /// + /// validatorsSummary control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.ValidationSummary validatorsSummary; + + /// + /// locServer control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.Localize locServer; + + /// + /// ddlServer control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.DropDownList ddlServer; + + /// + /// PhoneNumbersRow control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.HtmlControls.HtmlTableRow PhoneNumbersRow; + + /// + /// Localize1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.Localize Localize1; + + /// + /// Phone control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.TextBox Phone; + + /// + /// requireStartPhoneValidator control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.RequiredFieldValidator requireStartPhoneValidator; + + /// + /// lblComments control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.Localize lblComments; + + /// + /// txtComments control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.TextBox txtComments; + + /// + /// btnUpdate control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.Button btnUpdate; + + /// + /// btnCancel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.Button btnCancel; + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/CRM2011_Settings.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/CRM2011_Settings.ascx.designer.cs index 5cf5ec1e..86ec4040 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/CRM2011_Settings.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/CRM2011_Settings.ascx.designer.cs @@ -1,10 +1,39 @@ -//------------------------------------------------------------------------------ -// <àâòîìàòè÷åñêè ñîçäàâàåìîå> -// Ýòîò êîä ñîçäàí ïðîãðàììîé. +// 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. + +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// + //------------------------------------------------------------------------------ namespace WebsitePanel.Portal.ProviderControls { @@ -13,83 +42,92 @@ namespace WebsitePanel.Portal.ProviderControls { public partial class CRM2011_Settings { /// - /// txtSqlServer ýëåìåíò óïðàâëåíèÿ. + /// txtSqlServer control. /// /// - /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. - /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// protected global::System.Web.UI.WebControls.TextBox txtSqlServer; /// - /// RequiredFieldValidator1 ýëåìåíò óïðàâëåíèÿ. + /// RequiredFieldValidator1 control. /// /// - /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. - /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator1; /// - /// txtReportingService ýëåìåíò óïðàâëåíèÿ. + /// txtReportingService control. /// /// - /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. - /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// protected global::System.Web.UI.WebControls.TextBox txtReportingService; /// - /// txtDomainName ýëåìåíò óïðàâëåíèÿ. + /// txtDomainName control. /// /// - /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. - /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// protected global::System.Web.UI.WebControls.TextBox txtDomainName; /// - /// RequiredFieldValidator2 ýëåìåíò óïðàâëåíèÿ. + /// RequiredFieldValidator2 control. /// /// - /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. - /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator2; /// - /// ddlSchema ýëåìåíò óïðàâëåíèÿ. + /// ddlSchema control. /// /// - /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. - /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// protected global::System.Web.UI.WebControls.DropDownList ddlSchema; /// - /// ddlCrmIpAddress ýëåìåíò óïðàâëåíèÿ. + /// ddlCrmIpAddress control. /// /// - /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. - /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// protected global::WebsitePanel.Portal.SelectIPAddress ddlCrmIpAddress; /// - /// txtPort ýëåìåíò óïðàâëåíèÿ. + /// txtPort control. /// /// - /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. - /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// protected global::System.Web.UI.WebControls.TextBox txtPort; /// - /// txtAppRootDomain ýëåìåíò óïðàâëåíèÿ. + /// txtAppRootDomain control. /// /// - /// Àâòîìàòè÷åñêè ñîçäàâàåìîå ïîëå. - /// Äëÿ èçìåíåíèÿ ïåðåìåñòèòå îáúÿâëåíèå ïîëÿ èç ôàéëà êîíñòðóêòîðà â ôàéë êîäà ïðîãðàììíîé ÷àñòè. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// protected global::System.Web.UI.WebControls.TextBox txtAppRootDomain; } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsLyncUserPlansPolicy.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsLyncUserPlansPolicy.ascx index 55701dac..10eae934 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsLyncUserPlansPolicy.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsLyncUserPlansPolicy.ascx @@ -40,58 +40,185 @@
- - - - - - - - -
- - - - -
-
-
- - - - - - - - - - - - - - - - - - - -
- -
- -
- -
- -
- -
-
-
+ + + + + + + + +
+ + + + +
+
+
+ + + + + + + + + + + + + + + + + +
+ +
+ +
+ +
+ +
+
+
+ + + + + + + + + + + + + + + +
+ +
+ +
+ +
+
+
+ + + + + + + + + +
+ + + +
+
+
+ + + + + + + + +
+ +
+
+
+ + + + + + + + + +
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + +
+ + + + + + +
+ + + +
+ + + +
+
+ + + + + + + +
+ + + +
+
+ +
+
+ + +<%-- Disable because not used @@ -128,6 +255,7 @@
+ --%>
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsLyncUserPlansPolicy.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsLyncUserPlansPolicy.ascx.cs index 51fbf72a..b33a0ce2 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsLyncUserPlansPolicy.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsLyncUserPlansPolicy.ascx.cs @@ -55,6 +55,52 @@ namespace WebsitePanel.Portal internal static List list; + protected void ddArchivingPolicyUpdate() + { + string[] archivePolicy = ES.Services.Lync.GetPolicyList(-1, LyncPolicyType.Archiving, null); + if (archivePolicy != null) + { + foreach (string policy in archivePolicy) + { + if (policy.ToLower() == "global") continue; + string txt = policy.Replace("Tag:", ""); + if (ddArchivingPolicy.Items.FindByValue(policy)==null) + ddArchivingPolicy.Items.Add(new System.Web.UI.WebControls.ListItem(txt, policy)); + } + } + } + + protected void Page_PreRender(object sender, EventArgs e) + { + + if (ddArchivingPolicy.Items.Count == 0) + ddArchivingPolicyUpdate(); + + chkEnterpriseVoice.Enabled = false; + chkEnterpriseVoice.Checked = false; + + pnEnterpriseVoice.Visible = false; + pnServerURI.Visible = false; + + switch (ddTelephony.SelectedIndex) + { + case 1: + break; + case 2: + pnEnterpriseVoice.Visible = true; + chkEnterpriseVoice.Checked = true; + break; + case 3: + pnServerURI.Visible = true; + break; + case 4: + pnServerURI.Visible = true; + break; + + } + + } + public void BindSettings(UserSettings settings) { @@ -113,8 +159,7 @@ namespace WebsitePanel.Portal } } - - LyncUserPlan plan = new LyncUserPlan(); + Providers.HostedSolution.LyncUserPlan plan = new Providers.HostedSolution.LyncUserPlan(); plan.LyncUserPlanName = txtPlan.Text; plan.IsDefault = false; @@ -124,24 +169,21 @@ namespace WebsitePanel.Portal 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; - } + plan.VoicePolicy = LyncVoicePolicyType.None; + + plan.RemoteUserAccess = chkRemoteUserAccess.Checked; + plan.PublicIMConnectivity = chkPublicIMConnectivity.Checked; + + plan.AllowOrganizeMeetingsWithExternalAnonymous = chkAllowOrganizeMeetingsWithExternalAnonymous.Checked; + + plan.Telephony = ddTelephony.SelectedIndex; + + plan.ServerURI = tbServerURI.Text; + + plan.ArchivePolicy = ddArchivingPolicy.SelectedValue; + plan.TelephonyDialPlanPolicy = ddTelephonyDialPlanPolicy.SelectedValue; + plan.TelephonyVoicePolicy = ddTelephonyVoicePolicy.SelectedValue; if (PanelSecurity.SelectedUser.Role == UserRole.Administrator) plan.LyncUserPlanType = (int)LyncUserPlanType.Administrator; @@ -234,7 +276,7 @@ namespace WebsitePanel.Portal } catch (Exception) { - messageBox.ShowErrorMessage("EXCHANGE_DELETE_MAILBOXPLAN"); + messageBox.ShowErrorMessage("LYNC_DELETE_PLAN"); } BindPlans(); @@ -261,7 +303,6 @@ namespace WebsitePanel.Portal orgs = ES.Services.ExchangeServer.GetExchangeOrganizations(1, false); } - plan = ES.Services.Lync.GetLyncUserPlan(orgs[0].Id, planId); txtPlan.Text = plan.LyncUserPlanName; @@ -271,26 +312,35 @@ namespace WebsitePanel.Portal chkConferencing.Checked = plan.Conferencing; chkMobility.Checked = plan.Mobility; chkEnterpriseVoice.Checked = plan.EnterpriseVoice; - switch (plan.VoicePolicy) + + chkRemoteUserAccess.Checked = plan.RemoteUserAccess; + chkPublicIMConnectivity.Checked = plan.PublicIMConnectivity; + + chkAllowOrganizeMeetingsWithExternalAnonymous.Checked = plan.AllowOrganizeMeetingsWithExternalAnonymous; + ddTelephony.SelectedIndex = plan.Telephony; + + tbServerURI.Text = plan.ServerURI; + + string planArchivePolicy = ""; + if (plan.ArchivePolicy != null) planArchivePolicy = plan.ArchivePolicy; + string planTelephonyDialPlanPolicy = ""; + if (plan.TelephonyDialPlanPolicy != null) planTelephonyDialPlanPolicy = plan.TelephonyDialPlanPolicy; + string planTelephonyVoicePolicy = ""; + if (plan.TelephonyVoicePolicy != null) planTelephonyVoicePolicy = plan.TelephonyVoicePolicy; + + ddArchivingPolicyUpdate(); + ListItem li = ddArchivingPolicy.Items.FindByValue(planArchivePolicy); + if (li == null) { - 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; + li = new System.Web.UI.WebControls.ListItem(planArchivePolicy.Replace("Tag:", ""), planArchivePolicy); + ddArchivingPolicy.Items.Add(li); } + ddArchivingPolicy.SelectedIndex = ddArchivingPolicy.Items.IndexOf(li); + + ddTelephonyDialPlanPolicy.Items.Clear(); + ddTelephonyDialPlanPolicy.Items.Add(new System.Web.UI.WebControls.ListItem(planTelephonyDialPlanPolicy.Replace("Tag:", ""), planTelephonyDialPlanPolicy)); + ddTelephonyVoicePolicy.Items.Clear(); + ddTelephonyVoicePolicy.Items.Add(new System.Web.UI.WebControls.ListItem(planTelephonyVoicePolicy.Replace("Tag:", ""), planTelephonyVoicePolicy)); btnUpdatePlan.Enabled = (string.IsNullOrEmpty(txtPlan.Text)) ? false : true; @@ -298,7 +348,6 @@ namespace WebsitePanel.Portal } catch (Exception) { - messageBox.ShowErrorMessage("EXCHANGE_DELETE_MAILBOXPLAN"); } BindPlans(); @@ -375,7 +424,6 @@ namespace WebsitePanel.Portal plan = new Providers.HostedSolution.LyncUserPlan(); plan.LyncUserPlanId = (int)ViewState["LyncUserPlanID"]; - plan.LyncUserPlanName = txtPlan.Text; plan.IsDefault = false; @@ -385,24 +433,22 @@ namespace WebsitePanel.Portal 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; - } + plan.VoicePolicy = LyncVoicePolicyType.None; + + plan.RemoteUserAccess = chkRemoteUserAccess.Checked; + plan.PublicIMConnectivity = chkPublicIMConnectivity.Checked; + + plan.AllowOrganizeMeetingsWithExternalAnonymous = chkAllowOrganizeMeetingsWithExternalAnonymous.Checked; + + plan.Telephony = ddTelephony.SelectedIndex; + + plan.ServerURI = tbServerURI.Text; + + plan.ArchivePolicy = ddArchivingPolicy.SelectedValue; + plan.TelephonyDialPlanPolicy = ddTelephonyDialPlanPolicy.SelectedValue; + plan.TelephonyVoicePolicy = ddTelephonyVoicePolicy.SelectedValue; + if (PanelSecurity.SelectedUser.Role == UserRole.Administrator) plan.LyncUserPlanType = (int)LyncUserPlanType.Administrator; @@ -417,11 +463,11 @@ namespace WebsitePanel.Portal if (result < 0) { - messageBox.ShowErrorMessage("EXCHANGE_UPDATEPLANS"); + messageBox.ShowErrorMessage("LYNC_UPDATEPLANS"); } else { - messageBox.ShowSuccessMessage("EXCHANGE_UPDATEPLANS"); + messageBox.ShowSuccessMessage("LYNC_UPDATEPLANS"); } } @@ -503,6 +549,39 @@ namespace WebsitePanel.Portal BindPlans(); } + protected void btnAccept_Click(object sender, EventArgs e) + { + + string name = tbTelephoneProvider.Text; + + if (string.IsNullOrEmpty(name)) return; + + ddTelephonyDialPlanPolicy.Items.Clear(); + string[] dialPlan = ES.Services.Lync.GetPolicyList(-1, LyncPolicyType.DialPlan, name); + if (dialPlan != null) + { + foreach (string policy in dialPlan) + { + if (policy.ToLower() == "global") continue; + string txt = policy.Replace("Tag:", ""); + ddTelephonyDialPlanPolicy.Items.Add(new System.Web.UI.WebControls.ListItem(txt, policy)); + } + } + + ddTelephonyVoicePolicy.Items.Clear(); + string[] voicePolicy = ES.Services.Lync.GetPolicyList(-1, LyncPolicyType.Voice, name); + if (voicePolicy != null) + { + foreach (string policy in voicePolicy) + { + if (policy.ToLower() == "global") continue; + string txt = policy.Replace("Tag:", ""); + ddTelephonyVoicePolicy.Items.Add(new System.Web.UI.WebControls.ListItem(txt, policy)); + } + } + + } + } } \ 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 71f46a10..4dbc33f5 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsLyncUserPlansPolicy.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsLyncUserPlansPolicy.ascx.designer.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2012, Outercurve Foundation. +// Copyright (c) 2011, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -31,10 +31,9 @@ // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// the code is regenerated. // //------------------------------------------------------------------------------ - namespace WebsitePanel.Portal { @@ -139,15 +138,6 @@ namespace WebsitePanel.Portal { /// protected global::System.Web.UI.WebControls.CheckBox chkMobility; - /// - /// chkFederation control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.CheckBox chkFederation; - /// /// chkConferencing control. /// @@ -167,67 +157,256 @@ namespace WebsitePanel.Portal { protected global::System.Web.UI.WebControls.CheckBox chkEnterpriseVoice; /// - /// secEnterpriseVoice control. + /// secPlanFeaturesFederation control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::WebsitePanel.Portal.CollapsiblePanel secEnterpriseVoice; + protected global::WebsitePanel.Portal.CollapsiblePanel secPlanFeaturesFederation; /// - /// EnterpriseVoice control. + /// PlanFeaturesFederation control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Panel EnterpriseVoice; + protected global::System.Web.UI.WebControls.Panel PlanFeaturesFederation; /// - /// chkNone control. + /// chkFederation control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.RadioButton chkNone; + protected global::System.Web.UI.WebControls.CheckBox chkFederation; /// - /// chkEmergency control. + /// chkRemoteUserAccess control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.RadioButton chkEmergency; + protected global::System.Web.UI.WebControls.CheckBox chkRemoteUserAccess; /// - /// chkNational control. + /// chkPublicIMConnectivity control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.RadioButton chkNational; + protected global::System.Web.UI.WebControls.CheckBox chkPublicIMConnectivity; /// - /// chkMobile control. + /// secPlanFeaturesArchiving control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.RadioButton chkMobile; + protected global::WebsitePanel.Portal.CollapsiblePanel secPlanFeaturesArchiving; /// - /// chkInternational control. + /// PlanFeaturesArchiving control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.RadioButton chkInternational; + protected global::System.Web.UI.WebControls.Panel PlanFeaturesArchiving; + + /// + /// locArchivingPolicy control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Localize locArchivingPolicy; + + /// + /// ddArchivingPolicy control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList ddArchivingPolicy; + + /// + /// secPlanFeaturesMeeting control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.CollapsiblePanel secPlanFeaturesMeeting; + + /// + /// PlanFeaturesMeeting control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel PlanFeaturesMeeting; + + /// + /// chkAllowOrganizeMeetingsWithExternalAnonymous control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox chkAllowOrganizeMeetingsWithExternalAnonymous; + + /// + /// secPlanFeaturesTelephony control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.CollapsiblePanel secPlanFeaturesTelephony; + + /// + /// PlanFeaturesTelephony control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel PlanFeaturesTelephony; + + /// + /// locTelephony control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Localize locTelephony; + + /// + /// ddTelephony control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList ddTelephony; + + /// + /// pnEnterpriseVoice control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel pnEnterpriseVoice; + + /// + /// locTelephonyProvider control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Localize locTelephonyProvider; + + /// + /// tbTelephoneProvider control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox tbTelephoneProvider; + + /// + /// btnAccept control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button btnAccept; + + /// + /// AcceptRequiredValidator control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RequiredFieldValidator AcceptRequiredValidator; + + /// + /// locDialPlan control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Localize locDialPlan; + + /// + /// ddTelephonyDialPlanPolicy control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList ddTelephonyDialPlanPolicy; + + /// + /// locVoicePolicy control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Localize locVoicePolicy; + + /// + /// ddTelephonyVoicePolicy control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList ddTelephonyVoicePolicy; + + /// + /// pnServerURI control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel pnServerURI; + + /// + /// locServerURI control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Localize locServerURI; + + /// + /// tbServerURI control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox tbServerURI; /// /// btnAddPlan control. diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/AllocatePackagePhoneNumbers.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/AllocatePackagePhoneNumbers.ascx new file mode 100644 index 00000000..7dd2aece --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/AllocatePackagePhoneNumbers.ascx @@ -0,0 +1,71 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="AllocatePackagePhoneNumbers.ascx.cs" Inherits="WebsitePanel.Portal.UserControls.AllocatePackagePhoneNumbers" %> +<%@ Register Src="SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %> + + + + + + +
    +
  • + +
  • +
  • + +
  • +
+ + + + + + + + + + + + + + + + +
+ +
+ + + + + * + + +
+ +
+ +
+ +
+
+
+

+ + +

\ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/AllocatePackagePhoneNumbers.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/AllocatePackagePhoneNumbers.ascx.cs new file mode 100644 index 00000000..991b7a21 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/AllocatePackagePhoneNumbers.ascx.cs @@ -0,0 +1,174 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using WebsitePanel.EnterpriseServer; +using WebsitePanel.Providers.Common; + +namespace WebsitePanel.Portal.UserControls +{ + public partial class AllocatePackagePhoneNumbers : WebsitePanelControlBase + { + private IPAddressPool pool; + public IPAddressPool Pool + { + get { return pool; } + set { pool = value; } + } + + private string listAddressesControl; + public string ListAddressesControl + { + get { return listAddressesControl; } + set { listAddressesControl = value; } + } + + private string resourceGroup; + public string ResourceGroup + { + get { return resourceGroup; } + set { resourceGroup = value; } + } + + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + BindIPAddresses(); + ToggleControls(); + } + } + + private void BindIPAddresses() + { + bool vps = (Pool == IPAddressPool.VpsExternalNetwork || Pool == IPAddressPool.VpsManagementNetwork); + + // bind list + IPAddressInfo[] ips = ES.Services.Servers.GetUnallottedIPAddresses(PanelSecurity.PackageId, ResourceGroup, Pool); + foreach (IPAddressInfo ip in ips) + { + string txt = ip.ExternalIP; + + // web sites - NAT Address + if (!vps && !String.IsNullOrEmpty(ip.InternalIP)) + txt += "/" + ip.InternalIP; + + // VPS - Gateway Address + else if (vps && !String.IsNullOrEmpty(ip.DefaultGateway)) + txt += "/" + ip.DefaultGateway; + + listExternalAddresses.Items.Add(new ListItem(txt, ip.AddressId.ToString())); + } + + int quotaAllowed = -1; + string quotaName = (String.Compare(ResourceGroup, ResourceGroups.VPS, true) == 0) ? Quotas.VPS_EXTERNAL_IP_ADDRESSES_NUMBER : Quotas.WEB_IP_ADDRESSES; + PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId); + if (cntx.Quotas.ContainsKey(quotaName)) + { + int quotaAllocated = cntx.Quotas[quotaName].QuotaAllocatedValue; + int quotaUsed = cntx.Quotas[quotaName].QuotaUsedValue; + + if (quotaAllocated != -1) + quotaAllowed = quotaAllocated - quotaUsed; + } + + // bind controls + int max = quotaAllowed == -1 ? listExternalAddresses.Items.Count : quotaAllowed; + + txtExternalAddressesNumber.Text = max.ToString(); + litMaxAddresses.Text = String.Format(GetLocalizedString("litMaxAddresses.Text"), max); + + if (max == 0) + { + AddressesTable.Visible = false; + ErrorMessagesList.Visible = true; + EmptyAddressesMessage.Visible = (listExternalAddresses.Items.Count == 0); + QuotaReachedMessage.Visible = (quotaAllowed == 0); + btnAdd.Enabled = false; + } + } + + protected void btnAdd_Click(object sender, EventArgs e) + { + try + { + List ids = new List(); + foreach (ListItem item in listExternalAddresses.Items) + { + if (item.Selected) + ids.Add(Utils.ParseInt(item.Value)); + } + + ResultObject res = ES.Services.Servers.AllocatePackageIPAddresses(PanelSecurity.PackageId, + ResourceGroup, Pool, + radioExternalRandom.Checked, + Utils.ParseInt(txtExternalAddressesNumber.Text), + ids.ToArray()); + if (res.IsSuccess) + { + // return back + Response.Redirect(HostModule.EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), ListAddressesControl)); + } + else + { + // show message + messageBox.ShowMessage(res, "VPS_ALLOCATE_EXTERNAL_ADDRESSES_ERROR", "VPS"); + } + } + catch (Exception ex) + { + messageBox.ShowErrorMessage("VPS_ALLOCATE_EXTERNAL_ADDRESSES_ERROR", ex); + } + } + + protected void btnCancel_Click(object sender, EventArgs e) + { + Response.Redirect(HostModule.EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), ListAddressesControl)); + } + + protected void radioExternalSelected_CheckedChanged(object sender, EventArgs e) + { + ToggleControls(); + } + + private void ToggleControls() + { + AddressesNumberRow.Visible = radioExternalRandom.Checked; + AddressesListRow.Visible = radioExternalSelected.Checked; + } + + protected void radioExternalRandom_CheckedChanged(object sender, EventArgs e) + { + ToggleControls(); + } + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/AllocatePackagePhoneNumbers.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/AllocatePackagePhoneNumbers.ascx.designer.cs new file mode 100644 index 00000000..4bbd3de7 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/AllocatePackagePhoneNumbers.ascx.designer.cs @@ -0,0 +1,243 @@ +// 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. + +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WebsitePanel.Portal.UserControls { + + + public partial class AllocatePackagePhoneNumbers { + + /// + /// messageBox control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox; + + /// + /// validatorsSummary control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.ValidationSummary validatorsSummary; + + /// + /// ErrorMessagesList control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl ErrorMessagesList; + + /// + /// EmptyAddressesMessage control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl EmptyAddressesMessage; + + /// + /// locNotEnoughAddresses control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.Localize locNotEnoughAddresses; + + /// + /// QuotaReachedMessage control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl QuotaReachedMessage; + + /// + /// locQuotaReached control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.Localize locQuotaReached; + + /// + /// AddressesTable control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.UpdatePanel AddressesTable; + + /// + /// radioExternalRandom control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.RadioButton radioExternalRandom; + + /// + /// AddressesNumberRow control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.HtmlControls.HtmlTableRow AddressesNumberRow; + + /// + /// locExternalAddresses control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.Localize locExternalAddresses; + + /// + /// txtExternalAddressesNumber control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.TextBox txtExternalAddressesNumber; + + /// + /// ExternalAddressesValidator control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.RequiredFieldValidator ExternalAddressesValidator; + + /// + /// litMaxAddresses control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.Literal litMaxAddresses; + + /// + /// radioExternalSelected control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.RadioButton radioExternalSelected; + + /// + /// AddressesListRow control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.HtmlControls.HtmlTableRow AddressesListRow; + + /// + /// listExternalAddresses control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.ListBox listExternalAddresses; + + /// + /// locHoldCtrl control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.Localize locHoldCtrl; + + /// + /// btnAdd control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.Button btnAdd; + + /// + /// btnCancel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.Button btnCancel; + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/App_LocalResources/AllocatePackagePhoneNumbers.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/App_LocalResources/AllocatePackagePhoneNumbers.ascx.resx new file mode 100644 index 00000000..b8f2d0ea --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/App_LocalResources/AllocatePackagePhoneNumbers.ascx.resx @@ -0,0 +1,153 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Add + + + Cancel + + + Enter the number of Phone Numbers + + + ({0} max) + + + Number of Phone Numbers: + + + * Hold CTRL key to select multiple phone numbers + + + The pool of Phone Numbers is empty.<br/>Allocate more Phone Numbers on reseller level. If the current hosting space is nested within "System" space then add more server Phone Numbers to the appropriate pool on "Configuration -> Phone Numbers" page. + + + Allocate Phone Numbers + + + Randomly select Phone Numbers from the pool + + + Select Phone Numbers from the list + + + Phone Numbers quota has been reached. + + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/App_LocalResources/PackagePhoneNumbers.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/App_LocalResources/PackagePhoneNumbers.ascx.resx new file mode 100644 index 00000000..646a40dd --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/App_LocalResources/PackagePhoneNumbers.ascx.resx @@ -0,0 +1,165 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Allocate... + + + Deallocate Selected + + + No Phone Numbers have been allocated to this hosting space. + + + Gateway + + + Phone Numbers + + + Item Name + + + Primary + + + Space + + + Subnet Mask + + + User + + + Default Gateway + + + Phone Numbers + + + Item Name + + + User Name + + + return confirm('Deallocate selected Phone Numbers from hosting space?'); + + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/PackagePhoneNumbers.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/PackagePhoneNumbers.ascx new file mode 100644 index 00000000..6fb848de --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/PackagePhoneNumbers.ascx @@ -0,0 +1,87 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="PackagePhoneNumbers.ascx.cs" Inherits="WebsitePanel.Portal.UserControls.PackagePhoneNumbers" %> +<%@ Register Src="SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %> +<%@ Register Src="SearchBox.ascx" TagName="SearchBox" TagPrefix="wsp" %> + + + + + + +
+
+ +
+
+ +
+
+ + + + + + + + +   + + + + + + + + + <%# Eval("ItemName") %> +   + + + + + + + <%# Eval("PackageName") %> + + + + + + <%# Eval("UserName") %> + + + + + + + + + + + + + +
+ +
\ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/PackagePhoneNumbers.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/PackagePhoneNumbers.ascx.cs new file mode 100644 index 00000000..e907fb61 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/PackagePhoneNumbers.ascx.cs @@ -0,0 +1,172 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using WebsitePanel.EnterpriseServer; +using WebsitePanel.Providers.Common; + +namespace WebsitePanel.Portal.UserControls +{ + public partial class PackagePhoneNumbers : WebsitePanelControlBase + { + private bool spaceOwner; + + private IPAddressPool pool; + public IPAddressPool Pool + { + get { return pool; } + set { pool = value; } + } + + private string editItemControl; + public string EditItemControl + { + get { return editItemControl; } + set { editItemControl = value; } + } + + private string spaceHomeControl; + public string SpaceHomeControl + { + get { return spaceHomeControl; } + set { spaceHomeControl = value; } + } + + private string allocateAddressesControl; + public string AllocateAddressesControl + { + get { return allocateAddressesControl; } + set { allocateAddressesControl = value; } + } + + public bool ManageAllowed + { + get { return ViewState["ManageAllowed"] != null ? (bool)ViewState["ManageAllowed"] : false; } + set { ViewState["ManageAllowed"] = value; } + } + + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + searchBox.AddCriteria("ExternalIP", GetLocalizedString("SearchField.IPAddress")); + searchBox.AddCriteria("ItemName", GetLocalizedString("SearchField.ItemName")); + searchBox.AddCriteria("Username", GetLocalizedString("SearchField.Username")); + } + + bool isUserSelected = PanelSecurity.SelectedUser.Role == WebsitePanel.EnterpriseServer.UserRole.User; + bool isUserLogged = PanelSecurity.EffectiveUser.Role == WebsitePanel.EnterpriseServer.UserRole.User; + spaceOwner = PanelSecurity.EffectiveUserId == PanelSecurity.SelectedUserId; + + gvAddresses.Columns[3].Visible = !isUserSelected; // space + gvAddresses.Columns[4].Visible = !isUserSelected; // user + + // managing external network permissions + gvAddresses.Columns[0].Visible = !isUserLogged && ManageAllowed; + btnAllocateAddress.Visible = !isUserLogged && !spaceOwner && ManageAllowed && !String.IsNullOrEmpty(AllocateAddressesControl); + btnDeallocateAddresses.Visible = !isUserLogged && ManageAllowed; + } + + public string GetItemEditUrl(string itemID) + { + return HostModule.EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), EditItemControl, + "ItemID=" + itemID); + } + + public string GetSpaceHomeUrl(string spaceId) + { + return HostModule.EditUrl("SpaceID", spaceId, SpaceHomeControl); + } + + protected void odsExternalAddressesPaged_Selected(object sender, ObjectDataSourceStatusEventArgs e) + { + if (e.Exception != null) + { + messageBox.ShowErrorMessage("EXCHANGE_GET_MAILBOXES", e.Exception); + e.ExceptionHandled = true; + } + } + + protected void btnAllocateAddress_Click(object sender, EventArgs e) + { + Response.Redirect(HostModule.EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), AllocateAddressesControl)); + } + + protected void gvAddresses_RowDataBound(object sender, GridViewRowEventArgs e) + { + PackageIPAddress item = e.Row.DataItem as PackageIPAddress; + if (item != null) + { + // checkbox + CheckBox chkSelect = e.Row.FindControl("chkSelect") as CheckBox; + chkSelect.Enabled = (!spaceOwner || (PanelSecurity.PackageId != item.PackageId)) && item.ItemId == 0; + } + } + + protected void btnDeallocateAddresses_Click(object sender, EventArgs e) + { + List ids = new List(); + + try + { + List items = new List(); + for (int i = 0; i < gvAddresses.Rows.Count; i++) + { + GridViewRow row = gvAddresses.Rows[i]; + CheckBox chkSelect = (CheckBox)row.FindControl("chkSelect"); + if (chkSelect.Checked) + items.Add((int)gvAddresses.DataKeys[i].Value); + } + + // check if at least one is selected + if (items.Count == 0) + { + messageBox.ShowWarningMessage("PHONE_EDIT_LIST_EMPTY_ERROR"); + return; + } + + ResultObject res = ES.Services.Servers.DeallocatePackageIPAddresses(PanelSecurity.PackageId, items.ToArray()); + messageBox.ShowMessage(res, "DEALLOCATE_SPACE_PHONE_NUMBER", "VPS"); + gvAddresses.DataBind(); + } + catch (Exception ex) + { + messageBox.ShowErrorMessage("DEALLOCATE_SPACE_PHONE_NUMBER", ex); + } + } + + protected void odsExternalAddressesPaged_Selecting(object sender, ObjectDataSourceSelectingEventArgs e) + { + e.InputParameters["pool"] = Pool; + } + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/PackagePhoneNumbers.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/PackagePhoneNumbers.ascx.designer.cs new file mode 100644 index 00000000..2b4926c8 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/PackagePhoneNumbers.ascx.designer.cs @@ -0,0 +1,103 @@ +// 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. + +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WebsitePanel.Portal.UserControls { + + + public partial class PackagePhoneNumbers { + + /// + /// messageBox control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox; + + /// + /// btnAllocateAddress control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.Button btnAllocateAddress; + + /// + /// searchBox control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::WebsitePanel.Portal.SearchBox searchBox; + + /// + /// gvAddresses control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.GridView gvAddresses; + + /// + /// odsExternalAddressesPaged control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.ObjectDataSource odsExternalAddressesPaged; + + /// + /// btnDeallocateAddresses control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + + /// + protected global::System.Web.UI.WebControls.Button btnDeallocateAddresses; + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesIPAddresses.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesIPAddresses.ascx.cs index 073a45f6..ce25e873 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesIPAddresses.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesIPAddresses.ascx.cs @@ -38,7 +38,6 @@ namespace WebsitePanel.Portal { protected void Page_Load(object sender, EventArgs e) { - } } } \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj index 0596b4b6..689afdc0 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj @@ -461,6 +461,20 @@ OrgIdPolicyEditor.ascx + + PackagePhoneNumbers.ascx + ASPXCodeBehind + + + PackagePhoneNumbers.ascx + + + AllocatePackagePhoneNumbers.ascx + ASPXCodeBehind + + + AllocatePackagePhoneNumbers.ascx + MonitoringPage.aspx ASPXCodeBehind @@ -3879,6 +3893,41 @@ WebsitesSSL.ascx + + LyncPhoneNumbers.ascx + ASPXCodeBehind + + + LyncPhoneNumbers.ascx + + + LyncAllocatePhoneNumbers.ascx + ASPXCodeBehind + + + LyncAllocatePhoneNumbers.ascx + + + PhoneNumbers.ascx + ASPXCodeBehind + + + PhoneNumbers.ascx + + + PhoneNumbersAddPhoneNumber.ascx + ASPXCodeBehind + + + PhoneNumbersAddPhoneNumber.ascx + + + PhoneNumbersEditPhoneNumber.ascx + ASPXCodeBehind + + + PhoneNumbersEditPhoneNumber.ascx + @@ -3918,6 +3967,8 @@ + + @@ -3980,6 +4031,11 @@ + + + + + @@ -5061,6 +5117,12 @@ Designer + + Designer + + + Designer + @@ -5072,6 +5134,15 @@ + + Designer + + + Designer + + + + Designer