fixing bugs

This commit is contained in:
vfedosevich 2014-01-17 18:22:40 +03:00
parent dbb90a0f6b
commit 5c016ebfdf
4 changed files with 296 additions and 33 deletions

View file

@ -28,7 +28,6 @@ namespace 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;
@ -61,6 +60,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()
{ {
@ -115,6 +118,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)
@ -971,6 +980,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)
{ {
@ -979,11 +1086,11 @@ namespace WebsitePanel.EnterpriseServer
} }
/// <remarks/> /// <remarks/>
[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); public delegate void CheckFileServicesInstallationCompletedEventHandler(object sender, CheckFileServicesInstallationCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [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
@ -1009,11 +1116,11 @@ namespace WebsitePanel.EnterpriseServer
} }
/// <remarks/> /// <remarks/>
[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); public delegate void GetEnterpriseFoldersCompletedEventHandler(object sender, GetEnterpriseFoldersCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [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
@ -1039,11 +1146,11 @@ namespace WebsitePanel.EnterpriseServer
} }
/// <remarks/> /// <remarks/>
[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); public delegate void GetEnterpriseFolderCompletedEventHandler(object sender, GetEnterpriseFolderCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [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
@ -1069,11 +1176,11 @@ namespace WebsitePanel.EnterpriseServer
} }
/// <remarks/> /// <remarks/>
[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); public delegate void CreateEnterpriseFolderCompletedEventHandler(object sender, CreateEnterpriseFolderCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [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
@ -1099,11 +1206,11 @@ namespace WebsitePanel.EnterpriseServer
} }
/// <remarks/> /// <remarks/>
[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); public delegate void DeleteEnterpriseFolderCompletedEventHandler(object sender, DeleteEnterpriseFolderCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [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
@ -1129,11 +1236,11 @@ namespace WebsitePanel.EnterpriseServer
} }
/// <remarks/> /// <remarks/>
[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); public delegate void GetEnterpriseFolderPermissionsCompletedEventHandler(object sender, GetEnterpriseFolderPermissionsCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [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
@ -1159,11 +1266,11 @@ namespace WebsitePanel.EnterpriseServer
} }
/// <remarks/> /// <remarks/>
[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); public delegate void SetEnterpriseFolderPermissionsCompletedEventHandler(object sender, SetEnterpriseFolderPermissionsCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [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
@ -1189,11 +1296,11 @@ namespace WebsitePanel.EnterpriseServer
} }
/// <remarks/> /// <remarks/>
[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); public delegate void SearchESAccountsCompletedEventHandler(object sender, SearchESAccountsCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [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
@ -1219,11 +1326,11 @@ namespace WebsitePanel.EnterpriseServer
} }
/// <remarks/> /// <remarks/>
[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); public delegate void GetEnterpriseFoldersPagedCompletedEventHandler(object sender, GetEnterpriseFoldersPagedCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [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
@ -1249,11 +1356,11 @@ namespace WebsitePanel.EnterpriseServer
} }
/// <remarks/> /// <remarks/>
[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); public delegate void RenameEnterpriseFolderCompletedEventHandler(object sender, RenameEnterpriseFolderCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [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
@ -1279,11 +1386,11 @@ namespace WebsitePanel.EnterpriseServer
} }
/// <remarks/> /// <remarks/>
[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); public delegate void CreateEnterpriseStorageCompletedEventHandler(object sender, CreateEnterpriseStorageCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [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
@ -1309,11 +1416,11 @@ namespace WebsitePanel.EnterpriseServer
} }
/// <remarks/> /// <remarks/>
[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); public delegate void CheckEnterpriseStorageInitializationCompletedEventHandler(object sender, CheckEnterpriseStorageInitializationCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [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
@ -1339,11 +1446,11 @@ namespace WebsitePanel.EnterpriseServer
} }
/// <remarks/> /// <remarks/>
[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); public delegate void CheckUsersDomainExistsCompletedEventHandler(object sender, CheckUsersDomainExistsCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [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
@ -1369,11 +1476,11 @@ namespace WebsitePanel.EnterpriseServer
} }
/// <remarks/> /// <remarks/>
[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); public delegate void GetDirectoryBrowseEnabledCompletedEventHandler(object sender, GetDirectoryBrowseEnabledCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [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
@ -1399,10 +1506,70 @@ namespace WebsitePanel.EnterpriseServer
} }
/// <remarks/> /// <remarks/>
[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); public delegate void SetDirectoryBrowseEnabledCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[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); 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

@ -1040,5 +1040,85 @@ namespace WebsitePanel.EnterpriseServer
return null; 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

@ -158,5 +158,21 @@ namespace WebsitePanel.EnterpriseServer
} }
#endregion #endregion
#region Statistics
[WebMethod]
public OrganizationStatistics GetStatistics(int itemId)
{
return EnterpriseStorageController.GetStatistics(itemId);
}
[WebMethod]
public OrganizationStatistics GetStatisticsByOrganization(int itemId)
{
return EnterpriseStorageController.GetStatisticsByOrganization(itemId);
}
#endregion
} }
} }

View file

@ -76,8 +76,8 @@ namespace WebsitePanel.Portal.ExchangeServer
{ {
btnAddFolder.Enabled = true; btnAddFolder.Enabled = true;
OrganizationStatistics organizationStats = ES.Services.Organizations.GetOrganizationStatisticsByOrganization(PanelRequest.ItemID); OrganizationStatistics organizationStats = ES.Services.EnterpriseStorage.GetStatisticsByOrganization/*ES.Services.Organizations.GetOrganizationStatisticsByOrganization*/(PanelRequest.ItemID);
OrganizationStatistics tenantStats = ES.Services.Organizations.GetOrganizationStatistics(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;