This commit is contained in:
dev_amdtel 2014-01-31 16:02:38 +04:00
commit 722115607c
55 changed files with 3525 additions and 1856 deletions

View file

@ -3094,3 +3094,62 @@ VALUES (467, 24, 4, N'HostedCRM2013.ProfessionalUsers', N'Professional licenses
END END
GO GO
INSERT INTO EnterpriseFolders
(
ItemID,
FolderName
)
VALUES
(
@ItemID,
@FolderName
)
SET @FolderID = SCOPE_IDENTITY()
RETURN
GO
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'DeleteEnterpriseFolder')
DROP PROCEDURE DeleteEnterpriseFolder
GO
CREATE PROCEDURE [dbo].[DeleteEnterpriseFolder]
(
@ItemID INT,
@FolderName NVARCHAR(255)
)
AS
DELETE FROM EnterpriseFolders
WHERE ItemID = @ItemID AND FolderName = @FolderName
GO
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'UpdateEnterpriseFolder')
DROP PROCEDURE UpdateEnterpriseFolder
GO
CREATE PROCEDURE [dbo].[UpdateEnterpriseFolder]
(
@ItemID INT,
@FolderID NVARCHAR(255),
@FolderName NVARCHAR(255),
@FolderQuota INT
)
AS
UPDATE EnterpriseFolders SET
FolderName = @FolderName,
FolderQuota = @FolderQuota
WHERE ItemID = @ItemID AND FolderName = @FolderID
GO
-- Enterprise Storage Quotas
IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'EnterpriseStorage.DiskStorageSpace')
BEGIN
INSERT [dbo].[Quotas] ([QuotaID], [GroupID],[QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (430, 44, 1,N'EnterpriseStorage.DiskStorageSpace',N'Disk Storage Space (Mb)',2, 0 , NULL)
END
GO
UPDATE [dbo].[Quotas] SET [QuotaDescription] = N'Disk Storage Space (Mb)' WHERE [QuotaName] = 'EnterpriseStorage.DiskStorageSpace'
GO

View file

@ -25,6 +25,7 @@
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // 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 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
@ -47,23 +48,14 @@ using WebsitePanel.Providers.OS;
namespace WebsitePanel.EnterpriseServer namespace WebsitePanel.EnterpriseServer
{ {
using System.Xml.Serialization;
using System.Web.Services;
using System.ComponentModel;
using System.Web.Services.Protocols;
using System;
using System.Diagnostics;
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name = "esEnterpriseStorageSoap", Namespace = "http://smbsaas/websitepanel/enterpriseserver")] [System.Web.Services.WebServiceBindingAttribute(Name = "esEnterpriseStorageSoap", Namespace = "http://smbsaas/websitepanel/enterpriseserver")]
[System.Xml.Serialization.XmlIncludeAttribute(typeof(ServiceProviderItem))] [System.Xml.Serialization.XmlIncludeAttribute(typeof(ServiceProviderItem))]
public partial class esEnterpriseStorage : Microsoft.Web.Services3.WebServicesClientProtocol public partial class esEnterpriseStorage : Microsoft.Web.Services3.WebServicesClientProtocol
{ {
private System.Threading.SendOrPostCallback CheckFileServicesInstallationOperationCompleted; private System.Threading.SendOrPostCallback CheckFileServicesInstallationOperationCompleted;
private System.Threading.SendOrPostCallback GetEnterpriseFoldersOperationCompleted; private System.Threading.SendOrPostCallback GetEnterpriseFoldersOperationCompleted;
@ -96,6 +88,10 @@ namespace WebsitePanel.EnterpriseServer
private System.Threading.SendOrPostCallback SetEnterpriseFolderSettingsOperationCompleted; private System.Threading.SendOrPostCallback SetEnterpriseFolderSettingsOperationCompleted;
private System.Threading.SendOrPostCallback GetStatisticsOperationCompleted;
private System.Threading.SendOrPostCallback GetStatisticsByOrganizationOperationCompleted;
/// <remarks/> /// <remarks/>
public esEnterpriseStorage() public esEnterpriseStorage()
{ {
@ -150,6 +146,12 @@ namespace WebsitePanel.EnterpriseServer
/// <remarks/> /// <remarks/>
public event SetEnterpriseFolderSettingsCompletedEventHandler SetEnterpriseFolderSettingsCompleted; public event SetEnterpriseFolderSettingsCompletedEventHandler SetEnterpriseFolderSettingsCompleted;
/// <remarks/>
public event GetStatisticsCompletedEventHandler GetStatisticsCompleted;
/// <remarks/>
public event GetStatisticsByOrganizationCompletedEventHandler GetStatisticsByOrganizationCompleted;
/// <remarks/> /// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CheckFileServicesInstallation", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CheckFileServicesInstallation", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public bool CheckFileServicesInstallation(int serviceId) public bool CheckFileServicesInstallation(int serviceId)
@ -946,23 +948,27 @@ namespace WebsitePanel.EnterpriseServer
/// <remarks/> /// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetEnterpriseFolderSettings", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetEnterpriseFolderSettings", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public void SetEnterpriseFolderSettings(int itemId, SystemFile folder, ESPermission[] permissions, bool directoyBrowsingEnabled) public void SetEnterpriseFolderSettings(int itemId, SystemFile folder, ESPermission[] permissions, bool directoyBrowsingEnabled, int quota, QuotaType quotaType)
{ {
this.Invoke("SetEnterpriseFolderSettings", new object[] { this.Invoke("SetEnterpriseFolderSettings", new object[] {
itemId, itemId,
folder, folder,
permissions, permissions,
directoyBrowsingEnabled}); directoyBrowsingEnabled,
quota,
quotaType});
} }
/// <remarks/> /// <remarks/>
public System.IAsyncResult BeginSetEnterpriseFolderSettings(int itemId, SystemFile folder, ESPermission[] permissions, bool directoyBrowsingEnabled, System.AsyncCallback callback, object asyncState) public System.IAsyncResult BeginSetEnterpriseFolderSettings(int itemId, SystemFile folder, ESPermission[] permissions, bool directoyBrowsingEnabled, int quota, QuotaType quotaType, System.AsyncCallback callback, object asyncState)
{ {
return this.BeginInvoke("SetEnterpriseFolderSettings", new object[] { return this.BeginInvoke("SetEnterpriseFolderSettings", new object[] {
itemId, itemId,
folder, folder,
permissions, permissions,
directoyBrowsingEnabled}, callback, asyncState); directoyBrowsingEnabled,
quota,
quotaType}, callback, asyncState);
} }
/// <remarks/> /// <remarks/>
@ -972,13 +978,13 @@ namespace WebsitePanel.EnterpriseServer
} }
/// <remarks/> /// <remarks/>
public void SetEnterpriseFolderSettingsAsync(int itemId, SystemFile folder, ESPermission[] permissions, bool directoyBrowsingEnabled) public void SetEnterpriseFolderSettingsAsync(int itemId, SystemFile folder, ESPermission[] permissions, bool directoyBrowsingEnabled, int quota, QuotaType quotaType)
{ {
this.SetEnterpriseFolderSettingsAsync(itemId, folder, permissions, directoyBrowsingEnabled, null); this.SetEnterpriseFolderSettingsAsync(itemId, folder, permissions, directoyBrowsingEnabled, quota, quotaType, null);
} }
/// <remarks/> /// <remarks/>
public void SetEnterpriseFolderSettingsAsync(int itemId, SystemFile folder, ESPermission[] permissions, bool directoyBrowsingEnabled, object userState) public void SetEnterpriseFolderSettingsAsync(int itemId, SystemFile folder, ESPermission[] permissions, bool directoyBrowsingEnabled, int quota, QuotaType quotaType, object userState)
{ {
if ((this.SetEnterpriseFolderSettingsOperationCompleted == null)) if ((this.SetEnterpriseFolderSettingsOperationCompleted == null))
{ {
@ -988,7 +994,9 @@ namespace WebsitePanel.EnterpriseServer
itemId, itemId,
folder, folder,
permissions, permissions,
directoyBrowsingEnabled}, this.SetEnterpriseFolderSettingsOperationCompleted, userState); directoyBrowsingEnabled,
quota,
quotaType}, this.SetEnterpriseFolderSettingsOperationCompleted, userState);
} }
private void OnSetEnterpriseFolderSettingsOperationCompleted(object arg) private void OnSetEnterpriseFolderSettingsOperationCompleted(object arg)
@ -1000,6 +1008,104 @@ namespace WebsitePanel.EnterpriseServer
} }
} }
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetStatistics", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public OrganizationStatistics GetStatistics(int itemId)
{
object[] results = this.Invoke("GetStatistics", new object[] {
itemId});
return ((OrganizationStatistics)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginGetStatistics(int itemId, System.AsyncCallback callback, object asyncState)
{
return this.BeginInvoke("GetStatistics", new object[] {
itemId}, callback, asyncState);
}
/// <remarks/>
public OrganizationStatistics EndGetStatistics(System.IAsyncResult asyncResult)
{
object[] results = this.EndInvoke(asyncResult);
return ((OrganizationStatistics)(results[0]));
}
/// <remarks/>
public void GetStatisticsAsync(int itemId)
{
this.GetStatisticsAsync(itemId, null);
}
/// <remarks/>
public void GetStatisticsAsync(int itemId, object userState)
{
if ((this.GetStatisticsOperationCompleted == null))
{
this.GetStatisticsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetStatisticsOperationCompleted);
}
this.InvokeAsync("GetStatistics", new object[] {
itemId}, this.GetStatisticsOperationCompleted, userState);
}
private void OnGetStatisticsOperationCompleted(object arg)
{
if ((this.GetStatisticsCompleted != null))
{
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.GetStatisticsCompleted(this, new GetStatisticsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetStatisticsByOrganization", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public OrganizationStatistics GetStatisticsByOrganization(int itemId)
{
object[] results = this.Invoke("GetStatisticsByOrganization", new object[] {
itemId});
return ((OrganizationStatistics)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginGetStatisticsByOrganization(int itemId, System.AsyncCallback callback, object asyncState)
{
return this.BeginInvoke("GetStatisticsByOrganization", new object[] {
itemId}, callback, asyncState);
}
/// <remarks/>
public OrganizationStatistics EndGetStatisticsByOrganization(System.IAsyncResult asyncResult)
{
object[] results = this.EndInvoke(asyncResult);
return ((OrganizationStatistics)(results[0]));
}
/// <remarks/>
public void GetStatisticsByOrganizationAsync(int itemId)
{
this.GetStatisticsByOrganizationAsync(itemId, null);
}
/// <remarks/>
public void GetStatisticsByOrganizationAsync(int itemId, object userState)
{
if ((this.GetStatisticsByOrganizationOperationCompleted == null))
{
this.GetStatisticsByOrganizationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetStatisticsByOrganizationOperationCompleted);
}
this.InvokeAsync("GetStatisticsByOrganization", new object[] {
itemId}, this.GetStatisticsByOrganizationOperationCompleted, userState);
}
private void OnGetStatisticsByOrganizationOperationCompleted(object arg)
{
if ((this.GetStatisticsByOrganizationCompleted != null))
{
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.GetStatisticsByOrganizationCompleted(this, new GetStatisticsByOrganizationCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/> /// <remarks/>
public new void CancelAsync(object userState) public new void CancelAsync(object userState)
{ {
@ -1008,11 +1114,11 @@ namespace WebsitePanel.EnterpriseServer
} }
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
public delegate void CheckFileServicesInstallationCompletedEventHandler(object sender, CheckFileServicesInstallationCompletedEventArgs e); public delegate void CheckFileServicesInstallationCompletedEventHandler(object sender, CheckFileServicesInstallationCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class CheckFileServicesInstallationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs public partial class CheckFileServicesInstallationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
@ -1038,11 +1144,11 @@ namespace WebsitePanel.EnterpriseServer
} }
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
public delegate void GetEnterpriseFoldersCompletedEventHandler(object sender, GetEnterpriseFoldersCompletedEventArgs e); public delegate void GetEnterpriseFoldersCompletedEventHandler(object sender, GetEnterpriseFoldersCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetEnterpriseFoldersCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs public partial class GetEnterpriseFoldersCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
@ -1068,11 +1174,11 @@ namespace WebsitePanel.EnterpriseServer
} }
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
public delegate void GetEnterpriseFolderCompletedEventHandler(object sender, GetEnterpriseFolderCompletedEventArgs e); public delegate void GetEnterpriseFolderCompletedEventHandler(object sender, GetEnterpriseFolderCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetEnterpriseFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs public partial class GetEnterpriseFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
@ -1098,11 +1204,11 @@ namespace WebsitePanel.EnterpriseServer
} }
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
public delegate void CreateEnterpriseFolderCompletedEventHandler(object sender, CreateEnterpriseFolderCompletedEventArgs e); public delegate void CreateEnterpriseFolderCompletedEventHandler(object sender, CreateEnterpriseFolderCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class CreateEnterpriseFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs public partial class CreateEnterpriseFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
@ -1128,11 +1234,11 @@ namespace WebsitePanel.EnterpriseServer
} }
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
public delegate void DeleteEnterpriseFolderCompletedEventHandler(object sender, DeleteEnterpriseFolderCompletedEventArgs e); public delegate void DeleteEnterpriseFolderCompletedEventHandler(object sender, DeleteEnterpriseFolderCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class DeleteEnterpriseFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs public partial class DeleteEnterpriseFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
@ -1158,11 +1264,11 @@ namespace WebsitePanel.EnterpriseServer
} }
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
public delegate void GetEnterpriseFolderPermissionsCompletedEventHandler(object sender, GetEnterpriseFolderPermissionsCompletedEventArgs e); public delegate void GetEnterpriseFolderPermissionsCompletedEventHandler(object sender, GetEnterpriseFolderPermissionsCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetEnterpriseFolderPermissionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs public partial class GetEnterpriseFolderPermissionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
@ -1188,11 +1294,11 @@ namespace WebsitePanel.EnterpriseServer
} }
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
public delegate void SetEnterpriseFolderPermissionsCompletedEventHandler(object sender, SetEnterpriseFolderPermissionsCompletedEventArgs e); public delegate void SetEnterpriseFolderPermissionsCompletedEventHandler(object sender, SetEnterpriseFolderPermissionsCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class SetEnterpriseFolderPermissionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs public partial class SetEnterpriseFolderPermissionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
@ -1218,11 +1324,11 @@ namespace WebsitePanel.EnterpriseServer
} }
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
public delegate void SearchESAccountsCompletedEventHandler(object sender, SearchESAccountsCompletedEventArgs e); public delegate void SearchESAccountsCompletedEventHandler(object sender, SearchESAccountsCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class SearchESAccountsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs public partial class SearchESAccountsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
@ -1248,11 +1354,11 @@ namespace WebsitePanel.EnterpriseServer
} }
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
public delegate void GetEnterpriseFoldersPagedCompletedEventHandler(object sender, GetEnterpriseFoldersPagedCompletedEventArgs e); public delegate void GetEnterpriseFoldersPagedCompletedEventHandler(object sender, GetEnterpriseFoldersPagedCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetEnterpriseFoldersPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs public partial class GetEnterpriseFoldersPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
@ -1278,11 +1384,11 @@ namespace WebsitePanel.EnterpriseServer
} }
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
public delegate void RenameEnterpriseFolderCompletedEventHandler(object sender, RenameEnterpriseFolderCompletedEventArgs e); public delegate void RenameEnterpriseFolderCompletedEventHandler(object sender, RenameEnterpriseFolderCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class RenameEnterpriseFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs public partial class RenameEnterpriseFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
@ -1308,11 +1414,11 @@ namespace WebsitePanel.EnterpriseServer
} }
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
public delegate void CreateEnterpriseStorageCompletedEventHandler(object sender, CreateEnterpriseStorageCompletedEventArgs e); public delegate void CreateEnterpriseStorageCompletedEventHandler(object sender, CreateEnterpriseStorageCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class CreateEnterpriseStorageCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs public partial class CreateEnterpriseStorageCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
@ -1338,11 +1444,11 @@ namespace WebsitePanel.EnterpriseServer
} }
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
public delegate void CheckEnterpriseStorageInitializationCompletedEventHandler(object sender, CheckEnterpriseStorageInitializationCompletedEventArgs e); public delegate void CheckEnterpriseStorageInitializationCompletedEventHandler(object sender, CheckEnterpriseStorageInitializationCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class CheckEnterpriseStorageInitializationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs public partial class CheckEnterpriseStorageInitializationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
@ -1368,11 +1474,11 @@ namespace WebsitePanel.EnterpriseServer
} }
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
public delegate void CheckUsersDomainExistsCompletedEventHandler(object sender, CheckUsersDomainExistsCompletedEventArgs e); public delegate void CheckUsersDomainExistsCompletedEventHandler(object sender, CheckUsersDomainExistsCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class CheckUsersDomainExistsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs public partial class CheckUsersDomainExistsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
@ -1398,11 +1504,11 @@ namespace WebsitePanel.EnterpriseServer
} }
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
public delegate void GetDirectoryBrowseEnabledCompletedEventHandler(object sender, GetDirectoryBrowseEnabledCompletedEventArgs e); public delegate void GetDirectoryBrowseEnabledCompletedEventHandler(object sender, GetDirectoryBrowseEnabledCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetDirectoryBrowseEnabledCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs public partial class GetDirectoryBrowseEnabledCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
@ -1428,10 +1534,70 @@ namespace WebsitePanel.EnterpriseServer
} }
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
public delegate void SetDirectoryBrowseEnabledCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); public delegate void SetDirectoryBrowseEnabledCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
public delegate void SetEnterpriseFolderSettingsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); public delegate void SetEnterpriseFolderSettingsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
public delegate void GetStatisticsCompletedEventHandler(object sender, GetStatisticsCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetStatisticsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
{
private object[] results;
internal GetStatisticsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState)
{
this.results = results;
}
/// <remarks/>
public OrganizationStatistics Result
{
get
{
this.RaiseExceptionIfNecessary();
return ((OrganizationStatistics)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
public delegate void GetStatisticsByOrganizationCompletedEventHandler(object sender, GetStatisticsByOrganizationCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetStatisticsByOrganizationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
{
private object[] results;
internal GetStatisticsByOrganizationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState)
{
this.results = results;
}
/// <remarks/>
public OrganizationStatistics Result
{
get
{
this.RaiseExceptionIfNecessary();
return ((OrganizationStatistics)(this.results[0]));
}
}
}
} }

View file

@ -4155,5 +4155,48 @@ namespace WebsitePanel.EnterpriseServer
} }
#endregion #endregion
#region Enterprise Storage
public static int AddEntepriseFolder(int itemId, string folderName)
{
SqlParameter prmId = new SqlParameter("@FolderID", SqlDbType.Int);
prmId.Direction = ParameterDirection.Output;
SqlHelper.ExecuteNonQuery(
ConnectionString,
CommandType.StoredProcedure,
"AddEnterpriseFolder",
prmId,
new SqlParameter("@ItemID", itemId),
new SqlParameter("@FolderName", folderName));
// read identity
return Convert.ToInt32(prmId.Value);
}
public static void DeleteEnterpriseFolder(int itemId, string folderName)
{
SqlHelper.ExecuteNonQuery(
ConnectionString,
CommandType.StoredProcedure,
"DeleteEnterpriseFolder",
new SqlParameter("@ItemID", itemId),
new SqlParameter("@FolderName", folderName));
}
public static void UpdateEnterpriseFolder(int itemId, string folderID, string folderName, int folderQuota)
{
SqlHelper.ExecuteNonQuery(
ConnectionString,
CommandType.StoredProcedure,
"UpdateEnterpriseFolder",
new SqlParameter("@ItemID", itemId),
new SqlParameter("@FolderID", folderID),
new SqlParameter("@FolderName", folderName),
new SqlParameter("@FolderQuota", folderQuota));
}
#endregion
} }
} }

