Added phone numbers in the hosted organization. part 2.
This commit is contained in:
parent
a735808a04
commit
ce04966e91
22 changed files with 4642 additions and 4442 deletions
|
@ -108,7 +108,7 @@ namespace WebsitePanel.Portal
|
|||
public PackageIPAddress[] GetPackageIPAddresses(int packageId, IPAddressPool pool, string filterColumn, string filterValue,
|
||||
string sortColumn, int maximumRows, int startRowIndex)
|
||||
{
|
||||
packageAddresses = ES.Services.Servers.GetPackageIPAddresses(packageId, pool,
|
||||
packageAddresses = ES.Services.Servers.GetPackageIPAddresses(packageId, 0, pool,
|
||||
filterColumn, filterValue, sortColumn, startRowIndex, maximumRows, true);
|
||||
return packageAddresses.Items;
|
||||
}
|
||||
|
|
|
@ -130,7 +130,7 @@ namespace WebsitePanel.Portal
|
|||
public PackageIPAddress[] GetPackageIPAddresses(int packageId, IPAddressPool pool, string filterColumn, string filterValue,
|
||||
string sortColumn, int maximumRows, int startRowIndex)
|
||||
{
|
||||
packageAddresses = ES.Services.Servers.GetPackageIPAddresses(packageId, pool,
|
||||
packageAddresses = ES.Services.Servers.GetPackageIPAddresses(packageId, 0, pool,
|
||||
filterColumn, filterValue, sortColumn, startRowIndex, maximumRows, true);
|
||||
return packageAddresses.Items;
|
||||
}
|
||||
|
@ -139,6 +139,19 @@ namespace WebsitePanel.Portal
|
|||
{
|
||||
return packageAddresses.Count;
|
||||
}
|
||||
|
||||
public PackageIPAddress[] GetPackageIPAddresses(int packageId, int orgId, IPAddressPool pool, string filterColumn, string filterValue,
|
||||
string sortColumn, int maximumRows, int startRowIndex)
|
||||
{
|
||||
packageAddresses = ES.Services.Servers.GetPackageIPAddresses(packageId, orgId, pool,
|
||||
filterColumn, filterValue, sortColumn, startRowIndex, maximumRows, true);
|
||||
return packageAddresses.Items;
|
||||
}
|
||||
|
||||
public int GetPackageIPAddressesCount(int packageId, int orgId, IPAddressPool pool, string filterColumn, string filterValue)
|
||||
{
|
||||
return packageAddresses.Count;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Package Private IP Addresses
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<wsp:AllocatePackagePhoneNumbers id="allocatePhoneNumbers" runat="server"
|
||||
Pool="PhoneNumbers"
|
||||
ResourceGroup="Web"
|
||||
ListAddressesControl="" />
|
||||
ListAddressesControl="lync_phonenumbers" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -57,7 +57,7 @@ namespace WebsitePanel.Portal.Lync
|
|||
private void BindPhoneNumbers()
|
||||
{
|
||||
|
||||
PackageIPAddress[] ips = ES.Services.Servers.GetPackageUnassignedIPAddresses(PanelSecurity.PackageId, IPAddressPool.PhoneNumbers);
|
||||
PackageIPAddress[] ips = ES.Services.Servers.GetPackageUnassignedIPAddresses(PanelSecurity.PackageId, PanelRequest.ItemID, IPAddressPool.PhoneNumbers);
|
||||
|
||||
if (ips.Length > 0)
|
||||
{
|
||||
|
|
|
@ -52,7 +52,7 @@ namespace WebsitePanel.Portal.Lync
|
|||
|
||||
private void BindPhoneNumbers()
|
||||
{
|
||||
PackageIPAddress[] ips = ES.Services.Servers.GetPackageUnassignedIPAddresses(PanelSecurity.PackageId, IPAddressPool.PhoneNumbers);
|
||||
PackageIPAddress[] ips = ES.Services.Servers.GetPackageUnassignedIPAddresses(PanelSecurity.PackageId, PanelRequest.ItemID, IPAddressPool.PhoneNumbers);
|
||||
|
||||
if (ips.Length > 0)
|
||||
{
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle"></asp:Localize>
|
||||
</div>
|
||||
<div class="FormBody">
|
||||
<wsp:PackagePhoneNumbers id="webAddresses" runat="server"
|
||||
<wsp:PackagePhoneNumbers id="phoneNumbers" runat="server"
|
||||
Pool="PhoneNumbers"
|
||||
EditItemControl=""
|
||||
SpaceHomeControl=""
|
||||
|
@ -43,7 +43,7 @@
|
|||
<table cellspacing="6">
|
||||
<tr>
|
||||
<td><asp:Localize ID="locIPQuota" runat="server" meta:resourcekey="locIPQuota" Text="Number of Phone Numbes:"></asp:Localize></td>
|
||||
<td><wsp:Quota ID="addressesQuota" runat="server" QuotaName="Lync.PhoneNumbers" /></td>
|
||||
<td><wsp:Quota ID="phoneQuota" runat="server" QuotaName="Lync.PhoneNumbers" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
|
|
@ -56,5 +56,50 @@ namespace WebsitePanel.Portal.Lync {
|
|||
/// Для изменения переместите объявление поля из файла конструктора в файл кода программной части.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize locTitle;
|
||||
|
||||
/// <summary>
|
||||
/// phoneNumbers элемент управления.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Автоматически создаваемое поле.
|
||||
/// Для изменения переместите объявление поля из файла конструктора в файл кода программной части.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.UserControls.PackagePhoneNumbers phoneNumbers;
|
||||
|
||||
/// <summary>
|
||||
/// secQuotas элемент управления.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Автоматически создаваемое поле.
|
||||
/// Для изменения переместите объявление поля из файла конструктора в файл кода программной части.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.CollapsiblePanel secQuotas;
|
||||
|
||||
/// <summary>
|
||||
/// QuotasPanel элемент управления.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Автоматически создаваемое поле.
|
||||
/// Для изменения переместите объявление поля из файла конструктора в файл кода программной части.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Panel QuotasPanel;
|
||||
|
||||
/// <summary>
|
||||
/// locIPQuota элемент управления.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Автоматически создаваемое поле.
|
||||
/// Для изменения переместите объявление поля из файла конструктора в файл кода программной части.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize locIPQuota;
|
||||
|
||||
/// <summary>
|
||||
/// phoneQuota элемент управления.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Автоматически создаваемое поле.
|
||||
/// Для изменения переместите объявление поля из файла конструктора в файл кода программной части.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.Quota phoneQuota;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ using WebsitePanel.Providers.Common;
|
|||
|
||||
namespace WebsitePanel.Portal.UserControls
|
||||
{
|
||||
public partial class AllocatePackagePhoneNumbers : WebsitePanelControlBase
|
||||
public partial class AllocatePackagePhoneNumbers : WebsitePanelModuleBase
|
||||
{
|
||||
private IPAddressPool pool;
|
||||
public IPAddressPool Pool
|
||||
|
@ -129,6 +129,7 @@ namespace WebsitePanel.Portal.UserControls
|
|||
}
|
||||
|
||||
ResultObject res = ES.Services.Servers.AllocatePackageIPAddresses(PanelSecurity.PackageId,
|
||||
PanelRequest.ItemID,
|
||||
ResourceGroup, Pool,
|
||||
radioExternalRandom.Checked,
|
||||
Utils.ParseInt(txtExternalAddressesNumber.Text),
|
||||
|
@ -136,7 +137,8 @@ namespace WebsitePanel.Portal.UserControls
|
|||
if (res.IsSuccess)
|
||||
{
|
||||
// return back
|
||||
Response.Redirect(HostModule.EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), ListAddressesControl));
|
||||
Response.Redirect(HostModule.EditUrl("ItemID", PanelRequest.ItemID.ToString(), ListAddressesControl,
|
||||
PortalUtils.SPACE_ID_PARAM + "=" + PanelSecurity.PackageId));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -129,6 +129,7 @@ namespace WebsitePanel.Portal.UserControls
|
|||
}
|
||||
|
||||
ResultObject res = ES.Services.Servers.AllocatePackageIPAddresses(PanelSecurity.PackageId,
|
||||
0,
|
||||
ResourceGroup, Pool,
|
||||
radioExternalRandom.Checked,
|
||||
Utils.ParseInt(txtExternalAddressesNumber.Text),
|
||||
|
|
|
@ -73,7 +73,8 @@
|
|||
OnSelected="odsExternalAddressesPaged_Selected"
|
||||
onselecting="odsExternalAddressesPaged_Selecting">
|
||||
<SelectParameters>
|
||||
<asp:QueryStringParameter Name="packageId" QueryStringField="SpaceID" DefaultValue="0" />
|
||||
<asp:QueryStringParameter Name="packageId" QueryStringField="SpaceID" DefaultValue="0" />
|
||||
<asp:QueryStringParameter Name="orgId" QueryStringField="ItemID" DefaultValue="0" />
|
||||
<asp:Parameter Name="pool" DefaultValue="0" />
|
||||
<asp:ControlParameter Name="filterColumn" ControlID="searchBox" PropertyName="FilterColumn" />
|
||||
<asp:ControlParameter Name="filterValue" ControlID="searchBox" PropertyName="FilterValue" />
|
||||
|
|
|
@ -118,7 +118,8 @@ namespace WebsitePanel.Portal.UserControls
|
|||
|
||||
protected void btnAllocateAddress_Click(object sender, EventArgs e)
|
||||
{
|
||||
Response.Redirect(HostModule.EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), AllocateAddressesControl));
|
||||
Response.Redirect(HostModule.EditUrl("ItemID", PanelRequest.ItemID.ToString(), AllocateAddressesControl,
|
||||
PortalUtils.SPACE_ID_PARAM + "=" + PanelSecurity.PackageId));
|
||||
}
|
||||
|
||||
protected void gvAddresses_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
|
|
|
@ -1,39 +1,10 @@
|
|||
// 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.
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.3074
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
|
||||
// повторной генерации кода.
|
||||
// </автоматически создаваемое>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebsitePanel.Portal.UserControls {
|
||||
|
@ -42,62 +13,56 @@ namespace WebsitePanel.Portal.UserControls {
|
|||
public partial class PackagePhoneNumbers {
|
||||
|
||||
/// <summary>
|
||||
/// messageBox control.
|
||||
/// messageBox элемент управления.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// Автоматически создаваемое поле.
|
||||
/// Для изменения переместите объявление поля из файла конструктора в файл кода программной части.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
|
||||
|
||||
/// <summary>
|
||||
/// btnAllocateAddress control.
|
||||
/// btnAllocateAddress элемент управления.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// Автоматически создаваемое поле.
|
||||
/// Для изменения переместите объявление поля из файла конструктора в файл кода программной части.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button btnAllocateAddress;
|
||||
|
||||
/// <summary>
|
||||
/// searchBox control.
|
||||
/// searchBox элемент управления.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// Автоматически создаваемое поле.
|
||||
/// Для изменения переместите объявление поля из файла конструктора в файл кода программной части.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.SearchBox searchBox;
|
||||
|
||||
/// <summary>
|
||||
/// gvAddresses control.
|
||||
/// gvAddresses элемент управления.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// Автоматически создаваемое поле.
|
||||
/// Для изменения переместите объявление поля из файла конструктора в файл кода программной части.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.GridView gvAddresses;
|
||||
|
||||
/// <summary>
|
||||
/// odsExternalAddressesPaged control.
|
||||
/// odsExternalAddressesPaged элемент управления.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// Автоматически создаваемое поле.
|
||||
/// Для изменения переместите объявление поля из файла конструктора в файл кода программной части.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.ObjectDataSource odsExternalAddressesPaged;
|
||||
|
||||
/// <summary>
|
||||
/// btnDeallocateAddresses control.
|
||||
/// btnDeallocateAddresses элемент управления.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
|
||||
/// Автоматически создаваемое поле.
|
||||
/// Для изменения переместите объявление поля из файла конструктора в файл кода программной части.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button btnDeallocateAddresses;
|
||||
}
|
||||
|
|
|
@ -117,7 +117,7 @@ namespace WebsitePanel.Portal.VPS
|
|||
if (PackagesHelper.IsQuotaEnabled(PanelSecurity.PackageId, Quotas.VPS_EXTERNAL_NETWORK_ENABLED))
|
||||
{
|
||||
// bind list
|
||||
PackageIPAddress[] ips = ES.Services.Servers.GetPackageUnassignedIPAddresses(PanelSecurity.PackageId, IPAddressPool.VpsExternalNetwork);
|
||||
PackageIPAddress[] ips = ES.Services.Servers.GetPackageUnassignedIPAddresses(PanelSecurity.PackageId, 0, IPAddressPool.VpsExternalNetwork);
|
||||
foreach (PackageIPAddress ip in ips)
|
||||
{
|
||||
string txt = ip.ExternalIP;
|
||||
|
|
|
@ -51,7 +51,7 @@ namespace WebsitePanel.Portal.VPS
|
|||
|
||||
private void BindExternalIPAddresses()
|
||||
{
|
||||
PackageIPAddress[] ips = ES.Services.Servers.GetPackageUnassignedIPAddresses(PanelSecurity.PackageId, IPAddressPool.VpsExternalNetwork);
|
||||
PackageIPAddress[] ips = ES.Services.Servers.GetPackageUnassignedIPAddresses(PanelSecurity.PackageId, 0, IPAddressPool.VpsExternalNetwork);
|
||||
foreach (PackageIPAddress ip in ips)
|
||||
{
|
||||
string txt = ip.ExternalIP;
|
||||
|
|
|
@ -51,7 +51,7 @@ namespace WebsitePanel.Portal.VPSForPC
|
|||
|
||||
private void BindExternalIPAddresses()
|
||||
{
|
||||
PackageIPAddress[] ips = ES.Services.Servers.GetPackageUnassignedIPAddresses(PanelSecurity.PackageId, IPAddressPool.VpsExternalNetwork);
|
||||
PackageIPAddress[] ips = ES.Services.Servers.GetPackageUnassignedIPAddresses(PanelSecurity.PackageId, 0, IPAddressPool.VpsExternalNetwork);
|
||||
foreach (PackageIPAddress ip in ips)
|
||||
{
|
||||
string txt = ip.ExternalIP;
|
||||
|
|
|
@ -92,7 +92,7 @@ namespace WebsitePanel.Portal
|
|||
{
|
||||
ddlIpAddresses.Items.Add(new ListItem("<Select IP>", ""));
|
||||
|
||||
PackageIPAddress[] ips = ES.Services.Servers.GetPackageUnassignedIPAddresses(PanelSecurity.PackageId, IPAddressPool.WebSites);
|
||||
PackageIPAddress[] ips = ES.Services.Servers.GetPackageUnassignedIPAddresses(PanelSecurity.PackageId, 0, IPAddressPool.WebSites);
|
||||
foreach (PackageIPAddress ip in ips)
|
||||
{
|
||||
string fullIP = ip.ExternalIP;
|
||||
|
|
|
@ -179,7 +179,7 @@ namespace WebsitePanel.Portal
|
|||
|
||||
// bind unassigned IP addresses
|
||||
ddlIpAddresses.Items.Clear();
|
||||
PackageIPAddress[] ips = ES.Services.Servers.GetPackageUnassignedIPAddresses(site.PackageId, IPAddressPool.WebSites);
|
||||
PackageIPAddress[] ips = ES.Services.Servers.GetPackageUnassignedIPAddresses(site.PackageId, 0, IPAddressPool.WebSites);
|
||||
foreach (PackageIPAddress ip in ips)
|
||||
{
|
||||
string fullIP = ip.ExternalIP;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue