diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/EnterpriseStorageProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/EnterpriseStorageProxy.cs
index da0a8852..c35f8954 100644
--- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/EnterpriseStorageProxy.cs
+++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/EnterpriseStorageProxy.cs
@@ -28,7 +28,6 @@ namespace WebsitePanel.EnterpriseServer
[System.Xml.Serialization.XmlIncludeAttribute(typeof(ServiceProviderItem))]
public partial class esEnterpriseStorage : Microsoft.Web.Services3.WebServicesClientProtocol
{
-
private System.Threading.SendOrPostCallback CheckFileServicesInstallationOperationCompleted;
private System.Threading.SendOrPostCallback GetEnterpriseFoldersOperationCompleted;
@@ -61,6 +60,10 @@ namespace WebsitePanel.EnterpriseServer
private System.Threading.SendOrPostCallback SetEnterpriseFolderSettingsOperationCompleted;
+ private System.Threading.SendOrPostCallback GetStatisticsOperationCompleted;
+
+ private System.Threading.SendOrPostCallback GetStatisticsByOrganizationOperationCompleted;
+
///
public esEnterpriseStorage()
{
@@ -115,6 +118,12 @@ namespace WebsitePanel.EnterpriseServer
///
public event SetEnterpriseFolderSettingsCompletedEventHandler SetEnterpriseFolderSettingsCompleted;
+ ///
+ public event GetStatisticsCompletedEventHandler GetStatisticsCompleted;
+
+ ///
+ public event GetStatisticsByOrganizationCompletedEventHandler GetStatisticsByOrganizationCompleted;
+
///
[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)
@@ -971,6 +980,104 @@ namespace WebsitePanel.EnterpriseServer
}
}
+ ///
+ [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]));
+ }
+
+ ///
+ public System.IAsyncResult BeginGetStatistics(int itemId, System.AsyncCallback callback, object asyncState)
+ {
+ return this.BeginInvoke("GetStatistics", new object[] {
+ itemId}, callback, asyncState);
+ }
+
+ ///
+ public OrganizationStatistics EndGetStatistics(System.IAsyncResult asyncResult)
+ {
+ object[] results = this.EndInvoke(asyncResult);
+ return ((OrganizationStatistics)(results[0]));
+ }
+
+ ///
+ public void GetStatisticsAsync(int itemId)
+ {
+ this.GetStatisticsAsync(itemId, null);
+ }
+
+ ///
+ 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));
+ }
+ }
+
+ ///
+ [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]));
+ }
+
+ ///
+ public System.IAsyncResult BeginGetStatisticsByOrganization(int itemId, System.AsyncCallback callback, object asyncState)
+ {
+ return this.BeginInvoke("GetStatisticsByOrganization", new object[] {
+ itemId}, callback, asyncState);
+ }
+
+ ///
+ public OrganizationStatistics EndGetStatisticsByOrganization(System.IAsyncResult asyncResult)
+ {
+ object[] results = this.EndInvoke(asyncResult);
+ return ((OrganizationStatistics)(results[0]));
+ }
+
+ ///
+ public void GetStatisticsByOrganizationAsync(int itemId)
+ {
+ this.GetStatisticsByOrganizationAsync(itemId, null);
+ }
+
+ ///
+ 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));
+ }
+ }
+
///
public new void CancelAsync(object userState)
{
@@ -979,11 +1086,11 @@ namespace WebsitePanel.EnterpriseServer
}
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
public delegate void CheckFileServicesInstallationCompletedEventHandler(object sender, CheckFileServicesInstallationCompletedEventArgs e);
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class CheckFileServicesInstallationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
@@ -1009,11 +1116,11 @@ namespace WebsitePanel.EnterpriseServer
}
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
public delegate void GetEnterpriseFoldersCompletedEventHandler(object sender, GetEnterpriseFoldersCompletedEventArgs e);
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetEnterpriseFoldersCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
@@ -1039,11 +1146,11 @@ namespace WebsitePanel.EnterpriseServer
}
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
public delegate void GetEnterpriseFolderCompletedEventHandler(object sender, GetEnterpriseFolderCompletedEventArgs e);
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetEnterpriseFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
@@ -1069,11 +1176,11 @@ namespace WebsitePanel.EnterpriseServer
}
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
public delegate void CreateEnterpriseFolderCompletedEventHandler(object sender, CreateEnterpriseFolderCompletedEventArgs e);
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class CreateEnterpriseFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
@@ -1099,11 +1206,11 @@ namespace WebsitePanel.EnterpriseServer
}
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
public delegate void DeleteEnterpriseFolderCompletedEventHandler(object sender, DeleteEnterpriseFolderCompletedEventArgs e);
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class DeleteEnterpriseFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
@@ -1129,11 +1236,11 @@ namespace WebsitePanel.EnterpriseServer
}
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
public delegate void GetEnterpriseFolderPermissionsCompletedEventHandler(object sender, GetEnterpriseFolderPermissionsCompletedEventArgs e);
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetEnterpriseFolderPermissionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
@@ -1159,11 +1266,11 @@ namespace WebsitePanel.EnterpriseServer
}
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
public delegate void SetEnterpriseFolderPermissionsCompletedEventHandler(object sender, SetEnterpriseFolderPermissionsCompletedEventArgs e);
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class SetEnterpriseFolderPermissionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
@@ -1189,11 +1296,11 @@ namespace WebsitePanel.EnterpriseServer
}
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
public delegate void SearchESAccountsCompletedEventHandler(object sender, SearchESAccountsCompletedEventArgs e);
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class SearchESAccountsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
@@ -1219,11 +1326,11 @@ namespace WebsitePanel.EnterpriseServer
}
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
public delegate void GetEnterpriseFoldersPagedCompletedEventHandler(object sender, GetEnterpriseFoldersPagedCompletedEventArgs e);
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetEnterpriseFoldersPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
@@ -1249,11 +1356,11 @@ namespace WebsitePanel.EnterpriseServer
}
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
public delegate void RenameEnterpriseFolderCompletedEventHandler(object sender, RenameEnterpriseFolderCompletedEventArgs e);
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class RenameEnterpriseFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
@@ -1279,11 +1386,11 @@ namespace WebsitePanel.EnterpriseServer
}
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
public delegate void CreateEnterpriseStorageCompletedEventHandler(object sender, CreateEnterpriseStorageCompletedEventArgs e);
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class CreateEnterpriseStorageCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
@@ -1309,11 +1416,11 @@ namespace WebsitePanel.EnterpriseServer
}
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
public delegate void CheckEnterpriseStorageInitializationCompletedEventHandler(object sender, CheckEnterpriseStorageInitializationCompletedEventArgs e);
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class CheckEnterpriseStorageInitializationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
@@ -1339,11 +1446,11 @@ namespace WebsitePanel.EnterpriseServer
}
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
public delegate void CheckUsersDomainExistsCompletedEventHandler(object sender, CheckUsersDomainExistsCompletedEventArgs e);
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class CheckUsersDomainExistsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
@@ -1369,11 +1476,11 @@ namespace WebsitePanel.EnterpriseServer
}
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
public delegate void GetDirectoryBrowseEnabledCompletedEventHandler(object sender, GetDirectoryBrowseEnabledCompletedEventArgs e);
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetDirectoryBrowseEnabledCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
@@ -1399,10 +1506,70 @@ namespace WebsitePanel.EnterpriseServer
}
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
public delegate void SetDirectoryBrowseEnabledCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
public delegate void SetEnterpriseFolderSettingsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
+ public delegate void GetStatisticsCompletedEventHandler(object sender, GetStatisticsCompletedEventArgs e);
+
+ ///
+ [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;
+ }
+
+ ///
+ public OrganizationStatistics Result
+ {
+ get
+ {
+ this.RaiseExceptionIfNecessary();
+ return ((OrganizationStatistics)(this.results[0]));
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")]
+ public delegate void GetStatisticsByOrganizationCompletedEventHandler(object sender, GetStatisticsByOrganizationCompletedEventArgs e);
+
+ ///
+ [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;
+ }
+
+ ///
+ public OrganizationStatistics Result
+ {
+ get
+ {
+ this.RaiseExceptionIfNecessary();
+ return ((OrganizationStatistics)(this.results[0]));
+ }
+ }
+ }
}
diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/EnterpriseStorage/EnterpriseStorageController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/EnterpriseStorage/EnterpriseStorageController.cs
index ad9ed437..bc333377 100644
--- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/EnterpriseStorage/EnterpriseStorageController.cs
+++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/EnterpriseStorage/EnterpriseStorageController.cs
@@ -1040,5 +1040,85 @@ namespace WebsitePanel.EnterpriseServer
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(DataProvider.GetUserByExchangeOrganizationIdInternally(org.Id));
+ List Packages = PackageController.GetPackages(user.UserId);
+
+ if ((Packages != null) & (Packages.Count > 0))
+ {
+ foreach (PackageInfo Package in Packages)
+ {
+ List 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
}
}
diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esEnterpriseStorage.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esEnterpriseStorage.asmx.cs
index e89987b6..bfa15387 100644
--- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esEnterpriseStorage.asmx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esEnterpriseStorage.asmx.cs
@@ -158,5 +158,21 @@ namespace WebsitePanel.EnterpriseServer
}
#endregion
+
+ #region Statistics
+
+ [WebMethod]
+ public OrganizationStatistics GetStatistics(int itemId)
+ {
+ return EnterpriseStorageController.GetStatistics(itemId);
+ }
+
+ [WebMethod]
+ public OrganizationStatistics GetStatisticsByOrganization(int itemId)
+ {
+ return EnterpriseStorageController.GetStatisticsByOrganization(itemId);
+ }
+
+ #endregion
}
}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/EnterpriseStorageFolders.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/EnterpriseStorageFolders.ascx.cs
index 0d5b1a75..fa4e1e50 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/EnterpriseStorageFolders.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/EnterpriseStorageFolders.ascx.cs
@@ -76,8 +76,8 @@ namespace WebsitePanel.Portal.ExchangeServer
{
btnAddFolder.Enabled = true;
- OrganizationStatistics organizationStats = ES.Services.Organizations.GetOrganizationStatisticsByOrganization(PanelRequest.ItemID);
- 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.QuotaValue = organizationStats.AllocatedEnterpriseStorageFolders;