View file

@ -47,6 +47,7 @@ using WebsitePanel.Providers.Web;
using WebsitePanel.Providers.HostedSolution; using WebsitePanel.Providers.HostedSolution;
using WebsitePanel.EnterpriseServer.Base.HostedSolution; using WebsitePanel.EnterpriseServer.Base.HostedSolution;
using WebsitePanel.Server.Client; using WebsitePanel.Server.Client;
using System.Text.RegularExpressions;
namespace WebsitePanel.EnterpriseServer namespace WebsitePanel.EnterpriseServer
{ {
@ -140,6 +141,11 @@ namespace WebsitePanel.EnterpriseServer
return CheckUsersDomainExistsInternal(itemId); return CheckUsersDomainExistsInternal(itemId);
} }
public static void SetFRSMQuotaOnFolder(int itemId, string folderName, int quota, QuotaType quotaType)
{
SetFRSMQuotaOnFolderInternal(itemId, folderName, quota, quotaType);
}
#region Directory Browsing #region Directory Browsing
public static bool GetDirectoryBrowseEnabled(int itemId, string siteId) public static bool GetDirectoryBrowseEnabled(int itemId, string siteId)
@ -260,17 +266,6 @@ namespace WebsitePanel.EnterpriseServer
EnterpriseStorageController.CreateFolder(itemId); EnterpriseStorageController.CreateFolder(itemId);
EnterpriseStorageController.AddWebDavDirectory(packageId, usersDomain, org.OrganizationId, homePath); EnterpriseStorageController.AddWebDavDirectory(packageId, usersDomain, org.OrganizationId, homePath);
//int osId = PackageController.GetPackageServiceId(packageId, ResourceGroups.Os);
//bool enableHardQuota = (esSesstings["enablehardquota"] != null)
// ? bool.Parse(esSesstings["enablehardquota"])
// : false;
//if (enableHardQuota && osId != 0 && OperatingSystemController.CheckFileServicesInstallation(osId))
//{
// FilesController.SetFolderQuota(packageId, Path.Combine(usersHome, org.OrganizationId),
// locationDrive, Quotas.ENTERPRISESTORAGE_DISKSTORAGESPACE);
//}
} }
} }
catch (Exception ex) catch (Exception ex)
@ -350,7 +345,14 @@ namespace WebsitePanel.EnterpriseServer
return new SystemFile[0]; return new SystemFile[0];
} }
EnterpriseStorage es = GetEnterpriseStorage(GetEnterpriseStorageServiceID(org.PackageId)); int serviceId = GetEnterpriseStorageServiceID(org.PackageId);
if (serviceId == 0)
{
return new SystemFile[0];
}
EnterpriseStorage es = GetEnterpriseStorage(serviceId);
return es.GetFolders(org.OrganizationId); return es.GetFolders(org.OrganizationId);
} }
@ -394,7 +396,16 @@ namespace WebsitePanel.EnterpriseServer
EnterpriseStorage es = GetEnterpriseStorage(GetEnterpriseStorageServiceID(org.PackageId)); EnterpriseStorage es = GetEnterpriseStorage(GetEnterpriseStorageServiceID(org.PackageId));
return es.RenameFolder(org.OrganizationId, oldFolder, newFolder); if (es.GetFolder(org.OrganizationId, newFolder) == null)
{
SystemFile folder = es.RenameFolder(org.OrganizationId, oldFolder, newFolder);
DataProvider.UpdateEnterpriseFolder(itemId, oldFolder, newFolder, folder.FRSMQuotaGB);
return folder;
}
return null;
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -412,14 +423,25 @@ namespace WebsitePanel.EnterpriseServer
Organization org = OrganizationController.GetOrganization(itemId); Organization org = OrganizationController.GetOrganization(itemId);
if (org == null) if (org == null)
{ {
return null; result.IsSuccess = false;
result.AddError("",new NullReferenceException("Organization not found"));
return result;
} }
EnterpriseStorage es = GetEnterpriseStorage(GetEnterpriseStorageServiceID(org.PackageId)); EnterpriseStorage es = GetEnterpriseStorage(GetEnterpriseStorageServiceID(org.PackageId));
if (es.GetFolder(org.OrganizationId, folderName) == null)
{
es.CreateFolder(org.OrganizationId, folderName); es.CreateFolder(org.OrganizationId, folderName);
UpdateESHardQuota(org.PackageId); DataProvider.AddEntepriseFolder(itemId, folderName);
}
else
{
result.IsSuccess = false;
result.AddError("Enterprise Storage", new Exception("Folder already exist"));
return result;
}
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -440,6 +462,48 @@ namespace WebsitePanel.EnterpriseServer
return result; return result;
} }
protected static void SetFRSMQuotaOnFolderInternal(int itemId, string folderName, int quota, QuotaType quotaType)
{
ResultObject result = TaskManager.StartResultTask<ResultObject>("ENTERPRISE_STORAGE", "CREATE_FOLDER");
try
{
// load organization
Organization org = OrganizationController.GetOrganization(itemId);
if (org == null)
{
return;
}
EnterpriseStorage es = GetEnterpriseStorage(GetEnterpriseStorageServiceID(org.PackageId));
es.CreateFolder(org.OrganizationId, folderName);
// check if it's not root folder
if (!string.IsNullOrEmpty(folderName))
{
SetFolderQuota(org.PackageId, org.OrganizationId, folderName, quota, quotaType);
DataProvider.UpdateEnterpriseFolder(itemId, folderName, folderName, quota);
}
}
catch (Exception ex)
{
result.AddError("ENTERPRISE_STORAGE_CREATE_FOLDER", ex);
}
finally
{
if (!result.IsSuccess)
{
TaskManager.CompleteResultTask(result);
}
else
{
TaskManager.CompleteResultTask();
}
}
}
protected static ResultObject DeleteFolderInternal(int itemId, string folderName) protected static ResultObject DeleteFolderInternal(int itemId, string folderName)
{ {
ResultObject result = TaskManager.StartResultTask<ResultObject>("ENTERPRISE_STORAGE", "DELETE_FOLDER"); ResultObject result = TaskManager.StartResultTask<ResultObject>("ENTERPRISE_STORAGE", "DELETE_FOLDER");
@ -456,6 +520,8 @@ namespace WebsitePanel.EnterpriseServer
EnterpriseStorage es = GetEnterpriseStorage(GetEnterpriseStorageServiceID(org.PackageId)); EnterpriseStorage es = GetEnterpriseStorage(GetEnterpriseStorageServiceID(org.PackageId));
es.DeleteFolder(org.OrganizationId, folderName); es.DeleteFolder(org.OrganizationId, folderName);
DataProvider.DeleteEnterpriseFolder(itemId, folderName);
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -501,9 +567,9 @@ namespace WebsitePanel.EnterpriseServer
foreach (ExchangeAccount tmpAccount in tmpAccounts.ToArray()) foreach (ExchangeAccount tmpAccount in tmpAccounts.ToArray())
{ {
if (tmpAccount.AccountType == ExchangeAccountType.SecurityGroup || tmpAccount.AccountType == ExchangeAccountType.SecurityGroup if (tmpAccount.AccountType == ExchangeAccountType.SecurityGroup || tmpAccount.AccountType == ExchangeAccountType.DefaultSecurityGroup
? OrganizationController.GetSecurityGroupGeneralSettings(itemId, tmpAccount.AccountId) == null ? OrganizationController.GetSecurityGroupGeneralSettings(itemId, tmpAccount.AccountId) == null
: OrganizationController.GetSecurityGroupGeneralSettings(itemId, tmpAccount.AccountId) == null) : OrganizationController.GetUserGeneralSettings(itemId, tmpAccount.AccountId) == null)
continue; continue;
exAccounts.Add(tmpAccount); exAccounts.Add(tmpAccount);
@ -765,6 +831,7 @@ namespace WebsitePanel.EnterpriseServer
if (permission.Access.ToLower().Contains("read-only")) if (permission.Access.ToLower().Contains("read-only"))
{ {
rule.Read = true; rule.Read = true;
rule.Source = true;
} }
if (permission.Access.ToLower().Contains("read-write")) if (permission.Access.ToLower().Contains("read-write"))
@ -827,7 +894,6 @@ namespace WebsitePanel.EnterpriseServer
permission.Access = "Read-Write"; permission.Access = "Read-Write";
} }
permissions.Add(permission); permissions.Add(permission);
} }
@ -835,29 +901,61 @@ namespace WebsitePanel.EnterpriseServer
} }
private static void UpdateESHardQuota(int packageId) private static void SetFolderQuota(int packageId, string orgId, string folderName, int quotaSize, QuotaType quotaType)
{ {
int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive);
if (accountCheck < 0)
return;
int packageCheck = SecurityContext.CheckPackage(packageId, DemandPackage.IsActive);
if (packageCheck < 0)
return;
int esServiceId = PackageController.GetPackageServiceId(packageId, ResourceGroups.EnterpriseStorage); int esServiceId = PackageController.GetPackageServiceId(packageId, ResourceGroups.EnterpriseStorage);
if (esServiceId != 0) if (esServiceId != 0)
{ {
StringDictionary esSesstings = ServerController.GetServiceSettings(esServiceId); StringDictionary esSesstings = ServerController.GetServiceSettings(esServiceId);
string usersHome = esSesstings["UsersHome"]; string usersHome = esSesstings["UsersHome"];
string usersDomain = esSesstings["UsersDomain"]; string usersDomain = esSesstings["UsersDomain"];
string locationDrive = esSesstings["LocationDrive"]; string locationDrive = esSesstings["LocationDrive"];
string homePath = string.Format("{0}:\\{1}", locationDrive, usersHome); var orgFolder = Path.Combine(usersHome, orgId, folderName);
int osId = PackageController.GetPackageServiceId(packageId, ResourceGroups.Os); var os = GetOS(packageId);
bool enableHardQuota = (esSesstings["enablehardquota"] != null)
? bool.Parse(esSesstings["enablehardquota"])
: false;
if (enableHardQuota && osId != 0 && OperatingSystemController.CheckFileServicesInstallation(osId)) if (os != null && os.CheckFileServicesInstallation())
{ {
FilesController.SetFolderQuota(packageId, usersHome, locationDrive, Quotas.ENTERPRISESTORAGE_DISKSTORAGESPACE); TaskManager.StartTask("FILES", "SET_QUOTA_ON_FOLDER", orgFolder, packageId);
try
{
QuotaValueInfo diskSpaceQuota = PackageController.GetPackageQuota(packageId, Quotas.ENTERPRISESTORAGE_DISKSTORAGESPACE);
#region figure Quota Unit
// Quota Unit
string unit = string.Empty;
if (diskSpaceQuota.QuotaDescription.ToLower().Contains("gb"))
unit = "GB";
else if (diskSpaceQuota.QuotaDescription.ToLower().Contains("mb"))
unit = "MB";
else
unit = "KB";
#endregion
os.SetQuotaLimitOnFolder(orgFolder, locationDrive, quotaType, quotaSize.ToString() + unit, 0, String.Empty, String.Empty);
}
catch (Exception ex)
{
TaskManager.WriteError(ex);
}
finally
{
TaskManager.CompleteTask();
}
} }
} }
} }
@ -906,5 +1004,121 @@ namespace WebsitePanel.EnterpriseServer
return null; return null;
} }
private static WebsitePanel.Providers.OS.OperatingSystem GetOS(int packageId)
{
var esServiceInfo = ServerController.GetServiceInfo(GetEnterpriseStorageServiceID(packageId));
var esProviderInfo = ServerController.GetProvider(esServiceInfo.ProviderId);
var osGroups = ServerController.GetResourceGroupByName(ResourceGroups.Os);
var osProviders = ServerController.GetProvidersByGroupID(osGroups.GroupId);
var regexResult = Regex.Match(esProviderInfo.ProviderType, "Windows([0-9]+)");
if(regexResult.Success)
{
foreach(var osProvider in osProviders)
{
BoolResult result = ServerController.IsInstalled(esServiceInfo.ServerId, osProvider.ProviderId);
if (result.IsSuccess && result.Value)
{
var os = new WebsitePanel.Providers.OS.OperatingSystem();
ServerProxyConfigurator cnfg = new ServerProxyConfigurator();
cnfg.ProviderSettings.ProviderGroupID = osProvider.GroupId;
cnfg.ProviderSettings.ProviderCode = osProvider.ProviderName;
cnfg.ProviderSettings.ProviderName = osProvider.DisplayName;
cnfg.ProviderSettings.ProviderType = osProvider.ProviderType;
ServiceProviderProxy.ServerInit(os, cnfg, esServiceInfo.ServerId);
return os;
}
}
}
return null;
}
#region Statistics
public static OrganizationStatistics GetStatistics(int itemId)
{
return GetStatisticsInternal(itemId, false);
}
public static OrganizationStatistics GetStatisticsByOrganization(int itemId)
{
return GetStatisticsInternal(itemId, true);
}
private static OrganizationStatistics GetStatisticsInternal(int itemId, bool byOrganization)
{
// place log record
TaskManager.StartTask("ENTERPRISE_STORAGE", "GET_ORG_STATS", itemId);
try
{
Organization org = (Organization)PackageController.GetPackageItem(itemId);
if (org == null)
return null;
OrganizationStatistics stats = new OrganizationStatistics();
if (byOrganization)
{
SystemFile[] folders = GetFolders(itemId);
stats.CreatedEnterpriseStorageFolders = folders.Count();
stats.UsedEnterpriseStorageSpace = folders.Where(x => x.FRSMQuotaMB != -1).Sum(x => x.FRSMQuotaMB);
}
else
{
UserInfo user = ObjectUtils.FillObjectFromDataReader<UserInfo>(DataProvider.GetUserByExchangeOrganizationIdInternally(org.Id));
List<PackageInfo> Packages = PackageController.GetPackages(user.UserId);
if ((Packages != null) & (Packages.Count > 0))
{
foreach (PackageInfo Package in Packages)
{
List<Organization> orgs = null;
orgs = ExchangeServerController.GetExchangeOrganizations(Package.PackageId, false);
if ((orgs != null) & (orgs.Count > 0))
{
foreach (Organization o in orgs)
{
SystemFile[] folders = GetFolders(o.Id);
stats.CreatedEnterpriseStorageFolders += folders.Count();
stats.UsedEnterpriseStorageSpace += folders.Where(x => x.FRSMQuotaMB != -1).Sum(x => x.FRSMQuotaMB);
}
}
}
}
}
// allocated quotas
PackageContext cntx = PackageController.GetPackageContext(org.PackageId);
stats.AllocatedEnterpriseStorageSpace = cntx.Quotas[Quotas.ENTERPRISESTORAGE_DISKSTORAGESPACE].QuotaAllocatedValue;
stats.AllocatedEnterpriseStorageFolders = cntx.Quotas[Quotas.ENTERPRISESTORAGE_FOLDERS].QuotaAllocatedValue;
return stats;
}
catch (Exception ex)
{
throw TaskManager.WriteError(ex);
}
finally
{
TaskManager.CompleteTask();
}
}
#endregion
} }
} }

View file

@ -910,7 +910,7 @@ namespace WebsitePanel.EnterpriseServer
return users.ToArray(); return users.ToArray();
} }
public static int SetFolderQuota(int packageId, string path, string driveName,string quotas) public static int SetFolderQuota(int packageId, string path, string driveName, string quotas)
{ {
// check account // check account
@ -948,7 +948,7 @@ namespace WebsitePanel.EnterpriseServer
OS.OperatingSystem os = GetOS(packageId); OS.OperatingSystem os = GetOS(packageId);
os.SetQuotaLimitOnFolder(path, driveName, diskSpaceQuota.QuotaAllocatedValue.ToString() + unit, 0, String.Empty, String.Empty); os.SetQuotaLimitOnFolder(path, driveName, QuotaType.Hard, diskSpaceQuota.QuotaAllocatedValue.ToString() + unit, 0, String.Empty, String.Empty);
return 0; return 0;
} }

View file

@ -229,6 +229,34 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
} }
} }
if (lync.GetOrganizationTenantId(org.OrganizationId) == string.Empty)
{
PackageContext cntx = PackageController.GetPackageContext(org.PackageId);
org.LyncTenantId = lync.CreateOrganization(org.OrganizationId,
org.DefaultDomain,
Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_CONFERENCING].QuotaAllocatedValue),
Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_ALLOWVIDEO].QuotaAllocatedValue),
Convert.ToInt32(cntx.Quotas[Quotas.LYNC_MAXPARTICIPANTS].QuotaAllocatedValue),
Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_FEDERATION].QuotaAllocatedValue),
Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_ENTERPRISEVOICE].QuotaAllocatedValue));
if (string.IsNullOrEmpty(org.LyncTenantId))
{
TaskManager.CompleteResultTask(res, LyncErrorCodes.CANNOT_ENABLE_ORG);
return res;
}
else
{
PackageController.UpdatePackageItem(org);
bReloadConfiguration = true;
}
}
LyncUserPlan plan = GetLyncUserPlan(itemId, lyncUserPlanId); LyncUserPlan plan = GetLyncUserPlan(itemId, lyncUserPlanId);
if (!lync.CreateUser(org.OrganizationId, user.UserPrincipalName, plan)) if (!lync.CreateUser(org.OrganizationId, user.UserPrincipalName, plan))

View file

@ -968,7 +968,8 @@ namespace WebsitePanel.EnterpriseServer
SystemFile[] folders = EnterpriseStorageController.GetFolders(itemId); SystemFile[] folders = EnterpriseStorageController.GetFolders(itemId);
stats.CreatedEnterpriseStorageFolders = folders.Count(); stats.CreatedEnterpriseStorageFolders = folders.Count();
stats.UsedEnterpriseStorageSpace = (int)folders.Sum(x => x.Size);
stats.UsedEnterpriseStorageSpace = folders.Where(x => x.FRSMQuotaMB != -1).Sum(x => x.FRSMQuotaMB);
} }
} }
else else
@ -1037,10 +1038,11 @@ namespace WebsitePanel.EnterpriseServer
if (cntxTmp.Groups.ContainsKey(ResourceGroups.EnterpriseStorage)) if (cntxTmp.Groups.ContainsKey(ResourceGroups.EnterpriseStorage))
{ {
SystemFile[] folders = EnterpriseStorageController.GetFolders(itemId); SystemFile[] folders = EnterpriseStorageController.GetFolders(o.Id);
stats.CreatedEnterpriseStorageFolders = folders.Count(); stats.CreatedEnterpriseStorageFolders += folders.Count();
stats.UsedEnterpriseStorageSpace = (int)folders.Sum(x => x.Size);
stats.UsedEnterpriseStorageSpace += folders.Where(x => x.FRSMQuotaMB != -1).Sum(x => x.FRSMQuotaMB);
} }
} }
} }
@ -1091,11 +1093,6 @@ namespace WebsitePanel.EnterpriseServer
if (cntx.Groups.ContainsKey(ResourceGroups.EnterpriseStorage)) if (cntx.Groups.ContainsKey(ResourceGroups.EnterpriseStorage))
{ {
stats.AllocatedEnterpriseStorageFolders = cntx.Quotas[Quotas.ENTERPRISESTORAGE_FOLDERS].QuotaAllocatedValue; stats.AllocatedEnterpriseStorageFolders = cntx.Quotas[Quotas.ENTERPRISESTORAGE_FOLDERS].QuotaAllocatedValue;
}
if (cntx.Groups.ContainsKey(ResourceGroups.EnterpriseStorage))
{
stats.AllocatedEnterpriseStorageSpace = cntx.Quotas[Quotas.ENTERPRISESTORAGE_DISKSTORAGESPACE].QuotaAllocatedValue; stats.AllocatedEnterpriseStorageSpace = cntx.Quotas[Quotas.ENTERPRISESTORAGE_DISKSTORAGESPACE].QuotaAllocatedValue;
} }

View file

@ -150,10 +150,27 @@ namespace WebsitePanel.EnterpriseServer
} }
[WebMethod] [WebMethod]
public void SetEnterpriseFolderSettings(int itemId, SystemFile folder, ESPermission[] permissions, bool directoyBrowsingEnabled) public void SetEnterpriseFolderSettings(int itemId, SystemFile folder, ESPermission[] permissions, bool directoyBrowsingEnabled, int quota, QuotaType quotaType)
{ {
EnterpriseStorageController.SetDirectoryBrowseEnabled(itemId, folder.Url, directoyBrowsingEnabled); EnterpriseStorageController.SetDirectoryBrowseEnabled(itemId, folder.Url, directoyBrowsingEnabled);
EnterpriseStorageController.SetFolderPermission(itemId, folder.Name, permissions); EnterpriseStorageController.SetFolderPermission(itemId, folder.Name, permissions);
EnterpriseStorageController.SetFRSMQuotaOnFolder(itemId, folder.Name, quota, quotaType);
}
#endregion
#region Statistics
[WebMethod]
public OrganizationStatistics GetStatistics(int itemId)
{
return EnterpriseStorageController.GetStatistics(itemId);
}
[WebMethod]
public OrganizationStatistics GetStatisticsByOrganization(int itemId)
{
return EnterpriseStorageController.GetStatisticsByOrganization(itemId);
} }
#endregion #endregion

View file

@ -35,6 +35,7 @@ namespace WebsitePanel.Providers.HostedSolution
public interface ILyncServer public interface ILyncServer
{ {
string CreateOrganization(string organizationId, string sipDomain, bool enableConferencing, bool enableConferencingVideo, int maxConferenceSize, bool enabledFederation, bool enabledEnterpriseVoice); string CreateOrganization(string organizationId, string sipDomain, bool enableConferencing, bool enableConferencingVideo, int maxConferenceSize, bool enabledFederation, bool enabledEnterpriseVoice);
string GetOrganizationTenantId(string organizationId);
bool DeleteOrganization(string organizationId, string sipDomain); bool DeleteOrganization(string organizationId, string sipDomain);
bool CreateUser(string organizationId, string userUpn, LyncUserPlan plan); bool CreateUser(string organizationId, string userUpn, LyncUserPlan plan);

View file

@ -0,0 +1,41 @@
// Copyright (c) 2012, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace WebsitePanel.Providers.OS
{
public enum FSRMQuotaType
{
Soft = 1,
Hard = 2
}
}

View file

@ -82,7 +82,8 @@ namespace WebsitePanel.Providers.OS
FolderGraph GetFolderGraph(string path); FolderGraph GetFolderGraph(string path);
void ExecuteSyncActions(FileSyncAction[] actions); void ExecuteSyncActions(FileSyncAction[] actions);
void SetQuotaLimitOnFolder(string folderPath, string shareNameDrive, string quotaLimit, int mode, string wmiUserName, string wmiPassword); void SetQuotaLimitOnFolder(string folderPath, string shareNameDrive, QuotaType quotaType, string quotaLimit, int mode, string wmiUserName, string wmiPassword);
Quota GetQuotaOnFolder(string folderPath, string wmiUserName, string wmiPassword);
void DeleteDirectoryRecursive(string rootPath); void DeleteDirectoryRecursive(string rootPath);
// File Services // File Services

View file

@ -0,0 +1,51 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace WebsitePanel.Providers.OS
{
public class Quota
{
#region Fields
private int _Size;
private QuotaType _QuotaType;
private int _Usage;
#endregion
#region Properties
public int Size
{
get { return _Size; }
set { _Size = value; }
}
public QuotaType QuotaType
{
get { return _QuotaType; }
set { _QuotaType = value; }
}
public int Usage
{
get { return _Usage; }
set { _Usage = value; }
}
#endregion
#region Constructors
public Quota()
{
_Size = -1;
_QuotaType = QuotaType.Soft;
_Usage = -1;
}
#endregion
}
}

View file

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace WebsitePanel.Providers.OS
{
public enum QuotaType
{
Soft = 1,
Hard = 2
}
}

View file

@ -46,6 +46,9 @@ namespace WebsitePanel.Providers.OS
private bool isPublished; private bool isPublished;
private WebDavFolderRule[] rules; private WebDavFolderRule[] rules;
private string url; private string url;
private int fsrmQuotaMB;
private int frsmQuotaGB;
private QuotaType fsrmQuotaType = QuotaType.Soft;
public SystemFile() public SystemFile()
{ {
@ -62,6 +65,24 @@ namespace WebsitePanel.Providers.OS
this.changed = changed; this.changed = changed;
} }
public int FRSMQuotaMB
{
get { return fsrmQuotaMB; }
set { fsrmQuotaMB = value; }
}
public int FRSMQuotaGB
{
get { return frsmQuotaGB; }
set { frsmQuotaGB = value; }
}
public QuotaType FsrmQuotaType
{
get { return fsrmQuotaType; }
set { fsrmQuotaType = value; }
}
public string FullName public string FullName
{ {
get { return fullName; } get { return fullName; }

View file

@ -113,6 +113,8 @@
<Compile Include="HostedSolution\LyncVoicePolicyType.cs" /> <Compile Include="HostedSolution\LyncVoicePolicyType.cs" />
<Compile Include="HostedSolution\OrganizationSecurityGroup.cs" /> <Compile Include="HostedSolution\OrganizationSecurityGroup.cs" />
<Compile Include="HostedSolution\TransactionAction.cs" /> <Compile Include="HostedSolution\TransactionAction.cs" />
<Compile Include="OS\Quota.cs" />
<Compile Include="OS\QuotaType.cs" />
<Compile Include="OS\SystemFilesPaged.cs" /> <Compile Include="OS\SystemFilesPaged.cs" />
<Compile Include="RemoteDesktopServices\IRemoteDesktopServices.cs" /> <Compile Include="RemoteDesktopServices\IRemoteDesktopServices.cs" />
<Compile Include="ResultObjects\HeliconApe.cs" /> <Compile Include="ResultObjects\HeliconApe.cs" />

View file

@ -39,17 +39,18 @@ namespace WebsitePanel.Providers.DNS
/// <remarks>It's also possible to access native CIM object, and use Mgmtclassgen.exe for that.</remarks> /// <remarks>It's also possible to access native CIM object, and use Mgmtclassgen.exe for that.</remarks>
internal static class RecordConverter internal static class RecordConverter
{ {
private static string RemoveTrailingDot( string str ) internal static string RemoveTrailingDot( string str )
{ {
if( !str.EndsWith( "." ) ) if( !str.EndsWith( "." ) )
return str; return str;
return str.Substring( 0, str.Length - 1 ); return str.Substring( 0, str.Length - 1 );
} }
private static string CorrectHost( string zoneName, string host ) internal static string CorrectHost( string zoneName, string host )
{ {
if( host.ToLower() == zoneName.ToLower() ) if( "@" == host || host.ToLower() == zoneName.ToLower() )
return ""; return String.Empty;
if( host.ToLower().EndsWith( "." + zoneName.ToLower() ) ) if( host.ToLower().EndsWith( "." + zoneName.ToLower() ) )
return host.Substring( 0, ( host.Length - zoneName.Length - 1 ) ); return host.Substring( 0, ( host.Length - zoneName.Length - 1 ) );
return host; return host;

View file

@ -39,6 +39,14 @@
<Project>{684C932A-6C75-46AC-A327-F3689D89EB42}</Project> <Project>{684C932A-6C75-46AC-A327-F3689D89EB42}</Project>
<Name>WebsitePanel.Providers.Base</Name> <Name>WebsitePanel.Providers.Base</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\WebsitePanel.Providers.OS.Windows2003\WebsitePanel.Providers.OS.Windows2003.csproj">
<Project>{899b3048-46be-4c4d-9d41-0043c8b0d11e}</Project>
<Name>WebsitePanel.Providers.OS.Windows2003</Name>
</ProjectReference>
<ProjectReference Include="..\WebsitePanel.Providers.OS.Windows2012\WebsitePanel.Providers.OS.Windows2012.csproj">
<Project>{27130bbb-76fa-411e-8b4d-51cd4dc821af}</Project>
<Name>WebsitePanel.Providers.OS.Windows2012</Name>
</ProjectReference>
<ProjectReference Include="..\WebsitePanel.Providers.Web.IIs60\WebsitePanel.Providers.Web.IIs60.csproj"> <ProjectReference Include="..\WebsitePanel.Providers.Web.IIs60\WebsitePanel.Providers.Web.IIs60.csproj">
<Project>{9be0317d-e42e-4ff6-9a87-8c801f046ea1}</Project> <Project>{9be0317d-e42e-4ff6-9a87-8c801f046ea1}</Project>
<Name>WebsitePanel.Providers.Web.IIs60</Name> <Name>WebsitePanel.Providers.Web.IIs60</Name>

View file

@ -67,30 +67,41 @@ namespace WebsitePanel.Providers.EnterpriseStorage
ArrayList items = new ArrayList(); ArrayList items = new ArrayList();
string rootPath = string.Format("{0}:\\{1}\\{2}", LocationDrive, UsersHome, organizationId); string rootPath = string.Format("{0}:\\{1}\\{2}", LocationDrive, UsersHome, organizationId);
var windows = new WebsitePanel.Providers.OS.Windows2012();
if (Directory.Exists(rootPath)) if (Directory.Exists(rootPath))
{ {
DirectoryInfo root = new DirectoryInfo(rootPath); DirectoryInfo root = new DirectoryInfo(rootPath);
IWebDav webdav = new Web.WebDav(UsersDomain); IWebDav webdav = new Web.WebDav(UsersDomain);
// get directories // get directories
DirectoryInfo[] dirs = root.GetDirectories(); DirectoryInfo[] dirs = root.GetDirectories();
foreach (DirectoryInfo dir in dirs) foreach (DirectoryInfo dir in dirs)
{ {
string fullName = System.IO.Path.Combine(rootPath, dir.Name); string fullName = System.IO.Path.Combine(rootPath, dir.Name);
SystemFile folder = new SystemFile(dir.Name, fullName, true, SystemFile folder = new SystemFile();
FileUtils.BytesToMb(FileUtils.CalculateFolderSize(dir.FullName)), dir.CreationTime, dir.LastWriteTime);
folder.Name = dir.Name;
folder.FullName = dir.FullName;
folder.IsDirectory = true;
Quota quota = windows.GetQuotaOnFolder(fullName, string.Empty, string.Empty);
folder.Size = quota.Usage;
if (folder.Size == -1)
{
folder.Size = FileUtils.BytesToMb(FileUtils.CalculateFolderSize(dir.FullName));
}
folder.Url = string.Format("https://{0}/{1}/{2}", UsersDomain, organizationId, dir.Name); folder.Url = string.Format("https://{0}/{1}/{2}", UsersDomain, organizationId, dir.Name);
folder.Rules = webdav.GetFolderWebDavRules(organizationId, dir.Name); folder.Rules = webdav.GetFolderWebDavRules(organizationId, dir.Name);
folder.FRSMQuotaMB = quota.Size;
folder.FRSMQuotaGB = windows.ConvertMegaBytesToGB(folder.FRSMQuotaMB);
folder.FsrmQuotaType = quota.QuotaType;
items.Add(folder); items.Add(folder);
// check if the directory is empty
folder.IsEmpty = (Directory.GetFileSystemEntries(fullName).Length == 0);
} }
} }
@ -102,16 +113,34 @@ namespace WebsitePanel.Providers.EnterpriseStorage
string fullName = string.Format("{0}:\\{1}\\{2}\\{3}", LocationDrive, UsersHome, organizationId, folderName); string fullName = string.Format("{0}:\\{1}\\{2}\\{3}", LocationDrive, UsersHome, organizationId, folderName);
SystemFile folder = null; SystemFile folder = null;
var windows = new WebsitePanel.Providers.OS.Windows2012();
if (Directory.Exists(fullName)) if (Directory.Exists(fullName))
{ {
DirectoryInfo root = new DirectoryInfo(fullName); DirectoryInfo root = new DirectoryInfo(fullName);
folder = new SystemFile(root.Name, fullName, true, folder = new SystemFile();
FileUtils.BytesToMb(FileUtils.CalculateFolderSize(root.FullName)), root.CreationTime, root.LastWriteTime);
folder.Name = root.Name;
folder.FullName = root.FullName;
folder.IsDirectory = true;
Quota quota = windows.GetQuotaOnFolder(fullName, string.Empty, string.Empty);
folder.Size = quota.Usage;
if (folder.Size == -1)
{
folder.Size = FileUtils.BytesToMb(FileUtils.CalculateFolderSize(root.FullName));
}
folder.Url = string.Format("https://{0}/{1}/{2}", UsersDomain, organizationId, folderName); folder.Url = string.Format("https://{0}/{1}/{2}", UsersDomain, organizationId, folderName);
folder.Rules = GetFolderWebDavRules(organizationId, folderName); folder.Rules = GetFolderWebDavRules(organizationId, folderName);
folder.FRSMQuotaMB = quota.Size;
folder.FRSMQuotaGB = windows.ConvertMegaBytesToGB(folder.FRSMQuotaMB);
folder.FsrmQuotaType = quota.QuotaType;
} }
return folder; return folder;
} }
@ -170,6 +199,37 @@ namespace WebsitePanel.Providers.EnterpriseStorage
public bool SetFolderWebDavRules(string organizationId, string folder, WebDavFolderRule[] rules) public bool SetFolderWebDavRules(string organizationId, string folder, WebDavFolderRule[] rules)
{ {
var users = new List<UserPermission>();
foreach (var rule in rules)
{
foreach (var user in rule.Users)
{
users.Add(new UserPermission
{
AccountName = user,
Read = rule.Read,
Write = rule.Write
});
}
foreach (var user in rule.Roles)
{
users.Add(new UserPermission
{
AccountName = user,
Read = rule.Read,
Write = rule.Write
});
}
}
string path = string.Format("{0}:\\{1}\\{2}\\{3}", LocationDrive, UsersHome, organizationId, folder);
SecurityUtils.ResetNtfsPermissions(path);
SecurityUtils.GrantGroupNtfsPermissions(path, users.ToArray(), false, new RemoteServerSettings(), null, null);
IWebDav webdav = new WebDav(UsersDomain); IWebDav webdav = new WebDav(UsersDomain);
return webdav.SetFolderWebDavRules(organizationId, folder, rules); return webdav.SetFolderWebDavRules(organizationId, folder, rules);

View file

@ -483,7 +483,7 @@ namespace WebsitePanel.Providers.HostedSolution
cmd = new Command("Disable-Mailbox"); cmd = new Command("Disable-Mailbox");
cmd.Parameters.Add("Identity", id); cmd.Parameters.Add("Identity", id);
cmd.Parameters.Add("Confirm", false); cmd.Parameters.Add("Confirm", new SwitchParameter(false));
ExecuteShellCommand(runSpace, cmd); ExecuteShellCommand(runSpace, cmd);
@ -1711,7 +1711,7 @@ namespace WebsitePanel.Providers.HostedSolution
cmd.Parameters.Add("Identity", accountName); cmd.Parameters.Add("Identity", accountName);
cmd.Parameters.Add("User", account); cmd.Parameters.Add("User", account);
cmd.Parameters.Add("AccessRights", accessRights); cmd.Parameters.Add("AccessRights", accessRights);
cmd.Parameters.Add("Confirm", false); cmd.Parameters.Add("Confirm", new SwitchParameter(false));
ExecuteShellCommand(runSpace, cmd); ExecuteShellCommand(runSpace, cmd);
ExchangeLog.LogEnd("RemoveMailboxFullAccessPermission"); ExchangeLog.LogEnd("RemoveMailboxFullAccessPermission");
@ -1786,7 +1786,7 @@ namespace WebsitePanel.Providers.HostedSolution
cmd.Parameters.Add("ChildObjectTypes", null); cmd.Parameters.Add("ChildObjectTypes", null);
cmd.Parameters.Add("InheritedObjectType", null); cmd.Parameters.Add("InheritedObjectType", null);
cmd.Parameters.Add("Properties", properties); cmd.Parameters.Add("Properties", properties);
cmd.Parameters.Add("Confirm", false); cmd.Parameters.Add("Confirm", new SwitchParameter(false));
ExecuteShellCommand(runSpace, cmd); ExecuteShellCommand(runSpace, cmd);
ExchangeLog.LogEnd("RemoveADPermission"); ExchangeLog.LogEnd("RemoveADPermission");
@ -1802,7 +1802,7 @@ namespace WebsitePanel.Providers.HostedSolution
cmd.Parameters.Add("AccessRights", accessRights); cmd.Parameters.Add("AccessRights", accessRights);
cmd.Parameters.Add("ExtendedRights", extendedRights); cmd.Parameters.Add("ExtendedRights", extendedRights);
cmd.Parameters.Add("Properties", properties); cmd.Parameters.Add("Properties", properties);
//cmd.Parameters.Add("Confirm", false); //cmd.Parameters.Add("Confirm", new SwitchParameter(false));
ExecuteShellCommand(runSpace, cmd); ExecuteShellCommand(runSpace, cmd);
ExchangeLog.LogEnd("AddADPermission"); ExchangeLog.LogEnd("AddADPermission");
@ -2223,7 +2223,7 @@ namespace WebsitePanel.Providers.HostedSolution
Command cmd = new Command("Remove-Mailbox"); Command cmd = new Command("Remove-Mailbox");
cmd.Parameters.Add("Identity", id); cmd.Parameters.Add("Identity", id);
cmd.Parameters.Add("Permanent", false); cmd.Parameters.Add("Permanent", false);
cmd.Parameters.Add("Confirm", false); cmd.Parameters.Add("Confirm", new SwitchParameter(false));
if (isPublicFolder) cmd.Parameters.Add("PublicFolder"); if (isPublicFolder) cmd.Parameters.Add("PublicFolder");
ExecuteShellCommand(runSpace, cmd); ExecuteShellCommand(runSpace, cmd);
ExchangeLog.LogEnd("RemoveMailbox"); ExchangeLog.LogEnd("RemoveMailbox");
@ -2234,7 +2234,7 @@ namespace WebsitePanel.Providers.HostedSolution
ExchangeLog.LogStart("DisableMailbox"); ExchangeLog.LogStart("DisableMailbox");
Command cmd = new Command("Disable-Mailbox"); Command cmd = new Command("Disable-Mailbox");
cmd.Parameters.Add("Identity", id); cmd.Parameters.Add("Identity", id);
cmd.Parameters.Add("Confirm", false); cmd.Parameters.Add("Confirm", new SwitchParameter(false));
ExecuteShellCommand(runSpace, cmd); ExecuteShellCommand(runSpace, cmd);
ExchangeLog.LogEnd("DisableMailbox"); ExchangeLog.LogEnd("DisableMailbox");
} }
@ -3202,7 +3202,7 @@ namespace WebsitePanel.Providers.HostedSolution
ExchangeLog.LogStart("RemoveContact"); ExchangeLog.LogStart("RemoveContact");
Command cmd = new Command("Remove-MailContact"); Command cmd = new Command("Remove-MailContact");
cmd.Parameters.Add("Identity", id); cmd.Parameters.Add("Identity", id);
cmd.Parameters.Add("Confirm", false); cmd.Parameters.Add("Confirm", new SwitchParameter(false));
ExecuteShellCommand(runSpace, cmd); ExecuteShellCommand(runSpace, cmd);
ExchangeLog.LogEnd("RemoveContact"); ExchangeLog.LogEnd("RemoveContact");
} }
@ -3509,7 +3509,7 @@ namespace WebsitePanel.Providers.HostedSolution
ExchangeLog.DebugInfo("Group Id: {0}", id); ExchangeLog.DebugInfo("Group Id: {0}", id);
Command cmd = new Command("Disable-DistributionGroup"); Command cmd = new Command("Disable-DistributionGroup");
cmd.Parameters.Add("Identity", id); cmd.Parameters.Add("Identity", id);
cmd.Parameters.Add("Confirm", false); cmd.Parameters.Add("Confirm", new SwitchParameter(false));
ExecuteShellCommand(runSpace, cmd); ExecuteShellCommand(runSpace, cmd);
ExchangeLog.LogEnd("DisableMailSecurityDistributionGroup"); ExchangeLog.LogEnd("DisableMailSecurityDistributionGroup");
} }
@ -3652,7 +3652,7 @@ namespace WebsitePanel.Providers.HostedSolution
ExchangeLog.LogStart("RemoveDistributionGroup"); ExchangeLog.LogStart("RemoveDistributionGroup");
Command cmd = new Command("Remove-DistributionGroup"); Command cmd = new Command("Remove-DistributionGroup");
cmd.Parameters.Add("Identity", id); cmd.Parameters.Add("Identity", id);
cmd.Parameters.Add("Confirm", false); cmd.Parameters.Add("Confirm", new SwitchParameter(false));
cmd.Parameters.Add("BypassSecurityGroupManagerCheck"); cmd.Parameters.Add("BypassSecurityGroupManagerCheck");
ExecuteShellCommand(runSpace, cmd); ExecuteShellCommand(runSpace, cmd);
ExchangeLog.LogEnd("RemoveDistributionGroup"); ExchangeLog.LogEnd("RemoveDistributionGroup");
@ -3803,7 +3803,7 @@ namespace WebsitePanel.Providers.HostedSolution
Command cmd = new Command("Remove-DistributionGroupMember"); Command cmd = new Command("Remove-DistributionGroupMember");
cmd.Parameters.Add("Identity", group); cmd.Parameters.Add("Identity", group);
cmd.Parameters.Add("Member", member); cmd.Parameters.Add("Member", member);
cmd.Parameters.Add("Confirm", false); cmd.Parameters.Add("Confirm", new SwitchParameter(false));
cmd.Parameters.Add("BypassSecurityGroupManagerCheck"); cmd.Parameters.Add("BypassSecurityGroupManagerCheck");
ExecuteShellCommand(runSpace, cmd); ExecuteShellCommand(runSpace, cmd);
} }
@ -3901,7 +3901,7 @@ namespace WebsitePanel.Providers.HostedSolution
cmd = new Command("Remove-DistributionGroupMember"); cmd = new Command("Remove-DistributionGroupMember");
cmd.Parameters.Add("Identity", accountName); cmd.Parameters.Add("Identity", accountName);
cmd.Parameters.Add("Member", member); cmd.Parameters.Add("Member", member);
cmd.Parameters.Add("Confirm", false); cmd.Parameters.Add("Confirm", new SwitchParameter(false));
ExecuteShellCommand(runSpace, cmd); ExecuteShellCommand(runSpace, cmd);
} }
@ -4504,7 +4504,7 @@ namespace WebsitePanel.Providers.HostedSolution
Command cmd = new Command("Remove-PublicFolder"); Command cmd = new Command("Remove-PublicFolder");
cmd.Parameters.Add("Identity", id); cmd.Parameters.Add("Identity", id);
cmd.Parameters.Add("Recurse", new SwitchParameter(true)); cmd.Parameters.Add("Recurse", new SwitchParameter(true));
cmd.Parameters.Add("Confirm", false); cmd.Parameters.Add("Confirm", new SwitchParameter(false));
ExecuteShellCommand(runSpace, cmd); ExecuteShellCommand(runSpace, cmd);
ExchangeLog.LogEnd("RemovePublicFolder"); ExchangeLog.LogEnd("RemovePublicFolder");
@ -4526,7 +4526,7 @@ namespace WebsitePanel.Providers.HostedSolution
Command cmd = new Command("Remove-PublicFolderClientPermission"); Command cmd = new Command("Remove-PublicFolderClientPermission");
cmd.Parameters.Add("Identity", id); cmd.Parameters.Add("Identity", id);
cmd.Parameters.Add("User", user); cmd.Parameters.Add("User", user);
cmd.Parameters.Add("Confirm", false); cmd.Parameters.Add("Confirm", new SwitchParameter(false));
ExecuteShellCommand(runSpace, cmd); ExecuteShellCommand(runSpace, cmd);
ExchangeLog.LogEnd("RemovePublicFolderClientPermission"); ExchangeLog.LogEnd("RemovePublicFolderClientPermission");
} }
@ -4657,7 +4657,7 @@ namespace WebsitePanel.Providers.HostedSolution
Command cmd = new Command("Disable-MailPublicFolder"); Command cmd = new Command("Disable-MailPublicFolder");
cmd.Parameters.Add("Identity", folder); cmd.Parameters.Add("Identity", folder);
cmd.Parameters.Add("Confirm", false); cmd.Parameters.Add("Confirm", new SwitchParameter(false));
ExecuteShellCommand(runSpace, cmd); ExecuteShellCommand(runSpace, cmd);
} }
finally finally
@ -4677,7 +4677,7 @@ namespace WebsitePanel.Providers.HostedSolution
Command cmd = new Command("Disable-MailPublicFolder"); Command cmd = new Command("Disable-MailPublicFolder");
cmd.Parameters.Add("Identity", folder); cmd.Parameters.Add("Identity", folder);
cmd.Parameters.Add("Confirm", false); cmd.Parameters.Add("Confirm", new SwitchParameter(false));
ExecuteShellCommand(runSpace, cmd); ExecuteShellCommand(runSpace, cmd);
cmd = new Command("Get-PublicFolder"); cmd = new Command("Get-PublicFolder");
@ -4759,7 +4759,7 @@ namespace WebsitePanel.Providers.HostedSolution
foreach (PSObject obj in result) foreach (PSObject obj in result)
{ {
string userId = ObjToString(GetPSObjectProperty(obj, "User")); string userId = ObjToString(GetPSObjectProperty(obj, "User"));
if (userId == "Default" || userId == "Anonymous" || userId.StartsWith("NT User:") == true) if (userId == "Default" || userId == "Anonymous" || userId.StartsWith("NT:") == true)
continue; continue;
object rights = GetPSObjectProperty(obj, "AccessRights"); object rights = GetPSObjectProperty(obj, "AccessRights");
@ -5289,7 +5289,7 @@ namespace WebsitePanel.Providers.HostedSolution
ExchangeLog.LogStart("DeleteAddressList"); ExchangeLog.LogStart("DeleteAddressList");
Command cmd = new Command("Remove-AddressList"); Command cmd = new Command("Remove-AddressList");
cmd.Parameters.Add("Identity", id); cmd.Parameters.Add("Identity", id);
cmd.Parameters.Add("Confirm", false); cmd.Parameters.Add("Confirm", new SwitchParameter(false));
ExecuteShellCommand(runSpace, cmd); ExecuteShellCommand(runSpace, cmd);
ExchangeLog.LogEnd("DeleteAddressList"); ExchangeLog.LogEnd("DeleteAddressList");
} }
@ -5302,7 +5302,7 @@ namespace WebsitePanel.Providers.HostedSolution
//{ //{
Command cmd = new Command("Remove-AddressBookPolicy"); Command cmd = new Command("Remove-AddressBookPolicy");
cmd.Parameters.Add("Identity", id); cmd.Parameters.Add("Identity", id);
cmd.Parameters.Add("Confirm", false); cmd.Parameters.Add("Confirm", new SwitchParameter(false));
ExecuteShellCommand(runSpace, cmd); ExecuteShellCommand(runSpace, cmd);
//} //}
ExchangeLog.LogEnd("DeleteAddressBookPolicy"); ExchangeLog.LogEnd("DeleteAddressBookPolicy");
@ -5364,7 +5364,7 @@ namespace WebsitePanel.Providers.HostedSolution
ExchangeLog.LogStart("DeleteGlobalAddressList"); ExchangeLog.LogStart("DeleteGlobalAddressList");
Command cmd = new Command("Remove-GlobalAddressList"); Command cmd = new Command("Remove-GlobalAddressList");
cmd.Parameters.Add("Identity", id); cmd.Parameters.Add("Identity", id);
cmd.Parameters.Add("Confirm", false); cmd.Parameters.Add("Confirm", new SwitchParameter(false));
ExecuteShellCommand(runSpace, cmd); ExecuteShellCommand(runSpace, cmd);
ExchangeLog.LogEnd("DeleteGlobalAddressList"); ExchangeLog.LogEnd("DeleteGlobalAddressList");
} }
@ -5426,7 +5426,7 @@ namespace WebsitePanel.Providers.HostedSolution
ExchangeLog.LogStart("DeleteOfflineAddressBook"); ExchangeLog.LogStart("DeleteOfflineAddressBook");
Command cmd = new Command("Remove-OfflineAddressBook"); Command cmd = new Command("Remove-OfflineAddressBook");
cmd.Parameters.Add("Identity", id); cmd.Parameters.Add("Identity", id);
cmd.Parameters.Add("Confirm", false); cmd.Parameters.Add("Confirm", new SwitchParameter(false));
ExecuteShellCommand(runSpace, cmd); ExecuteShellCommand(runSpace, cmd);
ExchangeLog.LogEnd("DeleteOfflineAddressBook"); ExchangeLog.LogEnd("DeleteOfflineAddressBook");
} }
@ -5436,7 +5436,7 @@ namespace WebsitePanel.Providers.HostedSolution
ExchangeLog.LogStart("DeleteAddressPolicy"); ExchangeLog.LogStart("DeleteAddressPolicy");
Command cmd = new Command("Remove-AddressBookPolicy"); Command cmd = new Command("Remove-AddressBookPolicy");
cmd.Parameters.Add("Identity", id); cmd.Parameters.Add("Identity", id);
cmd.Parameters.Add("Confirm", false); cmd.Parameters.Add("Confirm", new SwitchParameter(false));
ExecuteShellCommand(runSpace, cmd); ExecuteShellCommand(runSpace, cmd);
ExchangeLog.LogEnd("DeleteAddressPolicy"); ExchangeLog.LogEnd("DeleteAddressPolicy");
} }
@ -6440,7 +6440,7 @@ namespace WebsitePanel.Providers.HostedSolution
ExchangeLog.LogStart("RemoveAcceptedDomain"); ExchangeLog.LogStart("RemoveAcceptedDomain");
Command cmd = new Command("Remove-AcceptedDomain"); Command cmd = new Command("Remove-AcceptedDomain");
cmd.Parameters.Add("Identity", id); cmd.Parameters.Add("Identity", id);
cmd.Parameters.Add("Confirm", false); cmd.Parameters.Add("Confirm", new SwitchParameter(false));
ExecuteShellCommand(runSpace, cmd); ExecuteShellCommand(runSpace, cmd);
ExchangeLog.LogEnd("RemoveAcceptedDomain"); ExchangeLog.LogEnd("RemoveAcceptedDomain");
} }
@ -6452,7 +6452,7 @@ namespace WebsitePanel.Providers.HostedSolution
cmd.Parameters.Add("Identity", id); cmd.Parameters.Add("Identity", id);
cmd.Parameters.Add("DomainType", domainType.ToString()); cmd.Parameters.Add("DomainType", domainType.ToString());
cmd.Parameters.Add("AddressBookEnabled", !(domainType == ExchangeAcceptedDomainType.InternalRelay)); cmd.Parameters.Add("AddressBookEnabled", !(domainType == ExchangeAcceptedDomainType.InternalRelay));
cmd.Parameters.Add("Confirm", false); cmd.Parameters.Add("Confirm", new SwitchParameter(false));
ExecuteShellCommand(runSpace, cmd); ExecuteShellCommand(runSpace, cmd);
ExchangeLog.LogEnd("SetAcceptedDomainType"); ExchangeLog.LogEnd("SetAcceptedDomainType");
} }
@ -6485,7 +6485,7 @@ namespace WebsitePanel.Providers.HostedSolution
Command cmd = new Command("New-ActiveSyncMailboxPolicy"); Command cmd = new Command("New-ActiveSyncMailboxPolicy");
cmd.Parameters.Add("Name", organizationId); cmd.Parameters.Add("Name", organizationId);
cmd.Parameters.Add("AllowNonProvisionableDevices", true); cmd.Parameters.Add("AllowNonProvisionableDevices", true);
cmd.Parameters.Add("Confirm", false); cmd.Parameters.Add("Confirm", new SwitchParameter(false));
Collection<PSObject> result = ExecuteShellCommand(runSpace, cmd); Collection<PSObject> result = ExecuteShellCommand(runSpace, cmd);
string id = GetResultObjectIdentity(result); string id = GetResultObjectIdentity(result);
ExchangeLog.LogEnd("CreateActiveSyncPolicy"); ExchangeLog.LogEnd("CreateActiveSyncPolicy");
@ -6497,7 +6497,7 @@ namespace WebsitePanel.Providers.HostedSolution
ExchangeLog.LogStart("DeleteActiveSyncPolicy"); ExchangeLog.LogStart("DeleteActiveSyncPolicy");
Command cmd = new Command("Remove-ActiveSyncMailboxPolicy"); Command cmd = new Command("Remove-ActiveSyncMailboxPolicy");
cmd.Parameters.Add("Identity", id); cmd.Parameters.Add("Identity", id);
cmd.Parameters.Add("Confirm", false); cmd.Parameters.Add("Confirm", new SwitchParameter(false));
ExecuteShellCommand(runSpace, cmd); ExecuteShellCommand(runSpace, cmd);
ExchangeLog.LogEnd("DeleteActiveSyncPolicy"); ExchangeLog.LogEnd("DeleteActiveSyncPolicy");
} }
@ -6749,7 +6749,7 @@ namespace WebsitePanel.Providers.HostedSolution
runSpace = OpenRunspace(); runSpace = OpenRunspace();
Command cmd = new Command("Clear-ActiveSyncDevice"); Command cmd = new Command("Clear-ActiveSyncDevice");
cmd.Parameters.Add("Identity", id); cmd.Parameters.Add("Identity", id);
cmd.Parameters.Add("Confirm", false); cmd.Parameters.Add("Confirm", new SwitchParameter(false));
ExecuteShellCommand(runSpace, cmd); ExecuteShellCommand(runSpace, cmd);
} }
finally finally
@ -6769,7 +6769,7 @@ namespace WebsitePanel.Providers.HostedSolution
Command cmd = new Command("Clear-ActiveSyncDevice"); Command cmd = new Command("Clear-ActiveSyncDevice");
cmd.Parameters.Add("Identity", id); cmd.Parameters.Add("Identity", id);
cmd.Parameters.Add("Cancel", true); cmd.Parameters.Add("Cancel", true);
cmd.Parameters.Add("Confirm", false); cmd.Parameters.Add("Confirm", new SwitchParameter(false));
ExecuteShellCommand(runSpace, cmd); ExecuteShellCommand(runSpace, cmd);
} }
finally finally
@ -6809,7 +6809,7 @@ namespace WebsitePanel.Providers.HostedSolution
cmd = new Command("Remove-ActiveSyncDevice"); cmd = new Command("Remove-ActiveSyncDevice");
cmd.Parameters.Add("Identity", device.DeviceID); cmd.Parameters.Add("Identity", device.DeviceID);
cmd.Parameters.Add("Confirm", false); cmd.Parameters.Add("Confirm", new SwitchParameter(false));
ExecuteShellCommand(runSpace, cmd); ExecuteShellCommand(runSpace, cmd);
} }
} }
@ -6831,7 +6831,7 @@ namespace WebsitePanel.Providers.HostedSolution
runSpace = OpenRunspace(); runSpace = OpenRunspace();
Command cmd = new Command("Remove-ActiveSyncDevice"); Command cmd = new Command("Remove-ActiveSyncDevice");
cmd.Parameters.Add("Identity", id); cmd.Parameters.Add("Identity", id);
cmd.Parameters.Add("Confirm", false); cmd.Parameters.Add("Confirm", new SwitchParameter(false));
ExecuteShellCommand(runSpace, cmd); ExecuteShellCommand(runSpace, cmd);
} }
finally finally
@ -7317,7 +7317,7 @@ namespace WebsitePanel.Providers.HostedSolution
runSpace = OpenRunspace(); runSpace = OpenRunspace();
Command cmd = new Command("Remove-TransportRule"); Command cmd = new Command("Remove-TransportRule");
cmd.Parameters.Add("Identity", Name); cmd.Parameters.Add("Identity", Name);
cmd.Parameters.Add("Confirm", false); cmd.Parameters.Add("Confirm", new SwitchParameter(false));
ExecuteShellCommand(runSpace, cmd); ExecuteShellCommand(runSpace, cmd);
} }
catch (Exception exc) catch (Exception exc)

View file

