From 52cf12187f0f8c9db13d57ba55eb5846d8348128 Mon Sep 17 00:00:00 2001 From: vfedosevich Date: Wed, 21 Aug 2013 18:24:45 +0300 Subject: [PATCH] update functionallity for security groups --- .../OrganizationProxy.cs | 2272 +++++++++++------ .../HostedSolution/OrganizationController.cs | 83 +- .../esOrganizations.asmx.cs | 11 +- .../HostedSolution/ActiveDirectoryUtils.cs | 11 + .../HostedSolution/ExchangeAccountType.cs | 3 +- .../HostedSolution/IOrganization.cs | 2 + .../OrganizationProvider.cs | 17 +- .../OrganizationProxy.cs | 226 ++ .../WebsitePanel.Server/Organizations.asmx.cs | 6 + .../Code/Helpers/OrganizationsHelper.cs | 25 + .../OrganizationCreateSecurityGroup.ascx.resx | 6 +- ...tionSecurityGroupGeneralSettings.ascx.resx | 6 +- .../OrganizationSecurityGroups.ascx.resx | 22 +- .../OrganizationCreateSecurityGroup.ascx | 13 +- .../OrganizationCreateSecurityGroup.ascx.cs | 37 +- .../OrganizationSecurityGroups.ascx | 29 +- .../OrganizationSecurityGroups.ascx.cs | 29 +- ...rganizationSecurityGroups.ascx.designer.cs | 30 +- 18 files changed, 1849 insertions(+), 979 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/OrganizationProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/OrganizationProxy.cs index edc457e7..5df3b637 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/OrganizationProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/OrganizationProxy.cs @@ -39,7 +39,8 @@ // // This source code was auto-generated by wsdl, Version=2.0.50727.3038. // -namespace WebsitePanel.EnterpriseServer.HostedSolution { +namespace WebsitePanel.EnterpriseServer.HostedSolution +{ using System.Xml.Serialization; using System.Web.Services; using System.ComponentModel; @@ -53,156 +54,178 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { using WebsitePanel.Providers.HostedSolution; using WebsitePanel.Providers.ResultObjects; - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Web.Services.WebServiceBindingAttribute(Name="esOrganizationsSoap", Namespace="http://tempuri.org/")] + [System.Web.Services.WebServiceBindingAttribute(Name = "esOrganizationsSoap", Namespace = "http://tempuri.org/")] [System.Xml.Serialization.XmlIncludeAttribute(typeof(ResultObject))] [System.Xml.Serialization.XmlIncludeAttribute(typeof(ServiceProviderItem))] - public partial class esOrganizations : Microsoft.Web.Services3.WebServicesClientProtocol { + public partial class esOrganizations : Microsoft.Web.Services3.WebServicesClientProtocol + { private System.Threading.SendOrPostCallback CheckOrgIdExistsOperationCompleted; - + private System.Threading.SendOrPostCallback CreateOrganizationOperationCompleted; - + private System.Threading.SendOrPostCallback GetRawOrganizationsPagedOperationCompleted; - + private System.Threading.SendOrPostCallback GetOrganizationsOperationCompleted; - + private System.Threading.SendOrPostCallback GetOrganizationUserSummuryLetterOperationCompleted; - + private System.Threading.SendOrPostCallback SendOrganizationUserSummuryLetterOperationCompleted; - + private System.Threading.SendOrPostCallback DeleteOrganizationOperationCompleted; - + private System.Threading.SendOrPostCallback GetOrganizationStatisticsOperationCompleted; - + private System.Threading.SendOrPostCallback GetOrganizationStatisticsByOrganizationOperationCompleted; - + private System.Threading.SendOrPostCallback GetOrganizationOperationCompleted; - + private System.Threading.SendOrPostCallback GetAccountIdByUserPrincipalNameOperationCompleted; - + private System.Threading.SendOrPostCallback AddOrganizationDomainOperationCompleted; - + private System.Threading.SendOrPostCallback ChangeOrganizationDomainTypeOperationCompleted; - + private System.Threading.SendOrPostCallback GetOrganizationDomainsOperationCompleted; - + private System.Threading.SendOrPostCallback DeleteOrganizationDomainOperationCompleted; - + private System.Threading.SendOrPostCallback SetOrganizationDefaultDomainOperationCompleted; - + private System.Threading.SendOrPostCallback CreateUserOperationCompleted; - + private System.Threading.SendOrPostCallback ImportUserOperationCompleted; - + private System.Threading.SendOrPostCallback GetOrganizationUsersPagedOperationCompleted; - + private System.Threading.SendOrPostCallback GetUserGeneralSettingsOperationCompleted; - + private System.Threading.SendOrPostCallback SetUserGeneralSettingsOperationCompleted; - + private System.Threading.SendOrPostCallback SetUserPrincipalNameOperationCompleted; - + private System.Threading.SendOrPostCallback SetUserPasswordOperationCompleted; - + private System.Threading.SendOrPostCallback SearchAccountsOperationCompleted; - + private System.Threading.SendOrPostCallback DeleteUserOperationCompleted; - + private System.Threading.SendOrPostCallback GetPasswordPolicyOperationCompleted; + private System.Threading.SendOrPostCallback CreateSecurityGroupOperationCompleted; + private System.Threading.SendOrPostCallback GetSecurityGroupGeneralSettingsOperationCompleted; - + + private System.Threading.SendOrPostCallback DeleteSecurityGroupOperationCompleted; + + private System.Threading.SendOrPostCallback SetSecurityGroupGeneralSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback GetOrganizationSecurityGroupsPagedOperationCompleted; + /// - public esOrganizations() { + public esOrganizations() + { this.Url = "http://localhost:9002/esOrganizations.asmx"; } /// public event CheckOrgIdExistsCompletedEventHandler CheckOrgIdExistsCompleted; - + /// public event CreateOrganizationCompletedEventHandler CreateOrganizationCompleted; - + /// public event GetRawOrganizationsPagedCompletedEventHandler GetRawOrganizationsPagedCompleted; - + /// public event GetOrganizationsCompletedEventHandler GetOrganizationsCompleted; - + /// public event GetOrganizationUserSummuryLetterCompletedEventHandler GetOrganizationUserSummuryLetterCompleted; - + /// public event SendOrganizationUserSummuryLetterCompletedEventHandler SendOrganizationUserSummuryLetterCompleted; - + /// public event DeleteOrganizationCompletedEventHandler DeleteOrganizationCompleted; - + /// public event GetOrganizationStatisticsCompletedEventHandler GetOrganizationStatisticsCompleted; - + /// public event GetOrganizationStatisticsByOrganizationCompletedEventHandler GetOrganizationStatisticsByOrganizationCompleted; - + /// public event GetOrganizationCompletedEventHandler GetOrganizationCompleted; - + /// public event GetAccountIdByUserPrincipalNameCompletedEventHandler GetAccountIdByUserPrincipalNameCompleted; - + /// public event AddOrganizationDomainCompletedEventHandler AddOrganizationDomainCompleted; - + /// public event ChangeOrganizationDomainTypeCompletedEventHandler ChangeOrganizationDomainTypeCompleted; - + /// public event GetOrganizationDomainsCompletedEventHandler GetOrganizationDomainsCompleted; - + /// public event DeleteOrganizationDomainCompletedEventHandler DeleteOrganizationDomainCompleted; - + /// public event SetOrganizationDefaultDomainCompletedEventHandler SetOrganizationDefaultDomainCompleted; - + /// public event CreateUserCompletedEventHandler CreateUserCompleted; - + /// public event ImportUserCompletedEventHandler ImportUserCompleted; - + /// public event GetOrganizationUsersPagedCompletedEventHandler GetOrganizationUsersPagedCompleted; - + /// public event GetUserGeneralSettingsCompletedEventHandler GetUserGeneralSettingsCompleted; - + /// public event SetUserGeneralSettingsCompletedEventHandler SetUserGeneralSettingsCompleted; - + /// public event SetUserPrincipalNameCompletedEventHandler SetUserPrincipalNameCompleted; - + /// public event SetUserPasswordCompletedEventHandler SetUserPasswordCompleted; - + /// public event SearchAccountsCompletedEventHandler SearchAccountsCompleted; - + /// public event DeleteUserCompletedEventHandler DeleteUserCompleted; - + /// public event GetPasswordPolicyCompletedEventHandler GetPasswordPolicyCompleted; + /// + public event CreateSecurityGroupCompletedEventHandler CreateSecurityGroupCompleted; + /// public event GetSecurityGroupGeneralSettingsCompletedEventHandler GetSecurityGroupGeneralSettingsCompleted; + /// + public event DeleteSecurityGroupCompletedEventHandler DeleteSecurityGroupCompleted; + + /// + public event SetSecurityGroupGeneralSettingsCompletedEventHandler SetSecurityGroupGeneralSettingsCompleted; + + /// + public event GetOrganizationSecurityGroupsPagedCompletedEventHandler GetOrganizationSecurityGroupsPagedCompleted; + /// [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/CheckOrgIdExists", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] public bool CheckOrgIdExists(string orgId) @@ -251,10 +274,11 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { this.CheckOrgIdExistsCompleted(this, new CheckOrgIdExistsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/CreateOrganization", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int CreateOrganization(int packageId, string organizationID, string organizationName, string domainName) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/CreateOrganization", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int CreateOrganization(int packageId, string organizationID, string organizationName, string domainName) + { object[] results = this.Invoke("CreateOrganization", new object[] { packageId, organizationID, @@ -262,32 +286,37 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { domainName}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginCreateOrganization(int packageId, string organizationID, string organizationName, string domainName, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginCreateOrganization(int packageId, string organizationID, string organizationName, string domainName, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("CreateOrganization", new object[] { packageId, organizationID, organizationName, domainName}, callback, asyncState); } - + /// - public int EndCreateOrganization(System.IAsyncResult asyncResult) { + public int EndCreateOrganization(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void CreateOrganizationAsync(int packageId, string organizationID, string organizationName, string domainName) { + public void CreateOrganizationAsync(int packageId, string organizationID, string organizationName, string domainName) + { this.CreateOrganizationAsync(packageId, organizationID, organizationName, domainName, null); } - + /// - public void CreateOrganizationAsync(int packageId, string organizationID, string organizationName, string domainName, object userState) { - if ((this.CreateOrganizationOperationCompleted == null)) { + public void CreateOrganizationAsync(int packageId, string organizationID, string organizationName, string domainName, object userState) + { + if ((this.CreateOrganizationOperationCompleted == null)) + { this.CreateOrganizationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateOrganizationOperationCompleted); } this.InvokeAsync("CreateOrganization", new object[] { @@ -296,17 +325,20 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { organizationName, domainName}, this.CreateOrganizationOperationCompleted, userState); } - - private void OnCreateOrganizationOperationCompleted(object arg) { - if ((this.CreateOrganizationCompleted != null)) { + + private void OnCreateOrganizationOperationCompleted(object arg) + { + if ((this.CreateOrganizationCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.CreateOrganizationCompleted(this, new CreateOrganizationCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetRawOrganizationsPaged", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public System.Data.DataSet GetRawOrganizationsPaged(int packageId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetRawOrganizationsPaged", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public System.Data.DataSet GetRawOrganizationsPaged(int packageId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) + { object[] results = this.Invoke("GetRawOrganizationsPaged", new object[] { packageId, recursive, @@ -317,9 +349,10 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { maximumRows}); return ((System.Data.DataSet)(results[0])); } - + /// - public System.IAsyncResult BeginGetRawOrganizationsPaged(int packageId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetRawOrganizationsPaged(int packageId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetRawOrganizationsPaged", new object[] { packageId, recursive, @@ -329,21 +362,25 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { startRow, maximumRows}, callback, asyncState); } - + /// - public System.Data.DataSet EndGetRawOrganizationsPaged(System.IAsyncResult asyncResult) { + public System.Data.DataSet EndGetRawOrganizationsPaged(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((System.Data.DataSet)(results[0])); } - + /// - public void GetRawOrganizationsPagedAsync(int packageId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) { + public void GetRawOrganizationsPagedAsync(int packageId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) + { this.GetRawOrganizationsPagedAsync(packageId, recursive, filterColumn, filterValue, sortColumn, startRow, maximumRows, null); } - + /// - public void GetRawOrganizationsPagedAsync(int packageId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, object userState) { - if ((this.GetRawOrganizationsPagedOperationCompleted == null)) { + public void GetRawOrganizationsPagedAsync(int packageId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, object userState) + { + if ((this.GetRawOrganizationsPagedOperationCompleted == null)) + { this.GetRawOrganizationsPagedOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetRawOrganizationsPagedOperationCompleted); } this.InvokeAsync("GetRawOrganizationsPaged", new object[] { @@ -355,61 +392,72 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { startRow, maximumRows}, this.GetRawOrganizationsPagedOperationCompleted, userState); } - - private void OnGetRawOrganizationsPagedOperationCompleted(object arg) { - if ((this.GetRawOrganizationsPagedCompleted != null)) { + + private void OnGetRawOrganizationsPagedOperationCompleted(object arg) + { + if ((this.GetRawOrganizationsPagedCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetRawOrganizationsPagedCompleted(this, new GetRawOrganizationsPagedCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetOrganizations", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public Organization[] GetOrganizations(int packageId, bool recursive) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetOrganizations", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public Organization[] GetOrganizations(int packageId, bool recursive) + { object[] results = this.Invoke("GetOrganizations", new object[] { packageId, recursive}); return ((Organization[])(results[0])); } - + /// - public System.IAsyncResult BeginGetOrganizations(int packageId, bool recursive, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetOrganizations(int packageId, bool recursive, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetOrganizations", new object[] { packageId, recursive}, callback, asyncState); } - + /// - public Organization[] EndGetOrganizations(System.IAsyncResult asyncResult) { + public Organization[] EndGetOrganizations(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((Organization[])(results[0])); } - + /// - public void GetOrganizationsAsync(int packageId, bool recursive) { + public void GetOrganizationsAsync(int packageId, bool recursive) + { this.GetOrganizationsAsync(packageId, recursive, null); } - + /// - public void GetOrganizationsAsync(int packageId, bool recursive, object userState) { - if ((this.GetOrganizationsOperationCompleted == null)) { + public void GetOrganizationsAsync(int packageId, bool recursive, object userState) + { + if ((this.GetOrganizationsOperationCompleted == null)) + { this.GetOrganizationsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetOrganizationsOperationCompleted); } this.InvokeAsync("GetOrganizations", new object[] { packageId, recursive}, this.GetOrganizationsOperationCompleted, userState); } - - private void OnGetOrganizationsOperationCompleted(object arg) { - if ((this.GetOrganizationsCompleted != null)) { + + private void OnGetOrganizationsOperationCompleted(object arg) + { + if ((this.GetOrganizationsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetOrganizationsCompleted(this, new GetOrganizationsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetOrganizationUserSummuryLetter", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public string GetOrganizationUserSummuryLetter(int itemId, int accountId, bool pmm, bool emailMode, bool signup) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetOrganizationUserSummuryLetter", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public string GetOrganizationUserSummuryLetter(int itemId, int accountId, bool pmm, bool emailMode, bool signup) + { object[] results = this.Invoke("GetOrganizationUserSummuryLetter", new object[] { itemId, accountId, @@ -418,9 +466,10 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { signup}); return ((string)(results[0])); } - + /// - public System.IAsyncResult BeginGetOrganizationUserSummuryLetter(int itemId, int accountId, bool pmm, bool emailMode, bool signup, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetOrganizationUserSummuryLetter(int itemId, int accountId, bool pmm, bool emailMode, bool signup, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetOrganizationUserSummuryLetter", new object[] { itemId, accountId, @@ -428,21 +477,25 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { emailMode, signup}, callback, asyncState); } - + /// - public string EndGetOrganizationUserSummuryLetter(System.IAsyncResult asyncResult) { + public string EndGetOrganizationUserSummuryLetter(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((string)(results[0])); } - + /// - public void GetOrganizationUserSummuryLetterAsync(int itemId, int accountId, bool pmm, bool emailMode, bool signup) { + public void GetOrganizationUserSummuryLetterAsync(int itemId, int accountId, bool pmm, bool emailMode, bool signup) + { this.GetOrganizationUserSummuryLetterAsync(itemId, accountId, pmm, emailMode, signup, null); } - + /// - public void GetOrganizationUserSummuryLetterAsync(int itemId, int accountId, bool pmm, bool emailMode, bool signup, object userState) { - if ((this.GetOrganizationUserSummuryLetterOperationCompleted == null)) { + public void GetOrganizationUserSummuryLetterAsync(int itemId, int accountId, bool pmm, bool emailMode, bool signup, object userState) + { + if ((this.GetOrganizationUserSummuryLetterOperationCompleted == null)) + { this.GetOrganizationUserSummuryLetterOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetOrganizationUserSummuryLetterOperationCompleted); } this.InvokeAsync("GetOrganizationUserSummuryLetter", new object[] { @@ -452,17 +505,20 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { emailMode, signup}, this.GetOrganizationUserSummuryLetterOperationCompleted, userState); } - - private void OnGetOrganizationUserSummuryLetterOperationCompleted(object arg) { - if ((this.GetOrganizationUserSummuryLetterCompleted != null)) { + + private void OnGetOrganizationUserSummuryLetterOperationCompleted(object arg) + { + if ((this.GetOrganizationUserSummuryLetterCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetOrganizationUserSummuryLetterCompleted(this, new GetOrganizationUserSummuryLetterCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SendOrganizationUserSummuryLetter", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int SendOrganizationUserSummuryLetter(int itemId, int accountId, bool signup, string to, string cc) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SendOrganizationUserSummuryLetter", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int SendOrganizationUserSummuryLetter(int itemId, int accountId, bool signup, string to, string cc) + { object[] results = this.Invoke("SendOrganizationUserSummuryLetter", new object[] { itemId, accountId, @@ -471,9 +527,10 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { cc}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginSendOrganizationUserSummuryLetter(int itemId, int accountId, bool signup, string to, string cc, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSendOrganizationUserSummuryLetter(int itemId, int accountId, bool signup, string to, string cc, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("SendOrganizationUserSummuryLetter", new object[] { itemId, accountId, @@ -481,21 +538,25 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { to, cc}, callback, asyncState); } - + /// - public int EndSendOrganizationUserSummuryLetter(System.IAsyncResult asyncResult) { + public int EndSendOrganizationUserSummuryLetter(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void SendOrganizationUserSummuryLetterAsync(int itemId, int accountId, bool signup, string to, string cc) { + public void SendOrganizationUserSummuryLetterAsync(int itemId, int accountId, bool signup, string to, string cc) + { this.SendOrganizationUserSummuryLetterAsync(itemId, accountId, signup, to, cc, null); } - + /// - public void SendOrganizationUserSummuryLetterAsync(int itemId, int accountId, bool signup, string to, string cc, object userState) { - if ((this.SendOrganizationUserSummuryLetterOperationCompleted == null)) { + public void SendOrganizationUserSummuryLetterAsync(int itemId, int accountId, bool signup, string to, string cc, object userState) + { + if ((this.SendOrganizationUserSummuryLetterOperationCompleted == null)) + { this.SendOrganizationUserSummuryLetterOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSendOrganizationUserSummuryLetterOperationCompleted); } this.InvokeAsync("SendOrganizationUserSummuryLetter", new object[] { @@ -505,298 +566,354 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { to, cc}, this.SendOrganizationUserSummuryLetterOperationCompleted, userState); } - - private void OnSendOrganizationUserSummuryLetterOperationCompleted(object arg) { - if ((this.SendOrganizationUserSummuryLetterCompleted != null)) { + + private void OnSendOrganizationUserSummuryLetterOperationCompleted(object arg) + { + if ((this.SendOrganizationUserSummuryLetterCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SendOrganizationUserSummuryLetterCompleted(this, new SendOrganizationUserSummuryLetterCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteOrganization", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int DeleteOrganization(int itemId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteOrganization", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DeleteOrganization(int itemId) + { object[] results = this.Invoke("DeleteOrganization", new object[] { itemId}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginDeleteOrganization(int itemId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginDeleteOrganization(int itemId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("DeleteOrganization", new object[] { itemId}, callback, asyncState); } - + /// - public int EndDeleteOrganization(System.IAsyncResult asyncResult) { + public int EndDeleteOrganization(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void DeleteOrganizationAsync(int itemId) { + public void DeleteOrganizationAsync(int itemId) + { this.DeleteOrganizationAsync(itemId, null); } - + /// - public void DeleteOrganizationAsync(int itemId, object userState) { - if ((this.DeleteOrganizationOperationCompleted == null)) { + public void DeleteOrganizationAsync(int itemId, object userState) + { + if ((this.DeleteOrganizationOperationCompleted == null)) + { this.DeleteOrganizationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteOrganizationOperationCompleted); } this.InvokeAsync("DeleteOrganization", new object[] { itemId}, this.DeleteOrganizationOperationCompleted, userState); } - - private void OnDeleteOrganizationOperationCompleted(object arg) { - if ((this.DeleteOrganizationCompleted != null)) { + + private void OnDeleteOrganizationOperationCompleted(object arg) + { + if ((this.DeleteOrganizationCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeleteOrganizationCompleted(this, new DeleteOrganizationCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetOrganizationStatistics", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public OrganizationStatistics GetOrganizationStatistics(int itemId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetOrganizationStatistics", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public OrganizationStatistics GetOrganizationStatistics(int itemId) + { object[] results = this.Invoke("GetOrganizationStatistics", new object[] { itemId}); return ((OrganizationStatistics)(results[0])); } - + /// - public System.IAsyncResult BeginGetOrganizationStatistics(int itemId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetOrganizationStatistics(int itemId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetOrganizationStatistics", new object[] { itemId}, callback, asyncState); } - + /// - public OrganizationStatistics EndGetOrganizationStatistics(System.IAsyncResult asyncResult) { + public OrganizationStatistics EndGetOrganizationStatistics(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((OrganizationStatistics)(results[0])); } - + /// - public void GetOrganizationStatisticsAsync(int itemId) { + public void GetOrganizationStatisticsAsync(int itemId) + { this.GetOrganizationStatisticsAsync(itemId, null); } - + /// - public void GetOrganizationStatisticsAsync(int itemId, object userState) { - if ((this.GetOrganizationStatisticsOperationCompleted == null)) { + public void GetOrganizationStatisticsAsync(int itemId, object userState) + { + if ((this.GetOrganizationStatisticsOperationCompleted == null)) + { this.GetOrganizationStatisticsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetOrganizationStatisticsOperationCompleted); } this.InvokeAsync("GetOrganizationStatistics", new object[] { itemId}, this.GetOrganizationStatisticsOperationCompleted, userState); } - - private void OnGetOrganizationStatisticsOperationCompleted(object arg) { - if ((this.GetOrganizationStatisticsCompleted != null)) { + + private void OnGetOrganizationStatisticsOperationCompleted(object arg) + { + if ((this.GetOrganizationStatisticsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetOrganizationStatisticsCompleted(this, new GetOrganizationStatisticsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetOrganizationStatisticsByOrganization", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public OrganizationStatistics GetOrganizationStatisticsByOrganization(int itemId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetOrganizationStatisticsByOrganization", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public OrganizationStatistics GetOrganizationStatisticsByOrganization(int itemId) + { object[] results = this.Invoke("GetOrganizationStatisticsByOrganization", new object[] { itemId}); return ((OrganizationStatistics)(results[0])); } - + /// - public System.IAsyncResult BeginGetOrganizationStatisticsByOrganization(int itemId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetOrganizationStatisticsByOrganization(int itemId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetOrganizationStatisticsByOrganization", new object[] { itemId}, callback, asyncState); } - + /// - public OrganizationStatistics EndGetOrganizationStatisticsByOrganization(System.IAsyncResult asyncResult) { + public OrganizationStatistics EndGetOrganizationStatisticsByOrganization(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((OrganizationStatistics)(results[0])); } - + /// - public void GetOrganizationStatisticsByOrganizationAsync(int itemId) { + public void GetOrganizationStatisticsByOrganizationAsync(int itemId) + { this.GetOrganizationStatisticsByOrganizationAsync(itemId, null); } - + /// - public void GetOrganizationStatisticsByOrganizationAsync(int itemId, object userState) { - if ((this.GetOrganizationStatisticsByOrganizationOperationCompleted == null)) { + public void GetOrganizationStatisticsByOrganizationAsync(int itemId, object userState) + { + if ((this.GetOrganizationStatisticsByOrganizationOperationCompleted == null)) + { this.GetOrganizationStatisticsByOrganizationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetOrganizationStatisticsByOrganizationOperationCompleted); } this.InvokeAsync("GetOrganizationStatisticsByOrganization", new object[] { itemId}, this.GetOrganizationStatisticsByOrganizationOperationCompleted, userState); } - - private void OnGetOrganizationStatisticsByOrganizationOperationCompleted(object arg) { - if ((this.GetOrganizationStatisticsByOrganizationCompleted != null)) { + + private void OnGetOrganizationStatisticsByOrganizationOperationCompleted(object arg) + { + if ((this.GetOrganizationStatisticsByOrganizationCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetOrganizationStatisticsByOrganizationCompleted(this, new GetOrganizationStatisticsByOrganizationCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetOrganization", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public Organization GetOrganization(int itemId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetOrganization", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public Organization GetOrganization(int itemId) + { object[] results = this.Invoke("GetOrganization", new object[] { itemId}); return ((Organization)(results[0])); } - + /// - public System.IAsyncResult BeginGetOrganization(int itemId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetOrganization(int itemId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetOrganization", new object[] { itemId}, callback, asyncState); } - + /// - public Organization EndGetOrganization(System.IAsyncResult asyncResult) { + public Organization EndGetOrganization(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((Organization)(results[0])); } - + /// - public void GetOrganizationAsync(int itemId) { + public void GetOrganizationAsync(int itemId) + { this.GetOrganizationAsync(itemId, null); } - + /// - public void GetOrganizationAsync(int itemId, object userState) { - if ((this.GetOrganizationOperationCompleted == null)) { + public void GetOrganizationAsync(int itemId, object userState) + { + if ((this.GetOrganizationOperationCompleted == null)) + { this.GetOrganizationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetOrganizationOperationCompleted); } this.InvokeAsync("GetOrganization", new object[] { itemId}, this.GetOrganizationOperationCompleted, userState); } - - private void OnGetOrganizationOperationCompleted(object arg) { - if ((this.GetOrganizationCompleted != null)) { + + private void OnGetOrganizationOperationCompleted(object arg) + { + if ((this.GetOrganizationCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetOrganizationCompleted(this, new GetOrganizationCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetAccountIdByUserPrincipalName", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int GetAccountIdByUserPrincipalName(int itemId, string userPrincipalName) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetAccountIdByUserPrincipalName", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int GetAccountIdByUserPrincipalName(int itemId, string userPrincipalName) + { object[] results = this.Invoke("GetAccountIdByUserPrincipalName", new object[] { itemId, userPrincipalName}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginGetAccountIdByUserPrincipalName(int itemId, string userPrincipalName, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetAccountIdByUserPrincipalName(int itemId, string userPrincipalName, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetAccountIdByUserPrincipalName", new object[] { itemId, userPrincipalName}, callback, asyncState); } - + /// - public int EndGetAccountIdByUserPrincipalName(System.IAsyncResult asyncResult) { + public int EndGetAccountIdByUserPrincipalName(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void GetAccountIdByUserPrincipalNameAsync(int itemId, string userPrincipalName) { + public void GetAccountIdByUserPrincipalNameAsync(int itemId, string userPrincipalName) + { this.GetAccountIdByUserPrincipalNameAsync(itemId, userPrincipalName, null); } - + /// - public void GetAccountIdByUserPrincipalNameAsync(int itemId, string userPrincipalName, object userState) { - if ((this.GetAccountIdByUserPrincipalNameOperationCompleted == null)) { + public void GetAccountIdByUserPrincipalNameAsync(int itemId, string userPrincipalName, object userState) + { + if ((this.GetAccountIdByUserPrincipalNameOperationCompleted == null)) + { this.GetAccountIdByUserPrincipalNameOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetAccountIdByUserPrincipalNameOperationCompleted); } this.InvokeAsync("GetAccountIdByUserPrincipalName", new object[] { itemId, userPrincipalName}, this.GetAccountIdByUserPrincipalNameOperationCompleted, userState); } - - private void OnGetAccountIdByUserPrincipalNameOperationCompleted(object arg) { - if ((this.GetAccountIdByUserPrincipalNameCompleted != null)) { + + private void OnGetAccountIdByUserPrincipalNameOperationCompleted(object arg) + { + if ((this.GetAccountIdByUserPrincipalNameCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetAccountIdByUserPrincipalNameCompleted(this, new GetAccountIdByUserPrincipalNameCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/AddOrganizationDomain", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int AddOrganizationDomain(int itemId, string domainName) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/AddOrganizationDomain", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int AddOrganizationDomain(int itemId, string domainName) + { object[] results = this.Invoke("AddOrganizationDomain", new object[] { itemId, domainName}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginAddOrganizationDomain(int itemId, string domainName, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginAddOrganizationDomain(int itemId, string domainName, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("AddOrganizationDomain", new object[] { itemId, domainName}, callback, asyncState); } - + /// - public int EndAddOrganizationDomain(System.IAsyncResult asyncResult) { + public int EndAddOrganizationDomain(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void AddOrganizationDomainAsync(int itemId, string domainName) { + public void AddOrganizationDomainAsync(int itemId, string domainName) + { this.AddOrganizationDomainAsync(itemId, domainName, null); } - + /// - public void AddOrganizationDomainAsync(int itemId, string domainName, object userState) { - if ((this.AddOrganizationDomainOperationCompleted == null)) { + public void AddOrganizationDomainAsync(int itemId, string domainName, object userState) + { + if ((this.AddOrganizationDomainOperationCompleted == null)) + { this.AddOrganizationDomainOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddOrganizationDomainOperationCompleted); } this.InvokeAsync("AddOrganizationDomain", new object[] { itemId, domainName}, this.AddOrganizationDomainOperationCompleted, userState); } - - private void OnAddOrganizationDomainOperationCompleted(object arg) { - if ((this.AddOrganizationDomainCompleted != null)) { + + private void OnAddOrganizationDomainOperationCompleted(object arg) + { + if ((this.AddOrganizationDomainCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.AddOrganizationDomainCompleted(this, new AddOrganizationDomainCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/ChangeOrganizationDomainType", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int ChangeOrganizationDomainType(int itemId, int domainId, ExchangeAcceptedDomainType newDomainType) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/ChangeOrganizationDomainType", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int ChangeOrganizationDomainType(int itemId, int domainId, ExchangeAcceptedDomainType newDomainType) + { object[] results = this.Invoke("ChangeOrganizationDomainType", new object[] { itemId, domainId, newDomainType}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginChangeOrganizationDomainType(int itemId, int domainId, ExchangeAcceptedDomainType newDomainType, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginChangeOrganizationDomainType(int itemId, int domainId, ExchangeAcceptedDomainType newDomainType, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("ChangeOrganizationDomainType", new object[] { itemId, domainId, newDomainType}, callback, asyncState); } - + /// - public int EndChangeOrganizationDomainType(System.IAsyncResult asyncResult) { + public int EndChangeOrganizationDomainType(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void ChangeOrganizationDomainTypeAsync(int itemId, int domainId, ExchangeAcceptedDomainType newDomainType) { + public void ChangeOrganizationDomainTypeAsync(int itemId, int domainId, ExchangeAcceptedDomainType newDomainType) + { this.ChangeOrganizationDomainTypeAsync(itemId, domainId, newDomainType, null); } - + /// - public void ChangeOrganizationDomainTypeAsync(int itemId, int domainId, ExchangeAcceptedDomainType newDomainType, object userState) { - if ((this.ChangeOrganizationDomainTypeOperationCompleted == null)) { + public void ChangeOrganizationDomainTypeAsync(int itemId, int domainId, ExchangeAcceptedDomainType newDomainType, object userState) + { + if ((this.ChangeOrganizationDomainTypeOperationCompleted == null)) + { this.ChangeOrganizationDomainTypeOperationCompleted = new System.Threading.SendOrPostCallback(this.OnChangeOrganizationDomainTypeOperationCompleted); } this.InvokeAsync("ChangeOrganizationDomainType", new object[] { @@ -804,146 +921,173 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { domainId, newDomainType}, this.ChangeOrganizationDomainTypeOperationCompleted, userState); } - - private void OnChangeOrganizationDomainTypeOperationCompleted(object arg) { - if ((this.ChangeOrganizationDomainTypeCompleted != null)) { + + private void OnChangeOrganizationDomainTypeOperationCompleted(object arg) + { + if ((this.ChangeOrganizationDomainTypeCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.ChangeOrganizationDomainTypeCompleted(this, new ChangeOrganizationDomainTypeCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetOrganizationDomains", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public OrganizationDomainName[] GetOrganizationDomains(int itemId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetOrganizationDomains", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public OrganizationDomainName[] GetOrganizationDomains(int itemId) + { object[] results = this.Invoke("GetOrganizationDomains", new object[] { itemId}); return ((OrganizationDomainName[])(results[0])); } - + /// - public System.IAsyncResult BeginGetOrganizationDomains(int itemId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetOrganizationDomains(int itemId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetOrganizationDomains", new object[] { itemId}, callback, asyncState); } - + /// - public OrganizationDomainName[] EndGetOrganizationDomains(System.IAsyncResult asyncResult) { + public OrganizationDomainName[] EndGetOrganizationDomains(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((OrganizationDomainName[])(results[0])); } - + /// - public void GetOrganizationDomainsAsync(int itemId) { + public void GetOrganizationDomainsAsync(int itemId) + { this.GetOrganizationDomainsAsync(itemId, null); } - + /// - public void GetOrganizationDomainsAsync(int itemId, object userState) { - if ((this.GetOrganizationDomainsOperationCompleted == null)) { + public void GetOrganizationDomainsAsync(int itemId, object userState) + { + if ((this.GetOrganizationDomainsOperationCompleted == null)) + { this.GetOrganizationDomainsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetOrganizationDomainsOperationCompleted); } this.InvokeAsync("GetOrganizationDomains", new object[] { itemId}, this.GetOrganizationDomainsOperationCompleted, userState); } - - private void OnGetOrganizationDomainsOperationCompleted(object arg) { - if ((this.GetOrganizationDomainsCompleted != null)) { + + private void OnGetOrganizationDomainsOperationCompleted(object arg) + { + if ((this.GetOrganizationDomainsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetOrganizationDomainsCompleted(this, new GetOrganizationDomainsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteOrganizationDomain", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int DeleteOrganizationDomain(int itemId, int domainId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteOrganizationDomain", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DeleteOrganizationDomain(int itemId, int domainId) + { object[] results = this.Invoke("DeleteOrganizationDomain", new object[] { itemId, domainId}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginDeleteOrganizationDomain(int itemId, int domainId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginDeleteOrganizationDomain(int itemId, int domainId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("DeleteOrganizationDomain", new object[] { itemId, domainId}, callback, asyncState); } - + /// - public int EndDeleteOrganizationDomain(System.IAsyncResult asyncResult) { + public int EndDeleteOrganizationDomain(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void DeleteOrganizationDomainAsync(int itemId, int domainId) { + public void DeleteOrganizationDomainAsync(int itemId, int domainId) + { this.DeleteOrganizationDomainAsync(itemId, domainId, null); } - + /// - public void DeleteOrganizationDomainAsync(int itemId, int domainId, object userState) { - if ((this.DeleteOrganizationDomainOperationCompleted == null)) { + public void DeleteOrganizationDomainAsync(int itemId, int domainId, object userState) + { + if ((this.DeleteOrganizationDomainOperationCompleted == null)) + { this.DeleteOrganizationDomainOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteOrganizationDomainOperationCompleted); } this.InvokeAsync("DeleteOrganizationDomain", new object[] { itemId, domainId}, this.DeleteOrganizationDomainOperationCompleted, userState); } - - private void OnDeleteOrganizationDomainOperationCompleted(object arg) { - if ((this.DeleteOrganizationDomainCompleted != null)) { + + private void OnDeleteOrganizationDomainOperationCompleted(object arg) + { + if ((this.DeleteOrganizationDomainCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeleteOrganizationDomainCompleted(this, new DeleteOrganizationDomainCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetOrganizationDefaultDomain", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int SetOrganizationDefaultDomain(int itemId, int domainId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetOrganizationDefaultDomain", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int SetOrganizationDefaultDomain(int itemId, int domainId) + { object[] results = this.Invoke("SetOrganizationDefaultDomain", new object[] { itemId, domainId}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginSetOrganizationDefaultDomain(int itemId, int domainId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSetOrganizationDefaultDomain(int itemId, int domainId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("SetOrganizationDefaultDomain", new object[] { itemId, domainId}, callback, asyncState); } - + /// - public int EndSetOrganizationDefaultDomain(System.IAsyncResult asyncResult) { + public int EndSetOrganizationDefaultDomain(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void SetOrganizationDefaultDomainAsync(int itemId, int domainId) { + public void SetOrganizationDefaultDomainAsync(int itemId, int domainId) + { this.SetOrganizationDefaultDomainAsync(itemId, domainId, null); } - + /// - public void SetOrganizationDefaultDomainAsync(int itemId, int domainId, object userState) { - if ((this.SetOrganizationDefaultDomainOperationCompleted == null)) { + public void SetOrganizationDefaultDomainAsync(int itemId, int domainId, object userState) + { + if ((this.SetOrganizationDefaultDomainOperationCompleted == null)) + { this.SetOrganizationDefaultDomainOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetOrganizationDefaultDomainOperationCompleted); } this.InvokeAsync("SetOrganizationDefaultDomain", new object[] { itemId, domainId}, this.SetOrganizationDefaultDomainOperationCompleted, userState); } - - private void OnSetOrganizationDefaultDomainOperationCompleted(object arg) { - if ((this.SetOrganizationDefaultDomainCompleted != null)) { + + private void OnSetOrganizationDefaultDomainOperationCompleted(object arg) + { + if ((this.SetOrganizationDefaultDomainCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetOrganizationDefaultDomainCompleted(this, new SetOrganizationDefaultDomainCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/CreateUser", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int CreateUser(int itemId, string displayName, string name, string domain, string password, string subscriberNumber, bool sendNotification, string to) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/CreateUser", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int CreateUser(int itemId, string displayName, string name, string domain, string password, string subscriberNumber, bool sendNotification, string to) + { object[] results = this.Invoke("CreateUser", new object[] { itemId, displayName, @@ -955,9 +1099,10 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { to}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginCreateUser(int itemId, string displayName, string name, string domain, string password, string subscriberNumber, bool sendNotification, string to, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginCreateUser(int itemId, string displayName, string name, string domain, string password, string subscriberNumber, bool sendNotification, string to, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("CreateUser", new object[] { itemId, displayName, @@ -968,21 +1113,25 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { sendNotification, to}, callback, asyncState); } - + /// - public int EndCreateUser(System.IAsyncResult asyncResult) { + public int EndCreateUser(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void CreateUserAsync(int itemId, string displayName, string name, string domain, string password, string subscriberNumber, bool sendNotification, string to) { + public void CreateUserAsync(int itemId, string displayName, string name, string domain, string password, string subscriberNumber, bool sendNotification, string to) + { this.CreateUserAsync(itemId, displayName, name, domain, password, subscriberNumber, sendNotification, to, null); } - + /// - public void CreateUserAsync(int itemId, string displayName, string name, string domain, string password, string subscriberNumber, bool sendNotification, string to, object userState) { - if ((this.CreateUserOperationCompleted == null)) { + public void CreateUserAsync(int itemId, string displayName, string name, string domain, string password, string subscriberNumber, bool sendNotification, string to, object userState) + { + if ((this.CreateUserOperationCompleted == null)) + { this.CreateUserOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateUserOperationCompleted); } this.InvokeAsync("CreateUser", new object[] { @@ -995,17 +1144,20 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { sendNotification, to}, this.CreateUserOperationCompleted, userState); } - - private void OnCreateUserOperationCompleted(object arg) { - if ((this.CreateUserCompleted != null)) { + + private void OnCreateUserOperationCompleted(object arg) + { + if ((this.CreateUserCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.CreateUserCompleted(this, new CreateUserCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/ImportUser", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int ImportUser(int itemId, string accountName, string displayName, string name, string domain, string password, string subscriberNumber) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/ImportUser", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int ImportUser(int itemId, string accountName, string displayName, string name, string domain, string password, string subscriberNumber) + { object[] results = this.Invoke("ImportUser", new object[] { itemId, accountName, @@ -1016,9 +1168,10 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { subscriberNumber}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginImportUser(int itemId, string accountName, string displayName, string name, string domain, string password, string subscriberNumber, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginImportUser(int itemId, string accountName, string displayName, string name, string domain, string password, string subscriberNumber, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("ImportUser", new object[] { itemId, accountName, @@ -1028,21 +1181,25 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { password, subscriberNumber}, callback, asyncState); } - + /// - public int EndImportUser(System.IAsyncResult asyncResult) { + public int EndImportUser(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void ImportUserAsync(int itemId, string accountName, string displayName, string name, string domain, string password, string subscriberNumber) { + public void ImportUserAsync(int itemId, string accountName, string displayName, string name, string domain, string password, string subscriberNumber) + { this.ImportUserAsync(itemId, accountName, displayName, name, domain, password, subscriberNumber, null); } - + /// - public void ImportUserAsync(int itemId, string accountName, string displayName, string name, string domain, string password, string subscriberNumber, object userState) { - if ((this.ImportUserOperationCompleted == null)) { + public void ImportUserAsync(int itemId, string accountName, string displayName, string name, string domain, string password, string subscriberNumber, object userState) + { + if ((this.ImportUserOperationCompleted == null)) + { this.ImportUserOperationCompleted = new System.Threading.SendOrPostCallback(this.OnImportUserOperationCompleted); } this.InvokeAsync("ImportUser", new object[] { @@ -1054,17 +1211,20 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { password, subscriberNumber}, this.ImportUserOperationCompleted, userState); } - - private void OnImportUserOperationCompleted(object arg) { - if ((this.ImportUserCompleted != null)) { + + private void OnImportUserOperationCompleted(object arg) + { + if ((this.ImportUserCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.ImportUserCompleted(this, new ImportUserCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetOrganizationUsersPaged", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public OrganizationUsersPaged GetOrganizationUsersPaged(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetOrganizationUsersPaged", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public OrganizationUsersPaged GetOrganizationUsersPaged(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) + { object[] results = this.Invoke("GetOrganizationUsersPaged", new object[] { itemId, filterColumn, @@ -1074,9 +1234,10 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { maximumRows}); return ((OrganizationUsersPaged)(results[0])); } - + /// - public System.IAsyncResult BeginGetOrganizationUsersPaged(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetOrganizationUsersPaged(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetOrganizationUsersPaged", new object[] { itemId, filterColumn, @@ -1085,21 +1246,25 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { startRow, maximumRows}, callback, asyncState); } - + /// - public OrganizationUsersPaged EndGetOrganizationUsersPaged(System.IAsyncResult asyncResult) { + public OrganizationUsersPaged EndGetOrganizationUsersPaged(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((OrganizationUsersPaged)(results[0])); } - + /// - public void GetOrganizationUsersPagedAsync(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) { + public void GetOrganizationUsersPagedAsync(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) + { this.GetOrganizationUsersPagedAsync(itemId, filterColumn, filterValue, sortColumn, startRow, maximumRows, null); } - + /// - public void GetOrganizationUsersPagedAsync(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, object userState) { - if ((this.GetOrganizationUsersPagedOperationCompleted == null)) { + public void GetOrganizationUsersPagedAsync(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, object userState) + { + if ((this.GetOrganizationUsersPagedOperationCompleted == null)) + { this.GetOrganizationUsersPagedOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetOrganizationUsersPagedOperationCompleted); } this.InvokeAsync("GetOrganizationUsersPaged", new object[] { @@ -1110,90 +1275,101 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { startRow, maximumRows}, this.GetOrganizationUsersPagedOperationCompleted, userState); } - - private void OnGetOrganizationUsersPagedOperationCompleted(object arg) { - if ((this.GetOrganizationUsersPagedCompleted != null)) { + + private void OnGetOrganizationUsersPagedOperationCompleted(object arg) + { + if ((this.GetOrganizationUsersPagedCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetOrganizationUsersPagedCompleted(this, new GetOrganizationUsersPagedCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetUserGeneralSettings", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public OrganizationUser GetUserGeneralSettings(int itemId, int accountId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetUserGeneralSettings", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public OrganizationUser GetUserGeneralSettings(int itemId, int accountId) + { object[] results = this.Invoke("GetUserGeneralSettings", new object[] { itemId, accountId}); return ((OrganizationUser)(results[0])); } - + /// - public System.IAsyncResult BeginGetUserGeneralSettings(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetUserGeneralSettings(int itemId, int accountId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetUserGeneralSettings", new object[] { itemId, accountId}, callback, asyncState); } - + /// - public OrganizationUser EndGetUserGeneralSettings(System.IAsyncResult asyncResult) { + public OrganizationUser EndGetUserGeneralSettings(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((OrganizationUser)(results[0])); } - + /// - public void GetUserGeneralSettingsAsync(int itemId, int accountId) { + public void GetUserGeneralSettingsAsync(int itemId, int accountId) + { this.GetUserGeneralSettingsAsync(itemId, accountId, null); } - + /// - public void GetUserGeneralSettingsAsync(int itemId, int accountId, object userState) { - if ((this.GetUserGeneralSettingsOperationCompleted == null)) { + public void GetUserGeneralSettingsAsync(int itemId, int accountId, object userState) + { + if ((this.GetUserGeneralSettingsOperationCompleted == null)) + { this.GetUserGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetUserGeneralSettingsOperationCompleted); } this.InvokeAsync("GetUserGeneralSettings", new object[] { itemId, accountId}, this.GetUserGeneralSettingsOperationCompleted, userState); } - - private void OnGetUserGeneralSettingsOperationCompleted(object arg) { - if ((this.GetUserGeneralSettingsCompleted != null)) { + + private void OnGetUserGeneralSettingsOperationCompleted(object arg) + { + if ((this.GetUserGeneralSettingsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetUserGeneralSettingsCompleted(this, new GetUserGeneralSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetUserGeneralSettings", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetUserGeneralSettings", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] public int SetUserGeneralSettings( - int itemId, - int accountId, - string displayName, - string password, - bool hideAddressBook, - bool disabled, - bool locked, - string firstName, - string initials, - string lastName, - string address, - string city, - string state, - string zip, - string country, - string jobTitle, - string company, - string department, - string office, - string managerAccountName, - string businessPhone, - string fax, - string homePhone, - string mobilePhone, - string pager, - string webPage, - string notes, - string externalEmail, - string subscriberNumber) { + int itemId, + int accountId, + string displayName, + string password, + bool hideAddressBook, + bool disabled, + bool locked, + string firstName, + string initials, + string lastName, + string address, + string city, + string state, + string zip, + string country, + string jobTitle, + string company, + string department, + string office, + string managerAccountName, + string businessPhone, + string fax, + string homePhone, + string mobilePhone, + string pager, + string webPage, + string notes, + string externalEmail, + string subscriberNumber) + { object[] results = this.Invoke("SetUserGeneralSettings", new object[] { itemId, accountId, @@ -1226,40 +1402,41 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { subscriberNumber}); return ((int)(results[0])); } - + /// public System.IAsyncResult BeginSetUserGeneralSettings( - int itemId, - int accountId, - string displayName, - string password, - bool hideAddressBook, - bool disabled, - bool locked, - string firstName, - string initials, - string lastName, - string address, - string city, - string state, - string zip, - string country, - string jobTitle, - string company, - string department, - string office, - string managerAccountName, - string businessPhone, - string fax, - string homePhone, - string mobilePhone, - string pager, - string webPage, - string notes, - string externalEmail, - string subscriberNumber, - System.AsyncCallback callback, - object asyncState) { + int itemId, + int accountId, + string displayName, + string password, + bool hideAddressBook, + bool disabled, + bool locked, + string firstName, + string initials, + string lastName, + string address, + string city, + string state, + string zip, + string country, + string jobTitle, + string company, + string department, + string office, + string managerAccountName, + string businessPhone, + string fax, + string homePhone, + string mobilePhone, + string pager, + string webPage, + string notes, + string externalEmail, + string subscriberNumber, + System.AsyncCallback callback, + object asyncState) + { return this.BeginInvoke("SetUserGeneralSettings", new object[] { itemId, accountId, @@ -1291,80 +1468,84 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { externalEmail, subscriberNumber}, callback, asyncState); } - + /// - public int EndSetUserGeneralSettings(System.IAsyncResult asyncResult) { + public int EndSetUserGeneralSettings(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// public void SetUserGeneralSettingsAsync( - int itemId, - int accountId, - string displayName, - string password, - bool hideAddressBook, - bool disabled, - bool locked, - string firstName, - string initials, - string lastName, - string address, - string city, - string state, - string zip, - string country, - string jobTitle, - string company, - string department, - string office, - string managerAccountName, - string businessPhone, - string fax, - string homePhone, - string mobilePhone, - string pager, - string webPage, - string notes, - string externalEmail, - string subscriberNumber) { + int itemId, + int accountId, + string displayName, + string password, + bool hideAddressBook, + bool disabled, + bool locked, + string firstName, + string initials, + string lastName, + string address, + string city, + string state, + string zip, + string country, + string jobTitle, + string company, + string department, + string office, + string managerAccountName, + string businessPhone, + string fax, + string homePhone, + string mobilePhone, + string pager, + string webPage, + string notes, + string externalEmail, + string subscriberNumber) + { this.SetUserGeneralSettingsAsync(itemId, accountId, displayName, password, hideAddressBook, disabled, locked, firstName, initials, lastName, address, city, state, zip, country, jobTitle, company, department, office, managerAccountName, businessPhone, fax, homePhone, mobilePhone, pager, webPage, notes, externalEmail, subscriberNumber, null); } - + /// public void SetUserGeneralSettingsAsync( - int itemId, - int accountId, - string displayName, - string password, - bool hideAddressBook, - bool disabled, - bool locked, - string firstName, - string initials, - string lastName, - string address, - string city, - string state, - string zip, - string country, - string jobTitle, - string company, - string department, - string office, - string managerAccountName, - string businessPhone, - string fax, - string homePhone, - string mobilePhone, - string pager, - string webPage, - string notes, - string externalEmail, - string subscriberNumber, - object userState) { - if ((this.SetUserGeneralSettingsOperationCompleted == null)) { + int itemId, + int accountId, + string displayName, + string password, + bool hideAddressBook, + bool disabled, + bool locked, + string firstName, + string initials, + string lastName, + string address, + string city, + string state, + string zip, + string country, + string jobTitle, + string company, + string department, + string office, + string managerAccountName, + string businessPhone, + string fax, + string homePhone, + string mobilePhone, + string pager, + string webPage, + string notes, + string externalEmail, + string subscriberNumber, + object userState) + { + if ((this.SetUserGeneralSettingsOperationCompleted == null)) + { this.SetUserGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetUserGeneralSettingsOperationCompleted); } this.InvokeAsync("SetUserGeneralSettings", new object[] { @@ -1398,17 +1579,20 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { externalEmail, subscriberNumber}, this.SetUserGeneralSettingsOperationCompleted, userState); } - - private void OnSetUserGeneralSettingsOperationCompleted(object arg) { - if ((this.SetUserGeneralSettingsCompleted != null)) { + + private void OnSetUserGeneralSettingsOperationCompleted(object arg) + { + if ((this.SetUserGeneralSettingsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetUserGeneralSettingsCompleted(this, new SetUserGeneralSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetUserPrincipalName", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int SetUserPrincipalName(int itemId, int accountId, string userPrincipalName, bool inherit) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetUserPrincipalName", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int SetUserPrincipalName(int itemId, int accountId, string userPrincipalName, bool inherit) + { object[] results = this.Invoke("SetUserPrincipalName", new object[] { itemId, accountId, @@ -1416,30 +1600,35 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { inherit}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginSetUserPrincipalName(int itemId, int accountId, string userPrincipalName, bool inherit, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSetUserPrincipalName(int itemId, int accountId, string userPrincipalName, bool inherit, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("SetUserPrincipalName", new object[] { itemId, accountId, userPrincipalName, inherit}, callback, asyncState); } - + /// - public int EndSetUserPrincipalName(System.IAsyncResult asyncResult) { + public int EndSetUserPrincipalName(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void SetUserPrincipalNameAsync(int itemId, int accountId, string userPrincipalName, bool inherit) { + public void SetUserPrincipalNameAsync(int itemId, int accountId, string userPrincipalName, bool inherit) + { this.SetUserPrincipalNameAsync(itemId, accountId, userPrincipalName, inherit, null); } - + /// - public void SetUserPrincipalNameAsync(int itemId, int accountId, string userPrincipalName, bool inherit, object userState) { - if ((this.SetUserPrincipalNameOperationCompleted == null)) { + public void SetUserPrincipalNameAsync(int itemId, int accountId, string userPrincipalName, bool inherit, object userState) + { + if ((this.SetUserPrincipalNameOperationCompleted == null)) + { this.SetUserPrincipalNameOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetUserPrincipalNameOperationCompleted); } this.InvokeAsync("SetUserPrincipalName", new object[] { @@ -1448,46 +1637,54 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { userPrincipalName, inherit}, this.SetUserPrincipalNameOperationCompleted, userState); } - - private void OnSetUserPrincipalNameOperationCompleted(object arg) { - if ((this.SetUserPrincipalNameCompleted != null)) { + + private void OnSetUserPrincipalNameOperationCompleted(object arg) + { + if ((this.SetUserPrincipalNameCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetUserPrincipalNameCompleted(this, new SetUserPrincipalNameCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetUserPassword", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int SetUserPassword(int itemId, int accountId, string password) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetUserPassword", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int SetUserPassword(int itemId, int accountId, string password) + { object[] results = this.Invoke("SetUserPassword", new object[] { itemId, accountId, password}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginSetUserPassword(int itemId, int accountId, string password, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSetUserPassword(int itemId, int accountId, string password, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("SetUserPassword", new object[] { itemId, accountId, password}, callback, asyncState); } - + /// - public int EndSetUserPassword(System.IAsyncResult asyncResult) { + public int EndSetUserPassword(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void SetUserPasswordAsync(int itemId, int accountId, string password) { + public void SetUserPasswordAsync(int itemId, int accountId, string password) + { this.SetUserPasswordAsync(itemId, accountId, password, null); } - + /// - public void SetUserPasswordAsync(int itemId, int accountId, string password, object userState) { - if ((this.SetUserPasswordOperationCompleted == null)) { + public void SetUserPasswordAsync(int itemId, int accountId, string password, object userState) + { + if ((this.SetUserPasswordOperationCompleted == null)) + { this.SetUserPasswordOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetUserPasswordOperationCompleted); } this.InvokeAsync("SetUserPassword", new object[] { @@ -1495,17 +1692,20 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { accountId, password}, this.SetUserPasswordOperationCompleted, userState); } - - private void OnSetUserPasswordOperationCompleted(object arg) { - if ((this.SetUserPasswordCompleted != null)) { + + private void OnSetUserPasswordOperationCompleted(object arg) + { + if ((this.SetUserPasswordCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetUserPasswordCompleted(this, new SetUserPasswordCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SearchAccounts", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public OrganizationUser[] SearchAccounts(int itemId, string filterColumn, string filterValue, string sortColumn, bool includeMailboxes) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SearchAccounts", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public OrganizationUser[] SearchAccounts(int itemId, string filterColumn, string filterValue, string sortColumn, bool includeMailboxes) + { object[] results = this.Invoke("SearchAccounts", new object[] { itemId, filterColumn, @@ -1514,9 +1714,10 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { includeMailboxes}); return ((OrganizationUser[])(results[0])); } - + /// - public System.IAsyncResult BeginSearchAccounts(int itemId, string filterColumn, string filterValue, string sortColumn, bool includeMailboxes, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSearchAccounts(int itemId, string filterColumn, string filterValue, string sortColumn, bool includeMailboxes, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("SearchAccounts", new object[] { itemId, filterColumn, @@ -1524,21 +1725,25 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { sortColumn, includeMailboxes}, callback, asyncState); } - + /// - public OrganizationUser[] EndSearchAccounts(System.IAsyncResult asyncResult) { + public OrganizationUser[] EndSearchAccounts(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((OrganizationUser[])(results[0])); } - + /// - public void SearchAccountsAsync(int itemId, string filterColumn, string filterValue, string sortColumn, bool includeMailboxes) { + public void SearchAccountsAsync(int itemId, string filterColumn, string filterValue, string sortColumn, bool includeMailboxes) + { this.SearchAccountsAsync(itemId, filterColumn, filterValue, sortColumn, includeMailboxes, null); } - + /// - public void SearchAccountsAsync(int itemId, string filterColumn, string filterValue, string sortColumn, bool includeMailboxes, object userState) { - if ((this.SearchAccountsOperationCompleted == null)) { + public void SearchAccountsAsync(int itemId, string filterColumn, string filterValue, string sortColumn, bool includeMailboxes, object userState) + { + if ((this.SearchAccountsOperationCompleted == null)) + { this.SearchAccountsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSearchAccountsOperationCompleted); } this.InvokeAsync("SearchAccounts", new object[] { @@ -1548,99 +1753,172 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { sortColumn, includeMailboxes}, this.SearchAccountsOperationCompleted, userState); } - - private void OnSearchAccountsOperationCompleted(object arg) { - if ((this.SearchAccountsCompleted != null)) { + + private void OnSearchAccountsOperationCompleted(object arg) + { + if ((this.SearchAccountsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SearchAccountsCompleted(this, new SearchAccountsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteUser", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int DeleteUser(int itemId, int accountId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteUser", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DeleteUser(int itemId, int accountId) + { object[] results = this.Invoke("DeleteUser", new object[] { itemId, accountId}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginDeleteUser(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginDeleteUser(int itemId, int accountId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("DeleteUser", new object[] { itemId, accountId}, callback, asyncState); } - + /// - public int EndDeleteUser(System.IAsyncResult asyncResult) { + public int EndDeleteUser(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void DeleteUserAsync(int itemId, int accountId) { + public void DeleteUserAsync(int itemId, int accountId) + { this.DeleteUserAsync(itemId, accountId, null); } - + /// - public void DeleteUserAsync(int itemId, int accountId, object userState) { - if ((this.DeleteUserOperationCompleted == null)) { + public void DeleteUserAsync(int itemId, int accountId, object userState) + { + if ((this.DeleteUserOperationCompleted == null)) + { this.DeleteUserOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteUserOperationCompleted); } this.InvokeAsync("DeleteUser", new object[] { itemId, accountId}, this.DeleteUserOperationCompleted, userState); } - - private void OnDeleteUserOperationCompleted(object arg) { - if ((this.DeleteUserCompleted != null)) { + + private void OnDeleteUserOperationCompleted(object arg) + { + if ((this.DeleteUserCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeleteUserCompleted(this, new DeleteUserCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetPasswordPolicy", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public PasswordPolicyResult GetPasswordPolicy(int itemId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetPasswordPolicy", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public PasswordPolicyResult GetPasswordPolicy(int itemId) + { object[] results = this.Invoke("GetPasswordPolicy", new object[] { itemId}); return ((PasswordPolicyResult)(results[0])); } - + /// - public System.IAsyncResult BeginGetPasswordPolicy(int itemId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetPasswordPolicy(int itemId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetPasswordPolicy", new object[] { itemId}, callback, asyncState); } - + /// - public PasswordPolicyResult EndGetPasswordPolicy(System.IAsyncResult asyncResult) { + public PasswordPolicyResult EndGetPasswordPolicy(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((PasswordPolicyResult)(results[0])); } - + /// - public void GetPasswordPolicyAsync(int itemId) { + public void GetPasswordPolicyAsync(int itemId) + { this.GetPasswordPolicyAsync(itemId, null); } - + /// - public void GetPasswordPolicyAsync(int itemId, object userState) { - if ((this.GetPasswordPolicyOperationCompleted == null)) { + public void GetPasswordPolicyAsync(int itemId, object userState) + { + if ((this.GetPasswordPolicyOperationCompleted == null)) + { this.GetPasswordPolicyOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetPasswordPolicyOperationCompleted); } this.InvokeAsync("GetPasswordPolicy", new object[] { itemId}, this.GetPasswordPolicyOperationCompleted, userState); } - - private void OnGetPasswordPolicyOperationCompleted(object arg) { - if ((this.GetPasswordPolicyCompleted != null)) { + + private void OnGetPasswordPolicyOperationCompleted(object arg) + { + if ((this.GetPasswordPolicyCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetPasswordPolicyCompleted(this, new GetPasswordPolicyCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/CreateSecurityGroup", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int CreateSecurityGroup(int itemId, string displayName, string managedBy) + { + object[] results = this.Invoke("CreateSecurityGroup", new object[] { + itemId, + displayName, + managedBy}); + return ((int)(results[0])); + } + + /// + public System.IAsyncResult BeginCreateSecurityGroup(int itemId, string displayName, string managedBy, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("CreateSecurityGroup", new object[] { + itemId, + displayName, + managedBy}, callback, asyncState); + } + + /// + public int EndCreateSecurityGroup(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((int)(results[0])); + } + + /// + public void CreateSecurityGroupAsync(int itemId, string displayName, string managedBy) + { + this.CreateSecurityGroupAsync(itemId, displayName, managedBy, null); + } + + /// + public void CreateSecurityGroupAsync(int itemId, string displayName, string managedBy, object userState) + { + if ((this.CreateSecurityGroupOperationCompleted == null)) + { + this.CreateSecurityGroupOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateSecurityGroupOperationCompleted); + } + this.InvokeAsync("CreateSecurityGroup", new object[] { + itemId, + displayName, + managedBy}, this.CreateSecurityGroupOperationCompleted, userState); + } + + private void OnCreateSecurityGroupOperationCompleted(object arg) + { + if ((this.CreateSecurityGroupCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.CreateSecurityGroupCompleted(this, new CreateSecurityGroupCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + /// [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetSecurityGroupGeneralSettings", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] public OrganizationSecurityGroup GetSecurityGroupGeneralSettings(int itemId, int accountId) @@ -1694,7 +1972,188 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { } /// - public new void CancelAsync(object userState) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteSecurityGroup", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DeleteSecurityGroup(int itemId, int accountId) + { + object[] results = this.Invoke("DeleteSecurityGroup", new object[] { + itemId, + accountId}); + return ((int)(results[0])); + } + + /// + public System.IAsyncResult BeginDeleteSecurityGroup(int itemId, int accountId, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("DeleteSecurityGroup", new object[] { + itemId, + accountId}, callback, asyncState); + } + + /// + public int EndDeleteSecurityGroup(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((int)(results[0])); + } + + /// + public void DeleteSecurityGroupAsync(int itemId, int accountId) + { + this.DeleteSecurityGroupAsync(itemId, accountId, null); + } + + /// + public void DeleteSecurityGroupAsync(int itemId, int accountId, object userState) + { + if ((this.DeleteSecurityGroupOperationCompleted == null)) + { + this.DeleteSecurityGroupOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteSecurityGroupOperationCompleted); + } + this.InvokeAsync("DeleteSecurityGroup", new object[] { + itemId, + accountId}, this.DeleteSecurityGroupOperationCompleted, userState); + } + + private void OnDeleteSecurityGroupOperationCompleted(object arg) + { + if ((this.DeleteSecurityGroupCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.DeleteSecurityGroupCompleted(this, new DeleteSecurityGroupCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetSecurityGroupGeneralSettings", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int SetSecurityGroupGeneralSettings(int itemId, int accountId, string displayName, string managedBy, string[] memberAccounts, string notes) + { + object[] results = this.Invoke("SetSecurityGroupGeneralSettings", new object[] { + itemId, + accountId, + displayName, + managedBy, + memberAccounts, + notes}); + return ((int)(results[0])); + } + + /// + public System.IAsyncResult BeginSetSecurityGroupGeneralSettings(int itemId, int accountId, string displayName, string managedBy, string[] memberAccounts, string notes, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("SetSecurityGroupGeneralSettings", new object[] { + itemId, + accountId, + displayName, + managedBy, + memberAccounts, + notes}, callback, asyncState); + } + + /// + public int EndSetSecurityGroupGeneralSettings(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((int)(results[0])); + } + + /// + public void SetSecurityGroupGeneralSettingsAsync(int itemId, int accountId, string displayName, string managedBy, string[] memberAccounts, string notes) + { + this.SetSecurityGroupGeneralSettingsAsync(itemId, accountId, displayName, managedBy, memberAccounts, notes, null); + } + + /// + public void SetSecurityGroupGeneralSettingsAsync(int itemId, int accountId, string displayName, string managedBy, string[] memberAccounts, string notes, object userState) + { + if ((this.SetSecurityGroupGeneralSettingsOperationCompleted == null)) + { + this.SetSecurityGroupGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetSecurityGroupGeneralSettingsOperationCompleted); + } + this.InvokeAsync("SetSecurityGroupGeneralSettings", new object[] { + itemId, + accountId, + displayName, + managedBy, + memberAccounts, + notes}, this.SetSecurityGroupGeneralSettingsOperationCompleted, userState); + } + + private void OnSetSecurityGroupGeneralSettingsOperationCompleted(object arg) + { + if ((this.SetSecurityGroupGeneralSettingsCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.SetSecurityGroupGeneralSettingsCompleted(this, new SetSecurityGroupGeneralSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetOrganizationSecurityGroupsPaged", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeAccountsPaged GetOrganizationSecurityGroupsPaged(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) + { + object[] results = this.Invoke("GetOrganizationSecurityGroupsPaged", new object[] { + itemId, + filterColumn, + filterValue, + sortColumn, + startRow, + maximumRows}); + return ((ExchangeAccountsPaged)(results[0])); + } + + /// + public System.IAsyncResult BeginGetOrganizationSecurityGroupsPaged(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("GetOrganizationSecurityGroupsPaged", new object[] { + itemId, + filterColumn, + filterValue, + sortColumn, + startRow, + maximumRows}, callback, asyncState); + } + + /// + public ExchangeAccountsPaged EndGetOrganizationSecurityGroupsPaged(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((ExchangeAccountsPaged)(results[0])); + } + + /// + public void GetOrganizationSecurityGroupsPagedAsync(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) + { + this.GetOrganizationSecurityGroupsPagedAsync(itemId, filterColumn, filterValue, sortColumn, startRow, maximumRows, null); + } + + /// + public void GetOrganizationSecurityGroupsPagedAsync(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, object userState) + { + if ((this.GetOrganizationSecurityGroupsPagedOperationCompleted == null)) + { + this.GetOrganizationSecurityGroupsPagedOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetOrganizationSecurityGroupsPagedOperationCompleted); + } + this.InvokeAsync("GetOrganizationSecurityGroupsPaged", new object[] { + itemId, + filterColumn, + filterValue, + sortColumn, + startRow, + maximumRows}, this.GetOrganizationSecurityGroupsPagedOperationCompleted, userState); + } + + private void OnGetOrganizationSecurityGroupsPagedOperationCompleted(object arg) + { + if ((this.GetOrganizationSecurityGroupsPagedCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetOrganizationSecurityGroupsPagedCompleted(this, new GetOrganizationSecurityGroupsPagedCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + public new void CancelAsync(object userState) + { base.CancelAsync(userState); } } @@ -1728,657 +2187,787 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void CreateOrganizationCompletedEventHandler(object sender, CreateOrganizationCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class CreateOrganizationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class CreateOrganizationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal CreateOrganizationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal CreateOrganizationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void GetRawOrganizationsPagedCompletedEventHandler(object sender, GetRawOrganizationsPagedCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetRawOrganizationsPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetRawOrganizationsPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetRawOrganizationsPagedCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetRawOrganizationsPagedCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public System.Data.DataSet Result { - get { + public System.Data.DataSet Result + { + get + { this.RaiseExceptionIfNecessary(); return ((System.Data.DataSet)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void GetOrganizationsCompletedEventHandler(object sender, GetOrganizationsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetOrganizationsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetOrganizationsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetOrganizationsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetOrganizationsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public Organization[] Result { - get { + public Organization[] Result + { + get + { this.RaiseExceptionIfNecessary(); return ((Organization[])(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void GetOrganizationUserSummuryLetterCompletedEventHandler(object sender, GetOrganizationUserSummuryLetterCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetOrganizationUserSummuryLetterCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetOrganizationUserSummuryLetterCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetOrganizationUserSummuryLetterCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetOrganizationUserSummuryLetterCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public string Result { - get { + public string Result + { + get + { this.RaiseExceptionIfNecessary(); return ((string)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void SendOrganizationUserSummuryLetterCompletedEventHandler(object sender, SendOrganizationUserSummuryLetterCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SendOrganizationUserSummuryLetterCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class SendOrganizationUserSummuryLetterCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal SendOrganizationUserSummuryLetterCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal SendOrganizationUserSummuryLetterCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void DeleteOrganizationCompletedEventHandler(object sender, DeleteOrganizationCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DeleteOrganizationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class DeleteOrganizationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal DeleteOrganizationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal DeleteOrganizationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void GetOrganizationStatisticsCompletedEventHandler(object sender, GetOrganizationStatisticsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetOrganizationStatisticsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetOrganizationStatisticsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetOrganizationStatisticsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetOrganizationStatisticsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public OrganizationStatistics Result { - get { + public OrganizationStatistics Result + { + get + { this.RaiseExceptionIfNecessary(); return ((OrganizationStatistics)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void GetOrganizationStatisticsByOrganizationCompletedEventHandler(object sender, GetOrganizationStatisticsByOrganizationCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetOrganizationStatisticsByOrganizationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetOrganizationStatisticsByOrganizationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetOrganizationStatisticsByOrganizationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetOrganizationStatisticsByOrganizationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public OrganizationStatistics Result { - get { + public OrganizationStatistics Result + { + get + { this.RaiseExceptionIfNecessary(); return ((OrganizationStatistics)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void GetOrganizationCompletedEventHandler(object sender, GetOrganizationCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetOrganizationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetOrganizationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetOrganizationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetOrganizationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public Organization Result { - get { + public Organization Result + { + get + { this.RaiseExceptionIfNecessary(); return ((Organization)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void GetAccountIdByUserPrincipalNameCompletedEventHandler(object sender, GetAccountIdByUserPrincipalNameCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetAccountIdByUserPrincipalNameCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetAccountIdByUserPrincipalNameCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetAccountIdByUserPrincipalNameCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetAccountIdByUserPrincipalNameCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void AddOrganizationDomainCompletedEventHandler(object sender, AddOrganizationDomainCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class AddOrganizationDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class AddOrganizationDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal AddOrganizationDomainCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal AddOrganizationDomainCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void ChangeOrganizationDomainTypeCompletedEventHandler(object sender, ChangeOrganizationDomainTypeCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class ChangeOrganizationDomainTypeCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class ChangeOrganizationDomainTypeCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal ChangeOrganizationDomainTypeCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal ChangeOrganizationDomainTypeCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void GetOrganizationDomainsCompletedEventHandler(object sender, GetOrganizationDomainsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetOrganizationDomainsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetOrganizationDomainsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetOrganizationDomainsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetOrganizationDomainsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public OrganizationDomainName[] Result { - get { + public OrganizationDomainName[] Result + { + get + { this.RaiseExceptionIfNecessary(); return ((OrganizationDomainName[])(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void DeleteOrganizationDomainCompletedEventHandler(object sender, DeleteOrganizationDomainCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DeleteOrganizationDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class DeleteOrganizationDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal DeleteOrganizationDomainCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal DeleteOrganizationDomainCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void SetOrganizationDefaultDomainCompletedEventHandler(object sender, SetOrganizationDefaultDomainCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SetOrganizationDefaultDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class SetOrganizationDefaultDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal SetOrganizationDefaultDomainCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal SetOrganizationDefaultDomainCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void CreateUserCompletedEventHandler(object sender, CreateUserCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class CreateUserCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class CreateUserCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal CreateUserCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal CreateUserCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void ImportUserCompletedEventHandler(object sender, ImportUserCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class ImportUserCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class ImportUserCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal ImportUserCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal ImportUserCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void GetOrganizationUsersPagedCompletedEventHandler(object sender, GetOrganizationUsersPagedCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetOrganizationUsersPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetOrganizationUsersPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetOrganizationUsersPagedCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetOrganizationUsersPagedCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public OrganizationUsersPaged Result { - get { + public OrganizationUsersPaged Result + { + get + { this.RaiseExceptionIfNecessary(); return ((OrganizationUsersPaged)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void GetUserGeneralSettingsCompletedEventHandler(object sender, GetUserGeneralSettingsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetUserGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetUserGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetUserGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetUserGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public OrganizationUser Result { - get { + public OrganizationUser Result + { + get + { this.RaiseExceptionIfNecessary(); return ((OrganizationUser)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void SetUserGeneralSettingsCompletedEventHandler(object sender, SetUserGeneralSettingsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SetUserGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class SetUserGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal SetUserGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal SetUserGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void SetUserPrincipalNameCompletedEventHandler(object sender, SetUserPrincipalNameCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SetUserPrincipalNameCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class SetUserPrincipalNameCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal SetUserPrincipalNameCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal SetUserPrincipalNameCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void SetUserPasswordCompletedEventHandler(object sender, SetUserPasswordCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SetUserPasswordCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class SetUserPasswordCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal SetUserPasswordCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal SetUserPasswordCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void SearchAccountsCompletedEventHandler(object sender, SearchAccountsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SearchAccountsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class SearchAccountsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal SearchAccountsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal SearchAccountsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public OrganizationUser[] Result { - get { + public OrganizationUser[] Result + { + get + { this.RaiseExceptionIfNecessary(); return ((OrganizationUser[])(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void DeleteUserCompletedEventHandler(object sender, DeleteUserCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DeleteUserCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class DeleteUserCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal DeleteUserCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal DeleteUserCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void GetPasswordPolicyCompletedEventHandler(object sender, GetPasswordPolicyCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetPasswordPolicyCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetPasswordPolicyCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetPasswordPolicyCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetPasswordPolicyCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public PasswordPolicyResult Result { - get { + public PasswordPolicyResult Result + { + get + { this.RaiseExceptionIfNecessary(); return ((PasswordPolicyResult)(this.results[0])); } } } + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + public delegate void CreateSecurityGroupCompletedEventHandler(object sender, CreateSecurityGroupCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class CreateSecurityGroupCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal CreateSecurityGroupCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void GetSecurityGroupGeneralSettingsCompletedEventHandler(object sender, GetSecurityGroupGeneralSettingsCompletedEventArgs e); @@ -2409,4 +2998,93 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { } } + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + public delegate void DeleteSecurityGroupCompletedEventHandler(object sender, DeleteSecurityGroupCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class DeleteSecurityGroupCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal DeleteSecurityGroupCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + public delegate void SetSecurityGroupGeneralSettingsCompletedEventHandler(object sender, SetSecurityGroupGeneralSettingsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class SetSecurityGroupGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal SetSecurityGroupGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + public delegate void GetOrganizationSecurityGroupsPagedCompletedEventHandler(object sender, GetOrganizationSecurityGroupsPagedCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetOrganizationSecurityGroupsPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetOrganizationSecurityGroupsPagedCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ExchangeAccountsPaged Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ExchangeAccountsPaged)(this.results[0])); + } + } + } } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/OrganizationController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/OrganizationController.cs index 51a0eace..bd36e12d 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/OrganizationController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/OrganizationController.cs @@ -1640,20 +1640,6 @@ namespace WebsitePanel.EnterpriseServer return account; } - /*public static OrganizationUser GetAccount(int itemId, string samAccountName) - { - OrganizationUser account = ObjectUtils.FillObjectFromDataReader( - DataProvider.GetExchangeAccount(itemId, userId)); - - if (account == null) - return null; - - // decrypt password - account.AccountPassword = CryptoUtils.Decrypt(account.AccountPassword); - - return account; - }*/ - public static OrganizationUser GetAccountByAccountName(int itemId, string AccountName) { OrganizationUser account = ObjectUtils.FillObjectFromDataReader( @@ -2265,6 +2251,15 @@ namespace WebsitePanel.EnterpriseServer return ocs; } + private static int AddAccount(int itemId, ExchangeAccountType accountType, + string accountName, string displayName, string primaryEmailAddress, bool mailEnabledPublicFolder, + MailboxManagerActions mailboxManagerActions, string samAccountName, string accountPassword, int mailboxPlanId, string subscriberNumber) + { + return DataProvider.AddExchangeAccount(itemId, (int)accountType, + accountName, displayName, primaryEmailAddress, mailEnabledPublicFolder, + mailboxManagerActions.ToString(), samAccountName, CryptoUtils.Encrypt(accountPassword), mailboxPlanId, (string.IsNullOrEmpty(subscriberNumber) ? null : subscriberNumber.Trim())); + } + public static int CreateSecurityGroup(int itemId, string displayName, string managedBy) { if (string.IsNullOrEmpty(displayName)) @@ -2281,19 +2276,11 @@ namespace WebsitePanel.EnterpriseServer TaskManager.Write("Organization ID :" + itemId); TaskManager.Write("display name :" + displayName); - int userId = -1; + int securityGroupId = -1; try { - /*displayName = displayName.Trim(); - name = name.Trim(); - domain = domain.Trim(); - - // e-mail - string email = name + "@" + domain; - - if (EmailAddressExists(email)) - return BusinessErrorCodes.ERROR_EXCHANGE_EMAIL_EXISTS; + displayName = displayName.Trim(); // load organization Organization org = GetOrganization(itemId); @@ -2318,35 +2305,25 @@ namespace WebsitePanel.EnterpriseServer if (!CheckUserQuota(org.Id, out errorCode)) return errorCode; - Organizations orgProxy = GetOrganizationProxy(org.ServiceId); - string upn = string.Format("{0}@{1}", name, domain); - string sAMAccountName = AppendOrgId(serviceSettings) ? BuildAccountNameWithOrgId(org.OrganizationId, name, org.ServiceId) : BuildAccountName(org.OrganizationId, name, org.ServiceId); + string accountName = BuildAccountName(org.OrganizationId, displayName, org.ServiceId); - TaskManager.Write("accountName :" + sAMAccountName); - TaskManager.Write("upn :" + upn); + TaskManager.Write("accountName :" + accountName); - if (orgProxy.CreateUser(org.OrganizationId, sAMAccountName, displayName, upn, password, enabled) == 0) + if (orgProxy.CreateSecurityGroup(org.OrganizationId, accountName, displayName, managedBy) == 0) { - accountName = sAMAccountName; - OrganizationUser retUser = orgProxy.GetUserGeneralSettings(sAMAccountName, org.OrganizationId); - TaskManager.Write("sAMAccountName :" + retUser.DomainUserName); + OrganizationSecurityGroup retSecurityGroup = orgProxy.GetSecurityGroupGeneralSettings(accountName, org.OrganizationId); + TaskManager.Write("sAMAccountName :" + retSecurityGroup.AccountName); - userId = AddOrganizationUser(itemId, sAMAccountName, displayName, email, retUser.DomainUserName, password, subscriberNumber); - - // register email address - AddAccountEmailAddress(userId, email); - - if (sendNotification) - { - SendSummaryLetter(org.Id, userId, true, to, ""); - } + securityGroupId = AddAccount(itemId, ExchangeAccountType.DistributionList, accountName, + displayName, null, false, + 0, retSecurityGroup.AccountName, null, 0, null); } else { - TaskManager.WriteError("Failed to create user"); - }*/ + TaskManager.WriteError("Failed to create securitygroup"); + } } catch (Exception ex) { @@ -2357,7 +2334,7 @@ namespace WebsitePanel.EnterpriseServer TaskManager.CompleteTask(); } - return userId; + return securityGroupId; } public static int DeleteSecurityGroup(int itemId, int accountId) @@ -2377,11 +2354,11 @@ namespace WebsitePanel.EnterpriseServer return -1; // load account - ExchangeAccount account = GetAccount(itemId, accountId); + ExchangeAccount account = ExchangeServerController.GetAccount(itemId, accountId); Organizations orgProxy = GetOrganizationProxy(org.ServiceId); - orgProxy.DeleteSecurityGroup(itemId, account.AccountName); + orgProxy.DeleteSecurityGroup(account.AccountName, org.OrganizationId); DeleteUserFromMetabase(itemId, accountId); @@ -2397,7 +2374,7 @@ namespace WebsitePanel.EnterpriseServer } } - public static int SetUserGeneralSettings(int itemId, int accountId, string displayName, string managedBy, string[] memberAccounts, string notes) + public static int SetSecurityGroupGeneralSettings(int itemId, int accountId, string displayName, string managedBy, string[] memberAccounts, string notes) { // check account int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); @@ -2477,8 +2454,8 @@ namespace WebsitePanel.EnterpriseServer demoSecurityGroups.Add(r2); - res.PageUsers = demoSecurityGroups.ToArray(); - res.RecordsCount = res.PageUsers.Length; + res.PageItems = demoSecurityGroups.ToArray(); + res.RecordsCount = res.PageItems.Length; return res; } @@ -2496,7 +2473,7 @@ namespace WebsitePanel.EnterpriseServer List Tmpaccounts = new List(); ObjectUtils.FillCollectionFromDataView(Tmpaccounts, ds.Tables[1].DefaultView); - result.PageUsers = Tmpaccounts.ToArray(); + result.PageItems = Tmpaccounts.ToArray(); List accounts = new List(); @@ -2504,11 +2481,11 @@ namespace WebsitePanel.EnterpriseServer { OrganizationSecurityGroup tmpSecurityGroup = GetSecurityGroupGeneralSettings(itemId, account.AccountId); - if (tmpUser != null) + if (tmpSecurityGroup != null) accounts.Add(account); } - result.PageUsers = accounts.ToArray(); + result.PageItems = accounts.ToArray(); return result; } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esOrganizations.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esOrganizations.asmx.cs index ed5b7f72..5f327c11 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esOrganizations.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esOrganizations.asmx.cs @@ -244,6 +244,12 @@ namespace WebsitePanel.EnterpriseServer #region Security Groups + [WebMethod] + public int CreateSecurityGroup(int itemId, string displayName, string managedBy) + { + return OrganizationController.CreateSecurityGroup(itemId, displayName, managedBy); + } + [WebMethod] public OrganizationSecurityGroup GetSecurityGroupGeneralSettings(int itemId, int accountId) { @@ -257,11 +263,12 @@ namespace WebsitePanel.EnterpriseServer } [WebMethod] - public int SetUserGeneralSettings(int itemId, int accountId, string displayName, string managedBy, string[] memberAccounts, string notes) + public int SetSecurityGroupGeneralSettings(int itemId, int accountId, string displayName, string managedBy, string[] memberAccounts, string notes) { - return OrganizationController.SetUserGeneralSettings(itemId, accountId, displayName, managedBy, memberAccounts, notes) + return OrganizationController.SetSecurityGroupGeneralSettings(itemId, accountId, displayName, managedBy, memberAccounts, notes); } + [WebMethod] public ExchangeAccountsPaged GetOrganizationSecurityGroupsPaged(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) { diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ActiveDirectoryUtils.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ActiveDirectoryUtils.cs index 8c73e494..3ec258f4 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ActiveDirectoryUtils.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ActiveDirectoryUtils.cs @@ -349,6 +349,11 @@ namespace WebsitePanel.Providers.HostedSolution } public static void CreateGroup(string path, string group) + { + CreateGroup(path, group, ""); + } + + public static void CreateGroup(string path, string group, string manager) { DirectoryEntry currentADObject = new DirectoryEntry(path); @@ -357,6 +362,12 @@ namespace WebsitePanel.Providers.HostedSolution newGroupObject.Properties[ADAttributes.SAMAccountName].Add(group); newGroupObject.Properties[ADAttributes.GroupType].Add(-2147483640); + + if (!string.IsNullOrEmpty(manager)) + { + newGroupObject.Properties[ADAttributes.Manager].Add(manager); + } + newGroupObject.CommitChanges(); } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeAccountType.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeAccountType.cs index a72ef690..defa7899 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeAccountType.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeAccountType.cs @@ -37,7 +37,8 @@ namespace WebsitePanel.Providers.HostedSolution PublicFolder = 4, Room = 5, Equipment = 6, - User = 7 + User = 7, + SecurityGroup = 8 } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/IOrganization.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/IOrganization.cs index 14e7aa30..1c1f5971 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/IOrganization.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/IOrganization.cs @@ -42,6 +42,8 @@ namespace WebsitePanel.Providers.HostedSolution OrganizationUser GetUserGeneralSettings(string loginName, string organizationId); + int CreateSecurityGroup(string organizationId, string groupName, string displayName, string managedBy); + OrganizationSecurityGroup GetSecurityGroupGeneralSettings(string groupName, string organizationId); void DeleteSecurityGroup(string groupName, string organizationId); diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/OrganizationProvider.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/OrganizationProvider.cs index 7ea5eee1..5b641448 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/OrganizationProvider.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/OrganizationProvider.cs @@ -824,12 +824,12 @@ namespace WebsitePanel.Providers.HostedSolution #region Security Groups - public int CreateSecurityGroup(string organizationId, string groupName, string displayName, string managedBy, string notes) + public int CreateSecurityGroup(string organizationId, string groupName, string displayName, string managedBy) { - return CreateSecurityGroupInternal(organizationId, groupName, displayName, managedBy, notes); + return CreateSecurityGroupInternal(organizationId, groupName, displayName, managedBy); } - internal int CreateSecurityGroupInternal(string organizationId, string groupName, string displayName, string managedBy, string notes) + internal int CreateSecurityGroupInternal(string organizationId, string groupName, string displayName, string managedBy) { HostedSolutionLog.LogStart("CreateSecurityGroupInternal"); HostedSolutionLog.DebugInfo("organizationId : {0}", organizationId); @@ -850,12 +850,6 @@ namespace WebsitePanel.Providers.HostedSolution if (!ActiveDirectoryUtils.AdObjectExists(groupPath)) { - ActiveDirectoryUtils.CreateGroup(path, groupName); - - DirectoryEntry entry = new DirectoryEntry(groupPath); - - ActiveDirectoryUtils.SetADObjectProperty(entry, ADAttributes.DisplayName, displayName); - string manager = string.Empty; if (!string.IsNullOrEmpty(managedBy)) { @@ -863,11 +857,8 @@ namespace WebsitePanel.Providers.HostedSolution manager = ActiveDirectoryUtils.AdObjectExists(managerPath) ? managerPath : string.Empty; } - ActiveDirectoryUtils.SetADObjectProperty(entry, ADAttributes.Manager, ActiveDirectoryUtils.RemoveADPrefix(manager)); + ActiveDirectoryUtils.CreateGroup(path, groupName, ActiveDirectoryUtils.RemoveADPrefix(manager)); - ActiveDirectoryUtils.SetADObjectProperty(entry, ADAttributes.Notes, notes); - entry.CommitChanges(); - groupCreated = true; HostedSolutionLog.DebugInfo("Security Group created: {0}", groupName); diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Client/OrganizationProxy.cs b/WebsitePanel/Sources/WebsitePanel.Server.Client/OrganizationProxy.cs index a89300cf..879ef85c 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Client/OrganizationProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Client/OrganizationProxy.cs @@ -77,8 +77,14 @@ namespace WebsitePanel.Providers.HostedSolution private System.Threading.SendOrPostCallback GetUserGeneralSettingsOperationCompleted; + private System.Threading.SendOrPostCallback CreateSecurityGroupOperationCompleted; + private System.Threading.SendOrPostCallback GetSecurityGroupGeneralSettingsOperationCompleted; + private System.Threading.SendOrPostCallback DeleteSecurityGroupOperationCompleted; + + private System.Threading.SendOrPostCallback SetSecurityGroupGeneralSettingsOperationCompleted; + private System.Threading.SendOrPostCallback SetUserGeneralSettingsOperationCompleted; private System.Threading.SendOrPostCallback SetUserPasswordOperationCompleted; @@ -119,9 +125,18 @@ namespace WebsitePanel.Providers.HostedSolution /// public event GetUserGeneralSettingsCompletedEventHandler GetUserGeneralSettingsCompleted; + /// + public event CreateSecurityGroupCompletedEventHandler CreateSecurityGroupCompleted; + /// public event GetSecurityGroupGeneralSettingsCompletedEventHandler GetSecurityGroupGeneralSettingsCompleted; + /// + public event DeleteSecurityGroupCompletedEventHandler DeleteSecurityGroupCompleted; + + /// + public event SetSecurityGroupGeneralSettingsCompletedEventHandler SetSecurityGroupGeneralSettingsCompleted; + /// public event SetUserGeneralSettingsCompletedEventHandler SetUserGeneralSettingsCompleted; @@ -463,6 +478,65 @@ namespace WebsitePanel.Providers.HostedSolution } } + /// + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/CreateSecurityGroup", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int CreateSecurityGroup(string organizationId, string groupName, string displayName, string managedBy) + { + object[] results = this.Invoke("CreateSecurityGroup", new object[] { + organizationId, + groupName, + displayName, + managedBy}); + return ((int)(results[0])); + } + + /// + public System.IAsyncResult BeginCreateSecurityGroup(string organizationId, string groupName, string displayName, string managedBy, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("CreateSecurityGroup", new object[] { + organizationId, + groupName, + displayName, + managedBy}, callback, asyncState); + } + + /// + public int EndCreateSecurityGroup(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((int)(results[0])); + } + + /// + public void CreateSecurityGroupAsync(string organizationId, string groupName, string displayName, string managedBy) + { + this.CreateSecurityGroupAsync(organizationId, groupName, displayName, managedBy, null); + } + + /// + public void CreateSecurityGroupAsync(string organizationId, string groupName, string displayName, string managedBy, object userState) + { + if ((this.CreateSecurityGroupOperationCompleted == null)) + { + this.CreateSecurityGroupOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateSecurityGroupOperationCompleted); + } + this.InvokeAsync("CreateSecurityGroup", new object[] { + organizationId, + groupName, + displayName, + managedBy}, this.CreateSecurityGroupOperationCompleted, userState); + } + + private void OnCreateSecurityGroupOperationCompleted(object arg) + { + if ((this.CreateSecurityGroupCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.CreateSecurityGroupCompleted(this, new CreateSecurityGroupCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetSecurityGroupGeneralSettings", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] @@ -516,6 +590,120 @@ namespace WebsitePanel.Providers.HostedSolution } } + /// + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteSecurityGroup", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void DeleteSecurityGroup(string groupName, string organizationId) + { + this.Invoke("DeleteSecurityGroup", new object[] { + groupName, + organizationId}); + } + + /// + public System.IAsyncResult BeginDeleteSecurityGroup(string groupName, string organizationId, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("DeleteSecurityGroup", new object[] { + groupName, + organizationId}, callback, asyncState); + } + + /// + public void EndDeleteSecurityGroup(System.IAsyncResult asyncResult) + { + this.EndInvoke(asyncResult); + } + + /// + public void DeleteSecurityGroupAsync(string groupName, string organizationId) + { + this.DeleteSecurityGroupAsync(groupName, organizationId, null); + } + + /// + public void DeleteSecurityGroupAsync(string groupName, string organizationId, object userState) + { + if ((this.DeleteSecurityGroupOperationCompleted == null)) + { + this.DeleteSecurityGroupOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteSecurityGroupOperationCompleted); + } + this.InvokeAsync("DeleteSecurityGroup", new object[] { + groupName, + organizationId}, this.DeleteSecurityGroupOperationCompleted, userState); + } + + private void OnDeleteSecurityGroupOperationCompleted(object arg) + { + if ((this.DeleteSecurityGroupCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.DeleteSecurityGroupCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetSecurityGroupGeneralSettings", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void SetSecurityGroupGeneralSettings(string organizationId, string groupName, string displayName, string managedBy, string[] memberAccounts, string notes) + { + this.Invoke("SetSecurityGroupGeneralSettings", new object[] { + organizationId, + groupName, + displayName, + managedBy, + memberAccounts, + notes}); + } + + /// + public System.IAsyncResult BeginSetSecurityGroupGeneralSettings(string organizationId, string groupName, string displayName, string managedBy, string[] memberAccounts, string notes, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("SetSecurityGroupGeneralSettings", new object[] { + organizationId, + groupName, + displayName, + managedBy, + memberAccounts, + notes}, callback, asyncState); + } + + /// + public void EndSetSecurityGroupGeneralSettings(System.IAsyncResult asyncResult) + { + this.EndInvoke(asyncResult); + } + + /// + public void SetSecurityGroupGeneralSettingsAsync(string organizationId, string groupName, string displayName, string managedBy, string[] memberAccounts, string notes) + { + this.SetSecurityGroupGeneralSettingsAsync(organizationId, groupName, displayName, managedBy, memberAccounts, notes, null); + } + + /// + public void SetSecurityGroupGeneralSettingsAsync(string organizationId, string groupName, string displayName, string managedBy, string[] memberAccounts, string notes, object userState) + { + if ((this.SetSecurityGroupGeneralSettingsOperationCompleted == null)) + { + this.SetSecurityGroupGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetSecurityGroupGeneralSettingsOperationCompleted); + } + this.InvokeAsync("SetSecurityGroupGeneralSettings", new object[] { + organizationId, + groupName, + displayName, + managedBy, + memberAccounts, + notes}, this.SetSecurityGroupGeneralSettingsOperationCompleted, userState); + } + + private void OnSetSecurityGroupGeneralSettingsOperationCompleted(object arg) + { + if ((this.SetSecurityGroupGeneralSettingsCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.SetSecurityGroupGeneralSettingsCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetUserGeneralSettings", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] @@ -1255,6 +1443,36 @@ namespace WebsitePanel.Providers.HostedSolution } } + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + public delegate void CreateSecurityGroupCompletedEventHandler(object sender, CreateSecurityGroupCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class CreateSecurityGroupCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal CreateSecurityGroupCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void GetSecurityGroupGeneralSettingsCompletedEventHandler(object sender, GetSecurityGroupGeneralSettingsCompletedEventArgs e); @@ -1285,6 +1503,14 @@ namespace WebsitePanel.Providers.HostedSolution } } + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + public delegate void DeleteSecurityGroupCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + public delegate void SetSecurityGroupGeneralSettingsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void SetUserGeneralSettingsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); diff --git a/WebsitePanel/Sources/WebsitePanel.Server/Organizations.asmx.cs b/WebsitePanel/Sources/WebsitePanel.Server/Organizations.asmx.cs index 2a18d450..27e50128 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server/Organizations.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server/Organizations.asmx.cs @@ -110,6 +110,12 @@ namespace WebsitePanel.Server return Organization.GetUserGeneralSettings(loginName, organizationId); } + [WebMethod, SoapHeader("settings")] + public int CreateSecurityGroup(string organizationId, string groupName, string displayName, string managedBy) + { + return Organization.CreateSecurityGroup(organizationId, groupName, displayName, managedBy); + } + [WebMethod, SoapHeader("settings")] public OrganizationSecurityGroup GetSecurityGroupGeneralSettings(string groupName, string organizationId) { diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Code/Helpers/OrganizationsHelper.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Code/Helpers/OrganizationsHelper.cs index f6790dde..6537ad67 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Code/Helpers/OrganizationsHelper.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Code/Helpers/OrganizationsHelper.cs @@ -83,5 +83,30 @@ namespace WebsitePanel.Portal } #endregion + + #region Security Groups + + ExchangeAccountsPaged accounts; + + public int GetOrganizationSecurityGroupsPagedCount(int itemId, string accountTypes, + string filterColumn, string filterValue) + { + return accounts.RecordsCount; + } + + public ExchangeAccount[] GetOrganizationSecurityGroupsPaged(int itemId, string accountTypes, + string filterColumn, string filterValue, + int maximumRows, int startRowIndex, string sortColumn) + { + if (!String.IsNullOrEmpty(filterValue)) + filterValue = filterValue + "%"; + + accounts = ES.Services.Organizations.GetOrganizationSecurityGroupsPaged(itemId, + filterColumn, filterValue, sortColumn, startRowIndex, maximumRows); + + return accounts.PageItems; + } + + #endregion } } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationCreateSecurityGroup.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationCreateSecurityGroup.ascx.resx index 1b640863..302d4e79 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationCreateSecurityGroup.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationCreateSecurityGroup.ascx.resx @@ -118,10 +118,10 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - ShowProgressDialog('Creating security group ...'); + ShowProgressDialog('Creating group ...'); - Create Security Group + Create Group @@ -136,7 +136,7 @@ Managed by: * - Create New Security Group + Create New Group Security Groups diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationSecurityGroupGeneralSettings.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationSecurityGroupGeneralSettings.ascx.resx index ab196e38..44c43842 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationSecurityGroupGeneralSettings.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationSecurityGroupGeneralSettings.ascx.resx @@ -118,7 +118,7 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - ShowProgressDialog('Updating security group settings...'); + ShowProgressDialog('Updating group settings...'); Save Changes @@ -139,10 +139,10 @@ Notes: - Edit Security Group + Edit Group - Security Group + Security Groups Please specify a manager diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationSecurityGroups.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationSecurityGroups.ascx.resx index 970456a1..ca580087 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationSecurityGroups.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationSecurityGroups.ascx.resx @@ -117,17 +117,17 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Create New Security Group + + Create New Group - if(!confirm('Are you sure you want to delete this security group?')) return false; else ShowProgressDialog('Deleting security group...'); + if(!confirm('Are you sure you want to delete this group?')) return false; else ShowProgressDialog('Deleting group...'); Delete - Delete Security Group + Delete Group Search @@ -141,20 +141,14 @@ - - No security groups have been created. To create a new security group click "Create New Security Group" button. + + No groups have been created. To create a new group click "Create New Group" button. - + Display Name - - E-mail Address - - - Total Security Groups Created: - - Security Groups + Groups Security Groups diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationCreateSecurityGroup.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationCreateSecurityGroup.ascx index 2f4d76aa..b3b0e1a8 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationCreateSecurityGroup.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationCreateSecurityGroup.ascx @@ -21,33 +21,32 @@
- +
-
+ ErrorMessage="Enter Display Name" ValidationGroup="CreateGroup" Display="Dynamic" Text="*" SetFocusOnError="True">
- +
- - + +
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationCreateSecurityGroup.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationCreateSecurityGroup.ascx.cs index 1d38154f..d81a3ecc 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationCreateSecurityGroup.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationCreateSecurityGroup.ascx.cs @@ -44,7 +44,6 @@ namespace WebsitePanel.Portal.ExchangeServer { protected void Page_Load(object sender, EventArgs e) { - } protected void btnCreate_Click(object sender, EventArgs e) @@ -54,43 +53,31 @@ namespace WebsitePanel.Portal.ExchangeServer private void CreateSecurityGroup() { - /*if (!Page.IsValid) - return;*/ - - - + if (!Page.IsValid) + return; try { + int accountId = ES.Services.Organizations.CreateSecurityGroup(PanelRequest.ItemID, txtDisplayName.Text, manager.GetAccount()); - //int accountId = ES.Services.ExchangeServer.CreateDistributionList(PanelRequest.ItemID, - // txtDisplayName.Text.Trim(), - // email.AccountName, - // email.DomainName, - // manager.GetAccountId()); + if (accountId < 0) + { + messageBox.ShowResultMessage(accountId); + return; + } - - //if (accountId < 0) - //{ - // messageBox.ShowResultMessage(accountId); - // return; - //} - - //Response.Redirect(EditUrl("AccountID", accountId.ToString(), "dlist_settings", - // "SpaceID=" + PanelSecurity.PackageId.ToString(), - // "ItemID=" + PanelRequest.ItemID.ToString())); + Response.Redirect(EditUrl("AccountID", accountId.ToString(), "secur_group_settings", + "SpaceID=" + PanelSecurity.PackageId.ToString(), + "ItemID=" + PanelRequest.ItemID.ToString())); } catch (Exception ex) { - messageBox.ShowErrorMessage("EXCHANGE_CREATE_DISTRIBUTION_LIST", ex); + messageBox.ShowErrorMessage("ORGANIZATION_CREATE_SECURITY_GROUP", ex); } } protected void valManager_ServerValidate(object source, ServerValidateEventArgs args) { args.IsValid = manager.GetAccountId() != 0; - } - - } } \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationSecurityGroups.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationSecurityGroups.ascx index 95b44dcd..938152b0 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationSecurityGroups.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationSecurityGroups.ascx @@ -26,8 +26,8 @@
- +
@@ -49,12 +49,12 @@
- + DataSourceID="odsSecurityGroupsPaged" PageSize="20"> - + - - + TypeName="WebsitePanel.Portal.OrganizationsHelper" + OnSelected="odsSecurityGroupsPaged_Selected"> @@ -86,12 +85,6 @@ -
- -     - - - diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationSecurityGroups.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationSecurityGroups.ascx.cs index d7fadd39..8678f6f2 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationSecurityGroups.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationSecurityGroups.ascx.cs @@ -50,21 +50,13 @@ namespace WebsitePanel.Portal.ExchangeServer { BindStats(); } - - } private void BindStats() { - // quota values - OrganizationStatistics stats = ES.Services.ExchangeServer.GetOrganizationStatisticsByOrganization(PanelRequest.ItemID); - OrganizationStatistics tenantStats = ES.Services.ExchangeServer.GetOrganizationStatistics(PanelRequest.ItemID); - listsQuota.QuotaUsedValue = stats.CreatedDistributionLists; - listsQuota.QuotaValue = stats.AllocatedDistributionLists; - if (stats.AllocatedDistributionLists != -1) listsQuota.QuotaAvailable = tenantStats.AllocatedDistributionLists - tenantStats.CreatedDistributionLists; } - protected void btnCreateList_Click(object sender, EventArgs e) + protected void btnCreateGroup_Click(object sender, EventArgs e) { Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "create_secur_group", "SpaceID=" + PanelSecurity.PackageId.ToString())); @@ -77,11 +69,11 @@ namespace WebsitePanel.Portal.ExchangeServer "ItemID=" + PanelRequest.ItemID.ToString()); } - protected void odsAccountsPaged_Selected(object sender, ObjectDataSourceStatusEventArgs e) + protected void odsSecurityGroupsPaged_Selected(object sender, ObjectDataSourceStatusEventArgs e) { if (e.Exception != null) { - messageBox.ShowErrorMessage("EXCHANGE_GET_LISTS", e.Exception); + messageBox.ShowErrorMessage("ORGANIZATION_GET_SECURITY_GROUP", e.Exception); e.ExceptionHandled = true; } } @@ -90,12 +82,12 @@ namespace WebsitePanel.Portal.ExchangeServer { if (e.CommandName == "DeleteItem") { - // delete distribution list + // delete security group int accountId = Utils.ParseInt(e.CommandArgument.ToString(), 0); try { - int result = ES.Services.ExchangeServer.DeleteDistributionList(PanelRequest.ItemID, accountId); + int result = ES.Services.Organizations.DeleteSecurityGroup(PanelRequest.ItemID, accountId); if (result < 0) { messageBox.ShowResultMessage(result); @@ -103,28 +95,27 @@ namespace WebsitePanel.Portal.ExchangeServer } // rebind grid - gvLists.DataBind(); + gvGroups.DataBind(); BindStats(); } catch (Exception ex) { - messageBox.ShowErrorMessage("EXCHANGE_DELETE_DISTRIBUTION_LIST", ex); + messageBox.ShowErrorMessage("ORGANIZATION_DELETE_SECURITY_GROUP", ex); } } } protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) - { - gvLists.PageSize = Convert.ToInt16(ddlPageSize.SelectedValue); + { + gvGroups.PageSize = Convert.ToInt16(ddlPageSize.SelectedValue); // rebind grid - gvLists.DataBind(); + gvGroups.DataBind(); // bind stats BindStats(); } - } } \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationSecurityGroups.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationSecurityGroups.ascx.designer.cs index 33a03516..1c8e4bc9 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationSecurityGroups.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationSecurityGroups.ascx.designer.cs @@ -67,13 +67,13 @@ namespace WebsitePanel.Portal.ExchangeServer { protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox; /// - /// btnCreateList control. + /// btnCreateGroup control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Button btnCreateList; + protected global::System.Web.UI.WebControls.Button btnCreateGroup; /// /// SearchPanel control. @@ -130,39 +130,21 @@ namespace WebsitePanel.Portal.ExchangeServer { protected global::System.Web.UI.WebControls.ImageButton cmdSearch; /// - /// gvLists control. + /// gvGroups control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.GridView gvLists; + protected global::System.Web.UI.WebControls.GridView gvGroups; /// - /// odsAccountsPaged control. + /// odsSecurityGroupsPaged control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.ObjectDataSource odsAccountsPaged; - - /// - /// locQuota control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Localize locQuota; - - /// - /// listsQuota control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::WebsitePanel.Portal.QuotaViewer listsQuota; + protected global::System.Web.UI.WebControls.ObjectDataSource odsSecurityGroupsPaged; } }