\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/AssignedRDSServers.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/AssignedRDSServers.ascx.cs
new file mode 100644
index 00000000..af6144d6
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/AssignedRDSServers.ascx.cs
@@ -0,0 +1,94 @@
+// Copyright (c) 2014, 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 WebsitePanel.EnterpriseServer;
+using WebsitePanel.Providers.Common;
+using WebsitePanel.Providers.HostedSolution;
+using WebsitePanel.Providers.OS;
+using WebsitePanel.WebPortal;
+
+namespace WebsitePanel.Portal.RDS
+{
+ public partial class AssignedRDSServers : WebsitePanelModuleBase
+ {
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+
+ }
+
+ PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
+ if (cntx.Quotas.ContainsKey(Quotas.RDS_SERVERS))
+ {
+ btnAddServerToOrg.Enabled = (!(cntx.Quotas[Quotas.RDS_SERVERS].QuotaAllocatedValue <= gvRDSAssignedServers.Rows.Count) || (cntx.Quotas[Quotas.RDS_SERVERS].QuotaAllocatedValue == -1));
+ }
+ }
+
+ protected void btnAddServerToOrg_Click(object sender, EventArgs e)
+ {
+ Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "rds_add_server",
+ "SpaceID=" + PanelSecurity.PackageId));
+ }
+
+ protected void gvRDSAssignedServers_RowCommand(object sender, GridViewCommandEventArgs e)
+ {
+ if (e.CommandName == "DeleteItem")
+ {
+ // delete RDS Server
+ int rdsServerId = int.Parse(e.CommandArgument.ToString());
+
+ try
+ {
+ ResultObject result = ES.Services.RDS.RemoveRdsServerFromOrganization(rdsServerId);
+ if (!result.IsSuccess)
+ {
+ messageBox.ShowMessage(result, "REMOTE_DESKTOP_SERVICES_UNASSIGN_SERVER_FROM_ORG", "RDS");
+ return;
+ }
+
+ gvRDSAssignedServers.DataBind();
+
+ }
+ catch (Exception ex)
+ {
+ ShowErrorMessage("REMOTE_DESKTOP_SERVICES_UNASSIGN_SERVER_FROM_ORG", ex);
+ }
+ }
+ }
+
+ protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ gvRDSAssignedServers.PageSize = Convert.ToInt16(ddlPageSize.SelectedValue);
+
+ gvRDSAssignedServers.DataBind();
+ }
+ }
+}
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/AssignedRDSServers.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/AssignedRDSServers.ascx.designer.cs
new file mode 100644
index 00000000..0ad4c109
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/AssignedRDSServers.ascx.designer.cs
@@ -0,0 +1,123 @@
+//------------------------------------------------------------------------------
+//
+// 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.RDS {
+
+
+ public partial class AssignedRDSServers {
+
+ ///
+ /// asyncTasks control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks;
+
+ ///
+ /// imgRDSServers control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Image imgRDSServers;
+
+ ///
+ /// 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;
+
+ ///
+ /// messageBox control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
+
+ ///
+ /// btnAddServerToOrg control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnAddServerToOrg;
+
+ ///
+ /// SearchPanel control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel SearchPanel;
+
+ ///
+ /// locSearch control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Localize locSearch;
+
+ ///
+ /// ddlPageSize control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.DropDownList ddlPageSize;
+
+ ///
+ /// txtSearchValue control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtSearchValue;
+
+ ///
+ /// cmdSearch control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ImageButton cmdSearch;
+
+ ///
+ /// gvRDSAssignedServers control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.GridView gvRDSAssignedServers;
+
+ ///
+ /// odsRDSAssignedServersPaged control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ObjectDataSource odsRDSAssignedServersPaged;
+ }
+}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSCollections.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSCollections.ascx
new file mode 100644
index 00000000..7fc47b47
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSCollections.ascx
@@ -0,0 +1,87 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RDSCollections.ascx.cs" Inherits="WebsitePanel.Portal.RDS.RDSCollections" %>
+<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
+<%@ Register Src="../UserControls/QuotaViewer.ascx" TagName="QuotaViewer" TagPrefix="wsp" %>
+<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
+
+
+
+
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSCollections.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSCollections.ascx.cs
new file mode 100644
index 00000000..1842197e
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSCollections.ascx.cs
@@ -0,0 +1,115 @@
+// Copyright (c) 2014, 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.Linq;
+using System.Web.UI.WebControls;
+using WebsitePanel.EnterpriseServer;
+using WebsitePanel.Providers.Common;
+using WebsitePanel.Providers.HostedSolution;
+using WebsitePanel.Providers.OS;
+using WebsitePanel.Providers.RemoteDesktopServices;
+using WebsitePanel.WebPortal;
+
+namespace WebsitePanel.Portal.RDS
+{
+ public partial class RDSCollections : WebsitePanelModuleBase
+ {
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ }
+ }
+
+ public string GetServerName(string collectionId)
+ {
+ int id = int.Parse(collectionId);
+
+ RdsServer[] servers = ES.Services.RDS.GetCollectionRdsServers(id);
+
+ return servers.FirstOrDefault().FqdName;
+ }
+
+ protected void btnAddCollection_Click(object sender, EventArgs e)
+ {
+ Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "rds_create_collection",
+ "SpaceID=" + PanelSecurity.PackageId));
+ }
+
+ protected void gvRDSCollections_RowCommand(object sender, GridViewCommandEventArgs e)
+ {
+ if (e.CommandName == "DeleteItem")
+ {
+ // delete RDS Collection
+ int rdsCollectionId = int.Parse(e.CommandArgument.ToString());
+
+ try
+ {
+ RdsCollection collection = ES.Services.RDS.GetRdsCollection(rdsCollectionId);
+
+ ResultObject result = ES.Services.RDS.RemoveRdsCollection(PanelRequest.ItemID, collection);
+
+ if (!result.IsSuccess)
+ {
+ messageBox.ShowMessage(result, "REMOTE_DESKTOP_SERVICES_REMOVE_COLLECTION", "RDS");
+ return;
+ }
+
+ gvRDSCollections.DataBind();
+
+ }
+ catch (Exception ex)
+ {
+ ShowErrorMessage("REMOTE_DESKTOP_SERVICES_REMOVE_COLLECTION", ex);
+ }
+ }
+ }
+
+ protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ gvRDSCollections.PageSize = Convert.ToInt16(ddlPageSize.SelectedValue);
+
+ gvRDSCollections.DataBind();
+ }
+
+ public string GetCollectionAppsEditUrl(string collectionId)
+ {
+ return EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "rds_collection_edit_apps",
+ "CollectionId=" + collectionId,
+ "ItemID=" + PanelRequest.ItemID);
+ }
+
+ public string GetCollectionUsersEditUrl(string collectionId)
+ {
+ return EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "rds_collection_edit_users",
+ "CollectionId=" + collectionId,
+ "ItemID=" + PanelRequest.ItemID);
+ }
+ }
+}
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSCollections.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSCollections.ascx.designer.cs
new file mode 100644
index 00000000..7b951606
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSCollections.ascx.designer.cs
@@ -0,0 +1,123 @@
+//------------------------------------------------------------------------------
+//
+// 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.RDS {
+
+
+ public partial class RDSCollections {
+
+ ///
+ /// asyncTasks control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks;
+
+ ///
+ /// imgRDSCollections control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Image imgRDSCollections;
+
+ ///
+ /// 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;
+
+ ///
+ /// messageBox control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
+
+ ///
+ /// btnAddCollection control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnAddCollection;
+
+ ///
+ /// SearchPanel control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel SearchPanel;
+
+ ///
+ /// locSearch control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Localize locSearch;
+
+ ///
+ /// ddlPageSize control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.DropDownList ddlPageSize;
+
+ ///
+ /// txtSearchValue control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtSearchValue;
+
+ ///
+ /// cmdSearch control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ImageButton cmdSearch;
+
+ ///
+ /// gvRDSCollections control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.GridView gvRDSCollections;
+
+ ///
+ /// odsRDSCollectionsPaged control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ObjectDataSource odsRDSCollectionsPaged;
+ }
+}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSCreateCollection.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSCreateCollection.ascx
new file mode 100644
index 00000000..7047502f
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSCreateCollection.ascx
@@ -0,0 +1,46 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RDSCreateCollection.ascx.cs" Inherits="WebsitePanel.Portal.RDS.RDSCreateCollection" %>
+<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
+<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
+<%@ Register Src="UserControls/RDSCollectionServers.ascx" TagName="CollectionServers" TagPrefix="wsp"%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSCreateCollection.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSCreateCollection.ascx.cs
new file mode 100644
index 00000000..ba53d8a8
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSCreateCollection.ascx.cs
@@ -0,0 +1,72 @@
+// Copyright (c) 2014, 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 WebsitePanel.EnterpriseServer;
+using WebsitePanel.Providers.Common;
+using WebsitePanel.Providers.HostedSolution;
+using WebsitePanel.Providers.OS;
+using WebsitePanel.Providers.RemoteDesktopServices;
+
+namespace WebsitePanel.Portal.RDS
+{
+ public partial class RDSCreateCollection : WebsitePanelModuleBase
+ {
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+
+ }
+ }
+
+ protected void btnSave_Click(object sender, EventArgs e)
+ {
+ if (!Page.IsValid)
+ return;
+
+ try
+ {
+ if (servers.GetServers().Count < 1)
+ {
+ messageBox.ShowErrorMessage("RDS_CREATE_COLLECTION_RDSSERVER_REQUAIRED");
+ return;
+ }
+ RdsCollection collection = new RdsCollection{ Name = txtCollectionName.Text, Servers = servers.GetServers(), Description = "" };
+
+ ES.Services.RDS.AddRdsCollection(PanelRequest.ItemID, collection);
+
+ Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "rds_collections",
+ "SpaceID=" + PanelSecurity.PackageId));
+ }
+ catch { }
+ }
+ }
+}
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSCreateCollection.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSCreateCollection.ascx.designer.cs
new file mode 100644
index 00000000..b1666d95
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSCreateCollection.ascx.designer.cs
@@ -0,0 +1,114 @@
+//------------------------------------------------------------------------------
+//
+// 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.RDS {
+
+
+ public partial class RDSCreateCollection {
+
+ ///
+ /// asyncTasks control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks;
+
+ ///
+ /// imgAddRDSServer control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Image imgAddRDSServer;
+
+ ///
+ /// 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;
+
+ ///
+ /// messageBox control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
+
+ ///
+ /// locCollectionName control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Localize locCollectionName;
+
+ ///
+ /// txtCollectionName control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtCollectionName;
+
+ ///
+ /// valCollectionName control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.RequiredFieldValidator valCollectionName;
+
+ ///
+ /// RDSServersPanel control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlGenericControl RDSServersPanel;
+
+ ///
+ /// locRDSServersSection control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Localize locRDSServersSection;
+
+ ///
+ /// servers control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.RDS.UserControls.RDSCollectionServers servers;
+
+ ///
+ /// 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;
+ }
+}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditCollectionApps.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditCollectionApps.ascx
new file mode 100644
index 00000000..e9ab9fc9
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditCollectionApps.ascx
@@ -0,0 +1,46 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RDSEditCollectionApps.ascx.cs" Inherits="WebsitePanel.Portal.RDS.RDSEditCollectionApps" %>
+<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
+<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
+<%@ Register Src="UserControls/RDSCollectionApps.ascx" TagName="CollectionApps" TagPrefix="wsp"%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditCollectionApps.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditCollectionApps.ascx.cs
new file mode 100644
index 00000000..0d647cb3
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditCollectionApps.ascx.cs
@@ -0,0 +1,69 @@
+// Copyright (c) 2014, 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 WebsitePanel.EnterpriseServer;
+using WebsitePanel.Providers.Common;
+using WebsitePanel.Providers.HostedSolution;
+using WebsitePanel.Providers.OS;
+using WebsitePanel.Providers.RemoteDesktopServices;
+
+namespace WebsitePanel.Portal.RDS
+{
+ public partial class RDSEditCollectionApps : WebsitePanelModuleBase
+ {
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ RdsCollection collection = ES.Services.RDS.GetRdsCollection(PanelRequest.CollectionID);
+ var collectionApps = ES.Services.RDS.GetCollectionRemoteApplications(PanelRequest.ItemID, collection.Name);
+
+ locCName.Text = collection.Name;
+
+ remoreApps.SetApps(collectionApps);
+ }
+ }
+
+ protected void btnSave_Click(object sender, EventArgs e)
+ {
+ if (!Page.IsValid)
+ return;
+ try
+ {
+ ES.Services.RDS.SetRemoteApplicationsToRdsCollection(PanelRequest.ItemID, PanelRequest.CollectionID, remoreApps.GetApps());
+
+ Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "rds_collections",
+ "SpaceID=" + PanelSecurity.PackageId));
+ }
+ catch (Exception ex) { }
+ }
+ }
+}
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditCollectionApps.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditCollectionApps.ascx.designer.cs
new file mode 100644
index 00000000..86f32f54
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditCollectionApps.ascx.designer.cs
@@ -0,0 +1,114 @@
+//------------------------------------------------------------------------------
+//
+// 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.RDS {
+
+
+ public partial class RDSEditCollectionApps {
+
+ ///
+ /// asyncTasks control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks;
+
+ ///
+ /// imgEditRDSCollection control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Image imgEditRDSCollection;
+
+ ///
+ /// 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;
+
+ ///
+ /// messageBox control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
+
+ ///
+ /// locCollectionName control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Localize locCollectionName;
+
+ ///
+ /// locCName control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Localize locCName;
+
+ ///
+ /// RemoteAppsPanel control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlGenericControl RemoteAppsPanel;
+
+ ///
+ /// locRemoteAppsSection control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Localize locRemoteAppsSection;
+
+ ///
+ /// remoreApps control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.RDS.UserControls.RDSCollectionApps remoreApps;
+
+ ///
+ /// 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;
+
+ ///
+ /// valSummary control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ValidationSummary valSummary;
+ }
+}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditCollectionUsers.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditCollectionUsers.ascx
new file mode 100644
index 00000000..59be0b41
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditCollectionUsers.ascx
@@ -0,0 +1,46 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RDSEditCollectionUsers.ascx.cs" Inherits="WebsitePanel.Portal.RDS.RDSEditCollectionUsers" %>
+<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
+<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
+<%@ Register Src="UserControls/RDSCollectionUsers.ascx" TagName="CollectionUsers" TagPrefix="wsp"%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditCollectionUsers.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditCollectionUsers.ascx.cs
new file mode 100644
index 00000000..a6db5a72
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditCollectionUsers.ascx.cs
@@ -0,0 +1,68 @@
+// Copyright (c) 2014, 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 WebsitePanel.EnterpriseServer;
+using WebsitePanel.Providers.Common;
+using WebsitePanel.Providers.HostedSolution;
+using WebsitePanel.Providers.OS;
+
+namespace WebsitePanel.Portal.RDS
+{
+ public partial class RDSEditCollectionUsers : WebsitePanelModuleBase
+ {
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ var collectionUsers = ES.Services.RDS.GetRdsCollectionUsers(PanelRequest.CollectionID);
+ var collection = ES.Services.RDS.GetRdsCollection(PanelRequest.CollectionID);
+
+ locCName.Text = collection.Name;
+
+ users.SetUsers(collectionUsers);
+ }
+ }
+
+ protected void btnSave_Click(object sender, EventArgs e)
+ {
+ if (!Page.IsValid)
+ return;
+ try
+ {
+ ES.Services.RDS.SetUsersToRdsCollection(PanelRequest.ItemID, PanelRequest.CollectionID, users.GetUsers());
+
+ Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "rds_collections",
+ "SpaceID=" + PanelSecurity.PackageId));
+ }
+ catch(Exception ex) { }
+ }
+ }
+}
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditCollectionUsers.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditCollectionUsers.ascx.designer.cs
new file mode 100644
index 00000000..8bbd99d4
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditCollectionUsers.ascx.designer.cs
@@ -0,0 +1,114 @@
+//------------------------------------------------------------------------------
+//
+// 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.RDS {
+
+
+ public partial class RDSEditCollectionUsers {
+
+ ///
+ /// asyncTasks control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks;
+
+ ///
+ /// imgEditRDSCollection control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Image imgEditRDSCollection;
+
+ ///
+ /// 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;
+
+ ///
+ /// messageBox control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
+
+ ///
+ /// locCollectionName control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Localize locCollectionName;
+
+ ///
+ /// locCName control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Localize locCName;
+
+ ///
+ /// UsersPanel control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlGenericControl UsersPanel;
+
+ ///
+ /// locUsersSection control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Localize locUsersSection;
+
+ ///
+ /// users control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.RDS.UserControls.RDSCollectionUsers users;
+
+ ///
+ /// 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;
+
+ ///
+ /// valSummary control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ValidationSummary valSummary;
+ }
+}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/App_LocalResources/RDSCollectionApps.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/App_LocalResources/RDSCollectionApps.ascx.resx
new file mode 100644
index 00000000..aebc0900
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/App_LocalResources/RDSCollectionApps.ascx.resx
@@ -0,0 +1,147 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 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...
+
+
+ Add Apps
+
+
+ Cancel
+
+
+ Delete
+
+
+ Remote Application Name
+
+
+ The list of remote apps is empty. Click "Add..." button.
+
+
+ Remote App Name
+
+
+ No remote apps found.
+
+
+ Available Remote Applications
+
+
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/App_LocalResources/RDSCollectionServers.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/App_LocalResources/RDSCollectionServers.ascx.resx
new file mode 100644
index 00000000..814527a9
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/App_LocalResources/RDSCollectionServers.ascx.resx
@@ -0,0 +1,147 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 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...
+
+
+ Add Servers
+
+
+ Cancel
+
+
+ Delete
+
+
+ Server Name
+
+
+ No servers found.
+
+
+ Server Name
+
+
+ The list of servers is empty. Click "Add..." button.
+
+
+ Enabled Servers
+
+
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/App_LocalResources/RDSCollectionUsers.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/App_LocalResources/RDSCollectionUsers.ascx.resx
new file mode 100644
index 00000000..47a2f1e3
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/App_LocalResources/RDSCollectionUsers.ascx.resx
@@ -0,0 +1,156 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 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...
+
+
+ Add Accounts
+
+
+ Cancel
+
+
+ Delete
+
+
+ Display Name
+
+
+ E-mail Address
+
+
+ Display Name
+
+
+ Email
+
+
+ No accounts found.
+
+
+ The list of users is empty. Click "Add..." button.
+
+
+ Users
+
+
+ Enabled Users
+
+
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/RDSCollectionApps.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/RDSCollectionApps.ascx
new file mode 100644
index 00000000..fc3a8844
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/RDSCollectionApps.ascx
@@ -0,0 +1,95 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RDSCollectionApps.ascx.cs" Inherits="WebsitePanel.Portal.RDS.UserControls.RDSCollectionApps" %>
+<%@ Register Src="../../UserControls/PopupHeader.ascx" TagName="PopupHeader" TagPrefix="wsp" %>
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/RDSCollectionUsers.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/RDSCollectionUsers.ascx.cs
new file mode 100644
index 00000000..a54796e6
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/RDSCollectionUsers.ascx.cs
@@ -0,0 +1,247 @@
+// Copyright (c) 2014, 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.UI;
+using System.Web.UI.WebControls;
+using WebsitePanel.Providers.HostedSolution;
+using System.Linq;
+using WebsitePanel.Providers.Web;
+using WebsitePanel.EnterpriseServer.Base.HostedSolution;
+using WebsitePanel.EnterpriseServer;
+
+namespace WebsitePanel.Portal.RDS.UserControls
+{
+ public partial class RDSCollectionUsers : WebsitePanelControlBase
+ {
+ public const string DirectionString = "DirectionString";
+
+ protected enum SelectedState
+ {
+ All,
+ Selected,
+ Unselected
+ }
+
+ public void SetUsers(OrganizationUser[] users)
+ {
+ BindAccounts(users, false);
+ }
+
+ public OrganizationUser[] GetUsers()
+ {
+ return GetGridViewUsers(SelectedState.All).ToArray();
+ }
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ // register javascript
+ if (!Page.ClientScript.IsClientScriptBlockRegistered("SelectAllCheckboxes"))
+ {
+ string script = @" function SelectAllCheckboxes(box)
+ {
+ var state = box.checked;
+ var elm = box.parentElement.parentElement.parentElement.parentElement.getElementsByTagName(""INPUT"");
+ for(i = 0; i < elm.length; i++)
+ if(elm[i].type == ""checkbox"" && elm[i].id != box.id && elm[i].checked != state && !elm[i].disabled)
+ elm[i].checked = state;
+ }";
+ Page.ClientScript.RegisterClientScriptBlock(typeof(RDSCollectionUsers), "SelectAllCheckboxes",
+ script, true);
+ }
+
+ PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
+ if (cntx.Quotas.ContainsKey(Quotas.RDS_USERS))
+ {
+ int rdsUsersCount = ES.Services.RDS.GetOrganizationRdsUsersCount(PanelRequest.ItemID);
+ btnAdd.Enabled = (!(cntx.Quotas[Quotas.RDS_USERS].QuotaAllocatedValue <= rdsUsersCount) || (cntx.Quotas[Quotas.RDS_USERS].QuotaAllocatedValue == -1));
+ }
+ }
+
+ protected void btnAdd_Click(object sender, EventArgs e)
+ {
+ // bind all accounts
+ BindPopupAccounts();
+
+ // show modal
+ AddAccountsModal.Show();
+ }
+
+ protected void btnDelete_Click(object sender, EventArgs e)
+ {
+ List selectedAccounts = GetGridViewUsers(SelectedState.Unselected);
+
+ BindAccounts(selectedAccounts.ToArray(), false);
+ }
+
+ protected void btnAddSelected_Click(object sender, EventArgs e)
+ {
+ List selectedAccounts = GetGridViewAccounts();
+
+ BindAccounts(selectedAccounts.ToArray(), true);
+
+ }
+
+ public string GetAccountImage(int accountTypeId)
+ {
+ string imgName = string.Empty;
+
+ ExchangeAccountType accountType = (ExchangeAccountType)accountTypeId;
+ switch (accountType)
+ {
+ case ExchangeAccountType.Room:
+ imgName = "room_16.gif";
+ break;
+ case ExchangeAccountType.Equipment:
+ imgName = "equipment_16.gif";
+ break;
+ default:
+ imgName = "admin_16.png";
+ break;
+ }
+
+ return GetThemedImage("Exchange/" + imgName);
+ }
+
+ protected void BindPopupAccounts()
+ {
+ OrganizationUser[] accounts = ES.Services.Organizations.GetOrganizationUsersPaged(PanelRequest.ItemID, null, null, null, 0, Int32.MaxValue).PageUsers;
+
+ accounts = accounts.Where(x => !GetUsers().Select(p => p.AccountName).Contains(x.AccountName)).ToArray();
+ Array.Sort(accounts, CompareAccount);
+ if (Direction == SortDirection.Ascending)
+ {
+ Array.Reverse(accounts);
+ Direction = SortDirection.Descending;
+ }
+ else
+ Direction = SortDirection.Ascending;
+
+ gvPopupAccounts.DataSource = accounts;
+ gvPopupAccounts.DataBind();
+ }
+
+ protected void BindAccounts(OrganizationUser[] newUsers, bool preserveExisting)
+ {
+ // get binded addresses
+ List users = new List();
+ if(preserveExisting)
+ users.AddRange(GetGridViewUsers(SelectedState.All));
+
+ // add new accounts
+ if (newUsers != null)
+ {
+ foreach (OrganizationUser newUser in newUsers)
+ {
+ // check if exists
+ bool exists = false;
+ foreach (OrganizationUser user in users)
+ {
+ if (String.Compare(user.AccountName, newUser.AccountName, true) == 0)
+ {
+ exists = true;
+ break;
+ }
+ }
+
+ if (exists)
+ continue;
+
+ users.Add(newUser);
+ }
+ }
+
+ gvUsers.DataSource = users;
+ gvUsers.DataBind();
+ }
+
+ protected List GetGridViewUsers(SelectedState state)
+ {
+ List users = new List();
+ for (int i = 0; i < gvUsers.Rows.Count; i++)
+ {
+ GridViewRow row = gvUsers.Rows[i];
+ CheckBox chkSelect = (CheckBox)row.FindControl("chkSelect");
+ if (chkSelect == null)
+ continue;
+
+ OrganizationUser user = new OrganizationUser();
+ user.AccountName = (string)gvUsers.DataKeys[i][0];
+ user.DisplayName = ((Literal)row.FindControl("litAccount")).Text;
+
+ if (state == SelectedState.All ||
+ (state == SelectedState.Selected && chkSelect.Checked) ||
+ (state == SelectedState.Unselected && !chkSelect.Checked))
+ users.Add(user);
+ }
+
+ return users;
+ }
+
+ protected List GetGridViewAccounts()
+ {
+ List accounts = new List();
+ for (int i = 0; i < gvPopupAccounts.Rows.Count; i++)
+ {
+ GridViewRow row = gvPopupAccounts.Rows[i];
+ CheckBox chkSelect = (CheckBox)row.FindControl("chkSelect");
+ if (chkSelect == null)
+ continue;
+
+ if (chkSelect.Checked)
+ {
+ accounts.Add(new OrganizationUser
+ {
+ AccountName = (string)gvPopupAccounts.DataKeys[i][0],
+ DisplayName = ((Literal)row.FindControl("litDisplayName")).Text
+ });
+ }
+ }
+
+ return accounts;
+
+ }
+
+ protected void cmdSearch_Click(object sender, ImageClickEventArgs e)
+ {
+ BindPopupAccounts();
+ }
+
+ protected SortDirection Direction
+ {
+ get { return ViewState[DirectionString] == null ? SortDirection.Descending : (SortDirection)ViewState[DirectionString]; }
+ set { ViewState[DirectionString] = value; }
+ }
+
+ protected static int CompareAccount(OrganizationUser user1, OrganizationUser user2)
+ {
+ return string.Compare(user1.DisplayName, user2.DisplayName);
+ }
+ }
+}
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/RDSCollectionUsers.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/RDSCollectionUsers.ascx.designer.cs
new file mode 100644
index 00000000..0ee1baea
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/RDSCollectionUsers.ascx.designer.cs
@@ -0,0 +1,159 @@
+//------------------------------------------------------------------------------
+//
+// 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.RDS.UserControls {
+
+
+ public partial class RDSCollectionUsers {
+
+ ///
+ /// UsersUpdatePanel control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.UpdatePanel UsersUpdatePanel;
+
+ ///
+ /// 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;
+
+ ///
+ /// btnDelete control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnDelete;
+
+ ///
+ /// gvUsers control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.GridView gvUsers;
+
+ ///
+ /// AddAccountsPanel control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel AddAccountsPanel;
+
+ ///
+ /// headerAddAccounts control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Localize headerAddAccounts;
+
+ ///
+ /// AddAccountsUpdatePanel control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.UpdatePanel AddAccountsUpdatePanel;
+
+ ///
+ /// SearchPanel control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel SearchPanel;
+
+ ///
+ /// ddlSearchColumn control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.DropDownList ddlSearchColumn;
+
+ ///
+ /// txtSearchValue control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtSearchValue;
+
+ ///
+ /// cmdSearch control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ImageButton cmdSearch;
+
+ ///
+ /// gvPopupAccounts control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.GridView gvPopupAccounts;
+
+ ///
+ /// btnAddSelected control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnAddSelected;
+
+ ///
+ /// btnCancelAdd control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnCancelAdd;
+
+ ///
+ /// btnAddAccountsFake control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnAddAccountsFake;
+
+ ///
+ /// AddAccountsModal control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::AjaxControlToolkit.ModalPopupExtender AddAccountsModal;
+ }
+}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServers.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServers.ascx
new file mode 100644
index 00000000..70cf33d6
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServers.ascx
@@ -0,0 +1,67 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RDSServers.ascx.cs" Inherits="WebsitePanel.Portal.RDSServers" %>
+<%@ Import Namespace="WebsitePanel.Portal" %>
+<%@ Register Src="UserControls/Comments.ascx" TagName="Comments" TagPrefix="uc4" %>
+<%@ Register Src="UserControls/SearchBox.ascx" TagName="SearchBox" TagPrefix="uc1" %>
+<%@ Register Src="UserControls/UserDetails.ascx" TagName="UserDetails" TagPrefix="uc2" %>
+<%@ Register Src="UserControls/CollapsiblePanel.ascx" TagName="CollapsiblePanel" TagPrefix="wsp" %>
+<%@ Register Src="UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 10
+ 20
+ 50
+ 100
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServers.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServers.ascx.cs
new file mode 100644
index 00000000..dd65214a
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServers.ascx.cs
@@ -0,0 +1,111 @@
+// Copyright (c) 2014, 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 RDSServers : WebsitePanelModuleBase
+ {
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ gvRDSServers.PageSize = Convert.ToInt16(ddlPageSize.SelectedValue);
+ gvRDSServers.Sort("Name", System.Web.UI.WebControls.SortDirection.Ascending);
+ }
+ }
+
+ protected void odsRDSServersPaged_Selected(object sender, ObjectDataSourceStatusEventArgs e)
+ {
+ if (e.Exception != null)
+ {
+ ProcessException(e.Exception.InnerException);
+ this.DisableControls = true;
+ e.ExceptionHandled = true;
+ }
+ }
+
+ protected void btnAddRDSServer_Click(object sender, EventArgs e)
+ {
+ Response.Redirect(EditUrl("add_rdsserver"));
+ }
+
+ protected void gvRDSServers_RowCommand(object sender, GridViewCommandEventArgs e)
+ {
+ if (e.CommandName == "DeleteItem")
+ {
+ // delete rds server
+ int rdsServerId;
+ bool hasValue = int.TryParse(e.CommandArgument.ToString(), out rdsServerId);
+
+ ResultObject result = new ResultObject();
+ result.IsSuccess = false;
+
+ try
+ {
+ if (hasValue)
+ {
+ result = ES.Services.RDS.RemoveRdsServer(rdsServerId);
+ }
+
+ if (!result.IsSuccess)
+ {
+ messageBox.ShowMessage(result, "REMOTE_DESKTOP_SERVICES_REMOVE_RDSSERVER", "RDS");
+ return;
+ }
+
+ gvRDSServers.DataBind();
+ }
+ catch (Exception ex)
+ {
+ ShowErrorMessage("REMOTE_DESKTOP_SERVICES_REMOVE_RDSSERVER", ex);
+ }
+ }
+ }
+
+ protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ gvRDSServers.PageSize = Convert.ToInt16(ddlPageSize.SelectedValue);
+
+ gvRDSServers.DataBind();
+ }
+ }
+}
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServers.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServers.ascx.designer.cs
new file mode 100644
index 00000000..ca243bca
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServers.ascx.designer.cs
@@ -0,0 +1,105 @@
+//------------------------------------------------------------------------------
+//
+// 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 RDSServers {
+
+ ///
+ /// updatePanelUsers control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.UpdatePanel updatePanelUsers;
+
+ ///
+ /// messageBox control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
+
+ ///
+ /// btnAddRDSServer control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnAddRDSServer;
+
+ ///
+ /// SearchPanel control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel SearchPanel;
+
+ ///
+ /// locSearch control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Localize locSearch;
+
+ ///
+ /// ddlPageSize control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.DropDownList ddlPageSize;
+
+ ///
+ /// txtSearchValue control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtSearchValue;
+
+ ///
+ /// cmdSearch control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ImageButton cmdSearch;
+
+ ///
+ /// gvRDSServers control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.GridView gvRDSServers;
+
+ ///
+ /// odsRDSServersPaged control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ObjectDataSource odsRDSServersPaged;
+ }
+}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServersAddserver.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServersAddserver.ascx
new file mode 100644
index 00000000..2f9d100a
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServersAddserver.ascx
@@ -0,0 +1,38 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RDSServersAddserver.ascx.cs" Inherits="WebsitePanel.Portal.RDSServersAddserver" %>
+<%@ Register Src="UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
+<%@ Register Src="UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServersAddserver.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServersAddserver.ascx.cs
new file mode 100644
index 00000000..005d3216
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServersAddserver.ascx.cs
@@ -0,0 +1,83 @@
+// Copyright (c) 2014, 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 WebsitePanel.EnterpriseServer;
+using WebsitePanel.Providers.Common;
+using WebsitePanel.Providers.HostedSolution;
+using WebsitePanel.Providers.OS;
+
+using WebsitePanel.EnterpriseServer;
+using WebsitePanel.Providers.RemoteDesktopServices;
+
+namespace WebsitePanel.Portal
+{
+ public partial class RDSServersAddserver : WebsitePanelModuleBase
+ {
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ }
+ }
+
+ protected void btnAdd_Click(object sender, EventArgs e)
+ {
+ if (!Page.IsValid)
+ return;
+ try
+ {
+ RdsServer rdsServer = new RdsServer();
+
+ rdsServer.FqdName = txtServerName.Text;
+ rdsServer.Description = txtServerComments.Text;
+
+ ResultObject result = ES.Services.RDS.AddRdsServer(rdsServer);
+
+ if (!result.IsSuccess && result.ErrorCodes.Count > 0)
+ {
+ messageBox.ShowMessage(result, "", "");
+ return;
+ }
+
+ RedirectToBrowsePage();
+ }
+ catch (Exception ex)
+ {
+ messageBox.ShowErrorMessage("", ex);
+ }
+ }
+
+ protected void btnCancel_Click(object sender, EventArgs e)
+ {
+ RedirectToBrowsePage();
+ }
+ }
+}
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServersAddserver.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServersAddserver.ascx.designer.cs
new file mode 100644
index 00000000..526938b3
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServersAddserver.ascx.designer.cs
@@ -0,0 +1,105 @@
+//------------------------------------------------------------------------------
+//
+// 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 RDSServersAddserver {
+
+ ///
+ /// asyncTasks control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks;
+
+ ///
+ /// messageBox control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
+
+ ///
+ /// locServerName control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Localize locServerName;
+
+ ///
+ /// txtServerName control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtServerName;
+
+ ///
+ /// valServerName control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.RequiredFieldValidator valServerName;
+
+ ///
+ /// locServerComments control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Localize locServerComments;
+
+ ///
+ /// txtServerComments control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtServerComments;
+
+ ///
+ /// valServerComments control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.RequiredFieldValidator valServerComments;
+
+ ///
+ /// 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/OrganizationMenuControl.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/OrganizationMenuControl.cs
index 6aac93ba..371a1adb 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/OrganizationMenuControl.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/OrganizationMenuControl.cs
@@ -115,6 +115,10 @@ namespace WebsitePanel.Portal.UserControls
//EnterpriseStorage Menu
if (Cntx.Groups.ContainsKey(ResourceGroups.EnterpriseStorage))
PrepareEnterpriseStorageMenuRoot(items);
+
+ //Remote Desktop Services Menu
+ if (Cntx.Groups.ContainsKey(ResourceGroups.RDS))
+ PrepareRDSMenuRoot(items);
}
private void PrepareOrganizationMenuRoot(MenuItemCollection items)
@@ -477,6 +481,35 @@ namespace WebsitePanel.Portal.UserControls
}
+ private void PrepareRDSMenuRoot(MenuItemCollection items)
+ {
+ if (ShortMenu)
+ {
+ PrepareRDSMenu(items);
+ }
+ else
+ {
+ MenuItem item = new MenuItem(GetLocalizedString("Text.RDSGroup"), "", "", null);
+
+ item.Selectable = false;
+
+ PrepareRDSMenu(item.ChildItems);
+
+ if (item.ChildItems.Count > 0)
+ {
+ items.Add(item);
+ }
+ }
+ }
+
+ private void PrepareRDSMenu(MenuItemCollection rdsItems)
+ {
+ rdsItems.Add(CreateMenuItem("RDSCollections", "rds_collections", null));
+
+ if (Utils.CheckQouta(Quotas.RDS_SERVERS, Cntx) && (PanelSecurity.LoggedUser.Role != UserRole.User))
+ rdsItems.Add(CreateMenuItem("RDSServers", "rds_servers", null));
+ }
+
private MenuItem CreateMenuItem(string text, string key)
{
return CreateMenuItem(text, key, null);
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 62d05d26..22deb551 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj
@@ -169,6 +169,7 @@
+
@@ -210,6 +211,83 @@
+
+ RDSServersAddserver.ascx
+ ASPXCodeBehind
+
+
+ RDSServersAddserver.ascx
+
+
+ RDSServers.ascx
+ ASPXCodeBehind
+
+
+ RDSServers.ascx
+
+
+ AssignedRDSServers.ascx
+ ASPXCodeBehind
+
+
+ AssignedRDSServers.ascx
+
+
+ AddRDSServer.ascx
+ ASPXCodeBehind
+
+
+ AddRDSServer.ascx
+
+
+ RDSEditCollectionApps.ascx
+ ASPXCodeBehind
+
+
+ RDSEditCollectionApps.ascx
+
+
+ RDSEditCollectionUsers.ascx
+ ASPXCodeBehind
+
+
+ RDSEditCollectionUsers.ascx
+
+
+ RDSCreateCollection.ascx
+ ASPXCodeBehind
+
+
+ RDSCreateCollection.ascx
+
+
+ RDSCollections.ascx
+ ASPXCodeBehind
+
+
+ RDSCollections.ascx
+
+
+ RDSCollectionApps.ascx
+ ASPXCodeBehind
+
+
+ RDSCollectionApps.ascx
+
+
+ RDSCollectionServers.ascx
+ ASPXCodeBehind
+
+
+ RDSCollectionServers.ascx
+
+
+ RDSCollectionUsers.ascx
+ ASPXCodeBehind
+
+
+ RDSCollectionUsers.ascx
+ SettingsServiceLevels.ascxASPXCodeBehind
@@ -4145,6 +4223,17 @@
+
+
+
+
+
+
+
+
+
+
+
@@ -5430,6 +5519,22 @@
+
+ Designer
+
+
+ Designer
+
+
+ Designer
+
+
+
+
+
+
+
+ Designer