@ -84,6 +84,11 @@ namespace WebsitePanel.Providers.HostedSolution
return CreateOrganizationInternal(organizationId, sipDomain, enableConferencingVideo, maxConferenceSize, enabledFederation, enabledEnterpriseVoice); return CreateOrganizationInternal(organizationId, sipDomain, enableConferencingVideo, maxConferenceSize, enabledFederation, enabledEnterpriseVoice);
} }
public virtual string GetOrganizationTenantId(string organizationId)
{
return "NoHostingPack";
}
public virtual bool DeleteOrganization(string organizationId, string sipDomain) public virtual bool DeleteOrganization(string organizationId, string sipDomain)
{ {
return DeleteOrganizationInternal(organizationId, sipDomain); return DeleteOrganizationInternal(organizationId, sipDomain);

View file

@ -112,6 +112,11 @@ namespace WebsitePanel.Providers.HostedSolution
return CreateOrganizationInternal(organizationId, sipDomain, enableConferencing, enableConferencingVideo, maxConferenceSize, enabledFederation, enabledEnterpriseVoice); return CreateOrganizationInternal(organizationId, sipDomain, enableConferencing, enableConferencingVideo, maxConferenceSize, enabledFederation, enabledEnterpriseVoice);
} }
public string GetOrganizationTenantId(string organizationId)
{
return GetOrganizationTenantIdInternal(organizationId);
}
public bool DeleteOrganization(string organizationId, string sipDomain) public bool DeleteOrganization(string organizationId, string sipDomain)
{ {
return DeleteOrganizationInternal(organizationId, sipDomain); return DeleteOrganizationInternal(organizationId, sipDomain);
@ -277,7 +282,42 @@ namespace WebsitePanel.Providers.HostedSolution
return TenantId; return TenantId;
} }
private string GetOrganizationTenantIdInternal(string organizationId)
{
HostedSolutionLog.LogStart("GetOrganizationTenantIdInternal");
HostedSolutionLog.DebugInfo("organizationId: {0}", organizationId);
string tenantIdStr = string.Empty;
Runspace runSpace = null;
try
{
runSpace = OpenRunspace();
Command cmd = new Command("Get-CsTenant");
cmd.Parameters.Add("Identity", GetOrganizationPath(organizationId));
Collection<PSObject> result = ExecuteShellCommand(runSpace, cmd, false);
if ((result != null) && (result.Count > 0))
{
Guid tenantId = (Guid)GetPSObjectProperty(result[0], "TenantId");
tenantIdStr = tenantId.ToString();
}
}
catch (Exception ex)
{
HostedSolutionLog.LogError("GetOrganizationTenantIdInternal", ex);
throw;
}
finally
{
CloseRunspace(runSpace);
}
HostedSolutionLog.LogEnd("GetOrganizationTenantIdnInternal");
return tenantIdStr;
}
private bool DeleteOrganizationInternal(string organizationId, string sipDomain) private bool DeleteOrganizationInternal(string organizationId, string sipDomain)
{ {
@ -508,7 +548,7 @@ namespace WebsitePanel.Providers.HostedSolution
HostedSolutionLog.DebugInfo("organizationId: {0}", organizationId); HostedSolutionLog.DebugInfo("organizationId: {0}", organizationId);
HostedSolutionLog.DebugInfo("userUpn: {0}", userUpn); HostedSolutionLog.DebugInfo("userUpn: {0}", userUpn);
LyncUser lyncUser = new LyncUser(); LyncUser lyncUser = null;
Runspace runSpace = null; Runspace runSpace = null;
try try
{ {
@ -517,8 +557,13 @@ namespace WebsitePanel.Providers.HostedSolution
Command cmd = new Command("Get-CsUser"); Command cmd = new Command("Get-CsUser");
cmd.Parameters.Add("Identity", userUpn); cmd.Parameters.Add("Identity", userUpn);
Collection<PSObject> result = ExecuteShellCommand(runSpace, cmd); Collection<PSObject> result = ExecuteShellCommand(runSpace, cmd);
if ((result != null) && (result.Count > 0))
{
PSObject user = result[0]; PSObject user = result[0];
lyncUser = new LyncUser();
lyncUser.DisplayName = (string)GetPSObjectProperty(user, "DisplayName"); lyncUser.DisplayName = (string)GetPSObjectProperty(user, "DisplayName");
lyncUser.SipAddress = (string)GetPSObjectProperty(user, "SipAddress"); lyncUser.SipAddress = (string)GetPSObjectProperty(user, "SipAddress");
lyncUser.LineUri = (string)GetPSObjectProperty(user, "LineURI"); lyncUser.LineUri = (string)GetPSObjectProperty(user, "LineURI");
@ -527,6 +572,10 @@ namespace WebsitePanel.Providers.HostedSolution
lyncUser.LineUri = lyncUser.LineUri.ToLower().Replace("tel:+", ""); lyncUser.LineUri = lyncUser.LineUri.ToLower().Replace("tel:+", "");
lyncUser.LineUri = lyncUser.LineUri.ToLower().Replace("tel:", ""); lyncUser.LineUri = lyncUser.LineUri.ToLower().Replace("tel:", "");
} }
else
HostedSolutionLog.LogInfo("GetLyncUserGeneralSettingsInternal: No info found");
}
catch (Exception ex) catch (Exception ex)
{ {
HostedSolutionLog.LogError("GetLyncUserGeneralSettingsInternal", ex); HostedSolutionLog.LogError("GetLyncUserGeneralSettingsInternal", ex);

View file

@ -27,6 +27,7 @@
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System; using System;
using System.Management.Automation;
using System.Management.Automation.Runspaces; using System.Management.Automation.Runspaces;
using System.Text; using System.Text;
using WebsitePanel.Server.Utils; using WebsitePanel.Server.Utils;
@ -87,10 +88,9 @@ namespace WebsitePanel.Providers.HostedSolution
foreach (CommandParameter parameter in cmd.Parameters) foreach (CommandParameter parameter in cmd.Parameters)
{ {
string formatString = " -{0} {1}"; string formatString = " -{0} {1}";
if (parameter.Value is string) if (parameter.Value is string) formatString = " -{0} '{1}'";
formatString = " -{0} '{1}'"; else if (parameter.Value is SwitchParameter) formatString = " -{0}:${1}";
else if (parameter.Value is bool) else if (parameter.Value is bool) formatString = " -{0} ${1}";
formatString = " -{0} ${1}";
sb.AppendFormat(formatString, parameter.Name, parameter.Value); sb.AppendFormat(formatString, parameter.Name, parameter.Value);
} }
Log.WriteInfo("{0} {1}", LogPrefix, sb.ToString()); Log.WriteInfo("{0} {1}", LogPrefix, sb.ToString());

View file

@ -112,6 +112,11 @@ namespace WebsitePanel.Providers.HostedSolution
return CreateOrganizationInternal(organizationId, sipDomain, enableConferencing, enableConferencingVideo, maxConferenceSize, enabledFederation, enabledEnterpriseVoice); return CreateOrganizationInternal(organizationId, sipDomain, enableConferencing, enableConferencingVideo, maxConferenceSize, enabledFederation, enabledEnterpriseVoice);
} }
public string GetOrganizationTenantId(string organizationId)
{
return GetOrganizationTenantIdInternal(organizationId);
}
public bool DeleteOrganization(string organizationId, string sipDomain) public bool DeleteOrganization(string organizationId, string sipDomain)
{ {
return DeleteOrganizationInternal(organizationId, sipDomain); return DeleteOrganizationInternal(organizationId, sipDomain);
@ -276,7 +281,42 @@ namespace WebsitePanel.Providers.HostedSolution
return TenantId; return TenantId;
} }
private string GetOrganizationTenantIdInternal(string organizationId)
{
HostedSolutionLog.LogStart("GetOrganizationTenantIdInternal");
HostedSolutionLog.DebugInfo("organizationId: {0}", organizationId);
string tenantIdStr = string.Empty;
Runspace runSpace = null;
try
{
runSpace = OpenRunspace();
Command cmd = new Command("Get-CsTenant");
cmd.Parameters.Add("Identity", GetOrganizationPath(organizationId));
Collection<PSObject> result = ExecuteShellCommand(runSpace, cmd, false);
if ((result != null) && (result.Count > 0))
{
Guid tenantId = (Guid)GetPSObjectProperty(result[0], "TenantId");
tenantIdStr = tenantId.ToString();
}
}
catch (Exception ex)
{
HostedSolutionLog.LogError("GetOrganizationTenantIdInternal", ex);
throw;
}
finally
{
CloseRunspace(runSpace);
}
HostedSolutionLog.LogEnd("GetOrganizationTenantIdnInternal");
return tenantIdStr;
}
private bool DeleteOrganizationInternal(string organizationId, string sipDomain) private bool DeleteOrganizationInternal(string organizationId, string sipDomain)
{ {
@ -507,7 +547,7 @@ namespace WebsitePanel.Providers.HostedSolution
HostedSolutionLog.DebugInfo("organizationId: {0}", organizationId); HostedSolutionLog.DebugInfo("organizationId: {0}", organizationId);
HostedSolutionLog.DebugInfo("userUpn: {0}", userUpn); HostedSolutionLog.DebugInfo("userUpn: {0}", userUpn);
LyncUser lyncUser = new LyncUser(); LyncUser lyncUser = null;
Runspace runSpace = null; Runspace runSpace = null;
try try
{ {
@ -516,8 +556,13 @@ namespace WebsitePanel.Providers.HostedSolution
Command cmd = new Command("Get-CsUser"); Command cmd = new Command("Get-CsUser");
cmd.Parameters.Add("Identity", userUpn); cmd.Parameters.Add("Identity", userUpn);
Collection<PSObject> result = ExecuteShellCommand(runSpace, cmd); Collection<PSObject> result = ExecuteShellCommand(runSpace, cmd);
if ((result != null) && (result.Count > 0))
{
PSObject user = result[0]; PSObject user = result[0];
lyncUser = new LyncUser();
lyncUser.DisplayName = (string)GetPSObjectProperty(user, "DisplayName"); lyncUser.DisplayName = (string)GetPSObjectProperty(user, "DisplayName");
lyncUser.SipAddress = (string)GetPSObjectProperty(user, "SipAddress"); lyncUser.SipAddress = (string)GetPSObjectProperty(user, "SipAddress");
lyncUser.LineUri = (string)GetPSObjectProperty(user, "LineURI"); lyncUser.LineUri = (string)GetPSObjectProperty(user, "LineURI");
@ -526,6 +571,10 @@ namespace WebsitePanel.Providers.HostedSolution
lyncUser.LineUri = lyncUser.LineUri.ToLower().Replace("tel:+", ""); lyncUser.LineUri = lyncUser.LineUri.ToLower().Replace("tel:+", "");
lyncUser.LineUri = lyncUser.LineUri.ToLower().Replace("tel:", ""); lyncUser.LineUri = lyncUser.LineUri.ToLower().Replace("tel:", "");
} }
else
HostedSolutionLog.LogInfo("GetLyncUserGeneralSettingsInternal: No info found");
}
catch (Exception ex) catch (Exception ex)
{ {
HostedSolutionLog.LogError("GetLyncUserGeneralSettingsInternal", ex); HostedSolutionLog.LogError("GetLyncUserGeneralSettingsInternal", ex);

View file

@ -54,12 +54,12 @@ namespace WebsitePanel.Providers.Mail
"whocanpost", "whocanpost",
"prependsubject", "prependsubject",
"maxmessagesize", "maxmessagesize",
//"maxrecipients", "maxrecipients",
"replytolist", "replytolist",
"subject", "subject",
//"listtoaddress", "listtoaddress",
//"listfromaddress", "listfromaddress",
//"listreplytoaddress", "listreplytoaddress",
"digestmode", "digestmode",
"sendsubscribe", "sendsubscribe",
"sendunsubscribe", "sendunsubscribe",
@ -1875,7 +1875,7 @@ namespace WebsitePanel.Providers.Mail
settings.Add(string.Concat("prependsubject=", list.EnableSubjectPrefix)); settings.Add(string.Concat("prependsubject=", list.EnableSubjectPrefix));
settings.Add(string.Concat("maxmessagesize=", list.MaxMessageSize)); settings.Add(string.Concat("maxmessagesize=", list.MaxMessageSize));
//settings.Add(string.Concat("maxrecipients=", list.MaxRecipientsPerMessage)); settings.Add(string.Concat("maxrecipients=", list.MaxRecipientsPerMessage));
settings.Add(string.Concat("subject=", list.SubjectPrefix)); settings.Add(string.Concat("subject=", list.SubjectPrefix));
switch (list.ReplyToMode) switch (list.ReplyToMode)
@ -1885,9 +1885,9 @@ namespace WebsitePanel.Providers.Mail
break; break;
} }
//settings.Add(string.Concat("listtoaddress=", list.ListToAddress)); settings.Add(string.Concat("listtoaddress=", list.ListToAddress));
//settings.Add(string.Concat("listfromaddress=", list.ListFromAddress)); settings.Add(string.Concat("listfromaddress=", list.ListFromAddress));
//settings.Add(string.Concat("listreplytoaddress=", list.ListReplyToAddress)); settings.Add(string.Concat("listreplytoaddress=", list.ListReplyToAddress));
settings.Add(string.Concat("digestmode=", list.DigestMode)); settings.Add(string.Concat("digestmode=", list.DigestMode));
settings.Add(string.Concat("sendsubscribe=", list.SendSubscribe)); settings.Add(string.Concat("sendsubscribe=", list.SendSubscribe));
settings.Add(string.Concat("sendunsubscribe=", list.SendUnsubscribe)); settings.Add(string.Concat("sendunsubscribe=", list.SendUnsubscribe));
@ -1959,7 +1959,7 @@ namespace WebsitePanel.Providers.Mail
settings.Add(string.Concat("prependsubject=", list.EnableSubjectPrefix)); settings.Add(string.Concat("prependsubject=", list.EnableSubjectPrefix));
settings.Add(string.Concat("maxmessagesize=", list.MaxMessageSize)); settings.Add(string.Concat("maxmessagesize=", list.MaxMessageSize));
//settings.Add(string.Concat("maxrecipients=", list.MaxRecipientsPerMessage)); settings.Add(string.Concat("maxrecipients=", list.MaxRecipientsPerMessage));
settings.Add(string.Concat("subject=", list.SubjectPrefix)); settings.Add(string.Concat("subject=", list.SubjectPrefix));
switch (list.ReplyToMode) switch (list.ReplyToMode)
@ -1972,9 +1972,9 @@ namespace WebsitePanel.Providers.Mail
break; break;
} }
//settings.Add(string.Concat("listtoaddress=", list.ListToAddress)); settings.Add(string.Concat("listtoaddress=", list.ListToAddress));
//settings.Add(string.Concat("listfromaddress=", list.ListFromAddress)); settings.Add(string.Concat("listfromaddress=", list.ListFromAddress));
//settings.Add(string.Concat("listreplytoaddress=", list.ListReplyToAddress)); settings.Add(string.Concat("listreplytoaddress=", list.ListReplyToAddress));
settings.Add(string.Concat("digestmode=", list.DigestMode)); settings.Add(string.Concat("digestmode=", list.DigestMode));
settings.Add(string.Concat("sendsubscribe=", list.SendSubscribe)); settings.Add(string.Concat("sendsubscribe=", list.SendSubscribe));
settings.Add(string.Concat("sendunsubscribe=", list.SendUnsubscribe)); settings.Add(string.Concat("sendunsubscribe=", list.SendUnsubscribe));

View file

@ -210,11 +210,16 @@ namespace WebsitePanel.Providers.OS
ServerSettings, usersOU, null); ServerSettings, usersOU, null);
} }
public virtual void SetQuotaLimitOnFolder(string folderPath, string shareNameDrive, string quotaLimit, int mode, string wmiUserName, string wmiPassword) public virtual void SetQuotaLimitOnFolder(string folderPath, string shareNameDrive, QuotaType quotaType, string quotaLimit, int mode, string wmiUserName, string wmiPassword)
{ {
FileUtils.SetQuotaLimitOnFolder(folderPath, shareNameDrive, quotaLimit, mode, wmiUserName, wmiPassword); FileUtils.SetQuotaLimitOnFolder(folderPath, shareNameDrive, quotaLimit, mode, wmiUserName, wmiPassword);
} }
public virtual Quota GetQuotaOnFolder(string folderPath, string wmiUserName, string wmiPassword)
{
throw new NotImplementedException();
}
public virtual void DeleteDirectoryRecursive(string rootPath) public virtual void DeleteDirectoryRecursive(string rootPath)
{ {
FileUtils.DeleteDirectoryRecursive(rootPath); FileUtils.DeleteDirectoryRecursive(rootPath);

View file

@ -74,7 +74,7 @@ namespace WebsitePanel.Providers.OS
|| version == WebsitePanel.Server.Utils.OS.WindowsVersion.Windows81; || version == WebsitePanel.Server.Utils.OS.WindowsVersion.Windows81;
} }
public override void SetQuotaLimitOnFolder(string folderPath, string shareNameDrive, string quotaLimit, int mode, string wmiUserName, string wmiPassword) public override void SetQuotaLimitOnFolder(string folderPath, string shareNameDrive, QuotaType quotaType, string quotaLimit, int mode, string wmiUserName, string wmiPassword)
{ {
Log.WriteStart("SetQuotaLimitOnFolder"); Log.WriteStart("SetQuotaLimitOnFolder");
Log.WriteInfo("FolderPath : {0}", folderPath); Log.WriteInfo("FolderPath : {0}", folderPath);
@ -82,7 +82,6 @@ namespace WebsitePanel.Providers.OS
Log.WriteInfo("QuotaLimit : {0}", quotaLimit); Log.WriteInfo("QuotaLimit : {0}", quotaLimit);
string path = Path.Combine(shareNameDrive + @":\", folderPath); string path = Path.Combine(shareNameDrive + @":\", folderPath);
var quota = CalculateQuota(quotaLimit);
Runspace runSpace = null; Runspace runSpace = null;
try try
@ -94,24 +93,33 @@ namespace WebsitePanel.Providers.OS
if (!FileUtils.DirectoryExists(path)) if (!FileUtils.DirectoryExists(path))
FileUtils.CreateDirectory(path); FileUtils.CreateDirectory(path);
if (quotaLimit.Contains("-"))
{
RemoveOldQuotaOnFolder(runSpace, path);
}
else
{
var quota = CalculateQuota(quotaLimit);
switch (mode) switch (mode)
{ {
//deleting old quota and creating new one //deleting old quota and creating new one
case 0: case 0:
{ {
RemoveOldQuotaOnFolder(runSpace, path); RemoveOldQuotaOnFolder(runSpace, path);
ChangeQuotaOnFolder(runSpace, "New-FsrmQuota", path, quota); ChangeQuotaOnFolder(runSpace, "New-FsrmQuota", path, quotaType, quota);
break; break;
} }
//modifying folder quota //modifying folder quota
case 1: case 1:
{ {
ChangeQuotaOnFolder(runSpace, "Set-FsrmQuota", path, quota); ChangeQuotaOnFolder(runSpace, "Set-FsrmQuota", path, quotaType, quota);
break; break;
} }
} }
} }
} }
}
catch (Exception ex) catch (Exception ex)
{ {
Log.WriteError("SetQuotaLimitOnFolder", ex); Log.WriteError("SetQuotaLimitOnFolder", ex);
@ -125,6 +133,48 @@ namespace WebsitePanel.Providers.OS
Log.WriteEnd("SetQuotaLimitOnFolder"); Log.WriteEnd("SetQuotaLimitOnFolder");
} }
public override Quota GetQuotaOnFolder(string folderPath, string wmiUserName, string wmiPassword)
{
Log.WriteStart("GetQuotaLimitOnFolder");
Log.WriteInfo("FolderPath : {0}", folderPath);
Runspace runSpace = null;
Quota quota = new Quota();
try
{
runSpace = OpenRunspace();
if (folderPath.IndexOfAny(Path.GetInvalidPathChars()) == -1)
{
Command cmd = new Command("Get-FsrmQuota");
cmd.Parameters.Add("Path", folderPath);
var result = ExecuteShellCommand(runSpace, cmd, false);
if (result.Count > 0)
{
quota.Size = ConvertBytesToMB(Convert.ToInt64(GetPSObjectProperty(result[0], "Size")));
quota.QuotaType = Convert.ToBoolean(GetPSObjectProperty(result[0], "SoftLimit")) ? QuotaType.Soft : QuotaType.Hard;
quota.Usage = ConvertBytesToMB(Convert.ToInt64(GetPSObjectProperty(result[0], "usage")));
}
}
}
catch (Exception ex)
{
Log.WriteError("GetQuotaLimitOnFolder", ex);
throw;
}
finally
{
CloseRunspace(runSpace);
}
Log.WriteEnd("GetQuotaLimitOnFolder");
return quota;
}
public UInt64 CalculateQuota(string quota) public UInt64 CalculateQuota(string quota)
{ {
UInt64 OneKb = 1024; UInt64 OneKb = 1024;
@ -150,6 +200,27 @@ namespace WebsitePanel.Providers.OS
return result; return result;
} }
public int ConvertMegaBytesToGB(int megabytes)
{
int OneGb = 1024;
if (megabytes == -1)
return megabytes;
return (int)(megabytes/ OneGb);
}
public int ConvertBytesToMB(long bytes)
{
int OneKb = 1024;
int OneMb = OneKb * 1024;
if (bytes == 0)
return 0;
return (int)(bytes / OneMb);
}
public void RemoveOldQuotaOnFolder(Runspace runSpace, string path) public void RemoveOldQuotaOnFolder(Runspace runSpace, string path)
{ {
try try
@ -165,11 +236,17 @@ namespace WebsitePanel.Providers.OS
catch { /* do nothing */ } catch { /* do nothing */ }
} }
public void ChangeQuotaOnFolder(Runspace runSpace, string command, string path, UInt64 quota) public void ChangeQuotaOnFolder(Runspace runSpace, string command, string path, QuotaType quotaType, UInt64 quota)
{ {
Command cmd = new Command(command); Command cmd = new Command(command);
cmd.Parameters.Add("Path", path); cmd.Parameters.Add("Path", path);
cmd.Parameters.Add("Size", quota); cmd.Parameters.Add("Size", quota);
if (quotaType == QuotaType.Soft)
{
cmd.Parameters.Add("SoftLimit", true);
}
ExecuteShellCommand(runSpace, cmd, false); ExecuteShellCommand(runSpace, cmd, false);
} }

View file

@ -350,10 +350,14 @@ namespace WebsitePanel.Providers.Web.HeliconZoo
switchboardCollection.Clear(); switchboardCollection.Clear();
// first disable all engines if "*" is not present in input engineNames
if (!engineNames.Contains("*"))
{
ConfigurationElement elementDisableAll = switchboardCollection.CreateElement(); ConfigurationElement elementDisableAll = switchboardCollection.CreateElement();
elementDisableAll.SetAttributeValue("name", "*"); elementDisableAll.SetAttributeValue("name", "*");
SetSwitchBoardValue(elementDisableAll, false); SetSwitchBoardValue(elementDisableAll, false);
switchboardCollection.Add(elementDisableAll); switchboardCollection.Add(elementDisableAll);
}
foreach (string engineName in engineNames) foreach (string engineName in engineNames)
{ {

View file

@ -675,14 +675,18 @@ namespace WebsitePanel.Providers.Web.Iis.WebObjects
// //
foreach (var item in iisObject.Applications) foreach (var item in iisObject.Applications)
{ {
try
{
Configuration cfg = item.GetWebConfiguration(); Configuration cfg = item.GetWebConfiguration();
string location = siteId + ConfigurationUtility.GetQualifiedVirtualPath(item.Path); string location = siteId + ConfigurationUtility.GetQualifiedVirtualPath(item.Path);
ConfigurationSection section = cfg.GetSection("system.webServer/heliconZoo", location); ConfigurationSection section;
try
{
section = cfg.GetSection("system.webServer/heliconZoo", location);
}
catch(Exception)
{
// looks like Helicon Zoo is not installed, return empty array
return vdirs.ToArray();
}
if (section.GetCollection().Count > 0) if (section.GetCollection().Count > 0)
{ {
@ -711,16 +715,8 @@ namespace WebsitePanel.Providers.Web.Iis.WebObjects
vdirs.Add(vdir); vdirs.Add(vdir);
} }
}
}
catch (Exception)
{
//there is no zoo
throw;
}
}
//
return vdirs.ToArray(); return vdirs.ToArray();
} }

View file

@ -1,4 +1,4 @@
// Copyright (c) 2012, Outercurve Foundation. // Copyright (c) 2012, Outercurve Foundation.
// All rights reserved. // All rights reserved.
// //
// Redistribution and use in source and binary forms, with or without modification, // Redistribution and use in source and binary forms, with or without modification,
@ -29,7 +29,7 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
// Runtime Version:2.0.50727.6400 // Runtime Version:2.0.50727.5466
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
@ -37,11 +37,11 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// //
// This source code was auto-generated by wsdl, Version=2.0.50727.3038. // This source code was auto-generated by wsdl, Version=2.0.50727.42.
// //
using WebsitePanel.Providers.HostedSolution; using WebsitePanel.Providers.HostedSolution;
namespace WebsitePanel.Providers.Lync { namespace WebsitePanel.Providers.Lync {
using System.Xml.Serialization; using System.Xml.Serialization;
using System.Web.Services; using System.Web.Services;
@ -52,7 +52,7 @@ namespace WebsitePanel.Providers.Lync {
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name="LyncServerSoap", Namespace="http://smbsaas/websitepanel/server/")] [System.Web.Services.WebServiceBindingAttribute(Name="LyncServerSoap", Namespace="http://smbsaas/websitepanel/server/")]
@ -62,6 +62,8 @@ namespace WebsitePanel.Providers.Lync {
private System.Threading.SendOrPostCallback CreateOrganizationOperationCompleted; private System.Threading.SendOrPostCallback CreateOrganizationOperationCompleted;
private System.Threading.SendOrPostCallback GetOrganizationTenantIdOperationCompleted;
private System.Threading.SendOrPostCallback DeleteOrganizationOperationCompleted; private System.Threading.SendOrPostCallback DeleteOrganizationOperationCompleted;
private System.Threading.SendOrPostCallback CreateUserOperationCompleted; private System.Threading.SendOrPostCallback CreateUserOperationCompleted;
@ -82,6 +84,8 @@ namespace WebsitePanel.Providers.Lync {
private System.Threading.SendOrPostCallback ReloadConfigurationOperationCompleted; private System.Threading.SendOrPostCallback ReloadConfigurationOperationCompleted;
private System.Threading.SendOrPostCallback GetPolicyListOperationCompleted;
/// <remarks/> /// <remarks/>
public LyncServer() { public LyncServer() {
this.Url = "http://localhost:9003/LyncServer.asmx"; this.Url = "http://localhost:9003/LyncServer.asmx";
@ -90,6 +94,9 @@ namespace WebsitePanel.Providers.Lync {
/// <remarks/> /// <remarks/>
public event CreateOrganizationCompletedEventHandler CreateOrganizationCompleted; public event CreateOrganizationCompletedEventHandler CreateOrganizationCompleted;
/// <remarks/>
public event GetOrganizationTenantIdCompletedEventHandler GetOrganizationTenantIdCompleted;
/// <remarks/> /// <remarks/>
public event DeleteOrganizationCompletedEventHandler DeleteOrganizationCompleted; public event DeleteOrganizationCompletedEventHandler DeleteOrganizationCompleted;
@ -120,6 +127,9 @@ namespace WebsitePanel.Providers.Lync {
/// <remarks/> /// <remarks/>
public event ReloadConfigurationCompletedEventHandler ReloadConfigurationCompleted; public event ReloadConfigurationCompletedEventHandler ReloadConfigurationCompleted;
/// <remarks/>
public event GetPolicyListCompletedEventHandler GetPolicyListCompleted;
/// <remarks/> /// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CreateOrganization", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CreateOrganization", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
@ -180,6 +190,48 @@ namespace WebsitePanel.Providers.Lync {
} }
} }
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetOrganizationTenantId", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public string GetOrganizationTenantId(string organizationId) {
object[] results = this.Invoke("GetOrganizationTenantId", new object[] {
organizationId});
return ((string)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginGetOrganizationTenantId(string organizationId, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetOrganizationTenantId", new object[] {
organizationId}, callback, asyncState);
}
/// <remarks/>
public string EndGetOrganizationTenantId(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((string)(results[0]));
}
/// <remarks/>
public void GetOrganizationTenantIdAsync(string organizationId) {
this.GetOrganizationTenantIdAsync(organizationId, null);
}
/// <remarks/>
public void GetOrganizationTenantIdAsync(string organizationId, object userState) {
if ((this.GetOrganizationTenantIdOperationCompleted == null)) {
this.GetOrganizationTenantIdOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetOrganizationTenantIdOperationCompleted);
}
this.InvokeAsync("GetOrganizationTenantId", new object[] {
organizationId}, this.GetOrganizationTenantIdOperationCompleted, userState);
}
private void OnGetOrganizationTenantIdOperationCompleted(object arg) {
if ((this.GetOrganizationTenantIdCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.GetOrganizationTenantIdCompleted(this, new GetOrganizationTenantIdCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/> /// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/DeleteOrganization", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/DeleteOrganization", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
@ -630,14 +682,49 @@ namespace WebsitePanel.Providers.Lync {
/// <remarks/> /// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetPolicyList", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetPolicyList", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public string[] GetPolicyList(LyncPolicyType type, string name) public string[] GetPolicyList(LyncPolicyType type, string name) {
{
object[] results = this.Invoke("GetPolicyList", new object[] { object[] results = this.Invoke("GetPolicyList", new object[] {
type, name}); type,
name});
return ((string[])(results[0])); return ((string[])(results[0]));
} }
/// <remarks/>
public System.IAsyncResult BeginGetPolicyList(LyncPolicyType type, string name, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetPolicyList", new object[] {
type,
name}, callback, asyncState);
}
/// <remarks/>
public string[] EndGetPolicyList(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((string[])(results[0]));
}
/// <remarks/>
public void GetPolicyListAsync(LyncPolicyType type, string name) {
this.GetPolicyListAsync(type, name, null);
}
/// <remarks/>
public void GetPolicyListAsync(LyncPolicyType type, string name, object userState) {
if ((this.GetPolicyListOperationCompleted == null)) {
this.GetPolicyListOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetPolicyListOperationCompleted);
}
this.InvokeAsync("GetPolicyList", new object[] {
type,
name}, this.GetPolicyListOperationCompleted, userState);
}
private void OnGetPolicyListOperationCompleted(object arg) {
if ((this.GetPolicyListCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.GetPolicyListCompleted(this, new GetPolicyListCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/> /// <remarks/>
public new void CancelAsync(object userState) { public new void CancelAsync(object userState) {
base.CancelAsync(userState); base.CancelAsync(userState);
@ -645,11 +732,11 @@ namespace WebsitePanel.Providers.Lync {
} }
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void CreateOrganizationCompletedEventHandler(object sender, CreateOrganizationCompletedEventArgs e); public delegate void CreateOrganizationCompletedEventHandler(object sender, CreateOrganizationCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class CreateOrganizationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { public partial class CreateOrganizationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -671,11 +758,37 @@ namespace WebsitePanel.Providers.Lync {
} }
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void GetOrganizationTenantIdCompletedEventHandler(object sender, GetOrganizationTenantIdCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetOrganizationTenantIdCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal GetOrganizationTenantIdCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public string Result {
get {
this.RaiseExceptionIfNecessary();
return ((string)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void DeleteOrganizationCompletedEventHandler(object sender, DeleteOrganizationCompletedEventArgs e); public delegate void DeleteOrganizationCompletedEventHandler(object sender, DeleteOrganizationCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class DeleteOrganizationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { public partial class DeleteOrganizationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -697,11 +810,11 @@ namespace WebsitePanel.Providers.Lync {
} }
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void CreateUserCompletedEventHandler(object sender, CreateUserCompletedEventArgs e); public delegate void CreateUserCompletedEventHandler(object sender, CreateUserCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class CreateUserCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { public partial class CreateUserCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -723,11 +836,11 @@ namespace WebsitePanel.Providers.Lync {
} }
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void GetLyncUserGeneralSettingsCompletedEventHandler(object sender, GetLyncUserGeneralSettingsCompletedEventArgs e); public delegate void GetLyncUserGeneralSettingsCompletedEventHandler(object sender, GetLyncUserGeneralSettingsCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetLyncUserGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { public partial class GetLyncUserGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -749,11 +862,11 @@ namespace WebsitePanel.Providers.Lync {
} }
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void SetLyncUserGeneralSettingsCompletedEventHandler(object sender, SetLyncUserGeneralSettingsCompletedEventArgs e); public delegate void SetLyncUserGeneralSettingsCompletedEventHandler(object sender, SetLyncUserGeneralSettingsCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class SetLyncUserGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { public partial class SetLyncUserGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -775,11 +888,11 @@ namespace WebsitePanel.Providers.Lync {
} }
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void SetLyncUserPlanCompletedEventHandler(object sender, SetLyncUserPlanCompletedEventArgs e); public delegate void SetLyncUserPlanCompletedEventHandler(object sender, SetLyncUserPlanCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class SetLyncUserPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { public partial class SetLyncUserPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -801,11 +914,11 @@ namespace WebsitePanel.Providers.Lync {
} }
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void DeleteUserCompletedEventHandler(object sender, DeleteUserCompletedEventArgs e); public delegate void DeleteUserCompletedEventHandler(object sender, DeleteUserCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class DeleteUserCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { public partial class DeleteUserCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -827,11 +940,11 @@ namespace WebsitePanel.Providers.Lync {
} }
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void GetFederationDomainsCompletedEventHandler(object sender, GetFederationDomainsCompletedEventArgs e); public delegate void GetFederationDomainsCompletedEventHandler(object sender, GetFederationDomainsCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetFederationDomainsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { public partial class GetFederationDomainsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -853,11 +966,11 @@ namespace WebsitePanel.Providers.Lync {
} }
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void AddFederationDomainCompletedEventHandler(object sender, AddFederationDomainCompletedEventArgs e); public delegate void AddFederationDomainCompletedEventHandler(object sender, AddFederationDomainCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class AddFederationDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { public partial class AddFederationDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -879,11 +992,11 @@ namespace WebsitePanel.Providers.Lync {
} }
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void RemoveFederationDomainCompletedEventHandler(object sender, RemoveFederationDomainCompletedEventArgs e); public delegate void RemoveFederationDomainCompletedEventHandler(object sender, RemoveFederationDomainCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class RemoveFederationDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { public partial class RemoveFederationDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -905,6 +1018,32 @@ namespace WebsitePanel.Providers.Lync {
} }
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void ReloadConfigurationCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); public delegate void ReloadConfigurationCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void GetPolicyListCompletedEventHandler(object sender, GetPolicyListCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetPolicyListCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal GetPolicyListCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public string[] Result {
get {
this.RaiseExceptionIfNecessary();
return ((string[])(this.results[0]));
}
}
}
} }

View file

@ -70,6 +70,23 @@ namespace WebsitePanel.Server
} }
} }
[WebMethod, SoapHeader("settings")]
public string GetOrganizationTenantId(string organizationId)
{
try
{
Log.WriteStart("{0}.GetOrganizationTenantId", ProviderSettings.ProviderName);
string ret = Lync.GetOrganizationTenantId(organizationId);
Log.WriteEnd("{0}.GetOrganizationTenantId", ProviderSettings.ProviderName);
return ret;
}
catch (Exception ex)
{
Log.WriteError(String.Format("Error: {0}.GetOrganizationTenantId", ProviderSettings.ProviderName), ex);
throw;
}
}
[WebMethod, SoapHeader("settings")] [WebMethod, SoapHeader("settings")]
public bool DeleteOrganization(string organizationId, string sipDomain) public bool DeleteOrganization(string organizationId, string sipDomain)
{ {

View file

@ -536,12 +536,12 @@ namespace WebsitePanel.Server
[WebMethod, SoapHeader("settings")] [WebMethod, SoapHeader("settings")]
public void SetQuotaLimitOnFolder(string folderPath, string shareNameDrive, string quotaLimit, int mode, string wmiUserName, string wmiPassword) public void SetQuotaLimitOnFolder(string folderPath, string shareNameDrive, QuotaType quotaType, string quotaLimit, int mode, string wmiUserName, string wmiPassword)
{ {
try try
{ {
Log.WriteStart("'{0}' SetQuotaLimitOnFolder", ProviderSettings.ProviderName); Log.WriteStart("'{0}' SetQuotaLimitOnFolder", ProviderSettings.ProviderName);
OsProvider.SetQuotaLimitOnFolder(folderPath, shareNameDrive, quotaLimit, mode, wmiUserName, wmiPassword); OsProvider.SetQuotaLimitOnFolder(folderPath, shareNameDrive, quotaType, quotaLimit, mode, wmiUserName, wmiPassword);
Log.WriteEnd("'{0}' SetQuotaLimitOnFolder", ProviderSettings.ProviderName); Log.WriteEnd("'{0}' SetQuotaLimitOnFolder", ProviderSettings.ProviderName);
} }
catch (Exception ex) catch (Exception ex)
@ -551,6 +551,23 @@ namespace WebsitePanel.Server
} }
} }
[WebMethod, SoapHeader("settings")]
public Quota GetQuotaOnFolder(string folderPath, string wmiUserName, string wmiPassword)
{
try
{
Log.WriteStart("'{0}' GetQuotaOnFolder", ProviderSettings.ProviderName);
var result = OsProvider.GetQuotaOnFolder(folderPath, wmiUserName, wmiPassword);
Log.WriteEnd("'{0}' GetQuotaOnFolder", ProviderSettings.ProviderName);
return result;
}
catch (Exception ex)
{
Log.WriteError(String.Format("'{0}' GetQuotaOnFolder", ProviderSettings.ProviderName), ex);
throw;
}
}
[WebMethod, SoapHeader("settings")] [WebMethod, SoapHeader("settings")]
public void DeleteDirectoryRecursive(string rootPath) public void DeleteDirectoryRecursive(string rootPath)
{ {

View file

@ -315,6 +315,9 @@
<data name="Error.FILES_RENAME_FILE" xml:space="preserve"> <data name="Error.FILES_RENAME_FILE" xml:space="preserve">
<value>Error renaming file</value> <value>Error renaming file</value>
</data> </data>
<data name="Error.FOLDER_ALREADY_EXIST" xml:space="preserve">
<value>Error: Folder already exist</value>
</data>
<data name="Error.FILES_UNZIP_FILES" xml:space="preserve"> <data name="Error.FILES_UNZIP_FILES" xml:space="preserve">
<value>Error extracting files</value> <value>Error extracting files</value>
</data> </data>
@ -5110,10 +5113,10 @@
<data name="Quota.Exchange2007.RecoverableItemsSpace" xml:space="preserve"> <data name="Quota.Exchange2007.RecoverableItemsSpace" xml:space="preserve">
<value>Recoverable Items Storage, MB</value> <value>Recoverable Items Storage, MB</value>
</data> </data>
<data name="EnterpriseStorage.DiskStorageSpace" xml:space="preserve"> <data name="Quota.EnterpriseStorage.DiskStorageSpace" xml:space="preserve">
<value>Disk Storage Space, MB</value> <value>Disk Storage Space, Mb</value>
</data> </data>
<data name="EnterpriseStorage.Folders" xml:space="preserve"> <data name="Quota.EnterpriseStorage.Folders" xml:space="preserve">
<value>Number of Root Folders</value> <value>Number of Root Folders</value>
</data> </data>
<data name="Error.LYNC_DELETE_DOMAIN" xml:space="preserve"> <data name="Error.LYNC_DELETE_DOMAIN" xml:space="preserve">
@ -5350,6 +5353,9 @@
<data name="Error.ORGANIZATION_GET_SECURITY_GROUP_SETTINGS" xml:space="preserve"> <data name="Error.ORGANIZATION_GET_SECURITY_GROUP_SETTINGS" xml:space="preserve">
<value>Error reading group settings</value> <value>Error reading group settings</value>
</data> </data>
<data name="Error.ENTERPRISE_STORAGE_CREATE_FOLDER" xml:space="preserve">
<value>Error creating folder</value>
</data>
<data name="Error.ORGANIZATION_UPDATE_SECURITY_GROUP_SETTINGS" xml:space="preserve"> <data name="Error.ORGANIZATION_UPDATE_SECURITY_GROUP_SETTINGS" xml:space="preserve">
<value>Error updating group settings</value> <value>Error updating group settings</value>
</data> </data>

View file

@ -141,6 +141,11 @@ SPAN.Checkbox.Bold
border-top: solid 1px #DFDFDF; border-top: solid 1px #DFDFDF;
} }
.FormRBtnL
{
padding-top: 10px;
}
.FormLabel150 .FormLabel150
{ {
font-size: 8pt; font-size: 8pt;

View file

@ -201,4 +201,10 @@
<data name="lblLyncPhone.Text" xml:space="preserve"> <data name="lblLyncPhone.Text" xml:space="preserve">
<value>Lync Phone Numbers:</value> <value>Lync Phone Numbers:</value>
</data> </data>
<data name="lblFolders.Text" xml:space="preserve">
<value>Folders:</value>
</data>
<data name="lblEnterpriseStorage.Text" xml:space="preserve">
<value>Enterprise Storage, MB:</value>
</data>
</root> </root>

View file

@ -147,4 +147,25 @@
<data name="locFolderUrl.Text" xml:space="preserve"> <data name="locFolderUrl.Text" xml:space="preserve">
<value>Folder Url:</value> <value>Folder Url:</value>
</data> </data>
<data name="locFolderSize" xml:space="preserve">
<value>Folder Limit Size (Gb):</value>
</data>
<data name="rangeFolderSize" xml:space="preserve">
<value>*</value>
</data>
<data name="valRequireFolderSize.ErrorMessage" xml:space="preserve">
<value>Enter Folder Size</value>
</data>
<data name="locQuotaType" xml:space="preserve">
<value>Quota Type:</value>
</data>
<data name="valRequireFolderSize" xml:space="preserve">
<value>*</value>
</data>
<data name="rbtnQuotaHard" xml:space="preserve">
<value>Hard</value>
</data>
<data name="rbtnQuotaSoft" xml:space="preserve">
<value>Soft</value>
</data>
</root> </root>

View file

@ -135,7 +135,7 @@
<data name="HSFormComments.Text" xml:space="preserve"> <data name="HSFormComments.Text" xml:space="preserve">
<value /> <value />
</data> </data>
<data name="locQuota.Text" xml:space="preserve"> <data name="locQuotaFolders.Text" xml:space="preserve">
<value>Total Folders Allocated:</value> <value>Total Folders Allocated:</value>
</data> </data>
<data name="Text.PageName" xml:space="preserve"> <data name="Text.PageName" xml:space="preserve">
@ -145,7 +145,7 @@
<value>Folder Name</value> <value>Folder Name</value>
</data> </data>
<data name="gvFolderSize.Header" xml:space="preserve"> <data name="gvFolderSize.Header" xml:space="preserve">
<value>Folder Size</value> <value>Used Space</value>
</data> </data>
<data name="locTitle" xml:space="preserve"> <data name="locTitle" xml:space="preserve">
<value>Folders</value> <value>Folders</value>
@ -153,4 +153,13 @@
<data name="gvFolderUrl.Header" xml:space="preserve"> <data name="gvFolderUrl.Header" xml:space="preserve">
<value>Url</value> <value>Url</value>
</data> </data>
<data name="locQuotaSpace.Text" xml:space="preserve">
<value>Total Space Allocated (Gb):</value>
</data>
<data name="gvFolderQuota.Header" xml:space="preserve">
<value>Allocated Space</value>
</data>
<data name="locQuotaAvailableSpace.Text" xml:space="preserve">
<value>Used Diskspace (Mb):</value>
</data>
</root> </root>

View file

@ -73,7 +73,7 @@ namespace WebsitePanel.Portal.ExchangeServer
if (!result.IsSuccess && result.ErrorCodes.Count > 0) if (!result.IsSuccess && result.ErrorCodes.Count > 0)
{ {
messageBox.ShowMessage(result, "ENTERPRISE_STORAGE_FOLDER", "EnterpriseStorage"); messageBox.ShowMessage(result, "ENTERPRISE_STORAGE_CREATE_FOLDER", "Enterprise Storage");
return; return;
} }

View file

@ -30,9 +30,27 @@
<tr> <tr>
<td class="FormLabel150"><asp:Localize ID="locFolderName" runat="server" meta:resourcekey="locFolderName" Text="Folder Name:"></asp:Localize></td> <td class="FormLabel150"><asp:Localize ID="locFolderName" runat="server" meta:resourcekey="locFolderName" Text="Folder Name:"></asp:Localize></td>
<td> <td>
<asp:TextBox ID="txtFolderName" runat="server" CssClass="HugeTextBox200"></asp:TextBox> <asp:TextBox ID="txtFolderName" runat="server" CssClass="HugeTextBox200" ></asp:TextBox>
<asp:RequiredFieldValidator ID="valRequireFolderName" runat="server" meta:resourcekey="valRequireFolderName" ControlToValidate="txtFolderName" <asp:RequiredFieldValidator ID="valRequireFolderName" runat="server" meta:resourcekey="valRequireFolderName" ControlToValidate="txtFolderName"
ErrorMessage="Enter Folder Name" ValidationGroup="EditFolder" Display="Dynamic" Text="*" SetFocusOnError="True"></asp:RequiredFieldValidator> ErrorMessage="Enter Folder Name" ValidationGroup="EditFolder" Display="Dynamic" Text="*" SetFocusOnError="True"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="FormLabel150"><asp:Localize ID="locFolderSize" runat="server" meta:resourcekey="locFolderSize" Text="Folder Limit Size (Gb):"></asp:Localize></td>
<td>
<asp:TextBox ID="txtFolderSize" runat="server" CssClass="HugeTextBox200"></asp:TextBox>
<asp:RequiredFieldValidator ID="valRequireFolderSize" runat="server" meta:resourcekey="valRequireFolderSize" ControlToValidate="txtFolderSize"
ErrorMessage="Enter Folder Size" ValidationGroup="EditFolder" Display="Dynamic" Text="*" SetFocusOnError="True"></asp:RequiredFieldValidator>
<asp:RangeValidator ID="rangeFolderSize" runat="server" ControlToValidate="txtFolderSize" MaximumValue="99999999" MinimumValue="0.01" Type="Double"
ValidationGroup="EditFolder" Display="Dynamic" Text="*" SetFocusOnError="True"
ErrorMessage="The quota youve entered exceeds the available quota for tenant" />
</td>
</tr>
<tr>
<td class="FormLabel150"><asp:Localize ID="locQuotaType" runat="server" meta:resourcekey="locQuotaType" Text="Quota Type:"></asp:Localize></td>
<td class="FormRBtnL">
<asp:RadioButton ID="rbtnQuotaSoft" runat="server" meta:resourcekey="rbtnQuotaSoft" Text="Soft" GroupName="QuotaType" Checked="true" />
<asp:RadioButton ID="rbtnQuotaHard" runat="server" meta:resourcekey="rbtnQuotaHard" Text="Hard" GroupName="QuotaType" />
<br /> <br />
<br /> <br />
</td> </td>

View file

@ -45,6 +45,12 @@ namespace WebsitePanel.Portal.ExchangeServer
{ {
public partial class EnterpriseStorageFolderGeneralSettings : WebsitePanelModuleBase public partial class EnterpriseStorageFolderGeneralSettings : WebsitePanelModuleBase
{ {
#region Constants
private const int OneGb = 1024;
#endregion
protected void Page_Load(object sender, EventArgs e) protected void Page_Load(object sender, EventArgs e)
{ {
if (!IsPostBack) if (!IsPostBack)
@ -56,6 +62,17 @@ namespace WebsitePanel.Portal.ExchangeServer
} }
BindSettings(); BindSettings();
OrganizationStatistics organizationStats = ES.Services.Organizations.GetOrganizationStatisticsByOrganization(PanelRequest.ItemID);
if (organizationStats.AllocatedEnterpriseStorageSpace != -1)
{
OrganizationStatistics tenantStats = ES.Services.Organizations.GetOrganizationStatistics(PanelRequest.ItemID);
rangeFolderSize.MaximumValue = Math.Round((tenantStats.AllocatedEnterpriseStorageSpace - (decimal)tenantStats.UsedEnterpriseStorageSpace)/OneGb
+ Utils.ParseDecimal(txtFolderSize.Text, 0), 2).ToString();
rangeFolderSize.ErrorMessage = string.Format("The quota youve entered exceeds the available quota for tenant ({0}Gb)", rangeFolderSize.MaximumValue);
}
} }
} }
@ -64,7 +81,6 @@ namespace WebsitePanel.Portal.ExchangeServer
try try
{ {
// get settings // get settings
Organization org = ES.Services.Organizations.GetOrganization(PanelRequest.ItemID); Organization org = ES.Services.Organizations.GetOrganization(PanelRequest.ItemID);
SystemFile folder = ES.Services.EnterpriseStorage.GetEnterpriseFolder( SystemFile folder = ES.Services.EnterpriseStorage.GetEnterpriseFolder(
@ -76,12 +92,26 @@ namespace WebsitePanel.Portal.ExchangeServer
txtFolderName.Text = folder.Name; txtFolderName.Text = folder.Name;
lblFolderUrl.Text = folder.Url; lblFolderUrl.Text = folder.Url;
if (folder.FRSMQuotaMB != -1)
{
txtFolderSize.Text = (Math.Round((decimal)folder.FRSMQuotaMB / OneGb, 2)).ToString();
}
switch (folder.FsrmQuotaType)
{
case QuotaType.Hard:
rbtnQuotaHard.Checked = true;
break;
case QuotaType.Soft:
rbtnQuotaSoft.Checked = true;
break;
}
var esPermissions = ES.Services.EnterpriseStorage.GetEnterpriseFolderPermissions(PanelRequest.ItemID,folder.Name); var esPermissions = ES.Services.EnterpriseStorage.GetEnterpriseFolderPermissions(PanelRequest.ItemID,folder.Name);
chkDirectoryBrowsing.Checked = ES.Services.EnterpriseStorage.GetDirectoryBrowseEnabled(PanelRequest.ItemID, folder.Url); chkDirectoryBrowsing.Checked = ES.Services.EnterpriseStorage.GetDirectoryBrowseEnabled(PanelRequest.ItemID, folder.Url);
permissions.SetPermissions(esPermissions); permissions.SetPermissions(esPermissions);
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -96,8 +126,6 @@ namespace WebsitePanel.Portal.ExchangeServer
try try
{ {
bool redirectNeeded = false;
litFolderName.Text = txtFolderName.Text; litFolderName.Text = txtFolderName.Text;
SystemFile folder = new SystemFile { Name = PanelRequest.FolderID, Url = lblFolderUrl.Text }; SystemFile folder = new SystemFile { Name = PanelRequest.FolderID, Url = lblFolderUrl.Text };
@ -123,19 +151,26 @@ namespace WebsitePanel.Portal.ExchangeServer
folder = ES.Services.EnterpriseStorage.RenameEnterpriseFolder(PanelRequest.ItemID, PanelRequest.FolderID, txtFolderName.Text); folder = ES.Services.EnterpriseStorage.RenameEnterpriseFolder(PanelRequest.ItemID, PanelRequest.FolderID, txtFolderName.Text);
redirectNeeded = true; if (folder == null)
{
messageBox.ShowErrorMessage("FOLDER_ALREADY_EXIST");
return;
}
} }
ES.Services.EnterpriseStorage.SetEnterpriseFolderSettings(PanelRequest.ItemID, folder, permissions.GetPemissions(), chkDirectoryBrowsing.Checked); ES.Services.EnterpriseStorage.SetEnterpriseFolderSettings(
PanelRequest.ItemID,
folder,
permissions.GetPemissions(),
chkDirectoryBrowsing.Checked,
(int)(decimal.Parse(txtFolderSize.Text) * OneGb),
rbtnQuotaSoft.Checked ? QuotaType.Soft : QuotaType.Hard);
if (redirectNeeded)
{
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "enterprisestorage_folders", Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "enterprisestorage_folders",
"ItemID=" + PanelRequest.ItemID)); "ItemID=" + PanelRequest.ItemID));
} }
messageBox.ShowSuccessMessage("ENTERPRISE_STORAGE_UPDATE_FOLDER_SETTINGS");
}
catch (Exception ex) catch (Exception ex)
{ {
messageBox.ShowErrorMessage("ENTERPRISE_STORAGE_UPDATE_FOLDER_SETTINGS", ex); messageBox.ShowErrorMessage("ENTERPRISE_STORAGE_UPDATE_FOLDER_SETTINGS", ex);

View file

@ -130,6 +130,69 @@ namespace WebsitePanel.Portal.ExchangeServer {
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.RequiredFieldValidator valRequireFolderName; protected global::System.Web.UI.WebControls.RequiredFieldValidator valRequireFolderName;
/// <summary>
/// locFolderSize control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locFolderSize;
/// <summary>
/// txtFolderSize control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtFolderSize;
/// <summary>
/// valRequireFolderSize control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RequiredFieldValidator valRequireFolderSize;
/// <summary>
/// rangeFolderSize control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RangeValidator rangeFolderSize;
/// <summary>
/// locQuotaType control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locQuotaType;
/// <summary>
/// rbtnQuotaSoft control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RadioButton rbtnQuotaSoft;
/// <summary>
/// rbtnQuotaHard control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RadioButton rbtnQuotaHard;
/// <summary> /// <summary>
/// locFolderUrl control. /// locFolderUrl control.
/// </summary> /// </summary>

View file

@ -60,10 +60,16 @@
</asp:hyperlink> </asp:hyperlink>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="gvFolderQuota" SortExpression="FRSMQuotaGB">
<ItemStyle Width="20%"></ItemStyle>
<ItemTemplate>
<asp:Literal id="litFolderQuota" runat="server" Text='<%# ConvertMBytesToGB(Eval("FRSMQuotaMB")).ToString() + " Gb" %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="gvFolderSize" SortExpression="Size"> <asp:TemplateField HeaderText="gvFolderSize" SortExpression="Size">
<ItemStyle Width="20%"></ItemStyle> <ItemStyle Width="20%"></ItemStyle>
<ItemTemplate> <ItemTemplate>
<asp:Literal id="litFolderSize" runat="server" Text='<%# Eval("Size").ToString() + " Mb" %>'></asp:Literal> <asp:Literal id="litFolderSize" runat="server" Text='<%# (ConvertMBytesToGB(Eval("Size"))).ToString() + " Gb" %>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="gvFolderUrl"> <asp:TemplateField HeaderText="gvFolderUrl">
@ -93,9 +99,21 @@
</asp:ObjectDataSource> </asp:ObjectDataSource>
<br /> <br />
<asp:Localize ID="locQuota" runat="server" meta:resourcekey="locQuota" Text="Total Folders Used:"></asp:Localize> <asp:Localize ID="locQuotaFolders" runat="server" meta:resourcekey="locQuotaFolders" Text="Total Folders Allocated:"></asp:Localize>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
<wsp:QuotaViewer ID="foldersQuota" runat="server" QuotaTypeId="2" /> <wsp:QuotaViewer ID="foldersQuota" runat="server" QuotaTypeId="2" />
<br />
<br />
<asp:Localize ID="locQuotaSpace" runat="server" meta:resourcekey="locQuotaSpace" Text="Total Space Allocated (Gb):"></asp:Localize>
&nbsp;&nbsp;&nbsp;
<wsp:QuotaViewer ID="spaceQuota" runat="server" QuotaTypeId="3" />
<br />
<br />
<asp:Localize ID="locQuotaAvailableSpace" runat="server" meta:resourcekey="locQuotaAvailableSpace" Text="Used Diskspace (Mb):"></asp:Localize>
&nbsp;&nbsp;&nbsp;
<wsp:QuotaViewer ID="spaceAvailableQuota" runat="server" QuotaTypeId="2" />
</div> </div>
</div> </div>
</div> </div>

View file

@ -37,6 +37,12 @@ namespace WebsitePanel.Portal.ExchangeServer
{ {
public partial class EnterpriseStorageFolders : WebsitePanelModuleBase public partial class EnterpriseStorageFolders : WebsitePanelModuleBase
{ {
#region Constants
private const int OneGb = 1024;
#endregion
protected void Page_Load(object sender, EventArgs e) protected void Page_Load(object sender, EventArgs e)
{ {
if (!IsPostBack) if (!IsPostBack)
@ -61,16 +67,26 @@ namespace WebsitePanel.Portal.ExchangeServer
"ItemID=" + PanelRequest.ItemID); "ItemID=" + PanelRequest.ItemID);
} }
public decimal ConvertMBytesToGB(object size)
{
return Math.Round(Convert.ToDecimal(size) / OneGb, 2);
}
protected void BindEnterpriseStorageStats() protected void BindEnterpriseStorageStats()
{ {
OrganizationStatistics organizationStats = ES.Services.Organizations.GetOrganizationStatisticsByOrganization(PanelRequest.ItemID); btnAddFolder.Enabled = true;
OrganizationStatistics tenantStats = ES.Services.Organizations.GetOrganizationStatistics(PanelRequest.ItemID); OrganizationStatistics organizationStats = ES.Services.EnterpriseStorage.GetStatisticsByOrganization/*ES.Services.Organizations.GetOrganizationStatisticsByOrganization*/(PanelRequest.ItemID);
OrganizationStatistics tenantStats = ES.Services.EnterpriseStorage.GetStatistics/*ES.Services.Organizations.GetOrganizationStatistics*/(PanelRequest.ItemID);
foldersQuota.QuotaUsedValue = organizationStats.CreatedEnterpriseStorageFolders; foldersQuota.QuotaUsedValue = organizationStats.CreatedEnterpriseStorageFolders;
foldersQuota.QuotaValue = organizationStats.AllocatedEnterpriseStorageFolders; foldersQuota.QuotaValue = organizationStats.AllocatedEnterpriseStorageFolders;
spaceAvailableQuota.QuotaUsedValue = organizationStats.UsedEnterpriseStorageSpace;
spaceAvailableQuota.QuotaValue = organizationStats.AllocatedEnterpriseStorageSpace;
spaceQuota.QuotaValue = (int)Math.Round(ConvertMBytesToGB(organizationStats.UsedEnterpriseStorageSpace), 0);
if (organizationStats.AllocatedEnterpriseStorageFolders != -1) if (organizationStats.AllocatedEnterpriseStorageFolders != -1)
{ {
int folderAvailable = foldersQuota.QuotaAvailable = tenantStats.AllocatedEnterpriseStorageFolders - tenantStats.CreatedEnterpriseStorageFolders; int folderAvailable = foldersQuota.QuotaAvailable = tenantStats.AllocatedEnterpriseStorageFolders - tenantStats.CreatedEnterpriseStorageFolders;
@ -80,6 +96,16 @@ namespace WebsitePanel.Portal.ExchangeServer
btnAddFolder.Enabled = false; btnAddFolder.Enabled = false;
} }
} }
if (organizationStats.AllocatedEnterpriseStorageSpace != -1)
{
int spaceAvailable = spaceAvailableQuota.QuotaAvailable = tenantStats.AllocatedEnterpriseStorageSpace - tenantStats.UsedEnterpriseStorageSpace;
if (spaceAvailable <= 0)
{
btnAddFolder.Enabled = false;
}
}
} }
protected void btnAddFolder_Click(object sender, EventArgs e) protected void btnAddFolder_Click(object sender, EventArgs e)
@ -105,6 +131,8 @@ namespace WebsitePanel.Portal.ExchangeServer
} }
gvFolders.DataBind(); gvFolders.DataBind();
BindEnterpriseStorageStats();
} }
catch (Exception ex) catch (Exception ex)
{ {

View file

@ -167,13 +167,13 @@ namespace WebsitePanel.Portal.ExchangeServer {
protected global::System.Web.UI.WebControls.ObjectDataSource odsEnterpriseFoldersPaged; protected global::System.Web.UI.WebControls.ObjectDataSource odsEnterpriseFoldersPaged;
/// <summary> /// <summary>
/// locQuota control. /// locQuotaFolders control.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Localize locQuota; protected global::System.Web.UI.WebControls.Localize locQuotaFolders;
/// <summary> /// <summary>
/// foldersQuota control. /// foldersQuota control.
@ -183,5 +183,41 @@ namespace WebsitePanel.Portal.ExchangeServer {
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.QuotaViewer foldersQuota; protected global::WebsitePanel.Portal.QuotaViewer foldersQuota;
/// <summary>
/// locQuotaSpace control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locQuotaSpace;
/// <summary>
/// spaceQuota control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.QuotaViewer spaceQuota;
/// <summary>
/// locQuotaAvailableSpace control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locQuotaAvailableSpace;
/// <summary>
/// spaceAvailableQuota control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.QuotaViewer spaceAvailableQuota;
} }
} }

View file

@ -150,7 +150,6 @@ namespace WebsitePanel.Portal.ExchangeServer
if (!hideItems) if (!hideItems)
{ {
domainStats.QuotaUsedValue = orgStats.CreatedDomains; domainStats.QuotaUsedValue = orgStats.CreatedDomains;
domainStats.QuotaValue = orgStats.AllocatedDomains; domainStats.QuotaValue = orgStats.AllocatedDomains;
if (orgStats.AllocatedDomains != -1) domainStats.QuotaAvailable = tenantStats.AllocatedDomains - tenantStats.CreatedDomains; if (orgStats.AllocatedDomains != -1) domainStats.QuotaAvailable = tenantStats.AllocatedDomains - tenantStats.CreatedDomains;
@ -171,9 +170,6 @@ namespace WebsitePanel.Portal.ExchangeServer
organizationStatsPanel.Visible = false; organizationStatsPanel.Visible = false;
if (cntx.Groups.ContainsKey(ResourceGroups.Exchange)) if (cntx.Groups.ContainsKey(ResourceGroups.Exchange))
{ {
exchangeStatsPanel.Visible = true; exchangeStatsPanel.Visible = true;

View file

@ -203,9 +203,6 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
if (chkSelect == null) if (chkSelect == null)
continue; continue;
ExchangeAccount[] accounts = ES.Services.EnterpriseStorage.SearchESAccounts(PanelRequest.ItemID,
ddlSearchColumn.SelectedValue, txtSearchValue.Text + "%", "");
ESPermission permission = new ESPermission(); ESPermission permission = new ESPermission();
permission.Account = (string)gvPermissions.DataKeys[i][0]; permission.Account = (string)gvPermissions.DataKeys[i][0];
permission.Access = ((Literal)row.FindControl("litAccess")).Text; permission.Access = ((Literal)row.FindControl("litAccess")).Text;

View file

@ -117,9 +117,6 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<data name="chkEnableHardQuota.Text" xml:space="preserve">
<value>Enable Hard Quota:</value>
</data>
<data name="lblSpacesFolder.Text" xml:space="preserve"> <data name="lblSpacesFolder.Text" xml:space="preserve">
<value>Enterprise Storage Path:</value> <value>Enterprise Storage Path:</value>
</data> </data>

View file

@ -24,19 +24,4 @@
ControlToValidate="txtDomain" ErrorMessage="*"></asp:RegularExpressionValidator> ControlToValidate="txtDomain" ErrorMessage="*"></asp:RegularExpressionValidator>
</td> </td>
</tr> </tr>
<tr>
<td class="SubHead" width="200" nowrap></td>
<td width="100%">
<table>
<tr>
<td>
<asp:CheckBox runat="server" AutoPostBack="false" ID="chkEnableHardQuota" meta:resourcekey="chkEnableHardQuota" Text="Enable Hard Quota:" /></td>
</tr>
<tr>
<td>
<asp:Label runat="server" ID="lblFileServiceInfo" Text="Install File Services role on the file server to enable the check box" Font-Italic="true" Visible="false"></asp:Label></td>
</tr>
</table>
</td>
</tr>
</table> </table>

View file

@ -48,14 +48,9 @@ namespace WebsitePanel.Portal.ProviderControls
{ {
try try
{ {
chkEnableHardQuota.Enabled = ES.Services.EnterpriseStorage.CheckFileServicesInstallation(PanelRequest.ServiceId); txtFolder.Enabled = ES.Services.EnterpriseStorage.CheckFileServicesInstallation(PanelRequest.ServiceId);
txtFolder.Enabled = chkEnableHardQuota.Enabled;
if (!chkEnableHardQuota.Enabled)
lblFileServiceInfo.Visible = true;
}
catch
{
} }
catch { }
} }
} }
@ -65,7 +60,6 @@ namespace WebsitePanel.Portal.ProviderControls
txtFolder.Text = path; txtFolder.Text = path;
txtDomain.Text = settings["UsersDomain"]; txtDomain.Text = settings["UsersDomain"];
chkEnableHardQuota.Checked = settings["EnableHardQuota"] == "true" ? true : false;
} }
public void SaveSettings(StringDictionary settings) public void SaveSettings(StringDictionary settings)
@ -79,7 +73,6 @@ namespace WebsitePanel.Portal.ProviderControls
settings["LocationDrive"] = drive.Split(':')[0]; settings["LocationDrive"] = drive.Split(':')[0];
settings["UsersHome"] = folder; settings["UsersHome"] = folder;
settings["UsersDomain"] = domain; settings["UsersDomain"] = domain;
settings["EnableHardQuota"] = chkEnableHardQuota.Checked.ToString().ToLower();
} }
} }
} }

View file

@ -111,23 +111,5 @@ namespace WebsitePanel.Portal.ProviderControls {
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.RegularExpressionValidator valExpressionDomain; protected global::System.Web.UI.WebControls.RegularExpressionValidator valExpressionDomain;
/// <summary>
/// chkEnableHardQuota control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox chkEnableHardQuota;
/// <summary>
/// lblFileServiceInfo control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblFileServiceInfo;
} }
} }

View file

@ -39,7 +39,7 @@
</tr> </tr>
<tr> <tr>
<td colspan="2"> <td colspan="2">
<asp:CheckBox ID="chkAssignIPAutomatically" runat="server" meta:resourcekey="chkAssignIPAutomatically" Text="Assign IP addresses to the space on creation" /> <asp:CheckBox ID="chkAssignIPAutomatically" runat="server" meta:resourcekey="chkAssignIPAutomatically" Text="Assign IP addresses on space creation" />
</td> </td>
</tr> </tr>
</table> </table>

View file

@ -86,6 +86,14 @@
<td class="SubHead" nowrap><asp:Label ID="lblHyperVForPC" runat="server" meta:resourcekey="lblHyperVForPC" Text="Number of VM:" /></td> <td class="SubHead" nowrap><asp:Label ID="lblHyperVForPC" runat="server" meta:resourcekey="lblHyperVForPC" Text="Number of VM:" /></td>
<td class="Normal"><wsp:Quota ID="quotaNumberOfVm" runat="server" QuotaName="VPSForPC.ServersNumber" DisplayGauge="True" /></td> <td class="Normal"><wsp:Quota ID="quotaNumberOfVm" runat="server" QuotaName="VPSForPC.ServersNumber" DisplayGauge="True" /></td>
</tr> </tr>
<tr id="pnlFolders" runat="server">
<td class="SubHead" nowrap><asp:Label ID="lblFolders" runat="server" meta:resourcekey="lblFolders" Text="Folders:" /></td>
<td class="Normal"><wsp:Quota ID="quotaNumberOfFolders" runat="server" QuotaName="EnterpriseStorage.Folders" DisplayGauge="True" /></td>
</tr>
<tr id="pnlEnterpriseStorage" runat="server">
<td class="SubHead" nowrap><asp:Label ID="lblEnterpriseStorage" runat="server" meta:resourcekey="lblEnterpriseStorage" Text="Enterprise Storage:" /></td>
<td class="Normal"><wsp:Quota ID="quotaEnterpriseStorage" runat="server" QuotaName="EnterpriseStorage.DiskStorageSpace" DisplayGauge="True" /></td>
</tr>
</table> </table>
</div> </div>
<div class="FormFooter"> <div class="FormFooter">

View file

@ -70,7 +70,9 @@ namespace WebsitePanel.Portal
{ "quotaDatabases", "pnlDatabases" }, { "quotaDatabases", "pnlDatabases" },
{ "quotaNumberOfVm", "pnlHyperVForPC" }, { "quotaNumberOfVm", "pnlHyperVForPC" },
{ "quotaFtpAccounts", "pnlFtpAccounts" }, { "quotaFtpAccounts", "pnlFtpAccounts" },
{ "quotaExchangeStorage", "pnlExchangeStorage" } { "quotaExchangeStorage", "pnlExchangeStorage" },
{ "quotaNumberOfFolders", "pnlFolders" },
{ "quotaEnterpriseStorage", "pnlEnterpriseStorage" }
}; };
protected void Page_Load(object sender, EventArgs e) protected void Page_Load(object sender, EventArgs e)

View file

@ -29,7 +29,6 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // 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 // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
@ -47,7 +46,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlDiskspace; protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlDiskspace;
@ -57,7 +55,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.Quota quotaDiskspace; protected global::WebsitePanel.Portal.Quota quotaDiskspace;
@ -67,7 +64,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.HyperLink lnkViewDiskspaceDetails; protected global::System.Web.UI.WebControls.HyperLink lnkViewDiskspaceDetails;
@ -77,7 +73,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlBandwidth; protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlBandwidth;
@ -87,7 +82,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.Quota quotaBandwidth; protected global::WebsitePanel.Portal.Quota quotaBandwidth;
@ -97,7 +91,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.HyperLink lnkViewBandwidthDetails; protected global::System.Web.UI.WebControls.HyperLink lnkViewBandwidthDetails;
@ -107,7 +100,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlDomains; protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlDomains;
@ -117,7 +109,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Label lblDomains; protected global::System.Web.UI.WebControls.Label lblDomains;
@ -127,7 +118,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.Quota quotaDomains; protected global::WebsitePanel.Portal.Quota quotaDomains;
@ -137,7 +127,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlSubDomains; protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlSubDomains;
@ -147,7 +136,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Label lblSubDomains; protected global::System.Web.UI.WebControls.Label lblSubDomains;
@ -157,7 +145,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.Quota quotaSubDomains; protected global::WebsitePanel.Portal.Quota quotaSubDomains;
@ -167,7 +154,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlDomainPointers; protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlDomainPointers;
@ -177,7 +163,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Label lblDomainPointers; protected global::System.Web.UI.WebControls.Label lblDomainPointers;
@ -187,7 +172,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.Quota quotaDomainPointers; protected global::WebsitePanel.Portal.Quota quotaDomainPointers;
@ -197,7 +181,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlOrganizations; protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlOrganizations;
@ -207,7 +190,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Label lblOrganizations; protected global::System.Web.UI.WebControls.Label lblOrganizations;
@ -217,7 +199,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.Quota quotaOrganizations; protected global::WebsitePanel.Portal.Quota quotaOrganizations;
@ -227,7 +208,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlUserAccounts; protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlUserAccounts;
@ -237,7 +217,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Label lblUserAccounts; protected global::System.Web.UI.WebControls.Label lblUserAccounts;
@ -247,7 +226,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.Quota quotaUserAccounts; protected global::WebsitePanel.Portal.Quota quotaUserAccounts;
@ -257,7 +235,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlExchangeAccounts; protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlExchangeAccounts;
@ -267,7 +244,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Label lblExchangeAccounts; protected global::System.Web.UI.WebControls.Label lblExchangeAccounts;
@ -277,7 +253,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.Quota quotaExchangeAccounts; protected global::WebsitePanel.Portal.Quota quotaExchangeAccounts;
@ -287,7 +262,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlExchangeStorage; protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlExchangeStorage;
@ -297,7 +271,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Label lblExchangeStorage; protected global::System.Web.UI.WebControls.Label lblExchangeStorage;
@ -307,7 +280,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.Quota quotaExchangeStorage; protected global::WebsitePanel.Portal.Quota quotaExchangeStorage;
@ -317,7 +289,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlMailAccounts; protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlMailAccounts;
@ -327,7 +298,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Label lblMailAccounts; protected global::System.Web.UI.WebControls.Label lblMailAccounts;
@ -337,7 +307,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.Quota quotaMailAccounts; protected global::WebsitePanel.Portal.Quota quotaMailAccounts;
@ -347,7 +316,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlOCSUsers; protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlOCSUsers;
@ -357,7 +325,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Label lblOCSUsers; protected global::System.Web.UI.WebControls.Label lblOCSUsers;
@ -367,7 +334,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.Quota quotaOCSUsers; protected global::WebsitePanel.Portal.Quota quotaOCSUsers;
@ -377,7 +343,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlLyncUsers; protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlLyncUsers;
@ -387,7 +352,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Label lblLyncUsers; protected global::System.Web.UI.WebControls.Label lblLyncUsers;
@ -397,7 +361,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.Quota quotaLyncUsers; protected global::WebsitePanel.Portal.Quota quotaLyncUsers;
@ -407,7 +370,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlLyncPhone; protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlLyncPhone;
@ -417,7 +379,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Label Label1; protected global::System.Web.UI.WebControls.Label Label1;
@ -427,7 +388,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.Quota quotaLyncPhone; protected global::WebsitePanel.Portal.Quota quotaLyncPhone;
@ -437,7 +397,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlBlackBerryUsers; protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlBlackBerryUsers;
@ -447,7 +406,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Label lblBlackBerryUsers; protected global::System.Web.UI.WebControls.Label lblBlackBerryUsers;
@ -457,7 +415,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.Quota quotaBlackBerryUsers; protected global::WebsitePanel.Portal.Quota quotaBlackBerryUsers;
@ -467,7 +424,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlSharepointSites; protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlSharepointSites;
@ -477,7 +433,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Label lblSharepointSites; protected global::System.Web.UI.WebControls.Label lblSharepointSites;
@ -487,7 +442,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.Quota quotaSharepointSites; protected global::WebsitePanel.Portal.Quota quotaSharepointSites;
@ -497,7 +451,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlWebSites; protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlWebSites;
@ -507,7 +460,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Label lblWebSites; protected global::System.Web.UI.WebControls.Label lblWebSites;
@ -517,7 +469,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.Quota quotaWebSites; protected global::WebsitePanel.Portal.Quota quotaWebSites;
@ -527,7 +478,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlFtpAccounts; protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlFtpAccounts;
@ -537,7 +487,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Label lblFtpAccounts; protected global::System.Web.UI.WebControls.Label lblFtpAccounts;
@ -547,7 +496,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.Quota quotaFtpAccounts; protected global::WebsitePanel.Portal.Quota quotaFtpAccounts;
@ -557,7 +505,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlDatabases; protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlDatabases;
@ -567,7 +514,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Label lblDatabases; protected global::System.Web.UI.WebControls.Label lblDatabases;
@ -577,7 +523,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.Quota quotaDatabases; protected global::WebsitePanel.Portal.Quota quotaDatabases;
@ -587,7 +532,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlHyperVForPC; protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlHyperVForPC;
@ -597,7 +541,6 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Label lblHyperVForPC; protected global::System.Web.UI.WebControls.Label lblHyperVForPC;
@ -607,17 +550,69 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.Quota quotaNumberOfVm; protected global::WebsitePanel.Portal.Quota quotaNumberOfVm;
/// <summary>
/// pnlFolders control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlFolders;
/// <summary>
/// lblFolders control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblFolders;
/// <summary>
/// quotaNumberOfFolders control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.Quota quotaNumberOfFolders;
/// <summary>
/// pnlEnterpriseStorage control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlEnterpriseStorage;
/// <summary>
/// lblEnterpriseStorage control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblEnterpriseStorage;
/// <summary>
/// quotaEnterpriseStorage control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.Quota quotaEnterpriseStorage;
/// <summary> /// <summary>
/// btnViewQuotas control. /// btnViewQuotas control.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Button btnViewQuotas; protected global::System.Web.UI.WebControls.Button btnViewQuotas;
} }

View file

@ -5291,7 +5291,9 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Content> </Content>
<Content Include="ExchangeServer\App_LocalResources\EnterpriseStorageCreateFolder.ascx.resx" /> <Content Include="ExchangeServer\App_LocalResources\EnterpriseStorageCreateFolder.ascx.resx" />
<Content Include="ExchangeServer\App_LocalResources\EnterpriseStorageFolderGeneralSettings.ascx.resx" /> <Content Include="ExchangeServer\App_LocalResources\EnterpriseStorageFolderGeneralSettings.ascx.resx">
<SubType>Designer</SubType>
</Content>
<Content Include="ExchangeServer\UserControls\App_LocalResources\EnterpriseStoragePermissions.ascx.resx" /> <Content Include="ExchangeServer\UserControls\App_LocalResources\EnterpriseStoragePermissions.ascx.resx" />
<Content Include="Lync\App_LocalResources\LyncPhoneNumbers.ascx.resx"> <Content Include="Lync\App_LocalResources\LyncPhoneNumbers.ascx.resx">
<SubType>Designer</SubType> <SubType>Designer</SubType>