1)remove a RDS server form org - add check if server is in collection
2)RDS add server in colection - can add only servers witch are not in other collection.
This commit is contained in:
parent
e49f5223d0
commit
399b24c7ce
3 changed files with 12 additions and 1 deletions
|
@ -422,7 +422,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
private static RdsServersPaged GetOrganizationRdsServersPagedInternal(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows)
|
private static RdsServersPaged GetOrganizationRdsServersPagedInternal(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows)
|
||||||
{
|
{
|
||||||
DataSet ds = DataProvider.GetRDSServersPaged(itemId, null, filterColumn, filterValue, sortColumn, startRow, maximumRows, ignoreRdsCollectionId: true);
|
DataSet ds = DataProvider.GetRDSServersPaged(itemId, null, filterColumn, filterValue, sortColumn, startRow, maximumRows);
|
||||||
|
|
||||||
RdsServersPaged result = new RdsServersPaged();
|
RdsServersPaged result = new RdsServersPaged();
|
||||||
result.RecordsCount = (int)ds.Tables[0].Rows[0][0];
|
result.RecordsCount = (int)ds.Tables[0].Rows[0][0];
|
||||||
|
|
|
@ -5593,4 +5593,7 @@
|
||||||
<data name="Error.RDS_CREATE_COLLECTION_RDSSERVER_REQUAIRED" xml:space="preserve">
|
<data name="Error.RDS_CREATE_COLLECTION_RDSSERVER_REQUAIRED" xml:space="preserve">
|
||||||
<value>Error creating rds collection. You need to add at least 1 rds server to collection</value>
|
<value>Error creating rds collection. You need to add at least 1 rds server to collection</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Error.RDS_UNASSIGN_SERVER_FROM_ORG_SERVER_IS_IN_COLLECTION" xml:space="preserve">
|
||||||
|
<value>Error deleting rds server from organization: server is used in rds collection</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
|
@ -32,6 +32,7 @@ using WebsitePanel.EnterpriseServer;
|
||||||
using WebsitePanel.Providers.Common;
|
using WebsitePanel.Providers.Common;
|
||||||
using WebsitePanel.Providers.HostedSolution;
|
using WebsitePanel.Providers.HostedSolution;
|
||||||
using WebsitePanel.Providers.OS;
|
using WebsitePanel.Providers.OS;
|
||||||
|
using WebsitePanel.Providers.RemoteDesktopServices;
|
||||||
using WebsitePanel.WebPortal;
|
using WebsitePanel.WebPortal;
|
||||||
|
|
||||||
namespace WebsitePanel.Portal.RDS
|
namespace WebsitePanel.Portal.RDS
|
||||||
|
@ -67,6 +68,13 @@ namespace WebsitePanel.Portal.RDS
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
RdsServer rdsServer = ES.Services.RDS.GetRdsServer(rdsServerId);
|
||||||
|
if (rdsServer.RdsCollectionId != null)
|
||||||
|
{
|
||||||
|
messageBox.ShowErrorMessage("RDS_UNASSIGN_SERVER_FROM_ORG_SERVER_IS_IN_COLLECTION");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ResultObject result = ES.Services.RDS.RemoveRdsServerFromOrganization(rdsServerId);
|
ResultObject result = ES.Services.RDS.RemoveRdsServerFromOrganization(rdsServerId);
|
||||||
if (!result.IsSuccess)
|
if (!result.IsSuccess)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue