diff --git a/WebsitePanel/Database/update_db.sql b/WebsitePanel/Database/update_db.sql index 520a5841..244189b8 100644 --- a/WebsitePanel/Database/update_db.sql +++ b/WebsitePanel/Database/update_db.sql @@ -3204,4 +3204,64 @@ VALUES SET @FolderID = SCOPE_IDENTITY() RETURN -GO \ No newline at end of file +GO + + + +-- CRM2013 + +-- CRM2013 ResourceGroup + +IF NOT EXISTS (SELECT * FROM [dbo].[ResourceGroups] WHERE [GroupName] = 'Hosted CRM2013') +BEGIN +INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController], [ShowGroup]) VALUES (24, N'Hosted CRM2013', 15, NULL, 1) +END +GO + +-- CRM2013 Provider + +IF NOT EXISTS (SELECT * FROM [dbo].[Providers] WHERE [DisplayName] = 'Hosted MS CRM 2013') +BEGIN +INSERT [dbo].[Providers] ([ProviderId], [GroupId], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) +VALUES(1202, 24, N'CRM', N'Hosted MS CRM 2013', N'WebsitePanel.Providers.HostedSolution.CRMProvider2013, WebsitePanel.Providers.HostedSolution.Crm2013', N'CRM2011', NULL) +END +GO + +-- CRM2013 Quotas + +IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'HostedCRM2013.Organization') +BEGIN +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID], [HideQuota]) +VALUES (463, 24, 1, N'HostedCRM2013.Organization', N'CRM Organization', 1, 0, NULL, NULL) +END +GO + +IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'HostedCRM2013.MaxDatabaseSize') +BEGIN +INSERT [dbo].[Quotas] ([QuotaID], [GroupID],[QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) +VALUES (464, 24, 5, N'HostedCRM2013.MaxDatabaseSize', N'Max Database Size, MB',3, 0 , NULL) +END +GO + +IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'HostedCRM2013.EssentialUsers') +BEGIN +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID], [HideQuota]) +VALUES (465, 24, 2, N'HostedCRM2013.EssentialUsers', N'Essential licenses per organization', 3, 0, NULL, NULL) +END +GO + +IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'HostedCRM2013.BasicUsers') +BEGIN +INSERT [dbo].[Quotas] ([QuotaID], [GroupID],[QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) +VALUES (466, 24, 3, N'HostedCRM2013.BasicUsers', N'Basic licenses per organization',3, 0 , NULL) +END +GO + +IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'HostedCRM2013.ProfessionalUsers') +BEGIN +INSERT [dbo].[Quotas] ([QuotaID], [GroupID],[QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) +VALUES (467, 24, 4, N'HostedCRM2013.ProfessionalUsers', N'Professional licenses per organization',3, 0 , NULL) +END +GO + + diff --git a/WebsitePanel/Lib/References/Microsoft/microsoft.crm.sdk.proxy.dll b/WebsitePanel/Lib/References/Microsoft/CRM2011/microsoft.crm.sdk.proxy.dll similarity index 100% rename from WebsitePanel/Lib/References/Microsoft/microsoft.crm.sdk.proxy.dll rename to WebsitePanel/Lib/References/Microsoft/CRM2011/microsoft.crm.sdk.proxy.dll diff --git a/WebsitePanel/Lib/References/Microsoft/microsoft.xrm.client.codegeneration.dll b/WebsitePanel/Lib/References/Microsoft/CRM2011/microsoft.xrm.client.codegeneration.dll similarity index 100% rename from WebsitePanel/Lib/References/Microsoft/microsoft.xrm.client.codegeneration.dll rename to WebsitePanel/Lib/References/Microsoft/CRM2011/microsoft.xrm.client.codegeneration.dll diff --git a/WebsitePanel/Lib/References/Microsoft/microsoft.xrm.client.dll b/WebsitePanel/Lib/References/Microsoft/CRM2011/microsoft.xrm.client.dll similarity index 100% rename from WebsitePanel/Lib/References/Microsoft/microsoft.xrm.client.dll rename to WebsitePanel/Lib/References/Microsoft/CRM2011/microsoft.xrm.client.dll diff --git a/WebsitePanel/Lib/References/Microsoft/microsoft.xrm.portal.dll b/WebsitePanel/Lib/References/Microsoft/CRM2011/microsoft.xrm.portal.dll similarity index 100% rename from WebsitePanel/Lib/References/Microsoft/microsoft.xrm.portal.dll rename to WebsitePanel/Lib/References/Microsoft/CRM2011/microsoft.xrm.portal.dll diff --git a/WebsitePanel/Lib/References/Microsoft/microsoft.xrm.portal.files.dll b/WebsitePanel/Lib/References/Microsoft/CRM2011/microsoft.xrm.portal.files.dll similarity index 100% rename from WebsitePanel/Lib/References/Microsoft/microsoft.xrm.portal.files.dll rename to WebsitePanel/Lib/References/Microsoft/CRM2011/microsoft.xrm.portal.files.dll diff --git a/WebsitePanel/Lib/References/Microsoft/microsoft.xrm.sdk.deployment.dll b/WebsitePanel/Lib/References/Microsoft/CRM2011/microsoft.xrm.sdk.deployment.dll similarity index 100% rename from WebsitePanel/Lib/References/Microsoft/microsoft.xrm.sdk.deployment.dll rename to WebsitePanel/Lib/References/Microsoft/CRM2011/microsoft.xrm.sdk.deployment.dll diff --git a/WebsitePanel/Lib/References/Microsoft/microsoft.xrm.sdk.dll b/WebsitePanel/Lib/References/Microsoft/CRM2011/microsoft.xrm.sdk.dll similarity index 100% rename from WebsitePanel/Lib/References/Microsoft/microsoft.xrm.sdk.dll rename to WebsitePanel/Lib/References/Microsoft/CRM2011/microsoft.xrm.sdk.dll diff --git a/WebsitePanel/Lib/References/Microsoft/microsoft.xrm.sdk.workflow.dll b/WebsitePanel/Lib/References/Microsoft/CRM2011/microsoft.xrm.sdk.workflow.dll similarity index 100% rename from WebsitePanel/Lib/References/Microsoft/microsoft.xrm.sdk.workflow.dll rename to WebsitePanel/Lib/References/Microsoft/CRM2011/microsoft.xrm.sdk.workflow.dll diff --git a/WebsitePanel/Lib/References/Microsoft/CRM2013/Microsoft.Crm.Sdk.Proxy.dll b/WebsitePanel/Lib/References/Microsoft/CRM2013/Microsoft.Crm.Sdk.Proxy.dll new file mode 100644 index 00000000..cc98c301 Binary files /dev/null and b/WebsitePanel/Lib/References/Microsoft/CRM2013/Microsoft.Crm.Sdk.Proxy.dll differ diff --git a/WebsitePanel/Lib/References/Microsoft/CRM2013/Microsoft.Xrm.Client.CodeGeneration.dll b/WebsitePanel/Lib/References/Microsoft/CRM2013/Microsoft.Xrm.Client.CodeGeneration.dll new file mode 100644 index 00000000..758d4494 Binary files /dev/null and b/WebsitePanel/Lib/References/Microsoft/CRM2013/Microsoft.Xrm.Client.CodeGeneration.dll differ diff --git a/WebsitePanel/Lib/References/Microsoft/CRM2013/Microsoft.Xrm.Client.dll b/WebsitePanel/Lib/References/Microsoft/CRM2013/Microsoft.Xrm.Client.dll new file mode 100644 index 00000000..8f9629aa Binary files /dev/null and b/WebsitePanel/Lib/References/Microsoft/CRM2013/Microsoft.Xrm.Client.dll differ diff --git a/WebsitePanel/Lib/References/Microsoft/CRM2013/Microsoft.Xrm.Portal.Files.dll b/WebsitePanel/Lib/References/Microsoft/CRM2013/Microsoft.Xrm.Portal.Files.dll new file mode 100644 index 00000000..b8d9278a Binary files /dev/null and b/WebsitePanel/Lib/References/Microsoft/CRM2013/Microsoft.Xrm.Portal.Files.dll differ diff --git a/WebsitePanel/Lib/References/Microsoft/CRM2013/Microsoft.Xrm.Portal.dll b/WebsitePanel/Lib/References/Microsoft/CRM2013/Microsoft.Xrm.Portal.dll new file mode 100644 index 00000000..33eb2197 Binary files /dev/null and b/WebsitePanel/Lib/References/Microsoft/CRM2013/Microsoft.Xrm.Portal.dll differ diff --git a/WebsitePanel/Lib/References/Microsoft/CRM2013/Microsoft.Xrm.Sdk.Deployment.dll b/WebsitePanel/Lib/References/Microsoft/CRM2013/Microsoft.Xrm.Sdk.Deployment.dll new file mode 100644 index 00000000..05c065a5 Binary files /dev/null and b/WebsitePanel/Lib/References/Microsoft/CRM2013/Microsoft.Xrm.Sdk.Deployment.dll differ diff --git a/WebsitePanel/Lib/References/Microsoft/CRM2013/Microsoft.Xrm.Sdk.Workflow.dll b/WebsitePanel/Lib/References/Microsoft/CRM2013/Microsoft.Xrm.Sdk.Workflow.dll new file mode 100644 index 00000000..ef8b5116 Binary files /dev/null and b/WebsitePanel/Lib/References/Microsoft/CRM2013/Microsoft.Xrm.Sdk.Workflow.dll differ diff --git a/WebsitePanel/Lib/References/Microsoft/CRM2013/Microsoft.Xrm.Sdk.dll b/WebsitePanel/Lib/References/Microsoft/CRM2013/Microsoft.Xrm.Sdk.dll new file mode 100644 index 00000000..048a102b Binary files /dev/null and b/WebsitePanel/Lib/References/Microsoft/CRM2013/Microsoft.Xrm.Sdk.dll differ diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/HostedSolution/CRMLycenseTypes.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/HostedSolution/CRMLycenseTypes.cs new file mode 100644 index 00000000..a38a0c7c --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/HostedSolution/CRMLycenseTypes.cs @@ -0,0 +1,50 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using WebsitePanel.EnterpriseServer; + +namespace WebsitePanel.EnterpriseServer +{ + public class CRMUserLycenseTypes + { + // CRM 2011 + public const int FULL = 0; + public const int LIMITED = 2; + public const int ESS = 22; + + // CRM 2013 + public const int PROFESSIONAL = 0; + public const int BASIC = 2; + public const int ESSENTIAL = 5; + + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/Quotas.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/Quotas.cs index 223e12d9..adc16ef7 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/Quotas.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/Quotas.cs @@ -118,6 +118,9 @@ order by rg.groupOrder public const string EXCHANGE2007_ALLOWLITIGATIONHOLD = "Exchange2007.AllowLitigationHold"; public const string EXCHANGE2007_RECOVERABLEITEMSSPACE = "Exchange2007.RecoverableItemsSpace"; public const string EXCHANGE2007_DISCLAIMERSALLOWED = "Exchange2007.DisclaimersAllowed"; + public const string EXCHANGE2013_ALLOWARCHIVING = "Exchange2013.AllowArchiving"; // Archiving + public const string EXCHANGE2013_ARCHIVINGSTORAGE = "Exchange2013.ArchivingStorage"; + public const string EXCHANGE2013_ARCHIVINGMAILBOXES = "Exchange2013.ArchivingMailboxes"; public const string MSSQL2000_DATABASES = "MsSQL2000.Databases"; // Databases public const string MSSQL2000_USERS = "MsSQL2000.Users"; // Users public const string MSSQL2000_MAXDATABASESIZE = "MsSQL2000.MaxDatabaseSize"; // Max Database Size @@ -163,6 +166,14 @@ order by rg.groupOrder public const string CRM_ESSUSERS = "HostedCRM.ESSUsers"; public const string CRM_MAXDATABASESIZE = "HostedCRM.MaxDatabaseSize"; + public const string CRM2013_ORGANIZATION = "HostedCRM2013.Organization"; + public const string CRM2013_MAXDATABASESIZE = "HostedCRM2013.MaxDatabaseSize"; + + public const string CRM2013_ESSENTIALUSERS = "HostedCRM2013.EssentialUsers"; + public const string CRM2013_BASICUSERS = "HostedCRM2013.BasicUsers"; + public const string CRM2013_PROFESSIONALUSERS = "HostedCRM2013.ProfessionalUsers"; + + public const string VPS_SERVERS_NUMBER = "VPS.ServersNumber"; // Number of VPS public const string VPS_MANAGING_ALLOWED = "VPS.ManagingAllowed"; // Allow user to create VPS public const string VPS_CPU_NUMBER = "VPS.CpuNumber"; // Number of CPU cores diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/ResourceGroups.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/ResourceGroups.cs index 4bbbcb09..ca3e129a 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/ResourceGroups.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/ResourceGroups.cs @@ -47,6 +47,7 @@ namespace WebsitePanel.EnterpriseServer public const string Exchange = "Exchange"; public const string HostedOrganizations = "Hosted Organizations"; public const string HostedCRM = "Hosted CRM"; + public const string HostedCRM2013 = "Hosted CRM2013"; public const string VPS = "VPS"; public const string BlackBerry = "BlackBerry"; public const string OCS = "OCS"; diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/WebsitePanel.EnterpriseServer.Base.csproj b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/WebsitePanel.EnterpriseServer.Base.csproj index 082f5542..90172b0b 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/WebsitePanel.EnterpriseServer.Base.csproj +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/WebsitePanel.EnterpriseServer.Base.csproj @@ -117,6 +117,7 @@ + diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/CRMProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/CRMProxy.cs index 23ecc747..e9b76805 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/CRMProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/CRMProxy.cs @@ -26,23 +26,11 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.5466 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -// -// This source code was auto-generated by wsdl, Version=2.0.50727.42. -// using WebsitePanel.Providers; using WebsitePanel.Providers.Common; using WebsitePanel.Providers.HostedSolution; using WebsitePanel.Providers.ResultObjects; + // // This source code was auto-generated by wsdl, Version=2.0.50727.42. // @@ -67,8 +55,12 @@ namespace WebsitePanel.EnterpriseServer { private System.Threading.SendOrPostCallback GetCollationOperationCompleted; + private System.Threading.SendOrPostCallback GetCollationByServiceIdOperationCompleted; + private System.Threading.SendOrPostCallback GetCurrencyOperationCompleted; + private System.Threading.SendOrPostCallback GetCurrencyByServiceIdOperationCompleted; + private System.Threading.SendOrPostCallback DeleteCRMOrganizationOperationCompleted; private System.Threading.SendOrPostCallback GetCRMUsersPagedOperationCompleted; @@ -95,6 +87,10 @@ namespace WebsitePanel.EnterpriseServer { private System.Threading.SendOrPostCallback GetMaxDBSizeOperationCompleted; + private System.Threading.SendOrPostCallback GetInstalledLanguagePacksOperationCompleted; + + private System.Threading.SendOrPostCallback GetInstalledLanguagePacksByServiceIdOperationCompleted; + /// public esCRM() { this.Url = "http://localhost:9002/esCRM.asmx"; @@ -106,9 +102,15 @@ namespace WebsitePanel.EnterpriseServer { /// public event GetCollationCompletedEventHandler GetCollationCompleted; + /// + public event GetCollationByServiceIdCompletedEventHandler GetCollationByServiceIdCompleted; + /// public event GetCurrencyCompletedEventHandler GetCurrencyCompleted; + /// + public event GetCurrencyByServiceIdCompletedEventHandler GetCurrencyByServiceIdCompleted; + /// public event DeleteCRMOrganizationCompletedEventHandler DeleteCRMOrganizationCompleted; @@ -148,9 +150,15 @@ namespace WebsitePanel.EnterpriseServer { /// public event GetMaxDBSizeCompletedEventHandler GetMaxDBSizeCompleted; + /// + public event GetInstalledLanguagePacksCompletedEventHandler GetInstalledLanguagePacksCompleted; + + /// + public event GetInstalledLanguagePacksByServiceIdCompletedEventHandler GetInstalledLanguagePacksByServiceIdCompleted; + /// [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CreateOrganization", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public OrganizationResult CreateOrganization(int organizationId, string baseCurrencyCode, string baseCurrencyName, string baseCurrencySymbol, string regionName, int userId, string collation) { + public OrganizationResult CreateOrganization(int organizationId, string baseCurrencyCode, string baseCurrencyName, string baseCurrencySymbol, string regionName, int userId, string collation, int baseLanguageCode) { object[] results = this.Invoke("CreateOrganization", new object[] { organizationId, baseCurrencyCode, @@ -158,12 +166,13 @@ namespace WebsitePanel.EnterpriseServer { baseCurrencySymbol, regionName, userId, - collation}); + collation, + baseLanguageCode}); return ((OrganizationResult)(results[0])); } /// - public System.IAsyncResult BeginCreateOrganization(int organizationId, string baseCurrencyCode, string baseCurrencyName, string baseCurrencySymbol, string regionName, int userId, string collation, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginCreateOrganization(int organizationId, string baseCurrencyCode, string baseCurrencyName, string baseCurrencySymbol, string regionName, int userId, string collation, int baseLanguageCode, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("CreateOrganization", new object[] { organizationId, baseCurrencyCode, @@ -171,7 +180,8 @@ namespace WebsitePanel.EnterpriseServer { baseCurrencySymbol, regionName, userId, - collation}, callback, asyncState); + collation, + baseLanguageCode}, callback, asyncState); } /// @@ -181,12 +191,12 @@ namespace WebsitePanel.EnterpriseServer { } /// - public void CreateOrganizationAsync(int organizationId, string baseCurrencyCode, string baseCurrencyName, string baseCurrencySymbol, string regionName, int userId, string collation) { - this.CreateOrganizationAsync(organizationId, baseCurrencyCode, baseCurrencyName, baseCurrencySymbol, regionName, userId, collation, null); + public void CreateOrganizationAsync(int organizationId, string baseCurrencyCode, string baseCurrencyName, string baseCurrencySymbol, string regionName, int userId, string collation, int baseLanguageCode) { + this.CreateOrganizationAsync(organizationId, baseCurrencyCode, baseCurrencyName, baseCurrencySymbol, regionName, userId, collation, baseLanguageCode, null); } /// - public void CreateOrganizationAsync(int organizationId, string baseCurrencyCode, string baseCurrencyName, string baseCurrencySymbol, string regionName, int userId, string collation, object userState) { + public void CreateOrganizationAsync(int organizationId, string baseCurrencyCode, string baseCurrencyName, string baseCurrencySymbol, string regionName, int userId, string collation, int baseLanguageCode, object userState) { if ((this.CreateOrganizationOperationCompleted == null)) { this.CreateOrganizationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateOrganizationOperationCompleted); } @@ -197,7 +207,8 @@ namespace WebsitePanel.EnterpriseServer { baseCurrencySymbol, regionName, userId, - collation}, this.CreateOrganizationOperationCompleted, userState); + collation, + baseLanguageCode}, this.CreateOrganizationOperationCompleted, userState); } private void OnCreateOrganizationOperationCompleted(object arg) { @@ -248,6 +259,47 @@ namespace WebsitePanel.EnterpriseServer { } } + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetCollationByServiceId", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public StringArrayResultObject GetCollationByServiceId(int serviceId) { + object[] results = this.Invoke("GetCollationByServiceId", new object[] { + serviceId}); + return ((StringArrayResultObject)(results[0])); + } + + /// + public System.IAsyncResult BeginGetCollationByServiceId(int serviceId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetCollationByServiceId", new object[] { + serviceId}, callback, asyncState); + } + + /// + public StringArrayResultObject EndGetCollationByServiceId(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((StringArrayResultObject)(results[0])); + } + + /// + public void GetCollationByServiceIdAsync(int serviceId) { + this.GetCollationByServiceIdAsync(serviceId, null); + } + + /// + public void GetCollationByServiceIdAsync(int serviceId, object userState) { + if ((this.GetCollationByServiceIdOperationCompleted == null)) { + this.GetCollationByServiceIdOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetCollationByServiceIdOperationCompleted); + } + this.InvokeAsync("GetCollationByServiceId", new object[] { + serviceId}, this.GetCollationByServiceIdOperationCompleted, userState); + } + + private void OnGetCollationByServiceIdOperationCompleted(object arg) { + if ((this.GetCollationByServiceIdCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetCollationByServiceIdCompleted(this, new GetCollationByServiceIdCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + /// [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetCurrency", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] public CurrencyArrayResultObject GetCurrency(int packageId) { @@ -289,6 +341,47 @@ namespace WebsitePanel.EnterpriseServer { } } + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetCurrencyByServiceId", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public CurrencyArrayResultObject GetCurrencyByServiceId(int serviceId) { + object[] results = this.Invoke("GetCurrencyByServiceId", new object[] { + serviceId}); + return ((CurrencyArrayResultObject)(results[0])); + } + + /// + public System.IAsyncResult BeginGetCurrencyByServiceId(int serviceId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetCurrencyByServiceId", new object[] { + serviceId}, callback, asyncState); + } + + /// + public CurrencyArrayResultObject EndGetCurrencyByServiceId(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((CurrencyArrayResultObject)(results[0])); + } + + /// + public void GetCurrencyByServiceIdAsync(int serviceId) { + this.GetCurrencyByServiceIdAsync(serviceId, null); + } + + /// + public void GetCurrencyByServiceIdAsync(int serviceId, object userState) { + if ((this.GetCurrencyByServiceIdOperationCompleted == null)) { + this.GetCurrencyByServiceIdOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetCurrencyByServiceIdOperationCompleted); + } + this.InvokeAsync("GetCurrencyByServiceId", new object[] { + serviceId}, this.GetCurrencyByServiceIdOperationCompleted, userState); + } + + private void OnGetCurrencyByServiceIdOperationCompleted(object arg) { + if ((this.GetCurrencyByServiceIdCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetCurrencyByServiceIdCompleted(this, new GetCurrencyByServiceIdCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + /// [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteCRMOrganization", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] public ResultObject DeleteCRMOrganization(int organizationId) { @@ -909,6 +1002,89 @@ namespace WebsitePanel.EnterpriseServer { } } + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetInstalledLanguagePacks", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int[] GetInstalledLanguagePacks(int packageId) { + object[] results = this.Invoke("GetInstalledLanguagePacks", new object[] { + packageId}); + return ((int[])(results[0])); + } + + /// + public System.IAsyncResult BeginGetInstalledLanguagePacks(int packageId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetInstalledLanguagePacks", new object[] { + packageId}, callback, asyncState); + } + + /// + public int[] EndGetInstalledLanguagePacks(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((int[])(results[0])); + } + + /// + public void GetInstalledLanguagePacksAsync(int packageId) { + this.GetInstalledLanguagePacksAsync(packageId, null); + } + + /// + public void GetInstalledLanguagePacksAsync(int packageId, object userState) { + if ((this.GetInstalledLanguagePacksOperationCompleted == null)) { + this.GetInstalledLanguagePacksOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetInstalledLanguagePacksOperationCompleted); + } + this.InvokeAsync("GetInstalledLanguagePacks", new object[] { + packageId}, this.GetInstalledLanguagePacksOperationCompleted, userState); + } + + private void OnGetInstalledLanguagePacksOperationCompleted(object arg) { + if ((this.GetInstalledLanguagePacksCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetInstalledLanguagePacksCompleted(this, new GetInstalledLanguagePacksCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetInstalledLanguagePacksByServiceId" + + "", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int[] GetInstalledLanguagePacksByServiceId(int serviceId) { + object[] results = this.Invoke("GetInstalledLanguagePacksByServiceId", new object[] { + serviceId}); + return ((int[])(results[0])); + } + + /// + public System.IAsyncResult BeginGetInstalledLanguagePacksByServiceId(int serviceId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetInstalledLanguagePacksByServiceId", new object[] { + serviceId}, callback, asyncState); + } + + /// + public int[] EndGetInstalledLanguagePacksByServiceId(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((int[])(results[0])); + } + + /// + public void GetInstalledLanguagePacksByServiceIdAsync(int serviceId) { + this.GetInstalledLanguagePacksByServiceIdAsync(serviceId, null); + } + + /// + public void GetInstalledLanguagePacksByServiceIdAsync(int serviceId, object userState) { + if ((this.GetInstalledLanguagePacksByServiceIdOperationCompleted == null)) { + this.GetInstalledLanguagePacksByServiceIdOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetInstalledLanguagePacksByServiceIdOperationCompleted); + } + this.InvokeAsync("GetInstalledLanguagePacksByServiceId", new object[] { + serviceId}, this.GetInstalledLanguagePacksByServiceIdOperationCompleted, userState); + } + + private void OnGetInstalledLanguagePacksByServiceIdOperationCompleted(object arg) { + if ((this.GetInstalledLanguagePacksByServiceIdCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetInstalledLanguagePacksByServiceIdCompleted(this, new GetInstalledLanguagePacksByServiceIdCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + /// public new void CancelAsync(object userState) { base.CancelAsync(userState); @@ -967,6 +1143,32 @@ namespace WebsitePanel.EnterpriseServer { } } + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetCollationByServiceIdCompletedEventHandler(object sender, GetCollationByServiceIdCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetCollationByServiceIdCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetCollationByServiceIdCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public StringArrayResultObject Result { + get { + this.RaiseExceptionIfNecessary(); + return ((StringArrayResultObject)(this.results[0])); + } + } + } + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetCurrencyCompletedEventHandler(object sender, GetCurrencyCompletedEventArgs e); @@ -993,6 +1195,32 @@ namespace WebsitePanel.EnterpriseServer { } } + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetCurrencyByServiceIdCompletedEventHandler(object sender, GetCurrencyByServiceIdCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetCurrencyByServiceIdCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetCurrencyByServiceIdCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public CurrencyArrayResultObject Result { + get { + this.RaiseExceptionIfNecessary(); + return ((CurrencyArrayResultObject)(this.results[0])); + } + } + } + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void DeleteCRMOrganizationCompletedEventHandler(object sender, DeleteCRMOrganizationCompletedEventArgs e); @@ -1330,4 +1558,56 @@ namespace WebsitePanel.EnterpriseServer { } } } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetInstalledLanguagePacksCompletedEventHandler(object sender, GetInstalledLanguagePacksCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetInstalledLanguagePacksCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetInstalledLanguagePacksCompletedEventArgs(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.42")] + public delegate void GetInstalledLanguagePacksByServiceIdCompletedEventHandler(object sender, GetInstalledLanguagePacksByServiceIdCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetInstalledLanguagePacksByServiceIdCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetInstalledLanguagePacksByServiceIdCompletedEventArgs(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])); + } + } + } } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ExchangeServerProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ExchangeServerProxy.cs index d9b1068c..a1740db3 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ExchangeServerProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ExchangeServerProxy.cs @@ -36,6 +36,11 @@ // //------------------------------------------------------------------------------ +using WebsitePanel.Providers; +using WebsitePanel.Providers.Common; +using WebsitePanel.Providers.HostedSolution; +using WebsitePanel.Providers.ResultObjects; + // // This source code was auto-generated by wsdl, Version=2.0.50727.42. // @@ -48,790 +53,1268 @@ namespace WebsitePanel.EnterpriseServer using System; using System.Diagnostics; using System.Data; - - using WebsitePanel.Providers; - using WebsitePanel.Providers.Common; - using WebsitePanel.Providers.HostedSolution; - using WebsitePanel.Providers.ResultObjects; - + + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Web.Services.WebServiceBindingAttribute(Name = "esExchangeServerSoap", Namespace = "http://smbsaas/websitepanel/enterpriseserver")] + [System.Web.Services.WebServiceBindingAttribute(Name="esExchangeServerSoap", Namespace="http://smbsaas/websitepanel/enterpriseserver")] [System.Xml.Serialization.XmlIncludeAttribute(typeof(BaseStatistics))] [System.Xml.Serialization.XmlIncludeAttribute(typeof(ServiceProviderItem))] - public partial class esExchangeServer : Microsoft.Web.Services3.WebServicesClientProtocol - { - - private System.Threading.SendOrPostCallback GetExchangeMailboxPlansOperationCompleted; - - private System.Threading.SendOrPostCallback GetExchangeMailboxPlanOperationCompleted; - - private System.Threading.SendOrPostCallback AddExchangeMailboxPlanOperationCompleted; - - private System.Threading.SendOrPostCallback UpdateExchangeMailboxPlanOperationCompleted; - - private System.Threading.SendOrPostCallback DeleteExchangeMailboxPlanOperationCompleted; - - private System.Threading.SendOrPostCallback SetOrganizationDefaultExchangeMailboxPlanOperationCompleted; - - private System.Threading.SendOrPostCallback CreatePublicFolderOperationCompleted; - - private System.Threading.SendOrPostCallback DeletePublicFoldersOperationCompleted; - - private System.Threading.SendOrPostCallback DeletePublicFolderOperationCompleted; - - private System.Threading.SendOrPostCallback EnableMailPublicFolderOperationCompleted; - - private System.Threading.SendOrPostCallback DisableMailPublicFolderOperationCompleted; - - private System.Threading.SendOrPostCallback GetPublicFolderGeneralSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback SetPublicFolderGeneralSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback GetPublicFolderMailFlowSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback SetPublicFolderMailFlowSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback GetPublicFolderEmailAddressesOperationCompleted; - - private System.Threading.SendOrPostCallback AddPublicFolderEmailAddressOperationCompleted; - - private System.Threading.SendOrPostCallback SetPublicFolderPrimaryEmailAddressOperationCompleted; - - private System.Threading.SendOrPostCallback DeletePublicFolderEmailAddressesOperationCompleted; - - private System.Threading.SendOrPostCallback AddExchangeDisclaimerOperationCompleted; - - private System.Threading.SendOrPostCallback UpdateExchangeDisclaimerOperationCompleted; - - private System.Threading.SendOrPostCallback DeleteExchangeDisclaimerOperationCompleted; - - private System.Threading.SendOrPostCallback GetExchangeDisclaimerOperationCompleted; - - private System.Threading.SendOrPostCallback GetExchangeDisclaimersOperationCompleted; - - private System.Threading.SendOrPostCallback SetExchangeAccountDisclaimerIdOperationCompleted; - - private System.Threading.SendOrPostCallback GetExchangeAccountDisclaimerIdOperationCompleted; - - private System.Threading.SendOrPostCallback GetRawExchangeOrganizationsPagedOperationCompleted; - - private System.Threading.SendOrPostCallback GetExchangeOrganizationsPagedOperationCompleted; - - private System.Threading.SendOrPostCallback GetExchangeOrganizationsOperationCompleted; - - private System.Threading.SendOrPostCallback GetOrganizationOperationCompleted; - - private System.Threading.SendOrPostCallback GetOrganizationStatisticsOperationCompleted; - - private System.Threading.SendOrPostCallback GetOrganizationStatisticsByOrganizationOperationCompleted; - - private System.Threading.SendOrPostCallback DeleteOrganizationOperationCompleted; - - private System.Threading.SendOrPostCallback GetOrganizationStorageLimitsOperationCompleted; - - private System.Threading.SendOrPostCallback SetOrganizationStorageLimitsOperationCompleted; - - private System.Threading.SendOrPostCallback GetMailboxesStatisticsOperationCompleted; - - private System.Threading.SendOrPostCallback GetMailboxStatisticsOperationCompleted; - - private System.Threading.SendOrPostCallback CalculateOrganizationDiskspaceOperationCompleted; - - private System.Threading.SendOrPostCallback GetActiveSyncPolicyOperationCompleted; - - private System.Threading.SendOrPostCallback SetActiveSyncPolicyOperationCompleted; - - private System.Threading.SendOrPostCallback AddAuthoritativeDomainOperationCompleted; - - private System.Threading.SendOrPostCallback DeleteAuthoritativeDomainOperationCompleted; - - private System.Threading.SendOrPostCallback GetAccountsPagedOperationCompleted; - - private System.Threading.SendOrPostCallback GetAccountsOperationCompleted; - - private System.Threading.SendOrPostCallback GetExchangeAccountByMailboxPlanIdOperationCompleted; - - private System.Threading.SendOrPostCallback SearchAccountsOperationCompleted; - - private System.Threading.SendOrPostCallback GetAccountOperationCompleted; - - private System.Threading.SendOrPostCallback SearchAccountOperationCompleted; - - private System.Threading.SendOrPostCallback CheckAccountCredentialsOperationCompleted; - - private System.Threading.SendOrPostCallback CreateMailboxOperationCompleted; - - private System.Threading.SendOrPostCallback DeleteMailboxOperationCompleted; - - private System.Threading.SendOrPostCallback DisableMailboxOperationCompleted; - - private System.Threading.SendOrPostCallback GetMailboxAdvancedSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback GetMailboxGeneralSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback SetMailboxGeneralSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback GetMailboxEmailAddressesOperationCompleted; - - private System.Threading.SendOrPostCallback AddMailboxEmailAddressOperationCompleted; - - private System.Threading.SendOrPostCallback SetMailboxPrimaryEmailAddressOperationCompleted; - - private System.Threading.SendOrPostCallback DeleteMailboxEmailAddressesOperationCompleted; - - private System.Threading.SendOrPostCallback GetMailboxMailFlowSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback SetMailboxMailFlowSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback SetExchangeMailboxPlanOperationCompleted; - - private System.Threading.SendOrPostCallback GetMailboxSetupInstructionsOperationCompleted; - - private System.Threading.SendOrPostCallback SendMailboxSetupInstructionsOperationCompleted; - - private System.Threading.SendOrPostCallback SetMailboxManagerSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback GetMailboxPermissionsOperationCompleted; - - private System.Threading.SendOrPostCallback SetMailboxPermissionsOperationCompleted; - - private System.Threading.SendOrPostCallback CreateContactOperationCompleted; - - private System.Threading.SendOrPostCallback DeleteContactOperationCompleted; - - private System.Threading.SendOrPostCallback GetContactGeneralSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback SetContactGeneralSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback GetContactMailFlowSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback SetContactMailFlowSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback CreateDistributionListOperationCompleted; - - private System.Threading.SendOrPostCallback DeleteDistributionListOperationCompleted; - - private System.Threading.SendOrPostCallback GetDistributionListGeneralSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback SetDistributionListGeneralSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback GetDistributionListMailFlowSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback SetDistributionListMailFlowSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback GetDistributionListEmailAddressesOperationCompleted; - - private System.Threading.SendOrPostCallback AddDistributionListEmailAddressOperationCompleted; - - private System.Threading.SendOrPostCallback SetDistributionListPrimaryEmailAddressOperationCompleted; - - private System.Threading.SendOrPostCallback DeleteDistributionListEmailAddressesOperationCompleted; - - private System.Threading.SendOrPostCallback SetDistributionListPermissionsOperationCompleted; - - private System.Threading.SendOrPostCallback GetDistributionListPermissionsOperationCompleted; - - private System.Threading.SendOrPostCallback GetMobileDevicesOperationCompleted; - - private System.Threading.SendOrPostCallback GetMobileDeviceOperationCompleted; - + public partial class esExchangeServer : Microsoft.Web.Services3.WebServicesClientProtocol { + private System.Threading.SendOrPostCallback WipeDataFromDeviceOperationCompleted; - + private System.Threading.SendOrPostCallback CancelRemoteWipeRequestOperationCompleted; - + private System.Threading.SendOrPostCallback RemoveDeviceOperationCompleted; - + + private System.Threading.SendOrPostCallback GetExchangeMailboxPlansOperationCompleted; + + private System.Threading.SendOrPostCallback GetExchangeMailboxPlanOperationCompleted; + + private System.Threading.SendOrPostCallback AddExchangeMailboxPlanOperationCompleted; + + private System.Threading.SendOrPostCallback UpdateExchangeMailboxPlanOperationCompleted; + + private System.Threading.SendOrPostCallback DeleteExchangeMailboxPlanOperationCompleted; + + private System.Threading.SendOrPostCallback SetOrganizationDefaultExchangeMailboxPlanOperationCompleted; + + private System.Threading.SendOrPostCallback GetExchangeRetentionPolicyTagsOperationCompleted; + + private System.Threading.SendOrPostCallback GetExchangeRetentionPolicyTagOperationCompleted; + + private System.Threading.SendOrPostCallback AddExchangeRetentionPolicyTagOperationCompleted; + + private System.Threading.SendOrPostCallback UpdateExchangeRetentionPolicyTagOperationCompleted; + + private System.Threading.SendOrPostCallback DeleteExchangeRetentionPolicyTagOperationCompleted; + + private System.Threading.SendOrPostCallback GetExchangeMailboxPlanRetentionPolicyTagsOperationCompleted; + + private System.Threading.SendOrPostCallback AddExchangeMailboxPlanRetentionPolicyTagOperationCompleted; + + private System.Threading.SendOrPostCallback DeleteExchangeMailboxPlanRetentionPolicyTagOperationCompleted; + + private System.Threading.SendOrPostCallback CreatePublicFolderOperationCompleted; + + private System.Threading.SendOrPostCallback DeletePublicFoldersOperationCompleted; + + private System.Threading.SendOrPostCallback DeletePublicFolderOperationCompleted; + + private System.Threading.SendOrPostCallback EnableMailPublicFolderOperationCompleted; + + private System.Threading.SendOrPostCallback DisableMailPublicFolderOperationCompleted; + + private System.Threading.SendOrPostCallback GetPublicFolderGeneralSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback SetPublicFolderGeneralSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback GetPublicFolderMailFlowSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback SetPublicFolderMailFlowSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback GetPublicFolderEmailAddressesOperationCompleted; + + private System.Threading.SendOrPostCallback AddPublicFolderEmailAddressOperationCompleted; + + private System.Threading.SendOrPostCallback SetPublicFolderPrimaryEmailAddressOperationCompleted; + + private System.Threading.SendOrPostCallback DeletePublicFolderEmailAddressesOperationCompleted; + + private System.Threading.SendOrPostCallback AddExchangeDisclaimerOperationCompleted; + + private System.Threading.SendOrPostCallback UpdateExchangeDisclaimerOperationCompleted; + + private System.Threading.SendOrPostCallback DeleteExchangeDisclaimerOperationCompleted; + + private System.Threading.SendOrPostCallback GetExchangeDisclaimerOperationCompleted; + + private System.Threading.SendOrPostCallback GetExchangeDisclaimersOperationCompleted; + + private System.Threading.SendOrPostCallback SetExchangeAccountDisclaimerIdOperationCompleted; + + private System.Threading.SendOrPostCallback GetExchangeAccountDisclaimerIdOperationCompleted; + + private System.Threading.SendOrPostCallback GetRawExchangeOrganizationsPagedOperationCompleted; + + private System.Threading.SendOrPostCallback GetExchangeOrganizationsPagedOperationCompleted; + + private System.Threading.SendOrPostCallback GetExchangeOrganizationsOperationCompleted; + + private System.Threading.SendOrPostCallback GetOrganizationOperationCompleted; + + private System.Threading.SendOrPostCallback GetOrganizationStatisticsOperationCompleted; + + private System.Threading.SendOrPostCallback GetOrganizationStatisticsByOrganizationOperationCompleted; + + private System.Threading.SendOrPostCallback DeleteOrganizationOperationCompleted; + + private System.Threading.SendOrPostCallback GetOrganizationStorageLimitsOperationCompleted; + + private System.Threading.SendOrPostCallback SetOrganizationStorageLimitsOperationCompleted; + + private System.Threading.SendOrPostCallback GetMailboxesStatisticsOperationCompleted; + + private System.Threading.SendOrPostCallback GetMailboxStatisticsOperationCompleted; + + private System.Threading.SendOrPostCallback CalculateOrganizationDiskspaceOperationCompleted; + + private System.Threading.SendOrPostCallback GetActiveSyncPolicyOperationCompleted; + + private System.Threading.SendOrPostCallback SetActiveSyncPolicyOperationCompleted; + + private System.Threading.SendOrPostCallback AddAuthoritativeDomainOperationCompleted; + + private System.Threading.SendOrPostCallback DeleteAuthoritativeDomainOperationCompleted; + + private System.Threading.SendOrPostCallback GetAccountsPagedOperationCompleted; + + private System.Threading.SendOrPostCallback GetAccountsOperationCompleted; + + private System.Threading.SendOrPostCallback GetExchangeAccountByMailboxPlanIdOperationCompleted; + + private System.Threading.SendOrPostCallback SearchAccountsOperationCompleted; + + private System.Threading.SendOrPostCallback GetAccountOperationCompleted; + + private System.Threading.SendOrPostCallback SearchAccountOperationCompleted; + + private System.Threading.SendOrPostCallback CheckAccountCredentialsOperationCompleted; + + private System.Threading.SendOrPostCallback CreateMailboxOperationCompleted; + + private System.Threading.SendOrPostCallback DeleteMailboxOperationCompleted; + + private System.Threading.SendOrPostCallback DisableMailboxOperationCompleted; + + private System.Threading.SendOrPostCallback GetMailboxAdvancedSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback GetMailboxGeneralSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback SetMailboxGeneralSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback GetMailboxEmailAddressesOperationCompleted; + + private System.Threading.SendOrPostCallback AddMailboxEmailAddressOperationCompleted; + + private System.Threading.SendOrPostCallback SetMailboxPrimaryEmailAddressOperationCompleted; + + private System.Threading.SendOrPostCallback DeleteMailboxEmailAddressesOperationCompleted; + + private System.Threading.SendOrPostCallback GetMailboxMailFlowSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback SetMailboxMailFlowSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback SetExchangeMailboxPlanOperationCompleted; + + private System.Threading.SendOrPostCallback GetMailboxSetupInstructionsOperationCompleted; + + private System.Threading.SendOrPostCallback SendMailboxSetupInstructionsOperationCompleted; + + private System.Threading.SendOrPostCallback SetMailboxManagerSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback GetMailboxPermissionsOperationCompleted; + + private System.Threading.SendOrPostCallback SetMailboxPermissionsOperationCompleted; + + private System.Threading.SendOrPostCallback CreateContactOperationCompleted; + + private System.Threading.SendOrPostCallback DeleteContactOperationCompleted; + + private System.Threading.SendOrPostCallback GetContactGeneralSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback SetContactGeneralSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback GetContactMailFlowSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback SetContactMailFlowSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback CreateDistributionListOperationCompleted; + + private System.Threading.SendOrPostCallback DeleteDistributionListOperationCompleted; + + private System.Threading.SendOrPostCallback GetDistributionListGeneralSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback SetDistributionListGeneralSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback GetDistributionListMailFlowSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback SetDistributionListMailFlowSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback GetDistributionListEmailAddressesOperationCompleted; + + private System.Threading.SendOrPostCallback AddDistributionListEmailAddressOperationCompleted; + + private System.Threading.SendOrPostCallback SetDistributionListPrimaryEmailAddressOperationCompleted; + + private System.Threading.SendOrPostCallback DeleteDistributionListEmailAddressesOperationCompleted; + + private System.Threading.SendOrPostCallback SetDistributionListPermissionsOperationCompleted; + + private System.Threading.SendOrPostCallback GetDistributionListPermissionsOperationCompleted; + + private System.Threading.SendOrPostCallback GetDistributionListsByMemberOperationCompleted; + + private System.Threading.SendOrPostCallback AddDistributionListMemberOperationCompleted; + + private System.Threading.SendOrPostCallback DeleteDistributionListMemberOperationCompleted; + + private System.Threading.SendOrPostCallback GetMobileDevicesOperationCompleted; + + private System.Threading.SendOrPostCallback GetMobileDeviceOperationCompleted; + /// - public esExchangeServer() - { + public esExchangeServer() { this.Url = "http://localhost:9002/esExchangeServer.asmx"; } - - /// - public event GetExchangeMailboxPlansCompletedEventHandler GetExchangeMailboxPlansCompleted; - - /// - public event GetExchangeMailboxPlanCompletedEventHandler GetExchangeMailboxPlanCompleted; - - /// - public event AddExchangeMailboxPlanCompletedEventHandler AddExchangeMailboxPlanCompleted; - - /// - public event UpdateExchangeMailboxPlanCompletedEventHandler UpdateExchangeMailboxPlanCompleted; - - /// - public event DeleteExchangeMailboxPlanCompletedEventHandler DeleteExchangeMailboxPlanCompleted; - - /// - public event SetOrganizationDefaultExchangeMailboxPlanCompletedEventHandler SetOrganizationDefaultExchangeMailboxPlanCompleted; - - /// - public event CreatePublicFolderCompletedEventHandler CreatePublicFolderCompleted; - - /// - public event DeletePublicFoldersCompletedEventHandler DeletePublicFoldersCompleted; - - /// - public event DeletePublicFolderCompletedEventHandler DeletePublicFolderCompleted; - - /// - public event EnableMailPublicFolderCompletedEventHandler EnableMailPublicFolderCompleted; - - /// - public event DisableMailPublicFolderCompletedEventHandler DisableMailPublicFolderCompleted; - - /// - public event GetPublicFolderGeneralSettingsCompletedEventHandler GetPublicFolderGeneralSettingsCompleted; - - /// - public event SetPublicFolderGeneralSettingsCompletedEventHandler SetPublicFolderGeneralSettingsCompleted; - - /// - public event GetPublicFolderMailFlowSettingsCompletedEventHandler GetPublicFolderMailFlowSettingsCompleted; - - /// - public event SetPublicFolderMailFlowSettingsCompletedEventHandler SetPublicFolderMailFlowSettingsCompleted; - - /// - public event GetPublicFolderEmailAddressesCompletedEventHandler GetPublicFolderEmailAddressesCompleted; - - /// - public event AddPublicFolderEmailAddressCompletedEventHandler AddPublicFolderEmailAddressCompleted; - - /// - public event SetPublicFolderPrimaryEmailAddressCompletedEventHandler SetPublicFolderPrimaryEmailAddressCompleted; - - /// - public event DeletePublicFolderEmailAddressesCompletedEventHandler DeletePublicFolderEmailAddressesCompleted; - - /// - public event AddExchangeDisclaimerCompletedEventHandler AddExchangeDisclaimerCompleted; - - /// - public event UpdateExchangeDisclaimerCompletedEventHandler UpdateExchangeDisclaimerCompleted; - - /// - public event DeleteExchangeDisclaimerCompletedEventHandler DeleteExchangeDisclaimerCompleted; - - /// - public event GetExchangeDisclaimerCompletedEventHandler GetExchangeDisclaimerCompleted; - - /// - public event GetExchangeDisclaimersCompletedEventHandler GetExchangeDisclaimersCompleted; - - /// - public event SetExchangeAccountDisclaimerIdCompletedEventHandler SetExchangeAccountDisclaimerIdCompleted; - - /// - public event GetExchangeAccountDisclaimerIdCompletedEventHandler GetExchangeAccountDisclaimerIdCompleted; - - /// - public event GetRawExchangeOrganizationsPagedCompletedEventHandler GetRawExchangeOrganizationsPagedCompleted; - - /// - public event GetExchangeOrganizationsPagedCompletedEventHandler GetExchangeOrganizationsPagedCompleted; - - /// - public event GetExchangeOrganizationsCompletedEventHandler GetExchangeOrganizationsCompleted; - - /// - public event GetOrganizationCompletedEventHandler GetOrganizationCompleted; - - /// - public event GetOrganizationStatisticsCompletedEventHandler GetOrganizationStatisticsCompleted; - - /// - public event GetOrganizationStatisticsByOrganizationCompletedEventHandler GetOrganizationStatisticsByOrganizationCompleted; - - /// - public event DeleteOrganizationCompletedEventHandler DeleteOrganizationCompleted; - - /// - public event GetOrganizationStorageLimitsCompletedEventHandler GetOrganizationStorageLimitsCompleted; - - /// - public event SetOrganizationStorageLimitsCompletedEventHandler SetOrganizationStorageLimitsCompleted; - - /// - public event GetMailboxesStatisticsCompletedEventHandler GetMailboxesStatisticsCompleted; - - /// - public event GetMailboxStatisticsCompletedEventHandler GetMailboxStatisticsCompleted; - - /// - public event CalculateOrganizationDiskspaceCompletedEventHandler CalculateOrganizationDiskspaceCompleted; - - /// - public event GetActiveSyncPolicyCompletedEventHandler GetActiveSyncPolicyCompleted; - - /// - public event SetActiveSyncPolicyCompletedEventHandler SetActiveSyncPolicyCompleted; - - /// - public event AddAuthoritativeDomainCompletedEventHandler AddAuthoritativeDomainCompleted; - - /// - public event DeleteAuthoritativeDomainCompletedEventHandler DeleteAuthoritativeDomainCompleted; - - /// - public event GetAccountsPagedCompletedEventHandler GetAccountsPagedCompleted; - - /// - public event GetAccountsCompletedEventHandler GetAccountsCompleted; - - /// - public event GetExchangeAccountByMailboxPlanIdCompletedEventHandler GetExchangeAccountByMailboxPlanIdCompleted; - - /// - public event SearchAccountsCompletedEventHandler SearchAccountsCompleted; - - /// - public event GetAccountCompletedEventHandler GetAccountCompleted; - - /// - public event SearchAccountCompletedEventHandler SearchAccountCompleted; - - /// - public event CheckAccountCredentialsCompletedEventHandler CheckAccountCredentialsCompleted; - - /// - public event CreateMailboxCompletedEventHandler CreateMailboxCompleted; - - /// - public event DeleteMailboxCompletedEventHandler DeleteMailboxCompleted; - - /// - public event DisableMailboxCompletedEventHandler DisableMailboxCompleted; - - /// - public event GetMailboxAdvancedSettingsCompletedEventHandler GetMailboxAdvancedSettingsCompleted; - - /// - public event GetMailboxGeneralSettingsCompletedEventHandler GetMailboxGeneralSettingsCompleted; - - /// - public event SetMailboxGeneralSettingsCompletedEventHandler SetMailboxGeneralSettingsCompleted; - - /// - public event GetMailboxEmailAddressesCompletedEventHandler GetMailboxEmailAddressesCompleted; - - /// - public event AddMailboxEmailAddressCompletedEventHandler AddMailboxEmailAddressCompleted; - - /// - public event SetMailboxPrimaryEmailAddressCompletedEventHandler SetMailboxPrimaryEmailAddressCompleted; - - /// - public event DeleteMailboxEmailAddressesCompletedEventHandler DeleteMailboxEmailAddressesCompleted; - - /// - public event GetMailboxMailFlowSettingsCompletedEventHandler GetMailboxMailFlowSettingsCompleted; - - /// - public event SetMailboxMailFlowSettingsCompletedEventHandler SetMailboxMailFlowSettingsCompleted; - - /// - public event SetExchangeMailboxPlanCompletedEventHandler SetExchangeMailboxPlanCompleted; - - /// - public event GetMailboxSetupInstructionsCompletedEventHandler GetMailboxSetupInstructionsCompleted; - - /// - public event SendMailboxSetupInstructionsCompletedEventHandler SendMailboxSetupInstructionsCompleted; - - /// - public event SetMailboxManagerSettingsCompletedEventHandler SetMailboxManagerSettingsCompleted; - - /// - public event GetMailboxPermissionsCompletedEventHandler GetMailboxPermissionsCompleted; - - /// - public event SetMailboxPermissionsCompletedEventHandler SetMailboxPermissionsCompleted; - - /// - public event CreateContactCompletedEventHandler CreateContactCompleted; - - /// - public event DeleteContactCompletedEventHandler DeleteContactCompleted; - - /// - public event GetContactGeneralSettingsCompletedEventHandler GetContactGeneralSettingsCompleted; - - /// - public event SetContactGeneralSettingsCompletedEventHandler SetContactGeneralSettingsCompleted; - - /// - public event GetContactMailFlowSettingsCompletedEventHandler GetContactMailFlowSettingsCompleted; - - /// - public event SetContactMailFlowSettingsCompletedEventHandler SetContactMailFlowSettingsCompleted; - - /// - public event CreateDistributionListCompletedEventHandler CreateDistributionListCompleted; - - /// - public event DeleteDistributionListCompletedEventHandler DeleteDistributionListCompleted; - - /// - public event GetDistributionListGeneralSettingsCompletedEventHandler GetDistributionListGeneralSettingsCompleted; - - /// - public event SetDistributionListGeneralSettingsCompletedEventHandler SetDistributionListGeneralSettingsCompleted; - - /// - public event GetDistributionListMailFlowSettingsCompletedEventHandler GetDistributionListMailFlowSettingsCompleted; - - /// - public event SetDistributionListMailFlowSettingsCompletedEventHandler SetDistributionListMailFlowSettingsCompleted; - - /// - public event GetDistributionListEmailAddressesCompletedEventHandler GetDistributionListEmailAddressesCompleted; - - /// - public event AddDistributionListEmailAddressCompletedEventHandler AddDistributionListEmailAddressCompleted; - - /// - public event SetDistributionListPrimaryEmailAddressCompletedEventHandler SetDistributionListPrimaryEmailAddressCompleted; - - /// - public event DeleteDistributionListEmailAddressesCompletedEventHandler DeleteDistributionListEmailAddressesCompleted; - - /// - public event SetDistributionListPermissionsCompletedEventHandler SetDistributionListPermissionsCompleted; - - /// - public event GetDistributionListPermissionsCompletedEventHandler GetDistributionListPermissionsCompleted; - - /// - public event GetMobileDevicesCompletedEventHandler GetMobileDevicesCompleted; - - /// - public event GetMobileDeviceCompletedEventHandler GetMobileDeviceCompleted; - + /// public event WipeDataFromDeviceCompletedEventHandler WipeDataFromDeviceCompleted; - + /// public event CancelRemoteWipeRequestCompletedEventHandler CancelRemoteWipeRequestCompleted; - + /// public event RemoveDeviceCompletedEventHandler RemoveDeviceCompleted; - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetExchangeMailboxPlans", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeMailboxPlan[] GetExchangeMailboxPlans(int itemId) - { + public event GetExchangeMailboxPlansCompletedEventHandler GetExchangeMailboxPlansCompleted; + + /// + public event GetExchangeMailboxPlanCompletedEventHandler GetExchangeMailboxPlanCompleted; + + /// + public event AddExchangeMailboxPlanCompletedEventHandler AddExchangeMailboxPlanCompleted; + + /// + public event UpdateExchangeMailboxPlanCompletedEventHandler UpdateExchangeMailboxPlanCompleted; + + /// + public event DeleteExchangeMailboxPlanCompletedEventHandler DeleteExchangeMailboxPlanCompleted; + + /// + public event SetOrganizationDefaultExchangeMailboxPlanCompletedEventHandler SetOrganizationDefaultExchangeMailboxPlanCompleted; + + /// + public event GetExchangeRetentionPolicyTagsCompletedEventHandler GetExchangeRetentionPolicyTagsCompleted; + + /// + public event GetExchangeRetentionPolicyTagCompletedEventHandler GetExchangeRetentionPolicyTagCompleted; + + /// + public event AddExchangeRetentionPolicyTagCompletedEventHandler AddExchangeRetentionPolicyTagCompleted; + + /// + public event UpdateExchangeRetentionPolicyTagCompletedEventHandler UpdateExchangeRetentionPolicyTagCompleted; + + /// + public event DeleteExchangeRetentionPolicyTagCompletedEventHandler DeleteExchangeRetentionPolicyTagCompleted; + + /// + public event GetExchangeMailboxPlanRetentionPolicyTagsCompletedEventHandler GetExchangeMailboxPlanRetentionPolicyTagsCompleted; + + /// + public event AddExchangeMailboxPlanRetentionPolicyTagCompletedEventHandler AddExchangeMailboxPlanRetentionPolicyTagCompleted; + + /// + public event DeleteExchangeMailboxPlanRetentionPolicyTagCompletedEventHandler DeleteExchangeMailboxPlanRetentionPolicyTagCompleted; + + /// + public event CreatePublicFolderCompletedEventHandler CreatePublicFolderCompleted; + + /// + public event DeletePublicFoldersCompletedEventHandler DeletePublicFoldersCompleted; + + /// + public event DeletePublicFolderCompletedEventHandler DeletePublicFolderCompleted; + + /// + public event EnableMailPublicFolderCompletedEventHandler EnableMailPublicFolderCompleted; + + /// + public event DisableMailPublicFolderCompletedEventHandler DisableMailPublicFolderCompleted; + + /// + public event GetPublicFolderGeneralSettingsCompletedEventHandler GetPublicFolderGeneralSettingsCompleted; + + /// + public event SetPublicFolderGeneralSettingsCompletedEventHandler SetPublicFolderGeneralSettingsCompleted; + + /// + public event GetPublicFolderMailFlowSettingsCompletedEventHandler GetPublicFolderMailFlowSettingsCompleted; + + /// + public event SetPublicFolderMailFlowSettingsCompletedEventHandler SetPublicFolderMailFlowSettingsCompleted; + + /// + public event GetPublicFolderEmailAddressesCompletedEventHandler GetPublicFolderEmailAddressesCompleted; + + /// + public event AddPublicFolderEmailAddressCompletedEventHandler AddPublicFolderEmailAddressCompleted; + + /// + public event SetPublicFolderPrimaryEmailAddressCompletedEventHandler SetPublicFolderPrimaryEmailAddressCompleted; + + /// + public event DeletePublicFolderEmailAddressesCompletedEventHandler DeletePublicFolderEmailAddressesCompleted; + + /// + public event AddExchangeDisclaimerCompletedEventHandler AddExchangeDisclaimerCompleted; + + /// + public event UpdateExchangeDisclaimerCompletedEventHandler UpdateExchangeDisclaimerCompleted; + + /// + public event DeleteExchangeDisclaimerCompletedEventHandler DeleteExchangeDisclaimerCompleted; + + /// + public event GetExchangeDisclaimerCompletedEventHandler GetExchangeDisclaimerCompleted; + + /// + public event GetExchangeDisclaimersCompletedEventHandler GetExchangeDisclaimersCompleted; + + /// + public event SetExchangeAccountDisclaimerIdCompletedEventHandler SetExchangeAccountDisclaimerIdCompleted; + + /// + public event GetExchangeAccountDisclaimerIdCompletedEventHandler GetExchangeAccountDisclaimerIdCompleted; + + /// + public event GetRawExchangeOrganizationsPagedCompletedEventHandler GetRawExchangeOrganizationsPagedCompleted; + + /// + public event GetExchangeOrganizationsPagedCompletedEventHandler GetExchangeOrganizationsPagedCompleted; + + /// + public event GetExchangeOrganizationsCompletedEventHandler GetExchangeOrganizationsCompleted; + + /// + public event GetOrganizationCompletedEventHandler GetOrganizationCompleted; + + /// + public event GetOrganizationStatisticsCompletedEventHandler GetOrganizationStatisticsCompleted; + + /// + public event GetOrganizationStatisticsByOrganizationCompletedEventHandler GetOrganizationStatisticsByOrganizationCompleted; + + /// + public event DeleteOrganizationCompletedEventHandler DeleteOrganizationCompleted; + + /// + public event GetOrganizationStorageLimitsCompletedEventHandler GetOrganizationStorageLimitsCompleted; + + /// + public event SetOrganizationStorageLimitsCompletedEventHandler SetOrganizationStorageLimitsCompleted; + + /// + public event GetMailboxesStatisticsCompletedEventHandler GetMailboxesStatisticsCompleted; + + /// + public event GetMailboxStatisticsCompletedEventHandler GetMailboxStatisticsCompleted; + + /// + public event CalculateOrganizationDiskspaceCompletedEventHandler CalculateOrganizationDiskspaceCompleted; + + /// + public event GetActiveSyncPolicyCompletedEventHandler GetActiveSyncPolicyCompleted; + + /// + public event SetActiveSyncPolicyCompletedEventHandler SetActiveSyncPolicyCompleted; + + /// + public event AddAuthoritativeDomainCompletedEventHandler AddAuthoritativeDomainCompleted; + + /// + public event DeleteAuthoritativeDomainCompletedEventHandler DeleteAuthoritativeDomainCompleted; + + /// + public event GetAccountsPagedCompletedEventHandler GetAccountsPagedCompleted; + + /// + public event GetAccountsCompletedEventHandler GetAccountsCompleted; + + /// + public event GetExchangeAccountByMailboxPlanIdCompletedEventHandler GetExchangeAccountByMailboxPlanIdCompleted; + + /// + public event SearchAccountsCompletedEventHandler SearchAccountsCompleted; + + /// + public event GetAccountCompletedEventHandler GetAccountCompleted; + + /// + public event SearchAccountCompletedEventHandler SearchAccountCompleted; + + /// + public event CheckAccountCredentialsCompletedEventHandler CheckAccountCredentialsCompleted; + + /// + public event CreateMailboxCompletedEventHandler CreateMailboxCompleted; + + /// + public event DeleteMailboxCompletedEventHandler DeleteMailboxCompleted; + + /// + public event DisableMailboxCompletedEventHandler DisableMailboxCompleted; + + /// + public event GetMailboxAdvancedSettingsCompletedEventHandler GetMailboxAdvancedSettingsCompleted; + + /// + public event GetMailboxGeneralSettingsCompletedEventHandler GetMailboxGeneralSettingsCompleted; + + /// + public event SetMailboxGeneralSettingsCompletedEventHandler SetMailboxGeneralSettingsCompleted; + + /// + public event GetMailboxEmailAddressesCompletedEventHandler GetMailboxEmailAddressesCompleted; + + /// + public event AddMailboxEmailAddressCompletedEventHandler AddMailboxEmailAddressCompleted; + + /// + public event SetMailboxPrimaryEmailAddressCompletedEventHandler SetMailboxPrimaryEmailAddressCompleted; + + /// + public event DeleteMailboxEmailAddressesCompletedEventHandler DeleteMailboxEmailAddressesCompleted; + + /// + public event GetMailboxMailFlowSettingsCompletedEventHandler GetMailboxMailFlowSettingsCompleted; + + /// + public event SetMailboxMailFlowSettingsCompletedEventHandler SetMailboxMailFlowSettingsCompleted; + + /// + public event SetExchangeMailboxPlanCompletedEventHandler SetExchangeMailboxPlanCompleted; + + /// + public event GetMailboxSetupInstructionsCompletedEventHandler GetMailboxSetupInstructionsCompleted; + + /// + public event SendMailboxSetupInstructionsCompletedEventHandler SendMailboxSetupInstructionsCompleted; + + /// + public event SetMailboxManagerSettingsCompletedEventHandler SetMailboxManagerSettingsCompleted; + + /// + public event GetMailboxPermissionsCompletedEventHandler GetMailboxPermissionsCompleted; + + /// + public event SetMailboxPermissionsCompletedEventHandler SetMailboxPermissionsCompleted; + + /// + public event CreateContactCompletedEventHandler CreateContactCompleted; + + /// + public event DeleteContactCompletedEventHandler DeleteContactCompleted; + + /// + public event GetContactGeneralSettingsCompletedEventHandler GetContactGeneralSettingsCompleted; + + /// + public event SetContactGeneralSettingsCompletedEventHandler SetContactGeneralSettingsCompleted; + + /// + public event GetContactMailFlowSettingsCompletedEventHandler GetContactMailFlowSettingsCompleted; + + /// + public event SetContactMailFlowSettingsCompletedEventHandler SetContactMailFlowSettingsCompleted; + + /// + public event CreateDistributionListCompletedEventHandler CreateDistributionListCompleted; + + /// + public event DeleteDistributionListCompletedEventHandler DeleteDistributionListCompleted; + + /// + public event GetDistributionListGeneralSettingsCompletedEventHandler GetDistributionListGeneralSettingsCompleted; + + /// + public event SetDistributionListGeneralSettingsCompletedEventHandler SetDistributionListGeneralSettingsCompleted; + + /// + public event GetDistributionListMailFlowSettingsCompletedEventHandler GetDistributionListMailFlowSettingsCompleted; + + /// + public event SetDistributionListMailFlowSettingsCompletedEventHandler SetDistributionListMailFlowSettingsCompleted; + + /// + public event GetDistributionListEmailAddressesCompletedEventHandler GetDistributionListEmailAddressesCompleted; + + /// + public event AddDistributionListEmailAddressCompletedEventHandler AddDistributionListEmailAddressCompleted; + + /// + public event SetDistributionListPrimaryEmailAddressCompletedEventHandler SetDistributionListPrimaryEmailAddressCompleted; + + /// + public event DeleteDistributionListEmailAddressesCompletedEventHandler DeleteDistributionListEmailAddressesCompleted; + + /// + public event SetDistributionListPermissionsCompletedEventHandler SetDistributionListPermissionsCompleted; + + /// + public event GetDistributionListPermissionsCompletedEventHandler GetDistributionListPermissionsCompleted; + + /// + public event GetDistributionListsByMemberCompletedEventHandler GetDistributionListsByMemberCompleted; + + /// + public event AddDistributionListMemberCompletedEventHandler AddDistributionListMemberCompleted; + + /// + public event DeleteDistributionListMemberCompletedEventHandler DeleteDistributionListMemberCompleted; + + /// + public event GetMobileDevicesCompletedEventHandler GetMobileDevicesCompleted; + + /// + public event GetMobileDeviceCompletedEventHandler GetMobileDeviceCompleted; + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/WipeDataFromDevice", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void WipeDataFromDevice(int itemId, string deviceId) { + this.Invoke("WipeDataFromDevice", new object[] { + itemId, + deviceId}); + } + + /// + public System.IAsyncResult BeginWipeDataFromDevice(int itemId, string deviceId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("WipeDataFromDevice", new object[] { + itemId, + deviceId}, callback, asyncState); + } + + /// + public void EndWipeDataFromDevice(System.IAsyncResult asyncResult) { + this.EndInvoke(asyncResult); + } + + /// + public void WipeDataFromDeviceAsync(int itemId, string deviceId) { + this.WipeDataFromDeviceAsync(itemId, deviceId, null); + } + + /// + public void WipeDataFromDeviceAsync(int itemId, string deviceId, object userState) { + if ((this.WipeDataFromDeviceOperationCompleted == null)) { + this.WipeDataFromDeviceOperationCompleted = new System.Threading.SendOrPostCallback(this.OnWipeDataFromDeviceOperationCompleted); + } + this.InvokeAsync("WipeDataFromDevice", new object[] { + itemId, + deviceId}, this.WipeDataFromDeviceOperationCompleted, userState); + } + + private void OnWipeDataFromDeviceOperationCompleted(object arg) { + if ((this.WipeDataFromDeviceCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.WipeDataFromDeviceCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CancelRemoteWipeRequest", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void CancelRemoteWipeRequest(int itemId, string deviceId) { + this.Invoke("CancelRemoteWipeRequest", new object[] { + itemId, + deviceId}); + } + + /// + public System.IAsyncResult BeginCancelRemoteWipeRequest(int itemId, string deviceId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("CancelRemoteWipeRequest", new object[] { + itemId, + deviceId}, callback, asyncState); + } + + /// + public void EndCancelRemoteWipeRequest(System.IAsyncResult asyncResult) { + this.EndInvoke(asyncResult); + } + + /// + public void CancelRemoteWipeRequestAsync(int itemId, string deviceId) { + this.CancelRemoteWipeRequestAsync(itemId, deviceId, null); + } + + /// + public void CancelRemoteWipeRequestAsync(int itemId, string deviceId, object userState) { + if ((this.CancelRemoteWipeRequestOperationCompleted == null)) { + this.CancelRemoteWipeRequestOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCancelRemoteWipeRequestOperationCompleted); + } + this.InvokeAsync("CancelRemoteWipeRequest", new object[] { + itemId, + deviceId}, this.CancelRemoteWipeRequestOperationCompleted, userState); + } + + private void OnCancelRemoteWipeRequestOperationCompleted(object arg) { + if ((this.CancelRemoteWipeRequestCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.CancelRemoteWipeRequestCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/RemoveDevice", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void RemoveDevice(int itemId, string deviceId) { + this.Invoke("RemoveDevice", new object[] { + itemId, + deviceId}); + } + + /// + public System.IAsyncResult BeginRemoveDevice(int itemId, string deviceId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("RemoveDevice", new object[] { + itemId, + deviceId}, callback, asyncState); + } + + /// + public void EndRemoveDevice(System.IAsyncResult asyncResult) { + this.EndInvoke(asyncResult); + } + + /// + public void RemoveDeviceAsync(int itemId, string deviceId) { + this.RemoveDeviceAsync(itemId, deviceId, null); + } + + /// + public void RemoveDeviceAsync(int itemId, string deviceId, object userState) { + if ((this.RemoveDeviceOperationCompleted == null)) { + this.RemoveDeviceOperationCompleted = new System.Threading.SendOrPostCallback(this.OnRemoveDeviceOperationCompleted); + } + this.InvokeAsync("RemoveDevice", new object[] { + itemId, + deviceId}, this.RemoveDeviceOperationCompleted, userState); + } + + private void OnRemoveDeviceOperationCompleted(object arg) { + if ((this.RemoveDeviceCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.RemoveDeviceCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetExchangeMailboxPlans", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeMailboxPlan[] GetExchangeMailboxPlans(int itemId, bool archiving) { object[] results = this.Invoke("GetExchangeMailboxPlans", new object[] { - itemId}); + itemId, + archiving}); return ((ExchangeMailboxPlan[])(results[0])); } - + /// - public System.IAsyncResult BeginGetExchangeMailboxPlans(int itemId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetExchangeMailboxPlans(int itemId, bool archiving, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetExchangeMailboxPlans", new object[] { - itemId}, callback, asyncState); + itemId, + archiving}, callback, asyncState); } - + /// - public ExchangeMailboxPlan[] EndGetExchangeMailboxPlans(System.IAsyncResult asyncResult) - { + public ExchangeMailboxPlan[] EndGetExchangeMailboxPlans(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((ExchangeMailboxPlan[])(results[0])); } - + /// - public void GetExchangeMailboxPlansAsync(int itemId) - { - this.GetExchangeMailboxPlansAsync(itemId, null); + public void GetExchangeMailboxPlansAsync(int itemId, bool archiving) { + this.GetExchangeMailboxPlansAsync(itemId, archiving, null); } - + /// - public void GetExchangeMailboxPlansAsync(int itemId, object userState) - { - if ((this.GetExchangeMailboxPlansOperationCompleted == null)) - { + public void GetExchangeMailboxPlansAsync(int itemId, bool archiving, object userState) { + if ((this.GetExchangeMailboxPlansOperationCompleted == null)) { this.GetExchangeMailboxPlansOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetExchangeMailboxPlansOperationCompleted); } this.InvokeAsync("GetExchangeMailboxPlans", new object[] { - itemId}, this.GetExchangeMailboxPlansOperationCompleted, userState); + itemId, + archiving}, this.GetExchangeMailboxPlansOperationCompleted, userState); } - - private void OnGetExchangeMailboxPlansOperationCompleted(object arg) - { - if ((this.GetExchangeMailboxPlansCompleted != null)) - { + + private void OnGetExchangeMailboxPlansOperationCompleted(object arg) { + if ((this.GetExchangeMailboxPlansCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetExchangeMailboxPlansCompleted(this, new GetExchangeMailboxPlansCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetExchangeMailboxPlan", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeMailboxPlan GetExchangeMailboxPlan(int itemId, int mailboxPlanId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetExchangeMailboxPlan", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeMailboxPlan GetExchangeMailboxPlan(int itemId, int mailboxPlanId) { object[] results = this.Invoke("GetExchangeMailboxPlan", new object[] { itemId, mailboxPlanId}); return ((ExchangeMailboxPlan)(results[0])); } - + /// - public System.IAsyncResult BeginGetExchangeMailboxPlan(int itemId, int mailboxPlanId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetExchangeMailboxPlan(int itemId, int mailboxPlanId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetExchangeMailboxPlan", new object[] { itemId, mailboxPlanId}, callback, asyncState); } - + /// - public ExchangeMailboxPlan EndGetExchangeMailboxPlan(System.IAsyncResult asyncResult) - { + public ExchangeMailboxPlan EndGetExchangeMailboxPlan(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((ExchangeMailboxPlan)(results[0])); } - + /// - public void GetExchangeMailboxPlanAsync(int itemId, int mailboxPlanId) - { + public void GetExchangeMailboxPlanAsync(int itemId, int mailboxPlanId) { this.GetExchangeMailboxPlanAsync(itemId, mailboxPlanId, null); } - + /// - public void GetExchangeMailboxPlanAsync(int itemId, int mailboxPlanId, object userState) - { - if ((this.GetExchangeMailboxPlanOperationCompleted == null)) - { + public void GetExchangeMailboxPlanAsync(int itemId, int mailboxPlanId, object userState) { + if ((this.GetExchangeMailboxPlanOperationCompleted == null)) { this.GetExchangeMailboxPlanOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetExchangeMailboxPlanOperationCompleted); } this.InvokeAsync("GetExchangeMailboxPlan", new object[] { itemId, mailboxPlanId}, this.GetExchangeMailboxPlanOperationCompleted, userState); } - - private void OnGetExchangeMailboxPlanOperationCompleted(object arg) - { - if ((this.GetExchangeMailboxPlanCompleted != null)) - { + + private void OnGetExchangeMailboxPlanOperationCompleted(object arg) { + if ((this.GetExchangeMailboxPlanCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetExchangeMailboxPlanCompleted(this, new GetExchangeMailboxPlanCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddExchangeMailboxPlan", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int AddExchangeMailboxPlan(int itemId, ExchangeMailboxPlan mailboxPlan) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddExchangeMailboxPlan", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int AddExchangeMailboxPlan(int itemId, ExchangeMailboxPlan mailboxPlan) { object[] results = this.Invoke("AddExchangeMailboxPlan", new object[] { itemId, mailboxPlan}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginAddExchangeMailboxPlan(int itemId, ExchangeMailboxPlan mailboxPlan, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginAddExchangeMailboxPlan(int itemId, ExchangeMailboxPlan mailboxPlan, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("AddExchangeMailboxPlan", new object[] { itemId, mailboxPlan}, callback, asyncState); } - + /// - public int EndAddExchangeMailboxPlan(System.IAsyncResult asyncResult) - { + public int EndAddExchangeMailboxPlan(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void AddExchangeMailboxPlanAsync(int itemId, ExchangeMailboxPlan mailboxPlan) - { + public void AddExchangeMailboxPlanAsync(int itemId, ExchangeMailboxPlan mailboxPlan) { this.AddExchangeMailboxPlanAsync(itemId, mailboxPlan, null); } - + /// - public void AddExchangeMailboxPlanAsync(int itemId, ExchangeMailboxPlan mailboxPlan, object userState) - { - if ((this.AddExchangeMailboxPlanOperationCompleted == null)) - { + public void AddExchangeMailboxPlanAsync(int itemId, ExchangeMailboxPlan mailboxPlan, object userState) { + if ((this.AddExchangeMailboxPlanOperationCompleted == null)) { this.AddExchangeMailboxPlanOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddExchangeMailboxPlanOperationCompleted); } this.InvokeAsync("AddExchangeMailboxPlan", new object[] { itemId, mailboxPlan}, this.AddExchangeMailboxPlanOperationCompleted, userState); } - - private void OnAddExchangeMailboxPlanOperationCompleted(object arg) - { - if ((this.AddExchangeMailboxPlanCompleted != null)) - { + + private void OnAddExchangeMailboxPlanOperationCompleted(object arg) { + if ((this.AddExchangeMailboxPlanCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.AddExchangeMailboxPlanCompleted(this, new AddExchangeMailboxPlanCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/UpdateExchangeMailboxPlan", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int UpdateExchangeMailboxPlan(int itemId, ExchangeMailboxPlan mailboxPlan) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/UpdateExchangeMailboxPlan", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int UpdateExchangeMailboxPlan(int itemId, ExchangeMailboxPlan mailboxPlan) { object[] results = this.Invoke("UpdateExchangeMailboxPlan", new object[] { itemId, mailboxPlan}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginUpdateExchangeMailboxPlan(int itemId, ExchangeMailboxPlan mailboxPlan, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginUpdateExchangeMailboxPlan(int itemId, ExchangeMailboxPlan mailboxPlan, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("UpdateExchangeMailboxPlan", new object[] { itemId, mailboxPlan}, callback, asyncState); } - + /// - public int EndUpdateExchangeMailboxPlan(System.IAsyncResult asyncResult) - { + public int EndUpdateExchangeMailboxPlan(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void UpdateExchangeMailboxPlanAsync(int itemId, ExchangeMailboxPlan mailboxPlan) - { + public void UpdateExchangeMailboxPlanAsync(int itemId, ExchangeMailboxPlan mailboxPlan) { this.UpdateExchangeMailboxPlanAsync(itemId, mailboxPlan, null); } - + /// - public void UpdateExchangeMailboxPlanAsync(int itemId, ExchangeMailboxPlan mailboxPlan, object userState) - { - if ((this.UpdateExchangeMailboxPlanOperationCompleted == null)) - { + public void UpdateExchangeMailboxPlanAsync(int itemId, ExchangeMailboxPlan mailboxPlan, object userState) { + if ((this.UpdateExchangeMailboxPlanOperationCompleted == null)) { this.UpdateExchangeMailboxPlanOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateExchangeMailboxPlanOperationCompleted); } this.InvokeAsync("UpdateExchangeMailboxPlan", new object[] { itemId, mailboxPlan}, this.UpdateExchangeMailboxPlanOperationCompleted, userState); } - - private void OnUpdateExchangeMailboxPlanOperationCompleted(object arg) - { - if ((this.UpdateExchangeMailboxPlanCompleted != null)) - { + + private void OnUpdateExchangeMailboxPlanOperationCompleted(object arg) { + if ((this.UpdateExchangeMailboxPlanCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.UpdateExchangeMailboxPlanCompleted(this, new UpdateExchangeMailboxPlanCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteExchangeMailboxPlan", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int DeleteExchangeMailboxPlan(int itemId, int mailboxPlanId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteExchangeMailboxPlan", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DeleteExchangeMailboxPlan(int itemId, int mailboxPlanId) { object[] results = this.Invoke("DeleteExchangeMailboxPlan", new object[] { itemId, mailboxPlanId}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginDeleteExchangeMailboxPlan(int itemId, int mailboxPlanId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginDeleteExchangeMailboxPlan(int itemId, int mailboxPlanId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("DeleteExchangeMailboxPlan", new object[] { itemId, mailboxPlanId}, callback, asyncState); } - + /// - public int EndDeleteExchangeMailboxPlan(System.IAsyncResult asyncResult) - { + public int EndDeleteExchangeMailboxPlan(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void DeleteExchangeMailboxPlanAsync(int itemId, int mailboxPlanId) - { + public void DeleteExchangeMailboxPlanAsync(int itemId, int mailboxPlanId) { this.DeleteExchangeMailboxPlanAsync(itemId, mailboxPlanId, null); } - + /// - public void DeleteExchangeMailboxPlanAsync(int itemId, int mailboxPlanId, object userState) - { - if ((this.DeleteExchangeMailboxPlanOperationCompleted == null)) - { + public void DeleteExchangeMailboxPlanAsync(int itemId, int mailboxPlanId, object userState) { + if ((this.DeleteExchangeMailboxPlanOperationCompleted == null)) { this.DeleteExchangeMailboxPlanOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteExchangeMailboxPlanOperationCompleted); } this.InvokeAsync("DeleteExchangeMailboxPlan", new object[] { itemId, mailboxPlanId}, this.DeleteExchangeMailboxPlanOperationCompleted, userState); } - - private void OnDeleteExchangeMailboxPlanOperationCompleted(object arg) - { - if ((this.DeleteExchangeMailboxPlanCompleted != null)) - { + + private void OnDeleteExchangeMailboxPlanOperationCompleted(object arg) { + if ((this.DeleteExchangeMailboxPlanCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeleteExchangeMailboxPlanCompleted(this, new DeleteExchangeMailboxPlanCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetOrganizationDefaultExchangeMailbo" + - "xPlan", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void SetOrganizationDefaultExchangeMailboxPlan(int itemId, int mailboxPlanId) - { + "xPlan", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void SetOrganizationDefaultExchangeMailboxPlan(int itemId, int mailboxPlanId) { this.Invoke("SetOrganizationDefaultExchangeMailboxPlan", new object[] { itemId, mailboxPlanId}); } - + /// - public System.IAsyncResult BeginSetOrganizationDefaultExchangeMailboxPlan(int itemId, int mailboxPlanId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginSetOrganizationDefaultExchangeMailboxPlan(int itemId, int mailboxPlanId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("SetOrganizationDefaultExchangeMailboxPlan", new object[] { itemId, mailboxPlanId}, callback, asyncState); } - + /// - public void EndSetOrganizationDefaultExchangeMailboxPlan(System.IAsyncResult asyncResult) - { + public void EndSetOrganizationDefaultExchangeMailboxPlan(System.IAsyncResult asyncResult) { this.EndInvoke(asyncResult); } - + /// - public void SetOrganizationDefaultExchangeMailboxPlanAsync(int itemId, int mailboxPlanId) - { + public void SetOrganizationDefaultExchangeMailboxPlanAsync(int itemId, int mailboxPlanId) { this.SetOrganizationDefaultExchangeMailboxPlanAsync(itemId, mailboxPlanId, null); } - + /// - public void SetOrganizationDefaultExchangeMailboxPlanAsync(int itemId, int mailboxPlanId, object userState) - { - if ((this.SetOrganizationDefaultExchangeMailboxPlanOperationCompleted == null)) - { + public void SetOrganizationDefaultExchangeMailboxPlanAsync(int itemId, int mailboxPlanId, object userState) { + if ((this.SetOrganizationDefaultExchangeMailboxPlanOperationCompleted == null)) { this.SetOrganizationDefaultExchangeMailboxPlanOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetOrganizationDefaultExchangeMailboxPlanOperationCompleted); } this.InvokeAsync("SetOrganizationDefaultExchangeMailboxPlan", new object[] { itemId, mailboxPlanId}, this.SetOrganizationDefaultExchangeMailboxPlanOperationCompleted, userState); } - - private void OnSetOrganizationDefaultExchangeMailboxPlanOperationCompleted(object arg) - { - if ((this.SetOrganizationDefaultExchangeMailboxPlanCompleted != null)) - { + + private void OnSetOrganizationDefaultExchangeMailboxPlanOperationCompleted(object arg) { + if ((this.SetOrganizationDefaultExchangeMailboxPlanCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetOrganizationDefaultExchangeMailboxPlanCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CreatePublicFolder", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int CreatePublicFolder(int itemId, string parentFolder, string folderName, bool mailEnabled, string accountName, string domain) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetExchangeRetentionPolicyTags", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeRetentionPolicyTag[] GetExchangeRetentionPolicyTags(int itemId) { + object[] results = this.Invoke("GetExchangeRetentionPolicyTags", new object[] { + itemId}); + return ((ExchangeRetentionPolicyTag[])(results[0])); + } + + /// + public System.IAsyncResult BeginGetExchangeRetentionPolicyTags(int itemId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetExchangeRetentionPolicyTags", new object[] { + itemId}, callback, asyncState); + } + + /// + public ExchangeRetentionPolicyTag[] EndGetExchangeRetentionPolicyTags(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((ExchangeRetentionPolicyTag[])(results[0])); + } + + /// + public void GetExchangeRetentionPolicyTagsAsync(int itemId) { + this.GetExchangeRetentionPolicyTagsAsync(itemId, null); + } + + /// + public void GetExchangeRetentionPolicyTagsAsync(int itemId, object userState) { + if ((this.GetExchangeRetentionPolicyTagsOperationCompleted == null)) { + this.GetExchangeRetentionPolicyTagsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetExchangeRetentionPolicyTagsOperationCompleted); + } + this.InvokeAsync("GetExchangeRetentionPolicyTags", new object[] { + itemId}, this.GetExchangeRetentionPolicyTagsOperationCompleted, userState); + } + + private void OnGetExchangeRetentionPolicyTagsOperationCompleted(object arg) { + if ((this.GetExchangeRetentionPolicyTagsCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetExchangeRetentionPolicyTagsCompleted(this, new GetExchangeRetentionPolicyTagsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetExchangeRetentionPolicyTag", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeRetentionPolicyTag GetExchangeRetentionPolicyTag(int itemId, int tagId) { + object[] results = this.Invoke("GetExchangeRetentionPolicyTag", new object[] { + itemId, + tagId}); + return ((ExchangeRetentionPolicyTag)(results[0])); + } + + /// + public System.IAsyncResult BeginGetExchangeRetentionPolicyTag(int itemId, int tagId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetExchangeRetentionPolicyTag", new object[] { + itemId, + tagId}, callback, asyncState); + } + + /// + public ExchangeRetentionPolicyTag EndGetExchangeRetentionPolicyTag(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((ExchangeRetentionPolicyTag)(results[0])); + } + + /// + public void GetExchangeRetentionPolicyTagAsync(int itemId, int tagId) { + this.GetExchangeRetentionPolicyTagAsync(itemId, tagId, null); + } + + /// + public void GetExchangeRetentionPolicyTagAsync(int itemId, int tagId, object userState) { + if ((this.GetExchangeRetentionPolicyTagOperationCompleted == null)) { + this.GetExchangeRetentionPolicyTagOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetExchangeRetentionPolicyTagOperationCompleted); + } + this.InvokeAsync("GetExchangeRetentionPolicyTag", new object[] { + itemId, + tagId}, this.GetExchangeRetentionPolicyTagOperationCompleted, userState); + } + + private void OnGetExchangeRetentionPolicyTagOperationCompleted(object arg) { + if ((this.GetExchangeRetentionPolicyTagCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetExchangeRetentionPolicyTagCompleted(this, new GetExchangeRetentionPolicyTagCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddExchangeRetentionPolicyTag", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int AddExchangeRetentionPolicyTag(int itemId, ExchangeRetentionPolicyTag tag) { + object[] results = this.Invoke("AddExchangeRetentionPolicyTag", new object[] { + itemId, + tag}); + return ((int)(results[0])); + } + + /// + public System.IAsyncResult BeginAddExchangeRetentionPolicyTag(int itemId, ExchangeRetentionPolicyTag tag, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("AddExchangeRetentionPolicyTag", new object[] { + itemId, + tag}, callback, asyncState); + } + + /// + public int EndAddExchangeRetentionPolicyTag(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((int)(results[0])); + } + + /// + public void AddExchangeRetentionPolicyTagAsync(int itemId, ExchangeRetentionPolicyTag tag) { + this.AddExchangeRetentionPolicyTagAsync(itemId, tag, null); + } + + /// + public void AddExchangeRetentionPolicyTagAsync(int itemId, ExchangeRetentionPolicyTag tag, object userState) { + if ((this.AddExchangeRetentionPolicyTagOperationCompleted == null)) { + this.AddExchangeRetentionPolicyTagOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddExchangeRetentionPolicyTagOperationCompleted); + } + this.InvokeAsync("AddExchangeRetentionPolicyTag", new object[] { + itemId, + tag}, this.AddExchangeRetentionPolicyTagOperationCompleted, userState); + } + + private void OnAddExchangeRetentionPolicyTagOperationCompleted(object arg) { + if ((this.AddExchangeRetentionPolicyTagCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.AddExchangeRetentionPolicyTagCompleted(this, new AddExchangeRetentionPolicyTagCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/UpdateExchangeRetentionPolicyTag", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int UpdateExchangeRetentionPolicyTag(int itemId, ExchangeRetentionPolicyTag tag) { + object[] results = this.Invoke("UpdateExchangeRetentionPolicyTag", new object[] { + itemId, + tag}); + return ((int)(results[0])); + } + + /// + public System.IAsyncResult BeginUpdateExchangeRetentionPolicyTag(int itemId, ExchangeRetentionPolicyTag tag, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("UpdateExchangeRetentionPolicyTag", new object[] { + itemId, + tag}, callback, asyncState); + } + + /// + public int EndUpdateExchangeRetentionPolicyTag(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((int)(results[0])); + } + + /// + public void UpdateExchangeRetentionPolicyTagAsync(int itemId, ExchangeRetentionPolicyTag tag) { + this.UpdateExchangeRetentionPolicyTagAsync(itemId, tag, null); + } + + /// + public void UpdateExchangeRetentionPolicyTagAsync(int itemId, ExchangeRetentionPolicyTag tag, object userState) { + if ((this.UpdateExchangeRetentionPolicyTagOperationCompleted == null)) { + this.UpdateExchangeRetentionPolicyTagOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateExchangeRetentionPolicyTagOperationCompleted); + } + this.InvokeAsync("UpdateExchangeRetentionPolicyTag", new object[] { + itemId, + tag}, this.UpdateExchangeRetentionPolicyTagOperationCompleted, userState); + } + + private void OnUpdateExchangeRetentionPolicyTagOperationCompleted(object arg) { + if ((this.UpdateExchangeRetentionPolicyTagCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.UpdateExchangeRetentionPolicyTagCompleted(this, new UpdateExchangeRetentionPolicyTagCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteExchangeRetentionPolicyTag", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DeleteExchangeRetentionPolicyTag(int itemId, int tagId) { + object[] results = this.Invoke("DeleteExchangeRetentionPolicyTag", new object[] { + itemId, + tagId}); + return ((int)(results[0])); + } + + /// + public System.IAsyncResult BeginDeleteExchangeRetentionPolicyTag(int itemId, int tagId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("DeleteExchangeRetentionPolicyTag", new object[] { + itemId, + tagId}, callback, asyncState); + } + + /// + public int EndDeleteExchangeRetentionPolicyTag(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((int)(results[0])); + } + + /// + public void DeleteExchangeRetentionPolicyTagAsync(int itemId, int tagId) { + this.DeleteExchangeRetentionPolicyTagAsync(itemId, tagId, null); + } + + /// + public void DeleteExchangeRetentionPolicyTagAsync(int itemId, int tagId, object userState) { + if ((this.DeleteExchangeRetentionPolicyTagOperationCompleted == null)) { + this.DeleteExchangeRetentionPolicyTagOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteExchangeRetentionPolicyTagOperationCompleted); + } + this.InvokeAsync("DeleteExchangeRetentionPolicyTag", new object[] { + itemId, + tagId}, this.DeleteExchangeRetentionPolicyTagOperationCompleted, userState); + } + + private void OnDeleteExchangeRetentionPolicyTagOperationCompleted(object arg) { + if ((this.DeleteExchangeRetentionPolicyTagCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.DeleteExchangeRetentionPolicyTagCompleted(this, new DeleteExchangeRetentionPolicyTagCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetExchangeMailboxPlanRetentionPolic" + + "yTags", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeMailboxPlanRetentionPolicyTag[] GetExchangeMailboxPlanRetentionPolicyTags(int policyId) { + object[] results = this.Invoke("GetExchangeMailboxPlanRetentionPolicyTags", new object[] { + policyId}); + return ((ExchangeMailboxPlanRetentionPolicyTag[])(results[0])); + } + + /// + public System.IAsyncResult BeginGetExchangeMailboxPlanRetentionPolicyTags(int policyId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetExchangeMailboxPlanRetentionPolicyTags", new object[] { + policyId}, callback, asyncState); + } + + /// + public ExchangeMailboxPlanRetentionPolicyTag[] EndGetExchangeMailboxPlanRetentionPolicyTags(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((ExchangeMailboxPlanRetentionPolicyTag[])(results[0])); + } + + /// + public void GetExchangeMailboxPlanRetentionPolicyTagsAsync(int policyId) { + this.GetExchangeMailboxPlanRetentionPolicyTagsAsync(policyId, null); + } + + /// + public void GetExchangeMailboxPlanRetentionPolicyTagsAsync(int policyId, object userState) { + if ((this.GetExchangeMailboxPlanRetentionPolicyTagsOperationCompleted == null)) { + this.GetExchangeMailboxPlanRetentionPolicyTagsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetExchangeMailboxPlanRetentionPolicyTagsOperationCompleted); + } + this.InvokeAsync("GetExchangeMailboxPlanRetentionPolicyTags", new object[] { + policyId}, this.GetExchangeMailboxPlanRetentionPolicyTagsOperationCompleted, userState); + } + + private void OnGetExchangeMailboxPlanRetentionPolicyTagsOperationCompleted(object arg) { + if ((this.GetExchangeMailboxPlanRetentionPolicyTagsCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetExchangeMailboxPlanRetentionPolicyTagsCompleted(this, new GetExchangeMailboxPlanRetentionPolicyTagsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddExchangeMailboxPlanRetentionPolic" + + "yTag", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int AddExchangeMailboxPlanRetentionPolicyTag(int itemId, ExchangeMailboxPlanRetentionPolicyTag planTag) { + object[] results = this.Invoke("AddExchangeMailboxPlanRetentionPolicyTag", new object[] { + itemId, + planTag}); + return ((int)(results[0])); + } + + /// + public System.IAsyncResult BeginAddExchangeMailboxPlanRetentionPolicyTag(int itemId, ExchangeMailboxPlanRetentionPolicyTag planTag, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("AddExchangeMailboxPlanRetentionPolicyTag", new object[] { + itemId, + planTag}, callback, asyncState); + } + + /// + public int EndAddExchangeMailboxPlanRetentionPolicyTag(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((int)(results[0])); + } + + /// + public void AddExchangeMailboxPlanRetentionPolicyTagAsync(int itemId, ExchangeMailboxPlanRetentionPolicyTag planTag) { + this.AddExchangeMailboxPlanRetentionPolicyTagAsync(itemId, planTag, null); + } + + /// + public void AddExchangeMailboxPlanRetentionPolicyTagAsync(int itemId, ExchangeMailboxPlanRetentionPolicyTag planTag, object userState) { + if ((this.AddExchangeMailboxPlanRetentionPolicyTagOperationCompleted == null)) { + this.AddExchangeMailboxPlanRetentionPolicyTagOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddExchangeMailboxPlanRetentionPolicyTagOperationCompleted); + } + this.InvokeAsync("AddExchangeMailboxPlanRetentionPolicyTag", new object[] { + itemId, + planTag}, this.AddExchangeMailboxPlanRetentionPolicyTagOperationCompleted, userState); + } + + private void OnAddExchangeMailboxPlanRetentionPolicyTagOperationCompleted(object arg) { + if ((this.AddExchangeMailboxPlanRetentionPolicyTagCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.AddExchangeMailboxPlanRetentionPolicyTagCompleted(this, new AddExchangeMailboxPlanRetentionPolicyTagCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteExchangeMailboxPlanRetentionPo" + + "licyTag", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DeleteExchangeMailboxPlanRetentionPolicyTag(int itemId, int planTagId) { + object[] results = this.Invoke("DeleteExchangeMailboxPlanRetentionPolicyTag", new object[] { + itemId, + planTagId}); + return ((int)(results[0])); + } + + /// + public System.IAsyncResult BeginDeleteExchangeMailboxPlanRetentionPolicyTag(int itemId, int planTagId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("DeleteExchangeMailboxPlanRetentionPolicyTag", new object[] { + itemId, + planTagId}, callback, asyncState); + } + + /// + public int EndDeleteExchangeMailboxPlanRetentionPolicyTag(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((int)(results[0])); + } + + /// + public void DeleteExchangeMailboxPlanRetentionPolicyTagAsync(int itemId, int planTagId) { + this.DeleteExchangeMailboxPlanRetentionPolicyTagAsync(itemId, planTagId, null); + } + + /// + public void DeleteExchangeMailboxPlanRetentionPolicyTagAsync(int itemId, int planTagId, object userState) { + if ((this.DeleteExchangeMailboxPlanRetentionPolicyTagOperationCompleted == null)) { + this.DeleteExchangeMailboxPlanRetentionPolicyTagOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteExchangeMailboxPlanRetentionPolicyTagOperationCompleted); + } + this.InvokeAsync("DeleteExchangeMailboxPlanRetentionPolicyTag", new object[] { + itemId, + planTagId}, this.DeleteExchangeMailboxPlanRetentionPolicyTagOperationCompleted, userState); + } + + private void OnDeleteExchangeMailboxPlanRetentionPolicyTagOperationCompleted(object arg) { + if ((this.DeleteExchangeMailboxPlanRetentionPolicyTagCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.DeleteExchangeMailboxPlanRetentionPolicyTagCompleted(this, new DeleteExchangeMailboxPlanRetentionPolicyTagCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CreatePublicFolder", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int CreatePublicFolder(int itemId, string parentFolder, string folderName, bool mailEnabled, string accountName, string domain) { object[] results = this.Invoke("CreatePublicFolder", new object[] { itemId, parentFolder, @@ -841,10 +1324,9 @@ namespace WebsitePanel.EnterpriseServer domain}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginCreatePublicFolder(int itemId, string parentFolder, string folderName, bool mailEnabled, string accountName, string domain, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginCreatePublicFolder(int itemId, string parentFolder, string folderName, bool mailEnabled, string accountName, string domain, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("CreatePublicFolder", new object[] { itemId, parentFolder, @@ -853,25 +1335,21 @@ namespace WebsitePanel.EnterpriseServer accountName, domain}, callback, asyncState); } - + /// - public int EndCreatePublicFolder(System.IAsyncResult asyncResult) - { + public int EndCreatePublicFolder(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void CreatePublicFolderAsync(int itemId, string parentFolder, string folderName, bool mailEnabled, string accountName, string domain) - { + public void CreatePublicFolderAsync(int itemId, string parentFolder, string folderName, bool mailEnabled, string accountName, string domain) { this.CreatePublicFolderAsync(itemId, parentFolder, folderName, mailEnabled, accountName, domain, null); } - + /// - public void CreatePublicFolderAsync(int itemId, string parentFolder, string folderName, bool mailEnabled, string accountName, string domain, object userState) - { - if ((this.CreatePublicFolderOperationCompleted == null)) - { + public void CreatePublicFolderAsync(int itemId, string parentFolder, string folderName, bool mailEnabled, string accountName, string domain, object userState) { + if ((this.CreatePublicFolderOperationCompleted == null)) { this.CreatePublicFolderOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreatePublicFolderOperationCompleted); } this.InvokeAsync("CreatePublicFolder", new object[] { @@ -882,124 +1360,105 @@ namespace WebsitePanel.EnterpriseServer accountName, domain}, this.CreatePublicFolderOperationCompleted, userState); } - - private void OnCreatePublicFolderOperationCompleted(object arg) - { - if ((this.CreatePublicFolderCompleted != null)) - { + + private void OnCreatePublicFolderOperationCompleted(object arg) { + if ((this.CreatePublicFolderCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.CreatePublicFolderCompleted(this, new CreatePublicFolderCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeletePublicFolders", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int DeletePublicFolders(int itemId, int[] accountIds) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeletePublicFolders", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DeletePublicFolders(int itemId, int[] accountIds) { object[] results = this.Invoke("DeletePublicFolders", new object[] { itemId, accountIds}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginDeletePublicFolders(int itemId, int[] accountIds, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginDeletePublicFolders(int itemId, int[] accountIds, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("DeletePublicFolders", new object[] { itemId, accountIds}, callback, asyncState); } - + /// - public int EndDeletePublicFolders(System.IAsyncResult asyncResult) - { + public int EndDeletePublicFolders(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void DeletePublicFoldersAsync(int itemId, int[] accountIds) - { + public void DeletePublicFoldersAsync(int itemId, int[] accountIds) { this.DeletePublicFoldersAsync(itemId, accountIds, null); } - + /// - public void DeletePublicFoldersAsync(int itemId, int[] accountIds, object userState) - { - if ((this.DeletePublicFoldersOperationCompleted == null)) - { + public void DeletePublicFoldersAsync(int itemId, int[] accountIds, object userState) { + if ((this.DeletePublicFoldersOperationCompleted == null)) { this.DeletePublicFoldersOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeletePublicFoldersOperationCompleted); } this.InvokeAsync("DeletePublicFolders", new object[] { itemId, accountIds}, this.DeletePublicFoldersOperationCompleted, userState); } - - private void OnDeletePublicFoldersOperationCompleted(object arg) - { - if ((this.DeletePublicFoldersCompleted != null)) - { + + private void OnDeletePublicFoldersOperationCompleted(object arg) { + if ((this.DeletePublicFoldersCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeletePublicFoldersCompleted(this, new DeletePublicFoldersCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeletePublicFolder", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int DeletePublicFolder(int itemId, int accountId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeletePublicFolder", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DeletePublicFolder(int itemId, int accountId) { object[] results = this.Invoke("DeletePublicFolder", new object[] { itemId, accountId}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginDeletePublicFolder(int itemId, int accountId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginDeletePublicFolder(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("DeletePublicFolder", new object[] { itemId, accountId}, callback, asyncState); } - + /// - public int EndDeletePublicFolder(System.IAsyncResult asyncResult) - { + public int EndDeletePublicFolder(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void DeletePublicFolderAsync(int itemId, int accountId) - { + public void DeletePublicFolderAsync(int itemId, int accountId) { this.DeletePublicFolderAsync(itemId, accountId, null); } - + /// - public void DeletePublicFolderAsync(int itemId, int accountId, object userState) - { - if ((this.DeletePublicFolderOperationCompleted == null)) - { + public void DeletePublicFolderAsync(int itemId, int accountId, object userState) { + if ((this.DeletePublicFolderOperationCompleted == null)) { this.DeletePublicFolderOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeletePublicFolderOperationCompleted); } this.InvokeAsync("DeletePublicFolder", new object[] { itemId, accountId}, this.DeletePublicFolderOperationCompleted, userState); } - - private void OnDeletePublicFolderOperationCompleted(object arg) - { - if ((this.DeletePublicFolderCompleted != null)) - { + + private void OnDeletePublicFolderOperationCompleted(object arg) { + if ((this.DeletePublicFolderCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeletePublicFolderCompleted(this, new DeletePublicFolderCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/EnableMailPublicFolder", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int EnableMailPublicFolder(int itemId, int accountId, string name, string domain) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/EnableMailPublicFolder", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int EnableMailPublicFolder(int itemId, int accountId, string name, string domain) { object[] results = this.Invoke("EnableMailPublicFolder", new object[] { itemId, accountId, @@ -1007,35 +1466,30 @@ namespace WebsitePanel.EnterpriseServer domain}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginEnableMailPublicFolder(int itemId, int accountId, string name, string domain, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginEnableMailPublicFolder(int itemId, int accountId, string name, string domain, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("EnableMailPublicFolder", new object[] { itemId, accountId, name, domain}, callback, asyncState); } - + /// - public int EndEnableMailPublicFolder(System.IAsyncResult asyncResult) - { + public int EndEnableMailPublicFolder(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void EnableMailPublicFolderAsync(int itemId, int accountId, string name, string domain) - { + public void EnableMailPublicFolderAsync(int itemId, int accountId, string name, string domain) { this.EnableMailPublicFolderAsync(itemId, accountId, name, domain, null); } - + /// - public void EnableMailPublicFolderAsync(int itemId, int accountId, string name, string domain, object userState) - { - if ((this.EnableMailPublicFolderOperationCompleted == null)) - { + public void EnableMailPublicFolderAsync(int itemId, int accountId, string name, string domain, object userState) { + if ((this.EnableMailPublicFolderOperationCompleted == null)) { this.EnableMailPublicFolderOperationCompleted = new System.Threading.SendOrPostCallback(this.OnEnableMailPublicFolderOperationCompleted); } this.InvokeAsync("EnableMailPublicFolder", new object[] { @@ -1044,124 +1498,105 @@ namespace WebsitePanel.EnterpriseServer name, domain}, this.EnableMailPublicFolderOperationCompleted, userState); } - - private void OnEnableMailPublicFolderOperationCompleted(object arg) - { - if ((this.EnableMailPublicFolderCompleted != null)) - { + + private void OnEnableMailPublicFolderOperationCompleted(object arg) { + if ((this.EnableMailPublicFolderCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.EnableMailPublicFolderCompleted(this, new EnableMailPublicFolderCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DisableMailPublicFolder", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int DisableMailPublicFolder(int itemId, int accountId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DisableMailPublicFolder", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DisableMailPublicFolder(int itemId, int accountId) { object[] results = this.Invoke("DisableMailPublicFolder", new object[] { itemId, accountId}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginDisableMailPublicFolder(int itemId, int accountId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginDisableMailPublicFolder(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("DisableMailPublicFolder", new object[] { itemId, accountId}, callback, asyncState); } - + /// - public int EndDisableMailPublicFolder(System.IAsyncResult asyncResult) - { + public int EndDisableMailPublicFolder(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void DisableMailPublicFolderAsync(int itemId, int accountId) - { + public void DisableMailPublicFolderAsync(int itemId, int accountId) { this.DisableMailPublicFolderAsync(itemId, accountId, null); } - + /// - public void DisableMailPublicFolderAsync(int itemId, int accountId, object userState) - { - if ((this.DisableMailPublicFolderOperationCompleted == null)) - { + public void DisableMailPublicFolderAsync(int itemId, int accountId, object userState) { + if ((this.DisableMailPublicFolderOperationCompleted == null)) { this.DisableMailPublicFolderOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDisableMailPublicFolderOperationCompleted); } this.InvokeAsync("DisableMailPublicFolder", new object[] { itemId, accountId}, this.DisableMailPublicFolderOperationCompleted, userState); } - - private void OnDisableMailPublicFolderOperationCompleted(object arg) - { - if ((this.DisableMailPublicFolderCompleted != null)) - { + + private void OnDisableMailPublicFolderOperationCompleted(object arg) { + if ((this.DisableMailPublicFolderCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DisableMailPublicFolderCompleted(this, new DisableMailPublicFolderCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetPublicFolderGeneralSettings", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangePublicFolder GetPublicFolderGeneralSettings(int itemId, int accountId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetPublicFolderGeneralSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangePublicFolder GetPublicFolderGeneralSettings(int itemId, int accountId) { object[] results = this.Invoke("GetPublicFolderGeneralSettings", new object[] { itemId, accountId}); return ((ExchangePublicFolder)(results[0])); } - + /// - public System.IAsyncResult BeginGetPublicFolderGeneralSettings(int itemId, int accountId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetPublicFolderGeneralSettings(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetPublicFolderGeneralSettings", new object[] { itemId, accountId}, callback, asyncState); } - + /// - public ExchangePublicFolder EndGetPublicFolderGeneralSettings(System.IAsyncResult asyncResult) - { + public ExchangePublicFolder EndGetPublicFolderGeneralSettings(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((ExchangePublicFolder)(results[0])); } - + /// - public void GetPublicFolderGeneralSettingsAsync(int itemId, int accountId) - { + public void GetPublicFolderGeneralSettingsAsync(int itemId, int accountId) { this.GetPublicFolderGeneralSettingsAsync(itemId, accountId, null); } - + /// - public void GetPublicFolderGeneralSettingsAsync(int itemId, int accountId, object userState) - { - if ((this.GetPublicFolderGeneralSettingsOperationCompleted == null)) - { + public void GetPublicFolderGeneralSettingsAsync(int itemId, int accountId, object userState) { + if ((this.GetPublicFolderGeneralSettingsOperationCompleted == null)) { this.GetPublicFolderGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetPublicFolderGeneralSettingsOperationCompleted); } this.InvokeAsync("GetPublicFolderGeneralSettings", new object[] { itemId, accountId}, this.GetPublicFolderGeneralSettingsOperationCompleted, userState); } - - private void OnGetPublicFolderGeneralSettingsOperationCompleted(object arg) - { - if ((this.GetPublicFolderGeneralSettingsCompleted != null)) - { + + private void OnGetPublicFolderGeneralSettingsOperationCompleted(object arg) { + if ((this.GetPublicFolderGeneralSettingsCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetPublicFolderGeneralSettingsCompleted(this, new GetPublicFolderGeneralSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetPublicFolderGeneralSettings", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int SetPublicFolderGeneralSettings(int itemId, int accountId, string newName, bool hideAddressBook, ExchangeAccount[] accounts) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetPublicFolderGeneralSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int SetPublicFolderGeneralSettings(int itemId, int accountId, string newName, bool hideAddressBook, ExchangeAccount[] accounts) { object[] results = this.Invoke("SetPublicFolderGeneralSettings", new object[] { itemId, accountId, @@ -1170,10 +1605,9 @@ namespace WebsitePanel.EnterpriseServer accounts}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginSetPublicFolderGeneralSettings(int itemId, int accountId, string newName, bool hideAddressBook, ExchangeAccount[] accounts, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginSetPublicFolderGeneralSettings(int itemId, int accountId, string newName, bool hideAddressBook, ExchangeAccount[] accounts, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("SetPublicFolderGeneralSettings", new object[] { itemId, accountId, @@ -1181,25 +1615,21 @@ namespace WebsitePanel.EnterpriseServer hideAddressBook, accounts}, callback, asyncState); } - + /// - public int EndSetPublicFolderGeneralSettings(System.IAsyncResult asyncResult) - { + public int EndSetPublicFolderGeneralSettings(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void SetPublicFolderGeneralSettingsAsync(int itemId, int accountId, string newName, bool hideAddressBook, ExchangeAccount[] accounts) - { + public void SetPublicFolderGeneralSettingsAsync(int itemId, int accountId, string newName, bool hideAddressBook, ExchangeAccount[] accounts) { this.SetPublicFolderGeneralSettingsAsync(itemId, accountId, newName, hideAddressBook, accounts, null); } - + /// - public void SetPublicFolderGeneralSettingsAsync(int itemId, int accountId, string newName, bool hideAddressBook, ExchangeAccount[] accounts, object userState) - { - if ((this.SetPublicFolderGeneralSettingsOperationCompleted == null)) - { + public void SetPublicFolderGeneralSettingsAsync(int itemId, int accountId, string newName, bool hideAddressBook, ExchangeAccount[] accounts, object userState) { + if ((this.SetPublicFolderGeneralSettingsOperationCompleted == null)) { this.SetPublicFolderGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetPublicFolderGeneralSettingsOperationCompleted); } this.InvokeAsync("SetPublicFolderGeneralSettings", new object[] { @@ -1209,72 +1639,61 @@ namespace WebsitePanel.EnterpriseServer hideAddressBook, accounts}, this.SetPublicFolderGeneralSettingsOperationCompleted, userState); } - - private void OnSetPublicFolderGeneralSettingsOperationCompleted(object arg) - { - if ((this.SetPublicFolderGeneralSettingsCompleted != null)) - { + + private void OnSetPublicFolderGeneralSettingsOperationCompleted(object arg) { + if ((this.SetPublicFolderGeneralSettingsCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetPublicFolderGeneralSettingsCompleted(this, new SetPublicFolderGeneralSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetPublicFolderMailFlowSettings", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangePublicFolder GetPublicFolderMailFlowSettings(int itemId, int accountId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetPublicFolderMailFlowSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangePublicFolder GetPublicFolderMailFlowSettings(int itemId, int accountId) { object[] results = this.Invoke("GetPublicFolderMailFlowSettings", new object[] { itemId, accountId}); return ((ExchangePublicFolder)(results[0])); } - + /// - public System.IAsyncResult BeginGetPublicFolderMailFlowSettings(int itemId, int accountId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetPublicFolderMailFlowSettings(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetPublicFolderMailFlowSettings", new object[] { itemId, accountId}, callback, asyncState); } - + /// - public ExchangePublicFolder EndGetPublicFolderMailFlowSettings(System.IAsyncResult asyncResult) - { + public ExchangePublicFolder EndGetPublicFolderMailFlowSettings(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((ExchangePublicFolder)(results[0])); } - + /// - public void GetPublicFolderMailFlowSettingsAsync(int itemId, int accountId) - { + public void GetPublicFolderMailFlowSettingsAsync(int itemId, int accountId) { this.GetPublicFolderMailFlowSettingsAsync(itemId, accountId, null); } - + /// - public void GetPublicFolderMailFlowSettingsAsync(int itemId, int accountId, object userState) - { - if ((this.GetPublicFolderMailFlowSettingsOperationCompleted == null)) - { + public void GetPublicFolderMailFlowSettingsAsync(int itemId, int accountId, object userState) { + if ((this.GetPublicFolderMailFlowSettingsOperationCompleted == null)) { this.GetPublicFolderMailFlowSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetPublicFolderMailFlowSettingsOperationCompleted); } this.InvokeAsync("GetPublicFolderMailFlowSettings", new object[] { itemId, accountId}, this.GetPublicFolderMailFlowSettingsOperationCompleted, userState); } - - private void OnGetPublicFolderMailFlowSettingsOperationCompleted(object arg) - { - if ((this.GetPublicFolderMailFlowSettingsCompleted != null)) - { + + private void OnGetPublicFolderMailFlowSettingsOperationCompleted(object arg) { + if ((this.GetPublicFolderMailFlowSettingsCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetPublicFolderMailFlowSettingsCompleted(this, new GetPublicFolderMailFlowSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetPublicFolderMailFlowSettings", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int SetPublicFolderMailFlowSettings(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetPublicFolderMailFlowSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int SetPublicFolderMailFlowSettings(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) { object[] results = this.Invoke("SetPublicFolderMailFlowSettings", new object[] { itemId, accountId, @@ -1283,10 +1702,9 @@ namespace WebsitePanel.EnterpriseServer requireSenderAuthentication}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginSetPublicFolderMailFlowSettings(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginSetPublicFolderMailFlowSettings(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("SetPublicFolderMailFlowSettings", new object[] { itemId, accountId, @@ -1294,25 +1712,21 @@ namespace WebsitePanel.EnterpriseServer rejectAccounts, requireSenderAuthentication}, callback, asyncState); } - + /// - public int EndSetPublicFolderMailFlowSettings(System.IAsyncResult asyncResult) - { + public int EndSetPublicFolderMailFlowSettings(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void SetPublicFolderMailFlowSettingsAsync(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) - { + public void SetPublicFolderMailFlowSettingsAsync(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) { this.SetPublicFolderMailFlowSettingsAsync(itemId, accountId, acceptAccounts, rejectAccounts, requireSenderAuthentication, null); } - + /// - public void SetPublicFolderMailFlowSettingsAsync(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, object userState) - { - if ((this.SetPublicFolderMailFlowSettingsOperationCompleted == null)) - { + public void SetPublicFolderMailFlowSettingsAsync(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, object userState) { + if ((this.SetPublicFolderMailFlowSettingsOperationCompleted == null)) { this.SetPublicFolderMailFlowSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetPublicFolderMailFlowSettingsOperationCompleted); } this.InvokeAsync("SetPublicFolderMailFlowSettings", new object[] { @@ -1322,106 +1736,90 @@ namespace WebsitePanel.EnterpriseServer rejectAccounts, requireSenderAuthentication}, this.SetPublicFolderMailFlowSettingsOperationCompleted, userState); } - - private void OnSetPublicFolderMailFlowSettingsOperationCompleted(object arg) - { - if ((this.SetPublicFolderMailFlowSettingsCompleted != null)) - { + + private void OnSetPublicFolderMailFlowSettingsOperationCompleted(object arg) { + if ((this.SetPublicFolderMailFlowSettingsCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetPublicFolderMailFlowSettingsCompleted(this, new SetPublicFolderMailFlowSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetPublicFolderEmailAddresses", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeEmailAddress[] GetPublicFolderEmailAddresses(int itemId, int accountId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetPublicFolderEmailAddresses", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeEmailAddress[] GetPublicFolderEmailAddresses(int itemId, int accountId) { object[] results = this.Invoke("GetPublicFolderEmailAddresses", new object[] { itemId, accountId}); return ((ExchangeEmailAddress[])(results[0])); } - + /// - public System.IAsyncResult BeginGetPublicFolderEmailAddresses(int itemId, int accountId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetPublicFolderEmailAddresses(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetPublicFolderEmailAddresses", new object[] { itemId, accountId}, callback, asyncState); } - + /// - public ExchangeEmailAddress[] EndGetPublicFolderEmailAddresses(System.IAsyncResult asyncResult) - { + public ExchangeEmailAddress[] EndGetPublicFolderEmailAddresses(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((ExchangeEmailAddress[])(results[0])); } - + /// - public void GetPublicFolderEmailAddressesAsync(int itemId, int accountId) - { + public void GetPublicFolderEmailAddressesAsync(int itemId, int accountId) { this.GetPublicFolderEmailAddressesAsync(itemId, accountId, null); } - + /// - public void GetPublicFolderEmailAddressesAsync(int itemId, int accountId, object userState) - { - if ((this.GetPublicFolderEmailAddressesOperationCompleted == null)) - { + public void GetPublicFolderEmailAddressesAsync(int itemId, int accountId, object userState) { + if ((this.GetPublicFolderEmailAddressesOperationCompleted == null)) { this.GetPublicFolderEmailAddressesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetPublicFolderEmailAddressesOperationCompleted); } this.InvokeAsync("GetPublicFolderEmailAddresses", new object[] { itemId, accountId}, this.GetPublicFolderEmailAddressesOperationCompleted, userState); } - - private void OnGetPublicFolderEmailAddressesOperationCompleted(object arg) - { - if ((this.GetPublicFolderEmailAddressesCompleted != null)) - { + + private void OnGetPublicFolderEmailAddressesOperationCompleted(object arg) { + if ((this.GetPublicFolderEmailAddressesCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetPublicFolderEmailAddressesCompleted(this, new GetPublicFolderEmailAddressesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddPublicFolderEmailAddress", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int AddPublicFolderEmailAddress(int itemId, int accountId, string emailAddress) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddPublicFolderEmailAddress", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int AddPublicFolderEmailAddress(int itemId, int accountId, string emailAddress) { object[] results = this.Invoke("AddPublicFolderEmailAddress", new object[] { itemId, accountId, emailAddress}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginAddPublicFolderEmailAddress(int itemId, int accountId, string emailAddress, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginAddPublicFolderEmailAddress(int itemId, int accountId, string emailAddress, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("AddPublicFolderEmailAddress", new object[] { itemId, accountId, emailAddress}, callback, asyncState); } - + /// - public int EndAddPublicFolderEmailAddress(System.IAsyncResult asyncResult) - { + public int EndAddPublicFolderEmailAddress(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void AddPublicFolderEmailAddressAsync(int itemId, int accountId, string emailAddress) - { + public void AddPublicFolderEmailAddressAsync(int itemId, int accountId, string emailAddress) { this.AddPublicFolderEmailAddressAsync(itemId, accountId, emailAddress, null); } - + /// - public void AddPublicFolderEmailAddressAsync(int itemId, int accountId, string emailAddress, object userState) - { - if ((this.AddPublicFolderEmailAddressOperationCompleted == null)) - { + public void AddPublicFolderEmailAddressAsync(int itemId, int accountId, string emailAddress, object userState) { + if ((this.AddPublicFolderEmailAddressOperationCompleted == null)) { this.AddPublicFolderEmailAddressOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddPublicFolderEmailAddressOperationCompleted); } this.InvokeAsync("AddPublicFolderEmailAddress", new object[] { @@ -1429,54 +1827,46 @@ namespace WebsitePanel.EnterpriseServer accountId, emailAddress}, this.AddPublicFolderEmailAddressOperationCompleted, userState); } - - private void OnAddPublicFolderEmailAddressOperationCompleted(object arg) - { - if ((this.AddPublicFolderEmailAddressCompleted != null)) - { + + private void OnAddPublicFolderEmailAddressOperationCompleted(object arg) { + if ((this.AddPublicFolderEmailAddressCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.AddPublicFolderEmailAddressCompleted(this, new AddPublicFolderEmailAddressCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetPublicFolderPrimaryEmailAddress", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int SetPublicFolderPrimaryEmailAddress(int itemId, int accountId, string emailAddress) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetPublicFolderPrimaryEmailAddress", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int SetPublicFolderPrimaryEmailAddress(int itemId, int accountId, string emailAddress) { object[] results = this.Invoke("SetPublicFolderPrimaryEmailAddress", new object[] { itemId, accountId, emailAddress}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginSetPublicFolderPrimaryEmailAddress(int itemId, int accountId, string emailAddress, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginSetPublicFolderPrimaryEmailAddress(int itemId, int accountId, string emailAddress, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("SetPublicFolderPrimaryEmailAddress", new object[] { itemId, accountId, emailAddress}, callback, asyncState); } - + /// - public int EndSetPublicFolderPrimaryEmailAddress(System.IAsyncResult asyncResult) - { + public int EndSetPublicFolderPrimaryEmailAddress(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void SetPublicFolderPrimaryEmailAddressAsync(int itemId, int accountId, string emailAddress) - { + public void SetPublicFolderPrimaryEmailAddressAsync(int itemId, int accountId, string emailAddress) { this.SetPublicFolderPrimaryEmailAddressAsync(itemId, accountId, emailAddress, null); } - + /// - public void SetPublicFolderPrimaryEmailAddressAsync(int itemId, int accountId, string emailAddress, object userState) - { - if ((this.SetPublicFolderPrimaryEmailAddressOperationCompleted == null)) - { + public void SetPublicFolderPrimaryEmailAddressAsync(int itemId, int accountId, string emailAddress, object userState) { + if ((this.SetPublicFolderPrimaryEmailAddressOperationCompleted == null)) { this.SetPublicFolderPrimaryEmailAddressOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetPublicFolderPrimaryEmailAddressOperationCompleted); } this.InvokeAsync("SetPublicFolderPrimaryEmailAddress", new object[] { @@ -1484,54 +1874,46 @@ namespace WebsitePanel.EnterpriseServer accountId, emailAddress}, this.SetPublicFolderPrimaryEmailAddressOperationCompleted, userState); } - - private void OnSetPublicFolderPrimaryEmailAddressOperationCompleted(object arg) - { - if ((this.SetPublicFolderPrimaryEmailAddressCompleted != null)) - { + + private void OnSetPublicFolderPrimaryEmailAddressOperationCompleted(object arg) { + if ((this.SetPublicFolderPrimaryEmailAddressCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetPublicFolderPrimaryEmailAddressCompleted(this, new SetPublicFolderPrimaryEmailAddressCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeletePublicFolderEmailAddresses", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int DeletePublicFolderEmailAddresses(int itemId, int accountId, string[] emailAddresses) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeletePublicFolderEmailAddresses", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DeletePublicFolderEmailAddresses(int itemId, int accountId, string[] emailAddresses) { object[] results = this.Invoke("DeletePublicFolderEmailAddresses", new object[] { itemId, accountId, emailAddresses}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginDeletePublicFolderEmailAddresses(int itemId, int accountId, string[] emailAddresses, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginDeletePublicFolderEmailAddresses(int itemId, int accountId, string[] emailAddresses, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("DeletePublicFolderEmailAddresses", new object[] { itemId, accountId, emailAddresses}, callback, asyncState); } - + /// - public int EndDeletePublicFolderEmailAddresses(System.IAsyncResult asyncResult) - { + public int EndDeletePublicFolderEmailAddresses(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void DeletePublicFolderEmailAddressesAsync(int itemId, int accountId, string[] emailAddresses) - { + public void DeletePublicFolderEmailAddressesAsync(int itemId, int accountId, string[] emailAddresses) { this.DeletePublicFolderEmailAddressesAsync(itemId, accountId, emailAddresses, null); } - + /// - public void DeletePublicFolderEmailAddressesAsync(int itemId, int accountId, string[] emailAddresses, object userState) - { - if ((this.DeletePublicFolderEmailAddressesOperationCompleted == null)) - { + public void DeletePublicFolderEmailAddressesAsync(int itemId, int accountId, string[] emailAddresses, object userState) { + if ((this.DeletePublicFolderEmailAddressesOperationCompleted == null)) { this.DeletePublicFolderEmailAddressesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeletePublicFolderEmailAddressesOperationCompleted); } this.InvokeAsync("DeletePublicFolderEmailAddresses", new object[] { @@ -1539,311 +1921,263 @@ namespace WebsitePanel.EnterpriseServer accountId, emailAddresses}, this.DeletePublicFolderEmailAddressesOperationCompleted, userState); } - - private void OnDeletePublicFolderEmailAddressesOperationCompleted(object arg) - { - if ((this.DeletePublicFolderEmailAddressesCompleted != null)) - { + + private void OnDeletePublicFolderEmailAddressesOperationCompleted(object arg) { + if ((this.DeletePublicFolderEmailAddressesCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeletePublicFolderEmailAddressesCompleted(this, new DeletePublicFolderEmailAddressesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddExchangeDisclaimer", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int AddExchangeDisclaimer(int itemId, ExchangeDisclaimer disclaimer) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddExchangeDisclaimer", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int AddExchangeDisclaimer(int itemId, ExchangeDisclaimer disclaimer) { object[] results = this.Invoke("AddExchangeDisclaimer", new object[] { itemId, disclaimer}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginAddExchangeDisclaimer(int itemId, ExchangeDisclaimer disclaimer, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginAddExchangeDisclaimer(int itemId, ExchangeDisclaimer disclaimer, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("AddExchangeDisclaimer", new object[] { itemId, disclaimer}, callback, asyncState); } - + /// - public int EndAddExchangeDisclaimer(System.IAsyncResult asyncResult) - { + public int EndAddExchangeDisclaimer(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void AddExchangeDisclaimerAsync(int itemId, ExchangeDisclaimer disclaimer) - { + public void AddExchangeDisclaimerAsync(int itemId, ExchangeDisclaimer disclaimer) { this.AddExchangeDisclaimerAsync(itemId, disclaimer, null); } - + /// - public void AddExchangeDisclaimerAsync(int itemId, ExchangeDisclaimer disclaimer, object userState) - { - if ((this.AddExchangeDisclaimerOperationCompleted == null)) - { + public void AddExchangeDisclaimerAsync(int itemId, ExchangeDisclaimer disclaimer, object userState) { + if ((this.AddExchangeDisclaimerOperationCompleted == null)) { this.AddExchangeDisclaimerOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddExchangeDisclaimerOperationCompleted); } this.InvokeAsync("AddExchangeDisclaimer", new object[] { itemId, disclaimer}, this.AddExchangeDisclaimerOperationCompleted, userState); } - - private void OnAddExchangeDisclaimerOperationCompleted(object arg) - { - if ((this.AddExchangeDisclaimerCompleted != null)) - { + + private void OnAddExchangeDisclaimerOperationCompleted(object arg) { + if ((this.AddExchangeDisclaimerCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.AddExchangeDisclaimerCompleted(this, new AddExchangeDisclaimerCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/UpdateExchangeDisclaimer", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int UpdateExchangeDisclaimer(int itemId, ExchangeDisclaimer disclaimer) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/UpdateExchangeDisclaimer", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int UpdateExchangeDisclaimer(int itemId, ExchangeDisclaimer disclaimer) { object[] results = this.Invoke("UpdateExchangeDisclaimer", new object[] { itemId, disclaimer}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginUpdateExchangeDisclaimer(int itemId, ExchangeDisclaimer disclaimer, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginUpdateExchangeDisclaimer(int itemId, ExchangeDisclaimer disclaimer, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("UpdateExchangeDisclaimer", new object[] { itemId, disclaimer}, callback, asyncState); } - + /// - public int EndUpdateExchangeDisclaimer(System.IAsyncResult asyncResult) - { + public int EndUpdateExchangeDisclaimer(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void UpdateExchangeDisclaimerAsync(int itemId, ExchangeDisclaimer disclaimer) - { + public void UpdateExchangeDisclaimerAsync(int itemId, ExchangeDisclaimer disclaimer) { this.UpdateExchangeDisclaimerAsync(itemId, disclaimer, null); } - + /// - public void UpdateExchangeDisclaimerAsync(int itemId, ExchangeDisclaimer disclaimer, object userState) - { - if ((this.UpdateExchangeDisclaimerOperationCompleted == null)) - { + public void UpdateExchangeDisclaimerAsync(int itemId, ExchangeDisclaimer disclaimer, object userState) { + if ((this.UpdateExchangeDisclaimerOperationCompleted == null)) { this.UpdateExchangeDisclaimerOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateExchangeDisclaimerOperationCompleted); } this.InvokeAsync("UpdateExchangeDisclaimer", new object[] { itemId, disclaimer}, this.UpdateExchangeDisclaimerOperationCompleted, userState); } - - private void OnUpdateExchangeDisclaimerOperationCompleted(object arg) - { - if ((this.UpdateExchangeDisclaimerCompleted != null)) - { + + private void OnUpdateExchangeDisclaimerOperationCompleted(object arg) { + if ((this.UpdateExchangeDisclaimerCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.UpdateExchangeDisclaimerCompleted(this, new UpdateExchangeDisclaimerCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteExchangeDisclaimer", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int DeleteExchangeDisclaimer(int itemId, int exchangeDisclaimerId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteExchangeDisclaimer", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DeleteExchangeDisclaimer(int itemId, int exchangeDisclaimerId) { object[] results = this.Invoke("DeleteExchangeDisclaimer", new object[] { itemId, exchangeDisclaimerId}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginDeleteExchangeDisclaimer(int itemId, int exchangeDisclaimerId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginDeleteExchangeDisclaimer(int itemId, int exchangeDisclaimerId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("DeleteExchangeDisclaimer", new object[] { itemId, exchangeDisclaimerId}, callback, asyncState); } - + /// - public int EndDeleteExchangeDisclaimer(System.IAsyncResult asyncResult) - { + public int EndDeleteExchangeDisclaimer(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void DeleteExchangeDisclaimerAsync(int itemId, int exchangeDisclaimerId) - { + public void DeleteExchangeDisclaimerAsync(int itemId, int exchangeDisclaimerId) { this.DeleteExchangeDisclaimerAsync(itemId, exchangeDisclaimerId, null); } - + /// - public void DeleteExchangeDisclaimerAsync(int itemId, int exchangeDisclaimerId, object userState) - { - if ((this.DeleteExchangeDisclaimerOperationCompleted == null)) - { + public void DeleteExchangeDisclaimerAsync(int itemId, int exchangeDisclaimerId, object userState) { + if ((this.DeleteExchangeDisclaimerOperationCompleted == null)) { this.DeleteExchangeDisclaimerOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteExchangeDisclaimerOperationCompleted); } this.InvokeAsync("DeleteExchangeDisclaimer", new object[] { itemId, exchangeDisclaimerId}, this.DeleteExchangeDisclaimerOperationCompleted, userState); } - - private void OnDeleteExchangeDisclaimerOperationCompleted(object arg) - { - if ((this.DeleteExchangeDisclaimerCompleted != null)) - { + + private void OnDeleteExchangeDisclaimerOperationCompleted(object arg) { + if ((this.DeleteExchangeDisclaimerCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeleteExchangeDisclaimerCompleted(this, new DeleteExchangeDisclaimerCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetExchangeDisclaimer", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeDisclaimer GetExchangeDisclaimer(int itemId, int exchangeDisclaimerId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetExchangeDisclaimer", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeDisclaimer GetExchangeDisclaimer(int itemId, int exchangeDisclaimerId) { object[] results = this.Invoke("GetExchangeDisclaimer", new object[] { itemId, exchangeDisclaimerId}); return ((ExchangeDisclaimer)(results[0])); } - + /// - public System.IAsyncResult BeginGetExchangeDisclaimer(int itemId, int exchangeDisclaimerId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetExchangeDisclaimer(int itemId, int exchangeDisclaimerId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetExchangeDisclaimer", new object[] { itemId, exchangeDisclaimerId}, callback, asyncState); } - + /// - public ExchangeDisclaimer EndGetExchangeDisclaimer(System.IAsyncResult asyncResult) - { + public ExchangeDisclaimer EndGetExchangeDisclaimer(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((ExchangeDisclaimer)(results[0])); } - + /// - public void GetExchangeDisclaimerAsync(int itemId, int exchangeDisclaimerId) - { + public void GetExchangeDisclaimerAsync(int itemId, int exchangeDisclaimerId) { this.GetExchangeDisclaimerAsync(itemId, exchangeDisclaimerId, null); } - + /// - public void GetExchangeDisclaimerAsync(int itemId, int exchangeDisclaimerId, object userState) - { - if ((this.GetExchangeDisclaimerOperationCompleted == null)) - { + public void GetExchangeDisclaimerAsync(int itemId, int exchangeDisclaimerId, object userState) { + if ((this.GetExchangeDisclaimerOperationCompleted == null)) { this.GetExchangeDisclaimerOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetExchangeDisclaimerOperationCompleted); } this.InvokeAsync("GetExchangeDisclaimer", new object[] { itemId, exchangeDisclaimerId}, this.GetExchangeDisclaimerOperationCompleted, userState); } - - private void OnGetExchangeDisclaimerOperationCompleted(object arg) - { - if ((this.GetExchangeDisclaimerCompleted != null)) - { + + private void OnGetExchangeDisclaimerOperationCompleted(object arg) { + if ((this.GetExchangeDisclaimerCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetExchangeDisclaimerCompleted(this, new GetExchangeDisclaimerCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetExchangeDisclaimers", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeDisclaimer[] GetExchangeDisclaimers(int itemId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetExchangeDisclaimers", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeDisclaimer[] GetExchangeDisclaimers(int itemId) { object[] results = this.Invoke("GetExchangeDisclaimers", new object[] { itemId}); return ((ExchangeDisclaimer[])(results[0])); } - + /// - public System.IAsyncResult BeginGetExchangeDisclaimers(int itemId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetExchangeDisclaimers(int itemId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetExchangeDisclaimers", new object[] { itemId}, callback, asyncState); } - + /// - public ExchangeDisclaimer[] EndGetExchangeDisclaimers(System.IAsyncResult asyncResult) - { + public ExchangeDisclaimer[] EndGetExchangeDisclaimers(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((ExchangeDisclaimer[])(results[0])); } - + /// - public void GetExchangeDisclaimersAsync(int itemId) - { + public void GetExchangeDisclaimersAsync(int itemId) { this.GetExchangeDisclaimersAsync(itemId, null); } - + /// - public void GetExchangeDisclaimersAsync(int itemId, object userState) - { - if ((this.GetExchangeDisclaimersOperationCompleted == null)) - { + public void GetExchangeDisclaimersAsync(int itemId, object userState) { + if ((this.GetExchangeDisclaimersOperationCompleted == null)) { this.GetExchangeDisclaimersOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetExchangeDisclaimersOperationCompleted); } this.InvokeAsync("GetExchangeDisclaimers", new object[] { itemId}, this.GetExchangeDisclaimersOperationCompleted, userState); } - - private void OnGetExchangeDisclaimersOperationCompleted(object arg) - { - if ((this.GetExchangeDisclaimersCompleted != null)) - { + + private void OnGetExchangeDisclaimersOperationCompleted(object arg) { + if ((this.GetExchangeDisclaimersCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetExchangeDisclaimersCompleted(this, new GetExchangeDisclaimersCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetExchangeAccountDisclaimerId", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int SetExchangeAccountDisclaimerId(int itemId, int AccountID, int ExchangeDisclaimerId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetExchangeAccountDisclaimerId", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int SetExchangeAccountDisclaimerId(int itemId, int AccountID, int ExchangeDisclaimerId) { object[] results = this.Invoke("SetExchangeAccountDisclaimerId", new object[] { itemId, AccountID, ExchangeDisclaimerId}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginSetExchangeAccountDisclaimerId(int itemId, int AccountID, int ExchangeDisclaimerId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginSetExchangeAccountDisclaimerId(int itemId, int AccountID, int ExchangeDisclaimerId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("SetExchangeAccountDisclaimerId", new object[] { itemId, AccountID, ExchangeDisclaimerId}, callback, asyncState); } - + /// - public int EndSetExchangeAccountDisclaimerId(System.IAsyncResult asyncResult) - { + public int EndSetExchangeAccountDisclaimerId(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void SetExchangeAccountDisclaimerIdAsync(int itemId, int AccountID, int ExchangeDisclaimerId) - { + public void SetExchangeAccountDisclaimerIdAsync(int itemId, int AccountID, int ExchangeDisclaimerId) { this.SetExchangeAccountDisclaimerIdAsync(itemId, AccountID, ExchangeDisclaimerId, null); } - + /// - public void SetExchangeAccountDisclaimerIdAsync(int itemId, int AccountID, int ExchangeDisclaimerId, object userState) - { - if ((this.SetExchangeAccountDisclaimerIdOperationCompleted == null)) - { + public void SetExchangeAccountDisclaimerIdAsync(int itemId, int AccountID, int ExchangeDisclaimerId, object userState) { + if ((this.SetExchangeAccountDisclaimerIdOperationCompleted == null)) { this.SetExchangeAccountDisclaimerIdOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetExchangeAccountDisclaimerIdOperationCompleted); } this.InvokeAsync("SetExchangeAccountDisclaimerId", new object[] { @@ -1851,72 +2185,61 @@ namespace WebsitePanel.EnterpriseServer AccountID, ExchangeDisclaimerId}, this.SetExchangeAccountDisclaimerIdOperationCompleted, userState); } - - private void OnSetExchangeAccountDisclaimerIdOperationCompleted(object arg) - { - if ((this.SetExchangeAccountDisclaimerIdCompleted != null)) - { + + private void OnSetExchangeAccountDisclaimerIdOperationCompleted(object arg) { + if ((this.SetExchangeAccountDisclaimerIdCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetExchangeAccountDisclaimerIdCompleted(this, new SetExchangeAccountDisclaimerIdCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetExchangeAccountDisclaimerId", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int GetExchangeAccountDisclaimerId(int itemId, int AccountID) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetExchangeAccountDisclaimerId", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int GetExchangeAccountDisclaimerId(int itemId, int AccountID) { object[] results = this.Invoke("GetExchangeAccountDisclaimerId", new object[] { itemId, AccountID}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginGetExchangeAccountDisclaimerId(int itemId, int AccountID, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetExchangeAccountDisclaimerId(int itemId, int AccountID, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetExchangeAccountDisclaimerId", new object[] { itemId, AccountID}, callback, asyncState); } - + /// - public int EndGetExchangeAccountDisclaimerId(System.IAsyncResult asyncResult) - { + public int EndGetExchangeAccountDisclaimerId(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void GetExchangeAccountDisclaimerIdAsync(int itemId, int AccountID) - { + public void GetExchangeAccountDisclaimerIdAsync(int itemId, int AccountID) { this.GetExchangeAccountDisclaimerIdAsync(itemId, AccountID, null); } - + /// - public void GetExchangeAccountDisclaimerIdAsync(int itemId, int AccountID, object userState) - { - if ((this.GetExchangeAccountDisclaimerIdOperationCompleted == null)) - { + public void GetExchangeAccountDisclaimerIdAsync(int itemId, int AccountID, object userState) { + if ((this.GetExchangeAccountDisclaimerIdOperationCompleted == null)) { this.GetExchangeAccountDisclaimerIdOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetExchangeAccountDisclaimerIdOperationCompleted); } this.InvokeAsync("GetExchangeAccountDisclaimerId", new object[] { itemId, AccountID}, this.GetExchangeAccountDisclaimerIdOperationCompleted, userState); } - - private void OnGetExchangeAccountDisclaimerIdOperationCompleted(object arg) - { - if ((this.GetExchangeAccountDisclaimerIdCompleted != null)) - { + + private void OnGetExchangeAccountDisclaimerIdOperationCompleted(object arg) { + if ((this.GetExchangeAccountDisclaimerIdCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetExchangeAccountDisclaimerIdCompleted(this, new GetExchangeAccountDisclaimerIdCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRawExchangeOrganizationsPaged", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public System.Data.DataSet GetRawExchangeOrganizationsPaged(int packageId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRawExchangeOrganizationsPaged", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public System.Data.DataSet GetRawExchangeOrganizationsPaged(int packageId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) { object[] results = this.Invoke("GetRawExchangeOrganizationsPaged", new object[] { packageId, recursive, @@ -1927,10 +2250,9 @@ namespace WebsitePanel.EnterpriseServer maximumRows}); return ((System.Data.DataSet)(results[0])); } - + /// - public System.IAsyncResult BeginGetRawExchangeOrganizationsPaged(int packageId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetRawExchangeOrganizationsPaged(int packageId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetRawExchangeOrganizationsPaged", new object[] { packageId, recursive, @@ -1940,25 +2262,21 @@ namespace WebsitePanel.EnterpriseServer startRow, maximumRows}, callback, asyncState); } - + /// - public System.Data.DataSet EndGetRawExchangeOrganizationsPaged(System.IAsyncResult asyncResult) - { + public System.Data.DataSet EndGetRawExchangeOrganizationsPaged(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((System.Data.DataSet)(results[0])); } - + /// - public void GetRawExchangeOrganizationsPagedAsync(int packageId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) - { + public void GetRawExchangeOrganizationsPagedAsync(int packageId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) { this.GetRawExchangeOrganizationsPagedAsync(packageId, recursive, filterColumn, filterValue, sortColumn, startRow, maximumRows, null); } - + /// - public void GetRawExchangeOrganizationsPagedAsync(int packageId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, object userState) - { - if ((this.GetRawExchangeOrganizationsPagedOperationCompleted == null)) - { + public void GetRawExchangeOrganizationsPagedAsync(int packageId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, object userState) { + if ((this.GetRawExchangeOrganizationsPagedOperationCompleted == null)) { this.GetRawExchangeOrganizationsPagedOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetRawExchangeOrganizationsPagedOperationCompleted); } this.InvokeAsync("GetRawExchangeOrganizationsPaged", new object[] { @@ -1970,20 +2288,17 @@ namespace WebsitePanel.EnterpriseServer startRow, maximumRows}, this.GetRawExchangeOrganizationsPagedOperationCompleted, userState); } - - private void OnGetRawExchangeOrganizationsPagedOperationCompleted(object arg) - { - if ((this.GetRawExchangeOrganizationsPagedCompleted != null)) - { + + private void OnGetRawExchangeOrganizationsPagedOperationCompleted(object arg) { + if ((this.GetRawExchangeOrganizationsPagedCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetRawExchangeOrganizationsPagedCompleted(this, new GetRawExchangeOrganizationsPagedCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetExchangeOrganizationsPaged", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public OrganizationsPaged GetExchangeOrganizationsPaged(int packageId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetExchangeOrganizationsPaged", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public OrganizationsPaged GetExchangeOrganizationsPaged(int packageId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) { object[] results = this.Invoke("GetExchangeOrganizationsPaged", new object[] { packageId, recursive, @@ -1994,10 +2309,9 @@ namespace WebsitePanel.EnterpriseServer maximumRows}); return ((OrganizationsPaged)(results[0])); } - + /// - public System.IAsyncResult BeginGetExchangeOrganizationsPaged(int packageId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetExchangeOrganizationsPaged(int packageId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetExchangeOrganizationsPaged", new object[] { packageId, recursive, @@ -2007,25 +2321,21 @@ namespace WebsitePanel.EnterpriseServer startRow, maximumRows}, callback, asyncState); } - + /// - public OrganizationsPaged EndGetExchangeOrganizationsPaged(System.IAsyncResult asyncResult) - { + public OrganizationsPaged EndGetExchangeOrganizationsPaged(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((OrganizationsPaged)(results[0])); } - + /// - public void GetExchangeOrganizationsPagedAsync(int packageId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) - { + public void GetExchangeOrganizationsPagedAsync(int packageId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) { this.GetExchangeOrganizationsPagedAsync(packageId, recursive, filterColumn, filterValue, sortColumn, startRow, maximumRows, null); } - + /// - public void GetExchangeOrganizationsPagedAsync(int packageId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, object userState) - { - if ((this.GetExchangeOrganizationsPagedOperationCompleted == null)) - { + public void GetExchangeOrganizationsPagedAsync(int packageId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, object userState) { + if ((this.GetExchangeOrganizationsPagedOperationCompleted == null)) { this.GetExchangeOrganizationsPagedOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetExchangeOrganizationsPagedOperationCompleted); } this.InvokeAsync("GetExchangeOrganizationsPaged", new object[] { @@ -2037,318 +2347,267 @@ namespace WebsitePanel.EnterpriseServer startRow, maximumRows}, this.GetExchangeOrganizationsPagedOperationCompleted, userState); } - - private void OnGetExchangeOrganizationsPagedOperationCompleted(object arg) - { - if ((this.GetExchangeOrganizationsPagedCompleted != null)) - { + + private void OnGetExchangeOrganizationsPagedOperationCompleted(object arg) { + if ((this.GetExchangeOrganizationsPagedCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetExchangeOrganizationsPagedCompleted(this, new GetExchangeOrganizationsPagedCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetExchangeOrganizations", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public Organization[] GetExchangeOrganizations(int packageId, bool recursive) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetExchangeOrganizations", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public Organization[] GetExchangeOrganizations(int packageId, bool recursive) { object[] results = this.Invoke("GetExchangeOrganizations", new object[] { packageId, recursive}); return ((Organization[])(results[0])); } - + /// - public System.IAsyncResult BeginGetExchangeOrganizations(int packageId, bool recursive, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetExchangeOrganizations(int packageId, bool recursive, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetExchangeOrganizations", new object[] { packageId, recursive}, callback, asyncState); } - + /// - public Organization[] EndGetExchangeOrganizations(System.IAsyncResult asyncResult) - { + public Organization[] EndGetExchangeOrganizations(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((Organization[])(results[0])); } - + /// - public void GetExchangeOrganizationsAsync(int packageId, bool recursive) - { + public void GetExchangeOrganizationsAsync(int packageId, bool recursive) { this.GetExchangeOrganizationsAsync(packageId, recursive, null); } - + /// - public void GetExchangeOrganizationsAsync(int packageId, bool recursive, object userState) - { - if ((this.GetExchangeOrganizationsOperationCompleted == null)) - { + public void GetExchangeOrganizationsAsync(int packageId, bool recursive, object userState) { + if ((this.GetExchangeOrganizationsOperationCompleted == null)) { this.GetExchangeOrganizationsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetExchangeOrganizationsOperationCompleted); } this.InvokeAsync("GetExchangeOrganizations", new object[] { packageId, recursive}, this.GetExchangeOrganizationsOperationCompleted, userState); } - - private void OnGetExchangeOrganizationsOperationCompleted(object arg) - { - if ((this.GetExchangeOrganizationsCompleted != null)) - { + + private void OnGetExchangeOrganizationsOperationCompleted(object arg) { + if ((this.GetExchangeOrganizationsCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetExchangeOrganizationsCompleted(this, new GetExchangeOrganizationsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetOrganization", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public Organization GetOrganization(int itemId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetOrganization", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public 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://smbsaas/websitepanel/enterpriseserver/GetOrganizationStatistics", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public OrganizationStatistics GetOrganizationStatistics(int itemId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetOrganizationStatistics", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public OrganizationStatistics 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://smbsaas/websitepanel/enterpriseserver/GetOrganizationStatisticsByOrganizat" + - "ion", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public OrganizationStatistics GetOrganizationStatisticsByOrganization(int itemId) - { + "ion", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public OrganizationStatistics 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://smbsaas/websitepanel/enterpriseserver/DeleteOrganization", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int DeleteOrganization(int itemId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteOrganization", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public 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://smbsaas/websitepanel/enterpriseserver/GetOrganizationStorageLimits", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public Organization GetOrganizationStorageLimits(int itemId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetOrganizationStorageLimits", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public Organization GetOrganizationStorageLimits(int itemId) { object[] results = this.Invoke("GetOrganizationStorageLimits", new object[] { itemId}); return ((Organization)(results[0])); } - + /// - public System.IAsyncResult BeginGetOrganizationStorageLimits(int itemId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetOrganizationStorageLimits(int itemId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetOrganizationStorageLimits", new object[] { itemId}, callback, asyncState); } - + /// - public Organization EndGetOrganizationStorageLimits(System.IAsyncResult asyncResult) - { + public Organization EndGetOrganizationStorageLimits(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((Organization)(results[0])); } - + /// - public void GetOrganizationStorageLimitsAsync(int itemId) - { + public void GetOrganizationStorageLimitsAsync(int itemId) { this.GetOrganizationStorageLimitsAsync(itemId, null); } - + /// - public void GetOrganizationStorageLimitsAsync(int itemId, object userState) - { - if ((this.GetOrganizationStorageLimitsOperationCompleted == null)) - { + public void GetOrganizationStorageLimitsAsync(int itemId, object userState) { + if ((this.GetOrganizationStorageLimitsOperationCompleted == null)) { this.GetOrganizationStorageLimitsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetOrganizationStorageLimitsOperationCompleted); } this.InvokeAsync("GetOrganizationStorageLimits", new object[] { itemId}, this.GetOrganizationStorageLimitsOperationCompleted, userState); } - - private void OnGetOrganizationStorageLimitsOperationCompleted(object arg) - { - if ((this.GetOrganizationStorageLimitsCompleted != null)) - { + + private void OnGetOrganizationStorageLimitsOperationCompleted(object arg) { + if ((this.GetOrganizationStorageLimitsCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetOrganizationStorageLimitsCompleted(this, new GetOrganizationStorageLimitsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetOrganizationStorageLimits", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int SetOrganizationStorageLimits(int itemId, int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays, bool applyToMailboxes) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetOrganizationStorageLimits", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int SetOrganizationStorageLimits(int itemId, int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays, bool applyToMailboxes) { object[] results = this.Invoke("SetOrganizationStorageLimits", new object[] { itemId, issueWarningKB, @@ -2358,10 +2617,9 @@ namespace WebsitePanel.EnterpriseServer applyToMailboxes}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginSetOrganizationStorageLimits(int itemId, int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays, bool applyToMailboxes, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginSetOrganizationStorageLimits(int itemId, int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays, bool applyToMailboxes, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("SetOrganizationStorageLimits", new object[] { itemId, issueWarningKB, @@ -2370,25 +2628,21 @@ namespace WebsitePanel.EnterpriseServer keepDeletedItemsDays, applyToMailboxes}, callback, asyncState); } - + /// - public int EndSetOrganizationStorageLimits(System.IAsyncResult asyncResult) - { + public int EndSetOrganizationStorageLimits(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void SetOrganizationStorageLimitsAsync(int itemId, int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays, bool applyToMailboxes) - { + public void SetOrganizationStorageLimitsAsync(int itemId, int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays, bool applyToMailboxes) { this.SetOrganizationStorageLimitsAsync(itemId, issueWarningKB, prohibitSendKB, prohibitSendReceiveKB, keepDeletedItemsDays, applyToMailboxes, null); } - + /// - public void SetOrganizationStorageLimitsAsync(int itemId, int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays, bool applyToMailboxes, object userState) - { - if ((this.SetOrganizationStorageLimitsOperationCompleted == null)) - { + public void SetOrganizationStorageLimitsAsync(int itemId, int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays, bool applyToMailboxes, object userState) { + if ((this.SetOrganizationStorageLimitsOperationCompleted == null)) { this.SetOrganizationStorageLimitsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetOrganizationStorageLimitsOperationCompleted); } this.InvokeAsync("SetOrganizationStorageLimits", new object[] { @@ -2399,236 +2653,201 @@ namespace WebsitePanel.EnterpriseServer keepDeletedItemsDays, applyToMailboxes}, this.SetOrganizationStorageLimitsOperationCompleted, userState); } - - private void OnSetOrganizationStorageLimitsOperationCompleted(object arg) - { - if ((this.SetOrganizationStorageLimitsCompleted != null)) - { + + private void OnSetOrganizationStorageLimitsOperationCompleted(object arg) { + if ((this.SetOrganizationStorageLimitsCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetOrganizationStorageLimitsCompleted(this, new SetOrganizationStorageLimitsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMailboxesStatistics", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeItemStatistics[] GetMailboxesStatistics(int itemId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMailboxesStatistics", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeItemStatistics[] GetMailboxesStatistics(int itemId) { object[] results = this.Invoke("GetMailboxesStatistics", new object[] { itemId}); return ((ExchangeItemStatistics[])(results[0])); } - + /// - public System.IAsyncResult BeginGetMailboxesStatistics(int itemId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetMailboxesStatistics(int itemId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetMailboxesStatistics", new object[] { itemId}, callback, asyncState); } - + /// - public ExchangeItemStatistics[] EndGetMailboxesStatistics(System.IAsyncResult asyncResult) - { + public ExchangeItemStatistics[] EndGetMailboxesStatistics(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((ExchangeItemStatistics[])(results[0])); } - + /// - public void GetMailboxesStatisticsAsync(int itemId) - { + public void GetMailboxesStatisticsAsync(int itemId) { this.GetMailboxesStatisticsAsync(itemId, null); } - + /// - public void GetMailboxesStatisticsAsync(int itemId, object userState) - { - if ((this.GetMailboxesStatisticsOperationCompleted == null)) - { + public void GetMailboxesStatisticsAsync(int itemId, object userState) { + if ((this.GetMailboxesStatisticsOperationCompleted == null)) { this.GetMailboxesStatisticsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetMailboxesStatisticsOperationCompleted); } this.InvokeAsync("GetMailboxesStatistics", new object[] { itemId}, this.GetMailboxesStatisticsOperationCompleted, userState); } - - private void OnGetMailboxesStatisticsOperationCompleted(object arg) - { - if ((this.GetMailboxesStatisticsCompleted != null)) - { + + private void OnGetMailboxesStatisticsOperationCompleted(object arg) { + if ((this.GetMailboxesStatisticsCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetMailboxesStatisticsCompleted(this, new GetMailboxesStatisticsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMailboxStatistics", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeMailboxStatistics GetMailboxStatistics(int itemId, int accountId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMailboxStatistics", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeMailboxStatistics GetMailboxStatistics(int itemId, int accountId) { object[] results = this.Invoke("GetMailboxStatistics", new object[] { itemId, accountId}); return ((ExchangeMailboxStatistics)(results[0])); } - + /// - public System.IAsyncResult BeginGetMailboxStatistics(int itemId, int accountId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetMailboxStatistics(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetMailboxStatistics", new object[] { itemId, accountId}, callback, asyncState); } - + /// - public ExchangeMailboxStatistics EndGetMailboxStatistics(System.IAsyncResult asyncResult) - { + public ExchangeMailboxStatistics EndGetMailboxStatistics(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((ExchangeMailboxStatistics)(results[0])); } - + /// - public void GetMailboxStatisticsAsync(int itemId, int accountId) - { + public void GetMailboxStatisticsAsync(int itemId, int accountId) { this.GetMailboxStatisticsAsync(itemId, accountId, null); } - + /// - public void GetMailboxStatisticsAsync(int itemId, int accountId, object userState) - { - if ((this.GetMailboxStatisticsOperationCompleted == null)) - { + public void GetMailboxStatisticsAsync(int itemId, int accountId, object userState) { + if ((this.GetMailboxStatisticsOperationCompleted == null)) { this.GetMailboxStatisticsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetMailboxStatisticsOperationCompleted); } this.InvokeAsync("GetMailboxStatistics", new object[] { itemId, accountId}, this.GetMailboxStatisticsOperationCompleted, userState); } - - private void OnGetMailboxStatisticsOperationCompleted(object arg) - { - if ((this.GetMailboxStatisticsCompleted != null)) - { + + private void OnGetMailboxStatisticsOperationCompleted(object arg) { + if ((this.GetMailboxStatisticsCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetMailboxStatisticsCompleted(this, new GetMailboxStatisticsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CalculateOrganizationDiskspace", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int CalculateOrganizationDiskspace(int itemId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CalculateOrganizationDiskspace", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int CalculateOrganizationDiskspace(int itemId) { object[] results = this.Invoke("CalculateOrganizationDiskspace", new object[] { itemId}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginCalculateOrganizationDiskspace(int itemId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginCalculateOrganizationDiskspace(int itemId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("CalculateOrganizationDiskspace", new object[] { itemId}, callback, asyncState); } - + /// - public int EndCalculateOrganizationDiskspace(System.IAsyncResult asyncResult) - { + public int EndCalculateOrganizationDiskspace(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void CalculateOrganizationDiskspaceAsync(int itemId) - { + public void CalculateOrganizationDiskspaceAsync(int itemId) { this.CalculateOrganizationDiskspaceAsync(itemId, null); } - + /// - public void CalculateOrganizationDiskspaceAsync(int itemId, object userState) - { - if ((this.CalculateOrganizationDiskspaceOperationCompleted == null)) - { + public void CalculateOrganizationDiskspaceAsync(int itemId, object userState) { + if ((this.CalculateOrganizationDiskspaceOperationCompleted == null)) { this.CalculateOrganizationDiskspaceOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCalculateOrganizationDiskspaceOperationCompleted); } this.InvokeAsync("CalculateOrganizationDiskspace", new object[] { itemId}, this.CalculateOrganizationDiskspaceOperationCompleted, userState); } - - private void OnCalculateOrganizationDiskspaceOperationCompleted(object arg) - { - if ((this.CalculateOrganizationDiskspaceCompleted != null)) - { + + private void OnCalculateOrganizationDiskspaceOperationCompleted(object arg) { + if ((this.CalculateOrganizationDiskspaceCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.CalculateOrganizationDiskspaceCompleted(this, new CalculateOrganizationDiskspaceCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetActiveSyncPolicy", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeActiveSyncPolicy GetActiveSyncPolicy(int itemId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetActiveSyncPolicy", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeActiveSyncPolicy GetActiveSyncPolicy(int itemId) { object[] results = this.Invoke("GetActiveSyncPolicy", new object[] { itemId}); return ((ExchangeActiveSyncPolicy)(results[0])); } - + /// - public System.IAsyncResult BeginGetActiveSyncPolicy(int itemId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetActiveSyncPolicy(int itemId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetActiveSyncPolicy", new object[] { itemId}, callback, asyncState); } - + /// - public ExchangeActiveSyncPolicy EndGetActiveSyncPolicy(System.IAsyncResult asyncResult) - { + public ExchangeActiveSyncPolicy EndGetActiveSyncPolicy(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((ExchangeActiveSyncPolicy)(results[0])); } - + /// - public void GetActiveSyncPolicyAsync(int itemId) - { + public void GetActiveSyncPolicyAsync(int itemId) { this.GetActiveSyncPolicyAsync(itemId, null); } - + /// - public void GetActiveSyncPolicyAsync(int itemId, object userState) - { - if ((this.GetActiveSyncPolicyOperationCompleted == null)) - { + public void GetActiveSyncPolicyAsync(int itemId, object userState) { + if ((this.GetActiveSyncPolicyOperationCompleted == null)) { this.GetActiveSyncPolicyOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetActiveSyncPolicyOperationCompleted); } this.InvokeAsync("GetActiveSyncPolicy", new object[] { itemId}, this.GetActiveSyncPolicyOperationCompleted, userState); } - - private void OnGetActiveSyncPolicyOperationCompleted(object arg) - { - if ((this.GetActiveSyncPolicyCompleted != null)) - { + + private void OnGetActiveSyncPolicyOperationCompleted(object arg) { + if ((this.GetActiveSyncPolicyCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetActiveSyncPolicyCompleted(this, new GetActiveSyncPolicyCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetActiveSyncPolicy", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetActiveSyncPolicy", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] public int SetActiveSyncPolicy( - int itemId, - bool allowNonProvisionableDevices, - bool attachmentsEnabled, - int maxAttachmentSizeKB, - bool uncAccessEnabled, - bool wssAccessEnabled, - bool devicePasswordEnabled, - bool alphanumericPasswordRequired, - bool passwordRecoveryEnabled, - bool deviceEncryptionEnabled, - bool allowSimplePassword, - int maxPasswordFailedAttempts, - int minPasswordLength, - int inactivityLockMin, - int passwordExpirationDays, - int passwordHistory, - int refreshInteval) - { + int itemId, + bool allowNonProvisionableDevices, + bool attachmentsEnabled, + int maxAttachmentSizeKB, + bool uncAccessEnabled, + bool wssAccessEnabled, + bool devicePasswordEnabled, + bool alphanumericPasswordRequired, + bool passwordRecoveryEnabled, + bool deviceEncryptionEnabled, + bool allowSimplePassword, + int maxPasswordFailedAttempts, + int minPasswordLength, + int inactivityLockMin, + int passwordExpirationDays, + int passwordHistory, + int refreshInteval) { object[] results = this.Invoke("SetActiveSyncPolicy", new object[] { itemId, allowNonProvisionableDevices, @@ -2649,29 +2868,28 @@ namespace WebsitePanel.EnterpriseServer refreshInteval}); return ((int)(results[0])); } - + /// public System.IAsyncResult BeginSetActiveSyncPolicy( - int itemId, - bool allowNonProvisionableDevices, - bool attachmentsEnabled, - int maxAttachmentSizeKB, - bool uncAccessEnabled, - bool wssAccessEnabled, - bool devicePasswordEnabled, - bool alphanumericPasswordRequired, - bool passwordRecoveryEnabled, - bool deviceEncryptionEnabled, - bool allowSimplePassword, - int maxPasswordFailedAttempts, - int minPasswordLength, - int inactivityLockMin, - int passwordExpirationDays, - int passwordHistory, - int refreshInteval, - System.AsyncCallback callback, - object asyncState) - { + int itemId, + bool allowNonProvisionableDevices, + bool attachmentsEnabled, + int maxAttachmentSizeKB, + bool uncAccessEnabled, + bool wssAccessEnabled, + bool devicePasswordEnabled, + bool alphanumericPasswordRequired, + bool passwordRecoveryEnabled, + bool deviceEncryptionEnabled, + bool allowSimplePassword, + int maxPasswordFailedAttempts, + int minPasswordLength, + int inactivityLockMin, + int passwordExpirationDays, + int passwordHistory, + int refreshInteval, + System.AsyncCallback callback, + object asyncState) { return this.BeginInvoke("SetActiveSyncPolicy", new object[] { itemId, allowNonProvisionableDevices, @@ -2691,60 +2909,56 @@ namespace WebsitePanel.EnterpriseServer passwordHistory, refreshInteval}, callback, asyncState); } - + /// - public int EndSetActiveSyncPolicy(System.IAsyncResult asyncResult) - { + public int EndSetActiveSyncPolicy(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// public void SetActiveSyncPolicyAsync( - int itemId, - bool allowNonProvisionableDevices, - bool attachmentsEnabled, - int maxAttachmentSizeKB, - bool uncAccessEnabled, - bool wssAccessEnabled, - bool devicePasswordEnabled, - bool alphanumericPasswordRequired, - bool passwordRecoveryEnabled, - bool deviceEncryptionEnabled, - bool allowSimplePassword, - int maxPasswordFailedAttempts, - int minPasswordLength, - int inactivityLockMin, - int passwordExpirationDays, - int passwordHistory, - int refreshInteval) - { + int itemId, + bool allowNonProvisionableDevices, + bool attachmentsEnabled, + int maxAttachmentSizeKB, + bool uncAccessEnabled, + bool wssAccessEnabled, + bool devicePasswordEnabled, + bool alphanumericPasswordRequired, + bool passwordRecoveryEnabled, + bool deviceEncryptionEnabled, + bool allowSimplePassword, + int maxPasswordFailedAttempts, + int minPasswordLength, + int inactivityLockMin, + int passwordExpirationDays, + int passwordHistory, + int refreshInteval) { this.SetActiveSyncPolicyAsync(itemId, allowNonProvisionableDevices, attachmentsEnabled, maxAttachmentSizeKB, uncAccessEnabled, wssAccessEnabled, devicePasswordEnabled, alphanumericPasswordRequired, passwordRecoveryEnabled, deviceEncryptionEnabled, allowSimplePassword, maxPasswordFailedAttempts, minPasswordLength, inactivityLockMin, passwordExpirationDays, passwordHistory, refreshInteval, null); } - + /// public void SetActiveSyncPolicyAsync( - int itemId, - bool allowNonProvisionableDevices, - bool attachmentsEnabled, - int maxAttachmentSizeKB, - bool uncAccessEnabled, - bool wssAccessEnabled, - bool devicePasswordEnabled, - bool alphanumericPasswordRequired, - bool passwordRecoveryEnabled, - bool deviceEncryptionEnabled, - bool allowSimplePassword, - int maxPasswordFailedAttempts, - int minPasswordLength, - int inactivityLockMin, - int passwordExpirationDays, - int passwordHistory, - int refreshInteval, - object userState) - { - if ((this.SetActiveSyncPolicyOperationCompleted == null)) - { + int itemId, + bool allowNonProvisionableDevices, + bool attachmentsEnabled, + int maxAttachmentSizeKB, + bool uncAccessEnabled, + bool wssAccessEnabled, + bool devicePasswordEnabled, + bool alphanumericPasswordRequired, + bool passwordRecoveryEnabled, + bool deviceEncryptionEnabled, + bool allowSimplePassword, + int maxPasswordFailedAttempts, + int minPasswordLength, + int inactivityLockMin, + int passwordExpirationDays, + int passwordHistory, + int refreshInteval, + object userState) { + if ((this.SetActiveSyncPolicyOperationCompleted == null)) { this.SetActiveSyncPolicyOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetActiveSyncPolicyOperationCompleted); } this.InvokeAsync("SetActiveSyncPolicy", new object[] { @@ -2766,124 +2980,105 @@ namespace WebsitePanel.EnterpriseServer passwordHistory, refreshInteval}, this.SetActiveSyncPolicyOperationCompleted, userState); } - - private void OnSetActiveSyncPolicyOperationCompleted(object arg) - { - if ((this.SetActiveSyncPolicyCompleted != null)) - { + + private void OnSetActiveSyncPolicyOperationCompleted(object arg) { + if ((this.SetActiveSyncPolicyCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetActiveSyncPolicyCompleted(this, new SetActiveSyncPolicyCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddAuthoritativeDomain", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int AddAuthoritativeDomain(int itemId, int domainId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddAuthoritativeDomain", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int AddAuthoritativeDomain(int itemId, int domainId) { object[] results = this.Invoke("AddAuthoritativeDomain", new object[] { itemId, domainId}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginAddAuthoritativeDomain(int itemId, int domainId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginAddAuthoritativeDomain(int itemId, int domainId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("AddAuthoritativeDomain", new object[] { itemId, domainId}, callback, asyncState); } - + /// - public int EndAddAuthoritativeDomain(System.IAsyncResult asyncResult) - { + public int EndAddAuthoritativeDomain(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void AddAuthoritativeDomainAsync(int itemId, int domainId) - { + public void AddAuthoritativeDomainAsync(int itemId, int domainId) { this.AddAuthoritativeDomainAsync(itemId, domainId, null); } - + /// - public void AddAuthoritativeDomainAsync(int itemId, int domainId, object userState) - { - if ((this.AddAuthoritativeDomainOperationCompleted == null)) - { + public void AddAuthoritativeDomainAsync(int itemId, int domainId, object userState) { + if ((this.AddAuthoritativeDomainOperationCompleted == null)) { this.AddAuthoritativeDomainOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddAuthoritativeDomainOperationCompleted); } this.InvokeAsync("AddAuthoritativeDomain", new object[] { itemId, domainId}, this.AddAuthoritativeDomainOperationCompleted, userState); } - - private void OnAddAuthoritativeDomainOperationCompleted(object arg) - { - if ((this.AddAuthoritativeDomainCompleted != null)) - { + + private void OnAddAuthoritativeDomainOperationCompleted(object arg) { + if ((this.AddAuthoritativeDomainCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.AddAuthoritativeDomainCompleted(this, new AddAuthoritativeDomainCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteAuthoritativeDomain", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int DeleteAuthoritativeDomain(int itemId, int domainId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteAuthoritativeDomain", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DeleteAuthoritativeDomain(int itemId, int domainId) { object[] results = this.Invoke("DeleteAuthoritativeDomain", new object[] { itemId, domainId}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginDeleteAuthoritativeDomain(int itemId, int domainId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginDeleteAuthoritativeDomain(int itemId, int domainId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("DeleteAuthoritativeDomain", new object[] { itemId, domainId}, callback, asyncState); } - + /// - public int EndDeleteAuthoritativeDomain(System.IAsyncResult asyncResult) - { + public int EndDeleteAuthoritativeDomain(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void DeleteAuthoritativeDomainAsync(int itemId, int domainId) - { + public void DeleteAuthoritativeDomainAsync(int itemId, int domainId) { this.DeleteAuthoritativeDomainAsync(itemId, domainId, null); } - + /// - public void DeleteAuthoritativeDomainAsync(int itemId, int domainId, object userState) - { - if ((this.DeleteAuthoritativeDomainOperationCompleted == null)) - { + public void DeleteAuthoritativeDomainAsync(int itemId, int domainId, object userState) { + if ((this.DeleteAuthoritativeDomainOperationCompleted == null)) { this.DeleteAuthoritativeDomainOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteAuthoritativeDomainOperationCompleted); } this.InvokeAsync("DeleteAuthoritativeDomain", new object[] { itemId, domainId}, this.DeleteAuthoritativeDomainOperationCompleted, userState); } - - private void OnDeleteAuthoritativeDomainOperationCompleted(object arg) - { - if ((this.DeleteAuthoritativeDomainCompleted != null)) - { + + private void OnDeleteAuthoritativeDomainOperationCompleted(object arg) { + if ((this.DeleteAuthoritativeDomainCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeleteAuthoritativeDomainCompleted(this, new DeleteAuthoritativeDomainCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetAccountsPaged", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeAccountsPaged GetAccountsPaged(int itemId, string accountTypes, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetAccountsPaged", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeAccountsPaged GetAccountsPaged(int itemId, string accountTypes, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, bool archiving) { object[] results = this.Invoke("GetAccountsPaged", new object[] { itemId, accountTypes, @@ -2891,13 +3086,13 @@ namespace WebsitePanel.EnterpriseServer filterValue, sortColumn, startRow, - maximumRows}); + maximumRows, + archiving}); return ((ExchangeAccountsPaged)(results[0])); } - + /// - public System.IAsyncResult BeginGetAccountsPaged(int itemId, string accountTypes, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetAccountsPaged(int itemId, string accountTypes, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, bool archiving, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetAccountsPaged", new object[] { itemId, accountTypes, @@ -2905,27 +3100,24 @@ namespace WebsitePanel.EnterpriseServer filterValue, sortColumn, startRow, - maximumRows}, callback, asyncState); + maximumRows, + archiving}, callback, asyncState); } - + /// - public ExchangeAccountsPaged EndGetAccountsPaged(System.IAsyncResult asyncResult) - { + public ExchangeAccountsPaged EndGetAccountsPaged(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((ExchangeAccountsPaged)(results[0])); } - + /// - public void GetAccountsPagedAsync(int itemId, string accountTypes, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) - { - this.GetAccountsPagedAsync(itemId, accountTypes, filterColumn, filterValue, sortColumn, startRow, maximumRows, null); + public void GetAccountsPagedAsync(int itemId, string accountTypes, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, bool archiving) { + this.GetAccountsPagedAsync(itemId, accountTypes, filterColumn, filterValue, sortColumn, startRow, maximumRows, archiving, null); } - + /// - public void GetAccountsPagedAsync(int itemId, string accountTypes, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, object userState) - { - if ((this.GetAccountsPagedOperationCompleted == null)) - { + public void GetAccountsPagedAsync(int itemId, string accountTypes, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, bool archiving, object userState) { + if ((this.GetAccountsPagedOperationCompleted == null)) { this.GetAccountsPagedOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetAccountsPagedOperationCompleted); } this.InvokeAsync("GetAccountsPaged", new object[] { @@ -2935,126 +3127,108 @@ namespace WebsitePanel.EnterpriseServer filterValue, sortColumn, startRow, - maximumRows}, this.GetAccountsPagedOperationCompleted, userState); + maximumRows, + archiving}, this.GetAccountsPagedOperationCompleted, userState); } - - private void OnGetAccountsPagedOperationCompleted(object arg) - { - if ((this.GetAccountsPagedCompleted != null)) - { + + private void OnGetAccountsPagedOperationCompleted(object arg) { + if ((this.GetAccountsPagedCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetAccountsPagedCompleted(this, new GetAccountsPagedCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetAccounts", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeAccount[] GetAccounts(int itemId, ExchangeAccountType accountType) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetAccounts", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeAccount[] GetAccounts(int itemId, ExchangeAccountType accountType) { object[] results = this.Invoke("GetAccounts", new object[] { itemId, accountType}); return ((ExchangeAccount[])(results[0])); } - + /// - public System.IAsyncResult BeginGetAccounts(int itemId, ExchangeAccountType accountType, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetAccounts(int itemId, ExchangeAccountType accountType, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetAccounts", new object[] { itemId, accountType}, callback, asyncState); } - + /// - public ExchangeAccount[] EndGetAccounts(System.IAsyncResult asyncResult) - { + public ExchangeAccount[] EndGetAccounts(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((ExchangeAccount[])(results[0])); } - + /// - public void GetAccountsAsync(int itemId, ExchangeAccountType accountType) - { + public void GetAccountsAsync(int itemId, ExchangeAccountType accountType) { this.GetAccountsAsync(itemId, accountType, null); } - + /// - public void GetAccountsAsync(int itemId, ExchangeAccountType accountType, object userState) - { - if ((this.GetAccountsOperationCompleted == null)) - { + public void GetAccountsAsync(int itemId, ExchangeAccountType accountType, object userState) { + if ((this.GetAccountsOperationCompleted == null)) { this.GetAccountsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetAccountsOperationCompleted); } this.InvokeAsync("GetAccounts", new object[] { itemId, accountType}, this.GetAccountsOperationCompleted, userState); } - - private void OnGetAccountsOperationCompleted(object arg) - { - if ((this.GetAccountsCompleted != null)) - { + + private void OnGetAccountsOperationCompleted(object arg) { + if ((this.GetAccountsCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetAccountsCompleted(this, new GetAccountsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetExchangeAccountByMailboxPlanId", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeAccount[] GetExchangeAccountByMailboxPlanId(int itemId, int mailboxPlanId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetExchangeAccountByMailboxPlanId", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeAccount[] GetExchangeAccountByMailboxPlanId(int itemId, int mailboxPlanId) { object[] results = this.Invoke("GetExchangeAccountByMailboxPlanId", new object[] { itemId, mailboxPlanId}); return ((ExchangeAccount[])(results[0])); } - + /// - public System.IAsyncResult BeginGetExchangeAccountByMailboxPlanId(int itemId, int mailboxPlanId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetExchangeAccountByMailboxPlanId(int itemId, int mailboxPlanId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetExchangeAccountByMailboxPlanId", new object[] { itemId, mailboxPlanId}, callback, asyncState); } - + /// - public ExchangeAccount[] EndGetExchangeAccountByMailboxPlanId(System.IAsyncResult asyncResult) - { + public ExchangeAccount[] EndGetExchangeAccountByMailboxPlanId(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((ExchangeAccount[])(results[0])); } - + /// - public void GetExchangeAccountByMailboxPlanIdAsync(int itemId, int mailboxPlanId) - { + public void GetExchangeAccountByMailboxPlanIdAsync(int itemId, int mailboxPlanId) { this.GetExchangeAccountByMailboxPlanIdAsync(itemId, mailboxPlanId, null); } - + /// - public void GetExchangeAccountByMailboxPlanIdAsync(int itemId, int mailboxPlanId, object userState) - { - if ((this.GetExchangeAccountByMailboxPlanIdOperationCompleted == null)) - { + public void GetExchangeAccountByMailboxPlanIdAsync(int itemId, int mailboxPlanId, object userState) { + if ((this.GetExchangeAccountByMailboxPlanIdOperationCompleted == null)) { this.GetExchangeAccountByMailboxPlanIdOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetExchangeAccountByMailboxPlanIdOperationCompleted); } this.InvokeAsync("GetExchangeAccountByMailboxPlanId", new object[] { itemId, mailboxPlanId}, this.GetExchangeAccountByMailboxPlanIdOperationCompleted, userState); } - - private void OnGetExchangeAccountByMailboxPlanIdOperationCompleted(object arg) - { - if ((this.GetExchangeAccountByMailboxPlanIdCompleted != null)) - { + + private void OnGetExchangeAccountByMailboxPlanIdOperationCompleted(object arg) { + if ((this.GetExchangeAccountByMailboxPlanIdCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetExchangeAccountByMailboxPlanIdCompleted(this, new GetExchangeAccountByMailboxPlanIdCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SearchAccounts", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeAccount[] SearchAccounts(int itemId, bool includeMailboxes, bool includeContacts, bool includeDistributionLists, bool includeRooms, bool includeEquipment, bool includeSecurityGroups, string filterColumn, string filterValue, string sortColumn) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SearchAccounts", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeAccount[] SearchAccounts(int itemId, bool includeMailboxes, bool includeContacts, bool includeDistributionLists, bool includeRooms, bool includeEquipment, bool includeSecurityGroups, string filterColumn, string filterValue, string sortColumn) { object[] results = this.Invoke("SearchAccounts", new object[] { itemId, includeMailboxes, @@ -3068,10 +3242,9 @@ namespace WebsitePanel.EnterpriseServer sortColumn}); return ((ExchangeAccount[])(results[0])); } - + /// - public System.IAsyncResult BeginSearchAccounts(int itemId, bool includeMailboxes, bool includeContacts, bool includeDistributionLists, bool includeRooms, bool includeEquipment, bool includeSecurityGroups, string filterColumn, string filterValue, string sortColumn, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginSearchAccounts(int itemId, bool includeMailboxes, bool includeContacts, bool includeDistributionLists, bool includeRooms, bool includeEquipment, bool includeSecurityGroups, string filterColumn, string filterValue, string sortColumn, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("SearchAccounts", new object[] { itemId, includeMailboxes, @@ -3084,25 +3257,21 @@ namespace WebsitePanel.EnterpriseServer filterValue, sortColumn}, callback, asyncState); } - + /// - public ExchangeAccount[] EndSearchAccounts(System.IAsyncResult asyncResult) - { + public ExchangeAccount[] EndSearchAccounts(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((ExchangeAccount[])(results[0])); } - + /// - public void SearchAccountsAsync(int itemId, bool includeMailboxes, bool includeContacts, bool includeDistributionLists, bool includeRooms, bool includeEquipment, bool includeSecurityGroups, string filterColumn, string filterValue, string sortColumn) - { + public void SearchAccountsAsync(int itemId, bool includeMailboxes, bool includeContacts, bool includeDistributionLists, bool includeRooms, bool includeEquipment, bool includeSecurityGroups, string filterColumn, string filterValue, string sortColumn) { this.SearchAccountsAsync(itemId, includeMailboxes, includeContacts, includeDistributionLists, includeRooms, includeEquipment, includeSecurityGroups, filterColumn, filterValue, sortColumn, null); } - + /// - public void SearchAccountsAsync(int itemId, bool includeMailboxes, bool includeContacts, bool includeDistributionLists, bool includeRooms, bool includeEquipment, bool includeSecurityGroups, string filterColumn, string filterValue, string sortColumn, object userState) - { - if ((this.SearchAccountsOperationCompleted == null)) - { + public void SearchAccountsAsync(int itemId, bool includeMailboxes, bool includeContacts, bool includeDistributionLists, bool includeRooms, bool includeEquipment, bool includeSecurityGroups, string filterColumn, string filterValue, string sortColumn, object userState) { + if ((this.SearchAccountsOperationCompleted == null)) { this.SearchAccountsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSearchAccountsOperationCompleted); } this.InvokeAsync("SearchAccounts", new object[] { @@ -3117,158 +3286,134 @@ namespace WebsitePanel.EnterpriseServer filterValue, sortColumn}, 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://smbsaas/websitepanel/enterpriseserver/GetAccount", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeAccount GetAccount(int itemId, int accountId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetAccount", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeAccount GetAccount(int itemId, int accountId) { object[] results = this.Invoke("GetAccount", new object[] { itemId, accountId}); return ((ExchangeAccount)(results[0])); } - + /// - public System.IAsyncResult BeginGetAccount(int itemId, int accountId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetAccount(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetAccount", new object[] { itemId, accountId}, callback, asyncState); } - + /// - public ExchangeAccount EndGetAccount(System.IAsyncResult asyncResult) - { + public ExchangeAccount EndGetAccount(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((ExchangeAccount)(results[0])); } - + /// - public void GetAccountAsync(int itemId, int accountId) - { + public void GetAccountAsync(int itemId, int accountId) { this.GetAccountAsync(itemId, accountId, null); } - + /// - public void GetAccountAsync(int itemId, int accountId, object userState) - { - if ((this.GetAccountOperationCompleted == null)) - { + public void GetAccountAsync(int itemId, int accountId, object userState) { + if ((this.GetAccountOperationCompleted == null)) { this.GetAccountOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetAccountOperationCompleted); } this.InvokeAsync("GetAccount", new object[] { itemId, accountId}, this.GetAccountOperationCompleted, userState); } - - private void OnGetAccountOperationCompleted(object arg) - { - if ((this.GetAccountCompleted != null)) - { + + private void OnGetAccountOperationCompleted(object arg) { + if ((this.GetAccountCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetAccountCompleted(this, new GetAccountCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SearchAccount", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeAccount SearchAccount(ExchangeAccountType accountType, string primaryEmailAddress) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SearchAccount", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeAccount SearchAccount(ExchangeAccountType accountType, string primaryEmailAddress) { object[] results = this.Invoke("SearchAccount", new object[] { accountType, primaryEmailAddress}); return ((ExchangeAccount)(results[0])); } - + /// - public System.IAsyncResult BeginSearchAccount(ExchangeAccountType accountType, string primaryEmailAddress, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginSearchAccount(ExchangeAccountType accountType, string primaryEmailAddress, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("SearchAccount", new object[] { accountType, primaryEmailAddress}, callback, asyncState); } - + /// - public ExchangeAccount EndSearchAccount(System.IAsyncResult asyncResult) - { + public ExchangeAccount EndSearchAccount(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((ExchangeAccount)(results[0])); } - + /// - public void SearchAccountAsync(ExchangeAccountType accountType, string primaryEmailAddress) - { + public void SearchAccountAsync(ExchangeAccountType accountType, string primaryEmailAddress) { this.SearchAccountAsync(accountType, primaryEmailAddress, null); } - + /// - public void SearchAccountAsync(ExchangeAccountType accountType, string primaryEmailAddress, object userState) - { - if ((this.SearchAccountOperationCompleted == null)) - { + public void SearchAccountAsync(ExchangeAccountType accountType, string primaryEmailAddress, object userState) { + if ((this.SearchAccountOperationCompleted == null)) { this.SearchAccountOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSearchAccountOperationCompleted); } this.InvokeAsync("SearchAccount", new object[] { accountType, primaryEmailAddress}, this.SearchAccountOperationCompleted, userState); } - - private void OnSearchAccountOperationCompleted(object arg) - { - if ((this.SearchAccountCompleted != null)) - { + + private void OnSearchAccountOperationCompleted(object arg) { + if ((this.SearchAccountCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SearchAccountCompleted(this, new SearchAccountCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CheckAccountCredentials", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public bool CheckAccountCredentials(int itemId, string email, string password) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CheckAccountCredentials", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public bool CheckAccountCredentials(int itemId, string email, string password) { object[] results = this.Invoke("CheckAccountCredentials", new object[] { itemId, email, password}); return ((bool)(results[0])); } - + /// - public System.IAsyncResult BeginCheckAccountCredentials(int itemId, string email, string password, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginCheckAccountCredentials(int itemId, string email, string password, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("CheckAccountCredentials", new object[] { itemId, email, password}, callback, asyncState); } - + /// - public bool EndCheckAccountCredentials(System.IAsyncResult asyncResult) - { + public bool EndCheckAccountCredentials(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((bool)(results[0])); } - + /// - public void CheckAccountCredentialsAsync(int itemId, string email, string password) - { + public void CheckAccountCredentialsAsync(int itemId, string email, string password) { this.CheckAccountCredentialsAsync(itemId, email, password, null); } - + /// - public void CheckAccountCredentialsAsync(int itemId, string email, string password, object userState) - { - if ((this.CheckAccountCredentialsOperationCompleted == null)) - { + public void CheckAccountCredentialsAsync(int itemId, string email, string password, object userState) { + if ((this.CheckAccountCredentialsOperationCompleted == null)) { this.CheckAccountCredentialsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCheckAccountCredentialsOperationCompleted); } this.InvokeAsync("CheckAccountCredentials", new object[] { @@ -3276,20 +3421,17 @@ namespace WebsitePanel.EnterpriseServer email, password}, this.CheckAccountCredentialsOperationCompleted, userState); } - - private void OnCheckAccountCredentialsOperationCompleted(object arg) - { - if ((this.CheckAccountCredentialsCompleted != null)) - { + + private void OnCheckAccountCredentialsOperationCompleted(object arg) { + if ((this.CheckAccountCredentialsCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.CheckAccountCredentialsCompleted(this, new CheckAccountCredentialsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CreateMailbox", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int CreateMailbox(int itemId, int accountId, ExchangeAccountType accountType, string accountName, string displayName, string name, string domain, string password, bool sendSetupInstructions, string setupInstructionMailAddress, int mailboxPlanId, string subscriberNumber) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CreateMailbox", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int CreateMailbox(int itemId, int accountId, ExchangeAccountType accountType, string accountName, string displayName, string name, string domain, string password, bool sendSetupInstructions, string setupInstructionMailAddress, int mailboxPlanId, int archivedPlanId, string subscriberNumber) { object[] results = this.Invoke("CreateMailbox", new object[] { itemId, accountId, @@ -3302,13 +3444,13 @@ namespace WebsitePanel.EnterpriseServer sendSetupInstructions, setupInstructionMailAddress, mailboxPlanId, + archivedPlanId, subscriberNumber}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginCreateMailbox(int itemId, int accountId, ExchangeAccountType accountType, string accountName, string displayName, string name, string domain, string password, bool sendSetupInstructions, string setupInstructionMailAddress, int mailboxPlanId, string subscriberNumber, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginCreateMailbox(int itemId, int accountId, ExchangeAccountType accountType, string accountName, string displayName, string name, string domain, string password, bool sendSetupInstructions, string setupInstructionMailAddress, int mailboxPlanId, int archivedPlanId, string subscriberNumber, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("CreateMailbox", new object[] { itemId, accountId, @@ -3321,27 +3463,24 @@ namespace WebsitePanel.EnterpriseServer sendSetupInstructions, setupInstructionMailAddress, mailboxPlanId, + archivedPlanId, subscriberNumber}, callback, asyncState); } - + /// - public int EndCreateMailbox(System.IAsyncResult asyncResult) - { + public int EndCreateMailbox(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void CreateMailboxAsync(int itemId, int accountId, ExchangeAccountType accountType, string accountName, string displayName, string name, string domain, string password, bool sendSetupInstructions, string setupInstructionMailAddress, int mailboxPlanId, string subscriberNumber) - { - this.CreateMailboxAsync(itemId, accountId, accountType, accountName, displayName, name, domain, password, sendSetupInstructions, setupInstructionMailAddress, mailboxPlanId, subscriberNumber, null); + public void CreateMailboxAsync(int itemId, int accountId, ExchangeAccountType accountType, string accountName, string displayName, string name, string domain, string password, bool sendSetupInstructions, string setupInstructionMailAddress, int mailboxPlanId, int archivedPlanId, string subscriberNumber) { + this.CreateMailboxAsync(itemId, accountId, accountType, accountName, displayName, name, domain, password, sendSetupInstructions, setupInstructionMailAddress, mailboxPlanId, archivedPlanId, subscriberNumber, null); } - + /// - public void CreateMailboxAsync(int itemId, int accountId, ExchangeAccountType accountType, string accountName, string displayName, string name, string domain, string password, bool sendSetupInstructions, string setupInstructionMailAddress, int mailboxPlanId, string subscriberNumber, object userState) - { - if ((this.CreateMailboxOperationCompleted == null)) - { + public void CreateMailboxAsync(int itemId, int accountId, ExchangeAccountType accountType, string accountName, string displayName, string name, string domain, string password, bool sendSetupInstructions, string setupInstructionMailAddress, int mailboxPlanId, int archivedPlanId, string subscriberNumber, object userState) { + if ((this.CreateMailboxOperationCompleted == null)) { this.CreateMailboxOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateMailboxOperationCompleted); } this.InvokeAsync("CreateMailbox", new object[] { @@ -3356,230 +3495,196 @@ namespace WebsitePanel.EnterpriseServer sendSetupInstructions, setupInstructionMailAddress, mailboxPlanId, + archivedPlanId, subscriberNumber}, this.CreateMailboxOperationCompleted, userState); } - - private void OnCreateMailboxOperationCompleted(object arg) - { - if ((this.CreateMailboxCompleted != null)) - { + + private void OnCreateMailboxOperationCompleted(object arg) { + if ((this.CreateMailboxCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.CreateMailboxCompleted(this, new CreateMailboxCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteMailbox", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int DeleteMailbox(int itemId, int accountId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteMailbox", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DeleteMailbox(int itemId, int accountId) { object[] results = this.Invoke("DeleteMailbox", new object[] { itemId, accountId}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginDeleteMailbox(int itemId, int accountId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginDeleteMailbox(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("DeleteMailbox", new object[] { itemId, accountId}, callback, asyncState); } - + /// - public int EndDeleteMailbox(System.IAsyncResult asyncResult) - { + public int EndDeleteMailbox(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void DeleteMailboxAsync(int itemId, int accountId) - { + public void DeleteMailboxAsync(int itemId, int accountId) { this.DeleteMailboxAsync(itemId, accountId, null); } - + /// - public void DeleteMailboxAsync(int itemId, int accountId, object userState) - { - if ((this.DeleteMailboxOperationCompleted == null)) - { + public void DeleteMailboxAsync(int itemId, int accountId, object userState) { + if ((this.DeleteMailboxOperationCompleted == null)) { this.DeleteMailboxOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteMailboxOperationCompleted); } this.InvokeAsync("DeleteMailbox", new object[] { itemId, accountId}, this.DeleteMailboxOperationCompleted, userState); } - - private void OnDeleteMailboxOperationCompleted(object arg) - { - if ((this.DeleteMailboxCompleted != null)) - { + + private void OnDeleteMailboxOperationCompleted(object arg) { + if ((this.DeleteMailboxCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeleteMailboxCompleted(this, new DeleteMailboxCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DisableMailbox", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int DisableMailbox(int itemId, int accountId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DisableMailbox", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DisableMailbox(int itemId, int accountId) { object[] results = this.Invoke("DisableMailbox", new object[] { itemId, accountId}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginDisableMailbox(int itemId, int accountId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginDisableMailbox(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("DisableMailbox", new object[] { itemId, accountId}, callback, asyncState); } - + /// - public int EndDisableMailbox(System.IAsyncResult asyncResult) - { + public int EndDisableMailbox(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void DisableMailboxAsync(int itemId, int accountId) - { + public void DisableMailboxAsync(int itemId, int accountId) { this.DisableMailboxAsync(itemId, accountId, null); } - + /// - public void DisableMailboxAsync(int itemId, int accountId, object userState) - { - if ((this.DisableMailboxOperationCompleted == null)) - { + public void DisableMailboxAsync(int itemId, int accountId, object userState) { + if ((this.DisableMailboxOperationCompleted == null)) { this.DisableMailboxOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDisableMailboxOperationCompleted); } this.InvokeAsync("DisableMailbox", new object[] { itemId, accountId}, this.DisableMailboxOperationCompleted, userState); } - - private void OnDisableMailboxOperationCompleted(object arg) - { - if ((this.DisableMailboxCompleted != null)) - { + + private void OnDisableMailboxOperationCompleted(object arg) { + if ((this.DisableMailboxCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DisableMailboxCompleted(this, new DisableMailboxCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMailboxAdvancedSettings", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeMailbox GetMailboxAdvancedSettings(int itemId, int accountId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMailboxAdvancedSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeMailbox GetMailboxAdvancedSettings(int itemId, int accountId) { object[] results = this.Invoke("GetMailboxAdvancedSettings", new object[] { itemId, accountId}); return ((ExchangeMailbox)(results[0])); } - + /// - public System.IAsyncResult BeginGetMailboxAdvancedSettings(int itemId, int accountId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetMailboxAdvancedSettings(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetMailboxAdvancedSettings", new object[] { itemId, accountId}, callback, asyncState); } - + /// - public ExchangeMailbox EndGetMailboxAdvancedSettings(System.IAsyncResult asyncResult) - { + public ExchangeMailbox EndGetMailboxAdvancedSettings(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((ExchangeMailbox)(results[0])); } - + /// - public void GetMailboxAdvancedSettingsAsync(int itemId, int accountId) - { + public void GetMailboxAdvancedSettingsAsync(int itemId, int accountId) { this.GetMailboxAdvancedSettingsAsync(itemId, accountId, null); } - + /// - public void GetMailboxAdvancedSettingsAsync(int itemId, int accountId, object userState) - { - if ((this.GetMailboxAdvancedSettingsOperationCompleted == null)) - { + public void GetMailboxAdvancedSettingsAsync(int itemId, int accountId, object userState) { + if ((this.GetMailboxAdvancedSettingsOperationCompleted == null)) { this.GetMailboxAdvancedSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetMailboxAdvancedSettingsOperationCompleted); } this.InvokeAsync("GetMailboxAdvancedSettings", new object[] { itemId, accountId}, this.GetMailboxAdvancedSettingsOperationCompleted, userState); } - - private void OnGetMailboxAdvancedSettingsOperationCompleted(object arg) - { - if ((this.GetMailboxAdvancedSettingsCompleted != null)) - { + + private void OnGetMailboxAdvancedSettingsOperationCompleted(object arg) { + if ((this.GetMailboxAdvancedSettingsCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetMailboxAdvancedSettingsCompleted(this, new GetMailboxAdvancedSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMailboxGeneralSettings", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeMailbox GetMailboxGeneralSettings(int itemId, int accountId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMailboxGeneralSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeMailbox GetMailboxGeneralSettings(int itemId, int accountId) { object[] results = this.Invoke("GetMailboxGeneralSettings", new object[] { itemId, accountId}); return ((ExchangeMailbox)(results[0])); } - + /// - public System.IAsyncResult BeginGetMailboxGeneralSettings(int itemId, int accountId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetMailboxGeneralSettings(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetMailboxGeneralSettings", new object[] { itemId, accountId}, callback, asyncState); } - + /// - public ExchangeMailbox EndGetMailboxGeneralSettings(System.IAsyncResult asyncResult) - { + public ExchangeMailbox EndGetMailboxGeneralSettings(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((ExchangeMailbox)(results[0])); } - + /// - public void GetMailboxGeneralSettingsAsync(int itemId, int accountId) - { + public void GetMailboxGeneralSettingsAsync(int itemId, int accountId) { this.GetMailboxGeneralSettingsAsync(itemId, accountId, null); } - + /// - public void GetMailboxGeneralSettingsAsync(int itemId, int accountId, object userState) - { - if ((this.GetMailboxGeneralSettingsOperationCompleted == null)) - { + public void GetMailboxGeneralSettingsAsync(int itemId, int accountId, object userState) { + if ((this.GetMailboxGeneralSettingsOperationCompleted == null)) { this.GetMailboxGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetMailboxGeneralSettingsOperationCompleted); } this.InvokeAsync("GetMailboxGeneralSettings", new object[] { itemId, accountId}, this.GetMailboxGeneralSettingsOperationCompleted, userState); } - - private void OnGetMailboxGeneralSettingsOperationCompleted(object arg) - { - if ((this.GetMailboxGeneralSettingsCompleted != null)) - { + + private void OnGetMailboxGeneralSettingsOperationCompleted(object arg) { + if ((this.GetMailboxGeneralSettingsCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetMailboxGeneralSettingsCompleted(this, new GetMailboxGeneralSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetMailboxGeneralSettings", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int SetMailboxGeneralSettings(int itemId, int accountId, bool hideAddressBook, bool disabled) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetMailboxGeneralSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int SetMailboxGeneralSettings(int itemId, int accountId, bool hideAddressBook, bool disabled) { object[] results = this.Invoke("SetMailboxGeneralSettings", new object[] { itemId, accountId, @@ -3587,35 +3692,30 @@ namespace WebsitePanel.EnterpriseServer disabled}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginSetMailboxGeneralSettings(int itemId, int accountId, bool hideAddressBook, bool disabled, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginSetMailboxGeneralSettings(int itemId, int accountId, bool hideAddressBook, bool disabled, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("SetMailboxGeneralSettings", new object[] { itemId, accountId, hideAddressBook, disabled}, callback, asyncState); } - + /// - public int EndSetMailboxGeneralSettings(System.IAsyncResult asyncResult) - { + public int EndSetMailboxGeneralSettings(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void SetMailboxGeneralSettingsAsync(int itemId, int accountId, bool hideAddressBook, bool disabled) - { + public void SetMailboxGeneralSettingsAsync(int itemId, int accountId, bool hideAddressBook, bool disabled) { this.SetMailboxGeneralSettingsAsync(itemId, accountId, hideAddressBook, disabled, null); } - + /// - public void SetMailboxGeneralSettingsAsync(int itemId, int accountId, bool hideAddressBook, bool disabled, object userState) - { - if ((this.SetMailboxGeneralSettingsOperationCompleted == null)) - { + public void SetMailboxGeneralSettingsAsync(int itemId, int accountId, bool hideAddressBook, bool disabled, object userState) { + if ((this.SetMailboxGeneralSettingsOperationCompleted == null)) { this.SetMailboxGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetMailboxGeneralSettingsOperationCompleted); } this.InvokeAsync("SetMailboxGeneralSettings", new object[] { @@ -3624,106 +3724,90 @@ namespace WebsitePanel.EnterpriseServer hideAddressBook, disabled}, this.SetMailboxGeneralSettingsOperationCompleted, userState); } - - private void OnSetMailboxGeneralSettingsOperationCompleted(object arg) - { - if ((this.SetMailboxGeneralSettingsCompleted != null)) - { + + private void OnSetMailboxGeneralSettingsOperationCompleted(object arg) { + if ((this.SetMailboxGeneralSettingsCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetMailboxGeneralSettingsCompleted(this, new SetMailboxGeneralSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMailboxEmailAddresses", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeEmailAddress[] GetMailboxEmailAddresses(int itemId, int accountId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMailboxEmailAddresses", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeEmailAddress[] GetMailboxEmailAddresses(int itemId, int accountId) { object[] results = this.Invoke("GetMailboxEmailAddresses", new object[] { itemId, accountId}); return ((ExchangeEmailAddress[])(results[0])); } - + /// - public System.IAsyncResult BeginGetMailboxEmailAddresses(int itemId, int accountId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetMailboxEmailAddresses(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetMailboxEmailAddresses", new object[] { itemId, accountId}, callback, asyncState); } - + /// - public ExchangeEmailAddress[] EndGetMailboxEmailAddresses(System.IAsyncResult asyncResult) - { + public ExchangeEmailAddress[] EndGetMailboxEmailAddresses(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((ExchangeEmailAddress[])(results[0])); } - + /// - public void GetMailboxEmailAddressesAsync(int itemId, int accountId) - { + public void GetMailboxEmailAddressesAsync(int itemId, int accountId) { this.GetMailboxEmailAddressesAsync(itemId, accountId, null); } - + /// - public void GetMailboxEmailAddressesAsync(int itemId, int accountId, object userState) - { - if ((this.GetMailboxEmailAddressesOperationCompleted == null)) - { + public void GetMailboxEmailAddressesAsync(int itemId, int accountId, object userState) { + if ((this.GetMailboxEmailAddressesOperationCompleted == null)) { this.GetMailboxEmailAddressesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetMailboxEmailAddressesOperationCompleted); } this.InvokeAsync("GetMailboxEmailAddresses", new object[] { itemId, accountId}, this.GetMailboxEmailAddressesOperationCompleted, userState); } - - private void OnGetMailboxEmailAddressesOperationCompleted(object arg) - { - if ((this.GetMailboxEmailAddressesCompleted != null)) - { + + private void OnGetMailboxEmailAddressesOperationCompleted(object arg) { + if ((this.GetMailboxEmailAddressesCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetMailboxEmailAddressesCompleted(this, new GetMailboxEmailAddressesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddMailboxEmailAddress", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int AddMailboxEmailAddress(int itemId, int accountId, string emailAddress) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddMailboxEmailAddress", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int AddMailboxEmailAddress(int itemId, int accountId, string emailAddress) { object[] results = this.Invoke("AddMailboxEmailAddress", new object[] { itemId, accountId, emailAddress}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginAddMailboxEmailAddress(int itemId, int accountId, string emailAddress, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginAddMailboxEmailAddress(int itemId, int accountId, string emailAddress, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("AddMailboxEmailAddress", new object[] { itemId, accountId, emailAddress}, callback, asyncState); } - + /// - public int EndAddMailboxEmailAddress(System.IAsyncResult asyncResult) - { + public int EndAddMailboxEmailAddress(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void AddMailboxEmailAddressAsync(int itemId, int accountId, string emailAddress) - { + public void AddMailboxEmailAddressAsync(int itemId, int accountId, string emailAddress) { this.AddMailboxEmailAddressAsync(itemId, accountId, emailAddress, null); } - + /// - public void AddMailboxEmailAddressAsync(int itemId, int accountId, string emailAddress, object userState) - { - if ((this.AddMailboxEmailAddressOperationCompleted == null)) - { + public void AddMailboxEmailAddressAsync(int itemId, int accountId, string emailAddress, object userState) { + if ((this.AddMailboxEmailAddressOperationCompleted == null)) { this.AddMailboxEmailAddressOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddMailboxEmailAddressOperationCompleted); } this.InvokeAsync("AddMailboxEmailAddress", new object[] { @@ -3731,54 +3815,46 @@ namespace WebsitePanel.EnterpriseServer accountId, emailAddress}, this.AddMailboxEmailAddressOperationCompleted, userState); } - - private void OnAddMailboxEmailAddressOperationCompleted(object arg) - { - if ((this.AddMailboxEmailAddressCompleted != null)) - { + + private void OnAddMailboxEmailAddressOperationCompleted(object arg) { + if ((this.AddMailboxEmailAddressCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.AddMailboxEmailAddressCompleted(this, new AddMailboxEmailAddressCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetMailboxPrimaryEmailAddress", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int SetMailboxPrimaryEmailAddress(int itemId, int accountId, string emailAddress) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetMailboxPrimaryEmailAddress", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int SetMailboxPrimaryEmailAddress(int itemId, int accountId, string emailAddress) { object[] results = this.Invoke("SetMailboxPrimaryEmailAddress", new object[] { itemId, accountId, emailAddress}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginSetMailboxPrimaryEmailAddress(int itemId, int accountId, string emailAddress, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginSetMailboxPrimaryEmailAddress(int itemId, int accountId, string emailAddress, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("SetMailboxPrimaryEmailAddress", new object[] { itemId, accountId, emailAddress}, callback, asyncState); } - + /// - public int EndSetMailboxPrimaryEmailAddress(System.IAsyncResult asyncResult) - { + public int EndSetMailboxPrimaryEmailAddress(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void SetMailboxPrimaryEmailAddressAsync(int itemId, int accountId, string emailAddress) - { + public void SetMailboxPrimaryEmailAddressAsync(int itemId, int accountId, string emailAddress) { this.SetMailboxPrimaryEmailAddressAsync(itemId, accountId, emailAddress, null); } - + /// - public void SetMailboxPrimaryEmailAddressAsync(int itemId, int accountId, string emailAddress, object userState) - { - if ((this.SetMailboxPrimaryEmailAddressOperationCompleted == null)) - { + public void SetMailboxPrimaryEmailAddressAsync(int itemId, int accountId, string emailAddress, object userState) { + if ((this.SetMailboxPrimaryEmailAddressOperationCompleted == null)) { this.SetMailboxPrimaryEmailAddressOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetMailboxPrimaryEmailAddressOperationCompleted); } this.InvokeAsync("SetMailboxPrimaryEmailAddress", new object[] { @@ -3786,54 +3862,46 @@ namespace WebsitePanel.EnterpriseServer accountId, emailAddress}, this.SetMailboxPrimaryEmailAddressOperationCompleted, userState); } - - private void OnSetMailboxPrimaryEmailAddressOperationCompleted(object arg) - { - if ((this.SetMailboxPrimaryEmailAddressCompleted != null)) - { + + private void OnSetMailboxPrimaryEmailAddressOperationCompleted(object arg) { + if ((this.SetMailboxPrimaryEmailAddressCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetMailboxPrimaryEmailAddressCompleted(this, new SetMailboxPrimaryEmailAddressCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteMailboxEmailAddresses", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int DeleteMailboxEmailAddresses(int itemId, int accountId, string[] emailAddresses) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteMailboxEmailAddresses", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DeleteMailboxEmailAddresses(int itemId, int accountId, string[] emailAddresses) { object[] results = this.Invoke("DeleteMailboxEmailAddresses", new object[] { itemId, accountId, emailAddresses}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginDeleteMailboxEmailAddresses(int itemId, int accountId, string[] emailAddresses, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginDeleteMailboxEmailAddresses(int itemId, int accountId, string[] emailAddresses, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("DeleteMailboxEmailAddresses", new object[] { itemId, accountId, emailAddresses}, callback, asyncState); } - + /// - public int EndDeleteMailboxEmailAddresses(System.IAsyncResult asyncResult) - { + public int EndDeleteMailboxEmailAddresses(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void DeleteMailboxEmailAddressesAsync(int itemId, int accountId, string[] emailAddresses) - { + public void DeleteMailboxEmailAddressesAsync(int itemId, int accountId, string[] emailAddresses) { this.DeleteMailboxEmailAddressesAsync(itemId, accountId, emailAddresses, null); } - + /// - public void DeleteMailboxEmailAddressesAsync(int itemId, int accountId, string[] emailAddresses, object userState) - { - if ((this.DeleteMailboxEmailAddressesOperationCompleted == null)) - { + public void DeleteMailboxEmailAddressesAsync(int itemId, int accountId, string[] emailAddresses, object userState) { + if ((this.DeleteMailboxEmailAddressesOperationCompleted == null)) { this.DeleteMailboxEmailAddressesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteMailboxEmailAddressesOperationCompleted); } this.InvokeAsync("DeleteMailboxEmailAddresses", new object[] { @@ -3841,72 +3909,61 @@ namespace WebsitePanel.EnterpriseServer accountId, emailAddresses}, this.DeleteMailboxEmailAddressesOperationCompleted, userState); } - - private void OnDeleteMailboxEmailAddressesOperationCompleted(object arg) - { - if ((this.DeleteMailboxEmailAddressesCompleted != null)) - { + + private void OnDeleteMailboxEmailAddressesOperationCompleted(object arg) { + if ((this.DeleteMailboxEmailAddressesCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeleteMailboxEmailAddressesCompleted(this, new DeleteMailboxEmailAddressesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMailboxMailFlowSettings", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeMailbox GetMailboxMailFlowSettings(int itemId, int accountId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMailboxMailFlowSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeMailbox GetMailboxMailFlowSettings(int itemId, int accountId) { object[] results = this.Invoke("GetMailboxMailFlowSettings", new object[] { itemId, accountId}); return ((ExchangeMailbox)(results[0])); } - + /// - public System.IAsyncResult BeginGetMailboxMailFlowSettings(int itemId, int accountId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetMailboxMailFlowSettings(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetMailboxMailFlowSettings", new object[] { itemId, accountId}, callback, asyncState); } - + /// - public ExchangeMailbox EndGetMailboxMailFlowSettings(System.IAsyncResult asyncResult) - { + public ExchangeMailbox EndGetMailboxMailFlowSettings(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((ExchangeMailbox)(results[0])); } - + /// - public void GetMailboxMailFlowSettingsAsync(int itemId, int accountId) - { + public void GetMailboxMailFlowSettingsAsync(int itemId, int accountId) { this.GetMailboxMailFlowSettingsAsync(itemId, accountId, null); } - + /// - public void GetMailboxMailFlowSettingsAsync(int itemId, int accountId, object userState) - { - if ((this.GetMailboxMailFlowSettingsOperationCompleted == null)) - { + public void GetMailboxMailFlowSettingsAsync(int itemId, int accountId, object userState) { + if ((this.GetMailboxMailFlowSettingsOperationCompleted == null)) { this.GetMailboxMailFlowSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetMailboxMailFlowSettingsOperationCompleted); } this.InvokeAsync("GetMailboxMailFlowSettings", new object[] { itemId, accountId}, this.GetMailboxMailFlowSettingsOperationCompleted, userState); } - - private void OnGetMailboxMailFlowSettingsOperationCompleted(object arg) - { - if ((this.GetMailboxMailFlowSettingsCompleted != null)) - { + + private void OnGetMailboxMailFlowSettingsOperationCompleted(object arg) { + if ((this.GetMailboxMailFlowSettingsCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetMailboxMailFlowSettingsCompleted(this, new GetMailboxMailFlowSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetMailboxMailFlowSettings", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int SetMailboxMailFlowSettings(int itemId, int accountId, bool enableForwarding, string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetMailboxMailFlowSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int SetMailboxMailFlowSettings(int itemId, int accountId, bool enableForwarding, string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) { object[] results = this.Invoke("SetMailboxMailFlowSettings", new object[] { itemId, accountId, @@ -3919,10 +3976,9 @@ namespace WebsitePanel.EnterpriseServer requireSenderAuthentication}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginSetMailboxMailFlowSettings(int itemId, int accountId, bool enableForwarding, string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginSetMailboxMailFlowSettings(int itemId, int accountId, bool enableForwarding, string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("SetMailboxMailFlowSettings", new object[] { itemId, accountId, @@ -3934,25 +3990,21 @@ namespace WebsitePanel.EnterpriseServer rejectAccounts, requireSenderAuthentication}, callback, asyncState); } - + /// - public int EndSetMailboxMailFlowSettings(System.IAsyncResult asyncResult) - { + public int EndSetMailboxMailFlowSettings(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void SetMailboxMailFlowSettingsAsync(int itemId, int accountId, bool enableForwarding, string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) - { + public void SetMailboxMailFlowSettingsAsync(int itemId, int accountId, bool enableForwarding, string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) { this.SetMailboxMailFlowSettingsAsync(itemId, accountId, enableForwarding, forwardingAccountName, forwardToBoth, sendOnBehalfAccounts, acceptAccounts, rejectAccounts, requireSenderAuthentication, null); } - + /// - public void SetMailboxMailFlowSettingsAsync(int itemId, int accountId, bool enableForwarding, string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, object userState) - { - if ((this.SetMailboxMailFlowSettingsOperationCompleted == null)) - { + public void SetMailboxMailFlowSettingsAsync(int itemId, int accountId, bool enableForwarding, string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, object userState) { + if ((this.SetMailboxMailFlowSettingsOperationCompleted == null)) { this.SetMailboxMailFlowSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetMailboxMailFlowSettingsOperationCompleted); } this.InvokeAsync("SetMailboxMailFlowSettings", new object[] { @@ -3966,75 +4018,67 @@ namespace WebsitePanel.EnterpriseServer rejectAccounts, requireSenderAuthentication}, this.SetMailboxMailFlowSettingsOperationCompleted, userState); } - - private void OnSetMailboxMailFlowSettingsOperationCompleted(object arg) - { - if ((this.SetMailboxMailFlowSettingsCompleted != null)) - { + + private void OnSetMailboxMailFlowSettingsOperationCompleted(object arg) { + if ((this.SetMailboxMailFlowSettingsCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetMailboxMailFlowSettingsCompleted(this, new SetMailboxMailFlowSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetExchangeMailboxPlan", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int SetExchangeMailboxPlan(int itemId, int accountId, int mailboxPlanId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetExchangeMailboxPlan", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int SetExchangeMailboxPlan(int itemId, int accountId, int mailboxPlanId, int archivePlanId) { object[] results = this.Invoke("SetExchangeMailboxPlan", new object[] { itemId, accountId, - mailboxPlanId}); + mailboxPlanId, + archivePlanId}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginSetExchangeMailboxPlan(int itemId, int accountId, int mailboxPlanId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginSetExchangeMailboxPlan(int itemId, int accountId, int mailboxPlanId, int archivePlanId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("SetExchangeMailboxPlan", new object[] { itemId, accountId, - mailboxPlanId}, callback, asyncState); + mailboxPlanId, + archivePlanId}, callback, asyncState); } - + /// - public int EndSetExchangeMailboxPlan(System.IAsyncResult asyncResult) - { + public int EndSetExchangeMailboxPlan(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void SetExchangeMailboxPlanAsync(int itemId, int accountId, int mailboxPlanId) - { - this.SetExchangeMailboxPlanAsync(itemId, accountId, mailboxPlanId, null); + public void SetExchangeMailboxPlanAsync(int itemId, int accountId, int mailboxPlanId, int archivePlanId) { + this.SetExchangeMailboxPlanAsync(itemId, accountId, mailboxPlanId, archivePlanId, null); } - + /// - public void SetExchangeMailboxPlanAsync(int itemId, int accountId, int mailboxPlanId, object userState) - { - if ((this.SetExchangeMailboxPlanOperationCompleted == null)) - { + public void SetExchangeMailboxPlanAsync(int itemId, int accountId, int mailboxPlanId, int archivePlanId, object userState) { + if ((this.SetExchangeMailboxPlanOperationCompleted == null)) { this.SetExchangeMailboxPlanOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetExchangeMailboxPlanOperationCompleted); } this.InvokeAsync("SetExchangeMailboxPlan", new object[] { itemId, accountId, - mailboxPlanId}, this.SetExchangeMailboxPlanOperationCompleted, userState); + mailboxPlanId, + archivePlanId}, this.SetExchangeMailboxPlanOperationCompleted, userState); } - - private void OnSetExchangeMailboxPlanOperationCompleted(object arg) - { - if ((this.SetExchangeMailboxPlanCompleted != null)) - { + + private void OnSetExchangeMailboxPlanOperationCompleted(object arg) { + if ((this.SetExchangeMailboxPlanCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetExchangeMailboxPlanCompleted(this, new SetExchangeMailboxPlanCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMailboxSetupInstructions", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public string GetMailboxSetupInstructions(int itemId, int accountId, bool pmm, bool emailMode, bool signup) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMailboxSetupInstructions", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public string GetMailboxSetupInstructions(int itemId, int accountId, bool pmm, bool emailMode, bool signup) { object[] results = this.Invoke("GetMailboxSetupInstructions", new object[] { itemId, accountId, @@ -4043,10 +4087,9 @@ namespace WebsitePanel.EnterpriseServer signup}); return ((string)(results[0])); } - + /// - public System.IAsyncResult BeginGetMailboxSetupInstructions(int itemId, int accountId, bool pmm, bool emailMode, bool signup, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetMailboxSetupInstructions(int itemId, int accountId, bool pmm, bool emailMode, bool signup, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetMailboxSetupInstructions", new object[] { itemId, accountId, @@ -4054,25 +4097,21 @@ namespace WebsitePanel.EnterpriseServer emailMode, signup}, callback, asyncState); } - + /// - public string EndGetMailboxSetupInstructions(System.IAsyncResult asyncResult) - { + public string EndGetMailboxSetupInstructions(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((string)(results[0])); } - + /// - public void GetMailboxSetupInstructionsAsync(int itemId, int accountId, bool pmm, bool emailMode, bool signup) - { + public void GetMailboxSetupInstructionsAsync(int itemId, int accountId, bool pmm, bool emailMode, bool signup) { this.GetMailboxSetupInstructionsAsync(itemId, accountId, pmm, emailMode, signup, null); } - + /// - public void GetMailboxSetupInstructionsAsync(int itemId, int accountId, bool pmm, bool emailMode, bool signup, object userState) - { - if ((this.GetMailboxSetupInstructionsOperationCompleted == null)) - { + public void GetMailboxSetupInstructionsAsync(int itemId, int accountId, bool pmm, bool emailMode, bool signup, object userState) { + if ((this.GetMailboxSetupInstructionsOperationCompleted == null)) { this.GetMailboxSetupInstructionsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetMailboxSetupInstructionsOperationCompleted); } this.InvokeAsync("GetMailboxSetupInstructions", new object[] { @@ -4082,20 +4121,17 @@ namespace WebsitePanel.EnterpriseServer emailMode, signup}, this.GetMailboxSetupInstructionsOperationCompleted, userState); } - - private void OnGetMailboxSetupInstructionsOperationCompleted(object arg) - { - if ((this.GetMailboxSetupInstructionsCompleted != null)) - { + + private void OnGetMailboxSetupInstructionsOperationCompleted(object arg) { + if ((this.GetMailboxSetupInstructionsCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetMailboxSetupInstructionsCompleted(this, new GetMailboxSetupInstructionsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SendMailboxSetupInstructions", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int SendMailboxSetupInstructions(int itemId, int accountId, bool signup, string to, string cc) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SendMailboxSetupInstructions", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int SendMailboxSetupInstructions(int itemId, int accountId, bool signup, string to, string cc) { object[] results = this.Invoke("SendMailboxSetupInstructions", new object[] { itemId, accountId, @@ -4104,10 +4140,9 @@ namespace WebsitePanel.EnterpriseServer cc}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginSendMailboxSetupInstructions(int itemId, int accountId, bool signup, string to, string cc, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginSendMailboxSetupInstructions(int itemId, int accountId, bool signup, string to, string cc, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("SendMailboxSetupInstructions", new object[] { itemId, accountId, @@ -4115,25 +4150,21 @@ namespace WebsitePanel.EnterpriseServer to, cc}, callback, asyncState); } - + /// - public int EndSendMailboxSetupInstructions(System.IAsyncResult asyncResult) - { + public int EndSendMailboxSetupInstructions(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void SendMailboxSetupInstructionsAsync(int itemId, int accountId, bool signup, string to, string cc) - { + public void SendMailboxSetupInstructionsAsync(int itemId, int accountId, bool signup, string to, string cc) { this.SendMailboxSetupInstructionsAsync(itemId, accountId, signup, to, cc, null); } - + /// - public void SendMailboxSetupInstructionsAsync(int itemId, int accountId, bool signup, string to, string cc, object userState) - { - if ((this.SendMailboxSetupInstructionsOperationCompleted == null)) - { + public void SendMailboxSetupInstructionsAsync(int itemId, int accountId, bool signup, string to, string cc, object userState) { + if ((this.SendMailboxSetupInstructionsOperationCompleted == null)) { this.SendMailboxSetupInstructionsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSendMailboxSetupInstructionsOperationCompleted); } this.InvokeAsync("SendMailboxSetupInstructions", new object[] { @@ -4143,20 +4174,17 @@ namespace WebsitePanel.EnterpriseServer to, cc}, this.SendMailboxSetupInstructionsOperationCompleted, userState); } - - private void OnSendMailboxSetupInstructionsOperationCompleted(object arg) - { - if ((this.SendMailboxSetupInstructionsCompleted != null)) - { + + private void OnSendMailboxSetupInstructionsOperationCompleted(object arg) { + if ((this.SendMailboxSetupInstructionsCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SendMailboxSetupInstructionsCompleted(this, new SendMailboxSetupInstructionsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetMailboxManagerSettings", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int SetMailboxManagerSettings(int itemId, int accountId, bool pmmAllowed, MailboxManagerActions action) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetMailboxManagerSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int SetMailboxManagerSettings(int itemId, int accountId, bool pmmAllowed, MailboxManagerActions action) { object[] results = this.Invoke("SetMailboxManagerSettings", new object[] { itemId, accountId, @@ -4164,35 +4192,30 @@ namespace WebsitePanel.EnterpriseServer action}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginSetMailboxManagerSettings(int itemId, int accountId, bool pmmAllowed, MailboxManagerActions action, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginSetMailboxManagerSettings(int itemId, int accountId, bool pmmAllowed, MailboxManagerActions action, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("SetMailboxManagerSettings", new object[] { itemId, accountId, pmmAllowed, action}, callback, asyncState); } - + /// - public int EndSetMailboxManagerSettings(System.IAsyncResult asyncResult) - { + public int EndSetMailboxManagerSettings(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void SetMailboxManagerSettingsAsync(int itemId, int accountId, bool pmmAllowed, MailboxManagerActions action) - { + public void SetMailboxManagerSettingsAsync(int itemId, int accountId, bool pmmAllowed, MailboxManagerActions action) { this.SetMailboxManagerSettingsAsync(itemId, accountId, pmmAllowed, action, null); } - + /// - public void SetMailboxManagerSettingsAsync(int itemId, int accountId, bool pmmAllowed, MailboxManagerActions action, object userState) - { - if ((this.SetMailboxManagerSettingsOperationCompleted == null)) - { + public void SetMailboxManagerSettingsAsync(int itemId, int accountId, bool pmmAllowed, MailboxManagerActions action, object userState) { + if ((this.SetMailboxManagerSettingsOperationCompleted == null)) { this.SetMailboxManagerSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetMailboxManagerSettingsOperationCompleted); } this.InvokeAsync("SetMailboxManagerSettings", new object[] { @@ -4201,72 +4224,61 @@ namespace WebsitePanel.EnterpriseServer pmmAllowed, action}, this.SetMailboxManagerSettingsOperationCompleted, userState); } - - private void OnSetMailboxManagerSettingsOperationCompleted(object arg) - { - if ((this.SetMailboxManagerSettingsCompleted != null)) - { + + private void OnSetMailboxManagerSettingsOperationCompleted(object arg) { + if ((this.SetMailboxManagerSettingsCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetMailboxManagerSettingsCompleted(this, new SetMailboxManagerSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMailboxPermissions", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeMailbox GetMailboxPermissions(int itemId, int accountId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMailboxPermissions", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeMailbox GetMailboxPermissions(int itemId, int accountId) { object[] results = this.Invoke("GetMailboxPermissions", new object[] { itemId, accountId}); return ((ExchangeMailbox)(results[0])); } - + /// - public System.IAsyncResult BeginGetMailboxPermissions(int itemId, int accountId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetMailboxPermissions(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetMailboxPermissions", new object[] { itemId, accountId}, callback, asyncState); } - + /// - public ExchangeMailbox EndGetMailboxPermissions(System.IAsyncResult asyncResult) - { + public ExchangeMailbox EndGetMailboxPermissions(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((ExchangeMailbox)(results[0])); } - + /// - public void GetMailboxPermissionsAsync(int itemId, int accountId) - { + public void GetMailboxPermissionsAsync(int itemId, int accountId) { this.GetMailboxPermissionsAsync(itemId, accountId, null); } - + /// - public void GetMailboxPermissionsAsync(int itemId, int accountId, object userState) - { - if ((this.GetMailboxPermissionsOperationCompleted == null)) - { + public void GetMailboxPermissionsAsync(int itemId, int accountId, object userState) { + if ((this.GetMailboxPermissionsOperationCompleted == null)) { this.GetMailboxPermissionsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetMailboxPermissionsOperationCompleted); } this.InvokeAsync("GetMailboxPermissions", new object[] { itemId, accountId}, this.GetMailboxPermissionsOperationCompleted, userState); } - - private void OnGetMailboxPermissionsOperationCompleted(object arg) - { - if ((this.GetMailboxPermissionsCompleted != null)) - { + + private void OnGetMailboxPermissionsOperationCompleted(object arg) { + if ((this.GetMailboxPermissionsCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetMailboxPermissionsCompleted(this, new GetMailboxPermissionsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetMailboxPermissions", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int SetMailboxPermissions(int itemId, int accountId, string[] sendAsaccounts, string[] fullAccessAcounts) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetMailboxPermissions", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int SetMailboxPermissions(int itemId, int accountId, string[] sendAsaccounts, string[] fullAccessAcounts) { object[] results = this.Invoke("SetMailboxPermissions", new object[] { itemId, accountId, @@ -4274,35 +4286,30 @@ namespace WebsitePanel.EnterpriseServer fullAccessAcounts}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginSetMailboxPermissions(int itemId, int accountId, string[] sendAsaccounts, string[] fullAccessAcounts, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginSetMailboxPermissions(int itemId, int accountId, string[] sendAsaccounts, string[] fullAccessAcounts, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("SetMailboxPermissions", new object[] { itemId, accountId, sendAsaccounts, fullAccessAcounts}, callback, asyncState); } - + /// - public int EndSetMailboxPermissions(System.IAsyncResult asyncResult) - { + public int EndSetMailboxPermissions(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void SetMailboxPermissionsAsync(int itemId, int accountId, string[] sendAsaccounts, string[] fullAccessAcounts) - { + public void SetMailboxPermissionsAsync(int itemId, int accountId, string[] sendAsaccounts, string[] fullAccessAcounts) { this.SetMailboxPermissionsAsync(itemId, accountId, sendAsaccounts, fullAccessAcounts, null); } - + /// - public void SetMailboxPermissionsAsync(int itemId, int accountId, string[] sendAsaccounts, string[] fullAccessAcounts, object userState) - { - if ((this.SetMailboxPermissionsOperationCompleted == null)) - { + public void SetMailboxPermissionsAsync(int itemId, int accountId, string[] sendAsaccounts, string[] fullAccessAcounts, object userState) { + if ((this.SetMailboxPermissionsOperationCompleted == null)) { this.SetMailboxPermissionsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetMailboxPermissionsOperationCompleted); } this.InvokeAsync("SetMailboxPermissions", new object[] { @@ -4311,54 +4318,46 @@ namespace WebsitePanel.EnterpriseServer sendAsaccounts, fullAccessAcounts}, this.SetMailboxPermissionsOperationCompleted, userState); } - - private void OnSetMailboxPermissionsOperationCompleted(object arg) - { - if ((this.SetMailboxPermissionsCompleted != null)) - { + + private void OnSetMailboxPermissionsOperationCompleted(object arg) { + if ((this.SetMailboxPermissionsCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetMailboxPermissionsCompleted(this, new SetMailboxPermissionsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CreateContact", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int CreateContact(int itemId, string displayName, string email) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CreateContact", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int CreateContact(int itemId, string displayName, string email) { object[] results = this.Invoke("CreateContact", new object[] { itemId, displayName, email}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginCreateContact(int itemId, string displayName, string email, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginCreateContact(int itemId, string displayName, string email, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("CreateContact", new object[] { itemId, displayName, email}, callback, asyncState); } - + /// - public int EndCreateContact(System.IAsyncResult asyncResult) - { + public int EndCreateContact(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void CreateContactAsync(int itemId, string displayName, string email) - { + public void CreateContactAsync(int itemId, string displayName, string email) { this.CreateContactAsync(itemId, displayName, email, null); } - + /// - public void CreateContactAsync(int itemId, string displayName, string email, object userState) - { - if ((this.CreateContactOperationCompleted == null)) - { + public void CreateContactAsync(int itemId, string displayName, string email, object userState) { + if ((this.CreateContactOperationCompleted == null)) { this.CreateContactOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateContactOperationCompleted); } this.InvokeAsync("CreateContact", new object[] { @@ -4366,150 +4365,131 @@ namespace WebsitePanel.EnterpriseServer displayName, email}, this.CreateContactOperationCompleted, userState); } - - private void OnCreateContactOperationCompleted(object arg) - { - if ((this.CreateContactCompleted != null)) - { + + private void OnCreateContactOperationCompleted(object arg) { + if ((this.CreateContactCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.CreateContactCompleted(this, new CreateContactCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteContact", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int DeleteContact(int itemId, int accountId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteContact", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DeleteContact(int itemId, int accountId) { object[] results = this.Invoke("DeleteContact", new object[] { itemId, accountId}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginDeleteContact(int itemId, int accountId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginDeleteContact(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("DeleteContact", new object[] { itemId, accountId}, callback, asyncState); } - + /// - public int EndDeleteContact(System.IAsyncResult asyncResult) - { + public int EndDeleteContact(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void DeleteContactAsync(int itemId, int accountId) - { + public void DeleteContactAsync(int itemId, int accountId) { this.DeleteContactAsync(itemId, accountId, null); } - + /// - public void DeleteContactAsync(int itemId, int accountId, object userState) - { - if ((this.DeleteContactOperationCompleted == null)) - { + public void DeleteContactAsync(int itemId, int accountId, object userState) { + if ((this.DeleteContactOperationCompleted == null)) { this.DeleteContactOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteContactOperationCompleted); } this.InvokeAsync("DeleteContact", new object[] { itemId, accountId}, this.DeleteContactOperationCompleted, userState); } - - private void OnDeleteContactOperationCompleted(object arg) - { - if ((this.DeleteContactCompleted != null)) - { + + private void OnDeleteContactOperationCompleted(object arg) { + if ((this.DeleteContactCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeleteContactCompleted(this, new DeleteContactCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetContactGeneralSettings", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeContact GetContactGeneralSettings(int itemId, int accountId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetContactGeneralSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeContact GetContactGeneralSettings(int itemId, int accountId) { object[] results = this.Invoke("GetContactGeneralSettings", new object[] { itemId, accountId}); return ((ExchangeContact)(results[0])); } - + /// - public System.IAsyncResult BeginGetContactGeneralSettings(int itemId, int accountId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetContactGeneralSettings(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetContactGeneralSettings", new object[] { itemId, accountId}, callback, asyncState); } - + /// - public ExchangeContact EndGetContactGeneralSettings(System.IAsyncResult asyncResult) - { + public ExchangeContact EndGetContactGeneralSettings(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((ExchangeContact)(results[0])); } - + /// - public void GetContactGeneralSettingsAsync(int itemId, int accountId) - { + public void GetContactGeneralSettingsAsync(int itemId, int accountId) { this.GetContactGeneralSettingsAsync(itemId, accountId, null); } - + /// - public void GetContactGeneralSettingsAsync(int itemId, int accountId, object userState) - { - if ((this.GetContactGeneralSettingsOperationCompleted == null)) - { + public void GetContactGeneralSettingsAsync(int itemId, int accountId, object userState) { + if ((this.GetContactGeneralSettingsOperationCompleted == null)) { this.GetContactGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetContactGeneralSettingsOperationCompleted); } this.InvokeAsync("GetContactGeneralSettings", new object[] { itemId, accountId}, this.GetContactGeneralSettingsOperationCompleted, userState); } - - private void OnGetContactGeneralSettingsOperationCompleted(object arg) - { - if ((this.GetContactGeneralSettingsCompleted != null)) - { + + private void OnGetContactGeneralSettingsOperationCompleted(object arg) { + if ((this.GetContactGeneralSettingsCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetContactGeneralSettingsCompleted(this, new GetContactGeneralSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetContactGeneralSettings", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetContactGeneralSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] public int SetContactGeneralSettings( - int itemId, - int accountId, - string displayName, - string emailAddress, - bool hideAddressBook, - 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, - int useMapiRichTextFormat) - { + int itemId, + int accountId, + string displayName, + string emailAddress, + bool hideAddressBook, + 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, + int useMapiRichTextFormat) { object[] results = this.Invoke("SetContactGeneralSettings", new object[] { itemId, accountId, @@ -4539,38 +4519,37 @@ namespace WebsitePanel.EnterpriseServer useMapiRichTextFormat}); return ((int)(results[0])); } - + /// public System.IAsyncResult BeginSetContactGeneralSettings( - int itemId, - int accountId, - string displayName, - string emailAddress, - bool hideAddressBook, - 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, - int useMapiRichTextFormat, - System.AsyncCallback callback, - object asyncState) - { + int itemId, + int accountId, + string displayName, + string emailAddress, + bool hideAddressBook, + 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, + int useMapiRichTextFormat, + System.AsyncCallback callback, + object asyncState) { return this.BeginInvoke("SetContactGeneralSettings", new object[] { itemId, accountId, @@ -4599,78 +4578,74 @@ namespace WebsitePanel.EnterpriseServer notes, useMapiRichTextFormat}, callback, asyncState); } - + /// - public int EndSetContactGeneralSettings(System.IAsyncResult asyncResult) - { + public int EndSetContactGeneralSettings(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// public void SetContactGeneralSettingsAsync( - int itemId, - int accountId, - string displayName, - string emailAddress, - bool hideAddressBook, - 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, - int useMapiRichTextFormat) - { + int itemId, + int accountId, + string displayName, + string emailAddress, + bool hideAddressBook, + 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, + int useMapiRichTextFormat) { this.SetContactGeneralSettingsAsync(itemId, accountId, displayName, emailAddress, hideAddressBook, firstName, initials, lastName, address, city, state, zip, country, jobTitle, company, department, office, managerAccountName, businessPhone, fax, homePhone, mobilePhone, pager, webPage, notes, useMapiRichTextFormat, null); } - + /// public void SetContactGeneralSettingsAsync( - int itemId, - int accountId, - string displayName, - string emailAddress, - bool hideAddressBook, - 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, - int useMapiRichTextFormat, - object userState) - { - if ((this.SetContactGeneralSettingsOperationCompleted == null)) - { + int itemId, + int accountId, + string displayName, + string emailAddress, + bool hideAddressBook, + 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, + int useMapiRichTextFormat, + object userState) { + if ((this.SetContactGeneralSettingsOperationCompleted == null)) { this.SetContactGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetContactGeneralSettingsOperationCompleted); } this.InvokeAsync("SetContactGeneralSettings", new object[] { @@ -4701,72 +4676,61 @@ namespace WebsitePanel.EnterpriseServer notes, useMapiRichTextFormat}, this.SetContactGeneralSettingsOperationCompleted, userState); } - - private void OnSetContactGeneralSettingsOperationCompleted(object arg) - { - if ((this.SetContactGeneralSettingsCompleted != null)) - { + + private void OnSetContactGeneralSettingsOperationCompleted(object arg) { + if ((this.SetContactGeneralSettingsCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetContactGeneralSettingsCompleted(this, new SetContactGeneralSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetContactMailFlowSettings", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeContact GetContactMailFlowSettings(int itemId, int accountId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetContactMailFlowSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeContact GetContactMailFlowSettings(int itemId, int accountId) { object[] results = this.Invoke("GetContactMailFlowSettings", new object[] { itemId, accountId}); return ((ExchangeContact)(results[0])); } - + /// - public System.IAsyncResult BeginGetContactMailFlowSettings(int itemId, int accountId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetContactMailFlowSettings(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetContactMailFlowSettings", new object[] { itemId, accountId}, callback, asyncState); } - + /// - public ExchangeContact EndGetContactMailFlowSettings(System.IAsyncResult asyncResult) - { + public ExchangeContact EndGetContactMailFlowSettings(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((ExchangeContact)(results[0])); } - + /// - public void GetContactMailFlowSettingsAsync(int itemId, int accountId) - { + public void GetContactMailFlowSettingsAsync(int itemId, int accountId) { this.GetContactMailFlowSettingsAsync(itemId, accountId, null); } - + /// - public void GetContactMailFlowSettingsAsync(int itemId, int accountId, object userState) - { - if ((this.GetContactMailFlowSettingsOperationCompleted == null)) - { + public void GetContactMailFlowSettingsAsync(int itemId, int accountId, object userState) { + if ((this.GetContactMailFlowSettingsOperationCompleted == null)) { this.GetContactMailFlowSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetContactMailFlowSettingsOperationCompleted); } this.InvokeAsync("GetContactMailFlowSettings", new object[] { itemId, accountId}, this.GetContactMailFlowSettingsOperationCompleted, userState); } - - private void OnGetContactMailFlowSettingsOperationCompleted(object arg) - { - if ((this.GetContactMailFlowSettingsCompleted != null)) - { + + private void OnGetContactMailFlowSettingsOperationCompleted(object arg) { + if ((this.GetContactMailFlowSettingsCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetContactMailFlowSettingsCompleted(this, new GetContactMailFlowSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetContactMailFlowSettings", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int SetContactMailFlowSettings(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetContactMailFlowSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int SetContactMailFlowSettings(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) { object[] results = this.Invoke("SetContactMailFlowSettings", new object[] { itemId, accountId, @@ -4775,10 +4739,9 @@ namespace WebsitePanel.EnterpriseServer requireSenderAuthentication}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginSetContactMailFlowSettings(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginSetContactMailFlowSettings(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("SetContactMailFlowSettings", new object[] { itemId, accountId, @@ -4786,25 +4749,21 @@ namespace WebsitePanel.EnterpriseServer rejectAccounts, requireSenderAuthentication}, callback, asyncState); } - + /// - public int EndSetContactMailFlowSettings(System.IAsyncResult asyncResult) - { + public int EndSetContactMailFlowSettings(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void SetContactMailFlowSettingsAsync(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) - { + public void SetContactMailFlowSettingsAsync(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) { this.SetContactMailFlowSettingsAsync(itemId, accountId, acceptAccounts, rejectAccounts, requireSenderAuthentication, null); } - + /// - public void SetContactMailFlowSettingsAsync(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, object userState) - { - if ((this.SetContactMailFlowSettingsOperationCompleted == null)) - { + public void SetContactMailFlowSettingsAsync(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, object userState) { + if ((this.SetContactMailFlowSettingsOperationCompleted == null)) { this.SetContactMailFlowSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetContactMailFlowSettingsOperationCompleted); } this.InvokeAsync("SetContactMailFlowSettings", new object[] { @@ -4814,20 +4773,17 @@ namespace WebsitePanel.EnterpriseServer rejectAccounts, requireSenderAuthentication}, this.SetContactMailFlowSettingsOperationCompleted, userState); } - - private void OnSetContactMailFlowSettingsOperationCompleted(object arg) - { - if ((this.SetContactMailFlowSettingsCompleted != null)) - { + + private void OnSetContactMailFlowSettingsOperationCompleted(object arg) { + if ((this.SetContactMailFlowSettingsCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetContactMailFlowSettingsCompleted(this, new SetContactMailFlowSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CreateDistributionList", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int CreateDistributionList(int itemId, string displayName, string name, string domain, int managerId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CreateDistributionList", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int CreateDistributionList(int itemId, string displayName, string name, string domain, int managerId) { object[] results = this.Invoke("CreateDistributionList", new object[] { itemId, displayName, @@ -4836,10 +4792,9 @@ namespace WebsitePanel.EnterpriseServer managerId}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginCreateDistributionList(int itemId, string displayName, string name, string domain, int managerId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginCreateDistributionList(int itemId, string displayName, string name, string domain, int managerId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("CreateDistributionList", new object[] { itemId, displayName, @@ -4847,25 +4802,21 @@ namespace WebsitePanel.EnterpriseServer domain, managerId}, callback, asyncState); } - + /// - public int EndCreateDistributionList(System.IAsyncResult asyncResult) - { + public int EndCreateDistributionList(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void CreateDistributionListAsync(int itemId, string displayName, string name, string domain, int managerId) - { + public void CreateDistributionListAsync(int itemId, string displayName, string name, string domain, int managerId) { this.CreateDistributionListAsync(itemId, displayName, name, domain, managerId, null); } - + /// - public void CreateDistributionListAsync(int itemId, string displayName, string name, string domain, int managerId, object userState) - { - if ((this.CreateDistributionListOperationCompleted == null)) - { + public void CreateDistributionListAsync(int itemId, string displayName, string name, string domain, int managerId, object userState) { + if ((this.CreateDistributionListOperationCompleted == null)) { this.CreateDistributionListOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateDistributionListOperationCompleted); } this.InvokeAsync("CreateDistributionList", new object[] { @@ -4875,124 +4826,105 @@ namespace WebsitePanel.EnterpriseServer domain, managerId}, this.CreateDistributionListOperationCompleted, userState); } - - private void OnCreateDistributionListOperationCompleted(object arg) - { - if ((this.CreateDistributionListCompleted != null)) - { + + private void OnCreateDistributionListOperationCompleted(object arg) { + if ((this.CreateDistributionListCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.CreateDistributionListCompleted(this, new CreateDistributionListCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteDistributionList", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int DeleteDistributionList(int itemId, int accountId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteDistributionList", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DeleteDistributionList(int itemId, int accountId) { object[] results = this.Invoke("DeleteDistributionList", new object[] { itemId, accountId}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginDeleteDistributionList(int itemId, int accountId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginDeleteDistributionList(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("DeleteDistributionList", new object[] { itemId, accountId}, callback, asyncState); } - + /// - public int EndDeleteDistributionList(System.IAsyncResult asyncResult) - { + public int EndDeleteDistributionList(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void DeleteDistributionListAsync(int itemId, int accountId) - { + public void DeleteDistributionListAsync(int itemId, int accountId) { this.DeleteDistributionListAsync(itemId, accountId, null); } - + /// - public void DeleteDistributionListAsync(int itemId, int accountId, object userState) - { - if ((this.DeleteDistributionListOperationCompleted == null)) - { + public void DeleteDistributionListAsync(int itemId, int accountId, object userState) { + if ((this.DeleteDistributionListOperationCompleted == null)) { this.DeleteDistributionListOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteDistributionListOperationCompleted); } this.InvokeAsync("DeleteDistributionList", new object[] { itemId, accountId}, this.DeleteDistributionListOperationCompleted, userState); } - - private void OnDeleteDistributionListOperationCompleted(object arg) - { - if ((this.DeleteDistributionListCompleted != null)) - { + + private void OnDeleteDistributionListOperationCompleted(object arg) { + if ((this.DeleteDistributionListCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeleteDistributionListCompleted(this, new DeleteDistributionListCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetDistributionListGeneralSettings", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeDistributionList GetDistributionListGeneralSettings(int itemId, int accountId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetDistributionListGeneralSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeDistributionList GetDistributionListGeneralSettings(int itemId, int accountId) { object[] results = this.Invoke("GetDistributionListGeneralSettings", new object[] { itemId, accountId}); return ((ExchangeDistributionList)(results[0])); } - + /// - public System.IAsyncResult BeginGetDistributionListGeneralSettings(int itemId, int accountId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetDistributionListGeneralSettings(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetDistributionListGeneralSettings", new object[] { itemId, accountId}, callback, asyncState); } - + /// - public ExchangeDistributionList EndGetDistributionListGeneralSettings(System.IAsyncResult asyncResult) - { + public ExchangeDistributionList EndGetDistributionListGeneralSettings(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((ExchangeDistributionList)(results[0])); } - + /// - public void GetDistributionListGeneralSettingsAsync(int itemId, int accountId) - { + public void GetDistributionListGeneralSettingsAsync(int itemId, int accountId) { this.GetDistributionListGeneralSettingsAsync(itemId, accountId, null); } - + /// - public void GetDistributionListGeneralSettingsAsync(int itemId, int accountId, object userState) - { - if ((this.GetDistributionListGeneralSettingsOperationCompleted == null)) - { + public void GetDistributionListGeneralSettingsAsync(int itemId, int accountId, object userState) { + if ((this.GetDistributionListGeneralSettingsOperationCompleted == null)) { this.GetDistributionListGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetDistributionListGeneralSettingsOperationCompleted); } this.InvokeAsync("GetDistributionListGeneralSettings", new object[] { itemId, accountId}, this.GetDistributionListGeneralSettingsOperationCompleted, userState); } - - private void OnGetDistributionListGeneralSettingsOperationCompleted(object arg) - { - if ((this.GetDistributionListGeneralSettingsCompleted != null)) - { + + private void OnGetDistributionListGeneralSettingsOperationCompleted(object arg) { + if ((this.GetDistributionListGeneralSettingsCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetDistributionListGeneralSettingsCompleted(this, new GetDistributionListGeneralSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetDistributionListGeneralSettings", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int SetDistributionListGeneralSettings(int itemId, int accountId, string displayName, bool hideAddressBook, string managerAccount, string[] memberAccounts, string notes) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetDistributionListGeneralSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int SetDistributionListGeneralSettings(int itemId, int accountId, string displayName, bool hideAddressBook, string managerAccount, string[] memberAccounts, string notes) { object[] results = this.Invoke("SetDistributionListGeneralSettings", new object[] { itemId, accountId, @@ -5003,10 +4935,9 @@ namespace WebsitePanel.EnterpriseServer notes}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginSetDistributionListGeneralSettings(int itemId, int accountId, string displayName, bool hideAddressBook, string managerAccount, string[] memberAccounts, string notes, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginSetDistributionListGeneralSettings(int itemId, int accountId, string displayName, bool hideAddressBook, string managerAccount, string[] memberAccounts, string notes, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("SetDistributionListGeneralSettings", new object[] { itemId, accountId, @@ -5016,25 +4947,21 @@ namespace WebsitePanel.EnterpriseServer memberAccounts, notes}, callback, asyncState); } - + /// - public int EndSetDistributionListGeneralSettings(System.IAsyncResult asyncResult) - { + public int EndSetDistributionListGeneralSettings(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void SetDistributionListGeneralSettingsAsync(int itemId, int accountId, string displayName, bool hideAddressBook, string managerAccount, string[] memberAccounts, string notes) - { + public void SetDistributionListGeneralSettingsAsync(int itemId, int accountId, string displayName, bool hideAddressBook, string managerAccount, string[] memberAccounts, string notes) { this.SetDistributionListGeneralSettingsAsync(itemId, accountId, displayName, hideAddressBook, managerAccount, memberAccounts, notes, null); } - + /// - public void SetDistributionListGeneralSettingsAsync(int itemId, int accountId, string displayName, bool hideAddressBook, string managerAccount, string[] memberAccounts, string notes, object userState) - { - if ((this.SetDistributionListGeneralSettingsOperationCompleted == null)) - { + public void SetDistributionListGeneralSettingsAsync(int itemId, int accountId, string displayName, bool hideAddressBook, string managerAccount, string[] memberAccounts, string notes, object userState) { + if ((this.SetDistributionListGeneralSettingsOperationCompleted == null)) { this.SetDistributionListGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetDistributionListGeneralSettingsOperationCompleted); } this.InvokeAsync("SetDistributionListGeneralSettings", new object[] { @@ -5046,72 +4973,61 @@ namespace WebsitePanel.EnterpriseServer memberAccounts, notes}, this.SetDistributionListGeneralSettingsOperationCompleted, userState); } - - private void OnSetDistributionListGeneralSettingsOperationCompleted(object arg) - { - if ((this.SetDistributionListGeneralSettingsCompleted != null)) - { + + private void OnSetDistributionListGeneralSettingsOperationCompleted(object arg) { + if ((this.SetDistributionListGeneralSettingsCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetDistributionListGeneralSettingsCompleted(this, new SetDistributionListGeneralSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetDistributionListMailFlowSettings", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeDistributionList GetDistributionListMailFlowSettings(int itemId, int accountId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetDistributionListMailFlowSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeDistributionList GetDistributionListMailFlowSettings(int itemId, int accountId) { object[] results = this.Invoke("GetDistributionListMailFlowSettings", new object[] { itemId, accountId}); return ((ExchangeDistributionList)(results[0])); } - + /// - public System.IAsyncResult BeginGetDistributionListMailFlowSettings(int itemId, int accountId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetDistributionListMailFlowSettings(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetDistributionListMailFlowSettings", new object[] { itemId, accountId}, callback, asyncState); } - + /// - public ExchangeDistributionList EndGetDistributionListMailFlowSettings(System.IAsyncResult asyncResult) - { + public ExchangeDistributionList EndGetDistributionListMailFlowSettings(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((ExchangeDistributionList)(results[0])); } - + /// - public void GetDistributionListMailFlowSettingsAsync(int itemId, int accountId) - { + public void GetDistributionListMailFlowSettingsAsync(int itemId, int accountId) { this.GetDistributionListMailFlowSettingsAsync(itemId, accountId, null); } - + /// - public void GetDistributionListMailFlowSettingsAsync(int itemId, int accountId, object userState) - { - if ((this.GetDistributionListMailFlowSettingsOperationCompleted == null)) - { + public void GetDistributionListMailFlowSettingsAsync(int itemId, int accountId, object userState) { + if ((this.GetDistributionListMailFlowSettingsOperationCompleted == null)) { this.GetDistributionListMailFlowSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetDistributionListMailFlowSettingsOperationCompleted); } this.InvokeAsync("GetDistributionListMailFlowSettings", new object[] { itemId, accountId}, this.GetDistributionListMailFlowSettingsOperationCompleted, userState); } - - private void OnGetDistributionListMailFlowSettingsOperationCompleted(object arg) - { - if ((this.GetDistributionListMailFlowSettingsCompleted != null)) - { + + private void OnGetDistributionListMailFlowSettingsOperationCompleted(object arg) { + if ((this.GetDistributionListMailFlowSettingsCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetDistributionListMailFlowSettingsCompleted(this, new GetDistributionListMailFlowSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetDistributionListMailFlowSettings", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int SetDistributionListMailFlowSettings(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetDistributionListMailFlowSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int SetDistributionListMailFlowSettings(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) { object[] results = this.Invoke("SetDistributionListMailFlowSettings", new object[] { itemId, accountId, @@ -5120,10 +5036,9 @@ namespace WebsitePanel.EnterpriseServer requireSenderAuthentication}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginSetDistributionListMailFlowSettings(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginSetDistributionListMailFlowSettings(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("SetDistributionListMailFlowSettings", new object[] { itemId, accountId, @@ -5131,25 +5046,21 @@ namespace WebsitePanel.EnterpriseServer rejectAccounts, requireSenderAuthentication}, callback, asyncState); } - + /// - public int EndSetDistributionListMailFlowSettings(System.IAsyncResult asyncResult) - { + public int EndSetDistributionListMailFlowSettings(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void SetDistributionListMailFlowSettingsAsync(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) - { + public void SetDistributionListMailFlowSettingsAsync(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) { this.SetDistributionListMailFlowSettingsAsync(itemId, accountId, acceptAccounts, rejectAccounts, requireSenderAuthentication, null); } - + /// - public void SetDistributionListMailFlowSettingsAsync(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, object userState) - { - if ((this.SetDistributionListMailFlowSettingsOperationCompleted == null)) - { + public void SetDistributionListMailFlowSettingsAsync(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, object userState) { + if ((this.SetDistributionListMailFlowSettingsOperationCompleted == null)) { this.SetDistributionListMailFlowSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetDistributionListMailFlowSettingsOperationCompleted); } this.InvokeAsync("SetDistributionListMailFlowSettings", new object[] { @@ -5159,106 +5070,90 @@ namespace WebsitePanel.EnterpriseServer rejectAccounts, requireSenderAuthentication}, this.SetDistributionListMailFlowSettingsOperationCompleted, userState); } - - private void OnSetDistributionListMailFlowSettingsOperationCompleted(object arg) - { - if ((this.SetDistributionListMailFlowSettingsCompleted != null)) - { + + private void OnSetDistributionListMailFlowSettingsOperationCompleted(object arg) { + if ((this.SetDistributionListMailFlowSettingsCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetDistributionListMailFlowSettingsCompleted(this, new SetDistributionListMailFlowSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetDistributionListEmailAddresses", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeEmailAddress[] GetDistributionListEmailAddresses(int itemId, int accountId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetDistributionListEmailAddresses", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeEmailAddress[] GetDistributionListEmailAddresses(int itemId, int accountId) { object[] results = this.Invoke("GetDistributionListEmailAddresses", new object[] { itemId, accountId}); return ((ExchangeEmailAddress[])(results[0])); } - + /// - public System.IAsyncResult BeginGetDistributionListEmailAddresses(int itemId, int accountId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetDistributionListEmailAddresses(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetDistributionListEmailAddresses", new object[] { itemId, accountId}, callback, asyncState); } - + /// - public ExchangeEmailAddress[] EndGetDistributionListEmailAddresses(System.IAsyncResult asyncResult) - { + public ExchangeEmailAddress[] EndGetDistributionListEmailAddresses(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((ExchangeEmailAddress[])(results[0])); } - + /// - public void GetDistributionListEmailAddressesAsync(int itemId, int accountId) - { + public void GetDistributionListEmailAddressesAsync(int itemId, int accountId) { this.GetDistributionListEmailAddressesAsync(itemId, accountId, null); } - + /// - public void GetDistributionListEmailAddressesAsync(int itemId, int accountId, object userState) - { - if ((this.GetDistributionListEmailAddressesOperationCompleted == null)) - { + public void GetDistributionListEmailAddressesAsync(int itemId, int accountId, object userState) { + if ((this.GetDistributionListEmailAddressesOperationCompleted == null)) { this.GetDistributionListEmailAddressesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetDistributionListEmailAddressesOperationCompleted); } this.InvokeAsync("GetDistributionListEmailAddresses", new object[] { itemId, accountId}, this.GetDistributionListEmailAddressesOperationCompleted, userState); } - - private void OnGetDistributionListEmailAddressesOperationCompleted(object arg) - { - if ((this.GetDistributionListEmailAddressesCompleted != null)) - { + + private void OnGetDistributionListEmailAddressesOperationCompleted(object arg) { + if ((this.GetDistributionListEmailAddressesCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetDistributionListEmailAddressesCompleted(this, new GetDistributionListEmailAddressesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddDistributionListEmailAddress", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int AddDistributionListEmailAddress(int itemId, int accountId, string emailAddress) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddDistributionListEmailAddress", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int AddDistributionListEmailAddress(int itemId, int accountId, string emailAddress) { object[] results = this.Invoke("AddDistributionListEmailAddress", new object[] { itemId, accountId, emailAddress}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginAddDistributionListEmailAddress(int itemId, int accountId, string emailAddress, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginAddDistributionListEmailAddress(int itemId, int accountId, string emailAddress, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("AddDistributionListEmailAddress", new object[] { itemId, accountId, emailAddress}, callback, asyncState); } - + /// - public int EndAddDistributionListEmailAddress(System.IAsyncResult asyncResult) - { + public int EndAddDistributionListEmailAddress(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void AddDistributionListEmailAddressAsync(int itemId, int accountId, string emailAddress) - { + public void AddDistributionListEmailAddressAsync(int itemId, int accountId, string emailAddress) { this.AddDistributionListEmailAddressAsync(itemId, accountId, emailAddress, null); } - + /// - public void AddDistributionListEmailAddressAsync(int itemId, int accountId, string emailAddress, object userState) - { - if ((this.AddDistributionListEmailAddressOperationCompleted == null)) - { + public void AddDistributionListEmailAddressAsync(int itemId, int accountId, string emailAddress, object userState) { + if ((this.AddDistributionListEmailAddressOperationCompleted == null)) { this.AddDistributionListEmailAddressOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddDistributionListEmailAddressOperationCompleted); } this.InvokeAsync("AddDistributionListEmailAddress", new object[] { @@ -5266,55 +5161,47 @@ namespace WebsitePanel.EnterpriseServer accountId, emailAddress}, this.AddDistributionListEmailAddressOperationCompleted, userState); } - - private void OnAddDistributionListEmailAddressOperationCompleted(object arg) - { - if ((this.AddDistributionListEmailAddressCompleted != null)) - { + + private void OnAddDistributionListEmailAddressOperationCompleted(object arg) { + if ((this.AddDistributionListEmailAddressCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.AddDistributionListEmailAddressCompleted(this, new AddDistributionListEmailAddressCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetDistributionListPrimaryEmailAddre" + - "ss", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int SetDistributionListPrimaryEmailAddress(int itemId, int accountId, string emailAddress) - { + "ss", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int SetDistributionListPrimaryEmailAddress(int itemId, int accountId, string emailAddress) { object[] results = this.Invoke("SetDistributionListPrimaryEmailAddress", new object[] { itemId, accountId, emailAddress}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginSetDistributionListPrimaryEmailAddress(int itemId, int accountId, string emailAddress, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginSetDistributionListPrimaryEmailAddress(int itemId, int accountId, string emailAddress, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("SetDistributionListPrimaryEmailAddress", new object[] { itemId, accountId, emailAddress}, callback, asyncState); } - + /// - public int EndSetDistributionListPrimaryEmailAddress(System.IAsyncResult asyncResult) - { + public int EndSetDistributionListPrimaryEmailAddress(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void SetDistributionListPrimaryEmailAddressAsync(int itemId, int accountId, string emailAddress) - { + public void SetDistributionListPrimaryEmailAddressAsync(int itemId, int accountId, string emailAddress) { this.SetDistributionListPrimaryEmailAddressAsync(itemId, accountId, emailAddress, null); } - + /// - public void SetDistributionListPrimaryEmailAddressAsync(int itemId, int accountId, string emailAddress, object userState) - { - if ((this.SetDistributionListPrimaryEmailAddressOperationCompleted == null)) - { + public void SetDistributionListPrimaryEmailAddressAsync(int itemId, int accountId, string emailAddress, object userState) { + if ((this.SetDistributionListPrimaryEmailAddressOperationCompleted == null)) { this.SetDistributionListPrimaryEmailAddressOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetDistributionListPrimaryEmailAddressOperationCompleted); } this.InvokeAsync("SetDistributionListPrimaryEmailAddress", new object[] { @@ -5322,55 +5209,47 @@ namespace WebsitePanel.EnterpriseServer accountId, emailAddress}, this.SetDistributionListPrimaryEmailAddressOperationCompleted, userState); } - - private void OnSetDistributionListPrimaryEmailAddressOperationCompleted(object arg) - { - if ((this.SetDistributionListPrimaryEmailAddressCompleted != null)) - { + + private void OnSetDistributionListPrimaryEmailAddressOperationCompleted(object arg) { + if ((this.SetDistributionListPrimaryEmailAddressCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetDistributionListPrimaryEmailAddressCompleted(this, new SetDistributionListPrimaryEmailAddressCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteDistributionListEmailAddresses" + - "", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int DeleteDistributionListEmailAddresses(int itemId, int accountId, string[] emailAddresses) - { + "", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DeleteDistributionListEmailAddresses(int itemId, int accountId, string[] emailAddresses) { object[] results = this.Invoke("DeleteDistributionListEmailAddresses", new object[] { itemId, accountId, emailAddresses}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginDeleteDistributionListEmailAddresses(int itemId, int accountId, string[] emailAddresses, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginDeleteDistributionListEmailAddresses(int itemId, int accountId, string[] emailAddresses, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("DeleteDistributionListEmailAddresses", new object[] { itemId, accountId, emailAddresses}, callback, asyncState); } - + /// - public int EndDeleteDistributionListEmailAddresses(System.IAsyncResult asyncResult) - { + public int EndDeleteDistributionListEmailAddresses(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void DeleteDistributionListEmailAddressesAsync(int itemId, int accountId, string[] emailAddresses) - { + public void DeleteDistributionListEmailAddressesAsync(int itemId, int accountId, string[] emailAddresses) { this.DeleteDistributionListEmailAddressesAsync(itemId, accountId, emailAddresses, null); } - + /// - public void DeleteDistributionListEmailAddressesAsync(int itemId, int accountId, string[] emailAddresses, object userState) - { - if ((this.DeleteDistributionListEmailAddressesOperationCompleted == null)) - { + public void DeleteDistributionListEmailAddressesAsync(int itemId, int accountId, string[] emailAddresses, object userState) { + if ((this.DeleteDistributionListEmailAddressesOperationCompleted == null)) { this.DeleteDistributionListEmailAddressesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteDistributionListEmailAddressesOperationCompleted); } this.InvokeAsync("DeleteDistributionListEmailAddresses", new object[] { @@ -5378,20 +5257,17 @@ namespace WebsitePanel.EnterpriseServer accountId, emailAddresses}, this.DeleteDistributionListEmailAddressesOperationCompleted, userState); } - - private void OnDeleteDistributionListEmailAddressesOperationCompleted(object arg) - { - if ((this.DeleteDistributionListEmailAddressesCompleted != null)) - { + + private void OnDeleteDistributionListEmailAddressesOperationCompleted(object arg) { + if ((this.DeleteDistributionListEmailAddressesCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeleteDistributionListEmailAddressesCompleted(this, new DeleteDistributionListEmailAddressesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetDistributionListPermissions", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ResultObject SetDistributionListPermissions(int itemId, int accountId, string[] sendAsAccounts, string[] sendOnBehalfAccounts) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetDistributionListPermissions", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ResultObject SetDistributionListPermissions(int itemId, int accountId, string[] sendAsAccounts, string[] sendOnBehalfAccounts) { object[] results = this.Invoke("SetDistributionListPermissions", new object[] { itemId, accountId, @@ -5399,35 +5275,30 @@ namespace WebsitePanel.EnterpriseServer sendOnBehalfAccounts}); return ((ResultObject)(results[0])); } - + /// - public System.IAsyncResult BeginSetDistributionListPermissions(int itemId, int accountId, string[] sendAsAccounts, string[] sendOnBehalfAccounts, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginSetDistributionListPermissions(int itemId, int accountId, string[] sendAsAccounts, string[] sendOnBehalfAccounts, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("SetDistributionListPermissions", new object[] { itemId, accountId, sendAsAccounts, sendOnBehalfAccounts}, callback, asyncState); } - + /// - public ResultObject EndSetDistributionListPermissions(System.IAsyncResult asyncResult) - { + public ResultObject EndSetDistributionListPermissions(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((ResultObject)(results[0])); } - + /// - public void SetDistributionListPermissionsAsync(int itemId, int accountId, string[] sendAsAccounts, string[] sendOnBehalfAccounts) - { + public void SetDistributionListPermissionsAsync(int itemId, int accountId, string[] sendAsAccounts, string[] sendOnBehalfAccounts) { this.SetDistributionListPermissionsAsync(itemId, accountId, sendAsAccounts, sendOnBehalfAccounts, null); } - + /// - public void SetDistributionListPermissionsAsync(int itemId, int accountId, string[] sendAsAccounts, string[] sendOnBehalfAccounts, object userState) - { - if ((this.SetDistributionListPermissionsOperationCompleted == null)) - { + public void SetDistributionListPermissionsAsync(int itemId, int accountId, string[] sendAsAccounts, string[] sendOnBehalfAccounts, object userState) { + if ((this.SetDistributionListPermissionsOperationCompleted == null)) { this.SetDistributionListPermissionsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetDistributionListPermissionsOperationCompleted); } this.InvokeAsync("SetDistributionListPermissions", new object[] { @@ -5436,2953 +5307,2825 @@ namespace WebsitePanel.EnterpriseServer sendAsAccounts, sendOnBehalfAccounts}, this.SetDistributionListPermissionsOperationCompleted, userState); } - - private void OnSetDistributionListPermissionsOperationCompleted(object arg) - { - if ((this.SetDistributionListPermissionsCompleted != null)) - { + + private void OnSetDistributionListPermissionsOperationCompleted(object arg) { + if ((this.SetDistributionListPermissionsCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetDistributionListPermissionsCompleted(this, new SetDistributionListPermissionsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetDistributionListPermissions", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeDistributionListResult GetDistributionListPermissions(int itemId, int accountId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetDistributionListPermissions", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeDistributionListResult GetDistributionListPermissions(int itemId, int accountId) { object[] results = this.Invoke("GetDistributionListPermissions", new object[] { itemId, accountId}); return ((ExchangeDistributionListResult)(results[0])); } - + /// - public System.IAsyncResult BeginGetDistributionListPermissions(int itemId, int accountId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetDistributionListPermissions(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetDistributionListPermissions", new object[] { itemId, accountId}, callback, asyncState); } - + /// - public ExchangeDistributionListResult EndGetDistributionListPermissions(System.IAsyncResult asyncResult) - { + public ExchangeDistributionListResult EndGetDistributionListPermissions(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((ExchangeDistributionListResult)(results[0])); } - + /// - public void GetDistributionListPermissionsAsync(int itemId, int accountId) - { + public void GetDistributionListPermissionsAsync(int itemId, int accountId) { this.GetDistributionListPermissionsAsync(itemId, accountId, null); } - + /// - public void GetDistributionListPermissionsAsync(int itemId, int accountId, object userState) - { - if ((this.GetDistributionListPermissionsOperationCompleted == null)) - { + public void GetDistributionListPermissionsAsync(int itemId, int accountId, object userState) { + if ((this.GetDistributionListPermissionsOperationCompleted == null)) { this.GetDistributionListPermissionsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetDistributionListPermissionsOperationCompleted); } this.InvokeAsync("GetDistributionListPermissions", new object[] { itemId, accountId}, this.GetDistributionListPermissionsOperationCompleted, userState); } - - private void OnGetDistributionListPermissionsOperationCompleted(object arg) - { - if ((this.GetDistributionListPermissionsCompleted != null)) - { + + private void OnGetDistributionListPermissionsOperationCompleted(object arg) { + if ((this.GetDistributionListPermissionsCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetDistributionListPermissionsCompleted(this, new GetDistributionListPermissionsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetDistributionListsByMember", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeAccount[] GetDistributionListsByMember(int itemId, int accountId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetDistributionListsByMember", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeAccount[] GetDistributionListsByMember(int itemId, int accountId) { object[] results = this.Invoke("GetDistributionListsByMember", new object[] { itemId, accountId}); return ((ExchangeAccount[])(results[0])); } + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddDistributionListMember", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int AddDistributionListMember(int itemId, string distributionListName, int memberId) - { + public System.IAsyncResult BeginGetDistributionListsByMember(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetDistributionListsByMember", new object[] { + itemId, + accountId}, callback, asyncState); + } + + /// + public ExchangeAccount[] EndGetDistributionListsByMember(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((ExchangeAccount[])(results[0])); + } + + /// + public void GetDistributionListsByMemberAsync(int itemId, int accountId) { + this.GetDistributionListsByMemberAsync(itemId, accountId, null); + } + + /// + public void GetDistributionListsByMemberAsync(int itemId, int accountId, object userState) { + if ((this.GetDistributionListsByMemberOperationCompleted == null)) { + this.GetDistributionListsByMemberOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetDistributionListsByMemberOperationCompleted); + } + this.InvokeAsync("GetDistributionListsByMember", new object[] { + itemId, + accountId}, this.GetDistributionListsByMemberOperationCompleted, userState); + } + + private void OnGetDistributionListsByMemberOperationCompleted(object arg) { + if ((this.GetDistributionListsByMemberCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetDistributionListsByMemberCompleted(this, new GetDistributionListsByMemberCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddDistributionListMember", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int AddDistributionListMember(int itemId, string distributionListName, int memberId) { object[] results = this.Invoke("AddDistributionListMember", new object[] { itemId, distributionListName, memberId}); return ((int)(results[0])); } + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteDistributionListMember", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int DeleteDistributionListMember(int itemId, string distributionListName, int memberId) - { + public System.IAsyncResult BeginAddDistributionListMember(int itemId, string distributionListName, int memberId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("AddDistributionListMember", new object[] { + itemId, + distributionListName, + memberId}, callback, asyncState); + } + + /// + public int EndAddDistributionListMember(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((int)(results[0])); + } + + /// + public void AddDistributionListMemberAsync(int itemId, string distributionListName, int memberId) { + this.AddDistributionListMemberAsync(itemId, distributionListName, memberId, null); + } + + /// + public void AddDistributionListMemberAsync(int itemId, string distributionListName, int memberId, object userState) { + if ((this.AddDistributionListMemberOperationCompleted == null)) { + this.AddDistributionListMemberOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddDistributionListMemberOperationCompleted); + } + this.InvokeAsync("AddDistributionListMember", new object[] { + itemId, + distributionListName, + memberId}, this.AddDistributionListMemberOperationCompleted, userState); + } + + private void OnAddDistributionListMemberOperationCompleted(object arg) { + if ((this.AddDistributionListMemberCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.AddDistributionListMemberCompleted(this, new AddDistributionListMemberCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteDistributionListMember", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DeleteDistributionListMember(int itemId, string distributionListName, int memberId) { object[] results = this.Invoke("DeleteDistributionListMember", new object[] { itemId, distributionListName, memberId}); return ((int)(results[0])); } - - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMobileDevices", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeMobileDevice[] GetMobileDevices(int itemId, int accountId) - { + public System.IAsyncResult BeginDeleteDistributionListMember(int itemId, string distributionListName, int memberId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("DeleteDistributionListMember", new object[] { + itemId, + distributionListName, + memberId}, callback, asyncState); + } + + /// + public int EndDeleteDistributionListMember(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((int)(results[0])); + } + + /// + public void DeleteDistributionListMemberAsync(int itemId, string distributionListName, int memberId) { + this.DeleteDistributionListMemberAsync(itemId, distributionListName, memberId, null); + } + + /// + public void DeleteDistributionListMemberAsync(int itemId, string distributionListName, int memberId, object userState) { + if ((this.DeleteDistributionListMemberOperationCompleted == null)) { + this.DeleteDistributionListMemberOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteDistributionListMemberOperationCompleted); + } + this.InvokeAsync("DeleteDistributionListMember", new object[] { + itemId, + distributionListName, + memberId}, this.DeleteDistributionListMemberOperationCompleted, userState); + } + + private void OnDeleteDistributionListMemberOperationCompleted(object arg) { + if ((this.DeleteDistributionListMemberCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.DeleteDistributionListMemberCompleted(this, new DeleteDistributionListMemberCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMobileDevices", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeMobileDevice[] GetMobileDevices(int itemId, int accountId) { object[] results = this.Invoke("GetMobileDevices", new object[] { itemId, accountId}); return ((ExchangeMobileDevice[])(results[0])); } - + /// - public System.IAsyncResult BeginGetMobileDevices(int itemId, int accountId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetMobileDevices(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetMobileDevices", new object[] { itemId, accountId}, callback, asyncState); } - + /// - public ExchangeMobileDevice[] EndGetMobileDevices(System.IAsyncResult asyncResult) - { + public ExchangeMobileDevice[] EndGetMobileDevices(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((ExchangeMobileDevice[])(results[0])); } - + /// - public void GetMobileDevicesAsync(int itemId, int accountId) - { + public void GetMobileDevicesAsync(int itemId, int accountId) { this.GetMobileDevicesAsync(itemId, accountId, null); } - + /// - public void GetMobileDevicesAsync(int itemId, int accountId, object userState) - { - if ((this.GetMobileDevicesOperationCompleted == null)) - { + public void GetMobileDevicesAsync(int itemId, int accountId, object userState) { + if ((this.GetMobileDevicesOperationCompleted == null)) { this.GetMobileDevicesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetMobileDevicesOperationCompleted); } this.InvokeAsync("GetMobileDevices", new object[] { itemId, accountId}, this.GetMobileDevicesOperationCompleted, userState); } - - private void OnGetMobileDevicesOperationCompleted(object arg) - { - if ((this.GetMobileDevicesCompleted != null)) - { + + private void OnGetMobileDevicesOperationCompleted(object arg) { + if ((this.GetMobileDevicesCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetMobileDevicesCompleted(this, new GetMobileDevicesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMobileDevice", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeMobileDevice GetMobileDevice(int itemId, string deviceId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMobileDevice", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeMobileDevice GetMobileDevice(int itemId, string deviceId) { object[] results = this.Invoke("GetMobileDevice", new object[] { itemId, deviceId}); return ((ExchangeMobileDevice)(results[0])); } - + /// - public System.IAsyncResult BeginGetMobileDevice(int itemId, string deviceId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetMobileDevice(int itemId, string deviceId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetMobileDevice", new object[] { itemId, deviceId}, callback, asyncState); } - + /// - public ExchangeMobileDevice EndGetMobileDevice(System.IAsyncResult asyncResult) - { + public ExchangeMobileDevice EndGetMobileDevice(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((ExchangeMobileDevice)(results[0])); } - + /// - public void GetMobileDeviceAsync(int itemId, string deviceId) - { + public void GetMobileDeviceAsync(int itemId, string deviceId) { this.GetMobileDeviceAsync(itemId, deviceId, null); } - + /// - public void GetMobileDeviceAsync(int itemId, string deviceId, object userState) - { - if ((this.GetMobileDeviceOperationCompleted == null)) - { + public void GetMobileDeviceAsync(int itemId, string deviceId, object userState) { + if ((this.GetMobileDeviceOperationCompleted == null)) { this.GetMobileDeviceOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetMobileDeviceOperationCompleted); } this.InvokeAsync("GetMobileDevice", new object[] { itemId, deviceId}, this.GetMobileDeviceOperationCompleted, userState); } - - private void OnGetMobileDeviceOperationCompleted(object arg) - { - if ((this.GetMobileDeviceCompleted != null)) - { + + private void OnGetMobileDeviceOperationCompleted(object arg) { + if ((this.GetMobileDeviceCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetMobileDeviceCompleted(this, new GetMobileDeviceCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/WipeDataFromDevice", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void WipeDataFromDevice(int itemId, string deviceId) - { - this.Invoke("WipeDataFromDevice", new object[] { - itemId, - deviceId}); - } - - /// - public System.IAsyncResult BeginWipeDataFromDevice(int itemId, string deviceId, System.AsyncCallback callback, object asyncState) - { - return this.BeginInvoke("WipeDataFromDevice", new object[] { - itemId, - deviceId}, callback, asyncState); - } - - /// - public void EndWipeDataFromDevice(System.IAsyncResult asyncResult) - { - this.EndInvoke(asyncResult); - } - - /// - public void WipeDataFromDeviceAsync(int itemId, string deviceId) - { - this.WipeDataFromDeviceAsync(itemId, deviceId, null); - } - - /// - public void WipeDataFromDeviceAsync(int itemId, string deviceId, object userState) - { - if ((this.WipeDataFromDeviceOperationCompleted == null)) - { - this.WipeDataFromDeviceOperationCompleted = new System.Threading.SendOrPostCallback(this.OnWipeDataFromDeviceOperationCompleted); - } - this.InvokeAsync("WipeDataFromDevice", new object[] { - itemId, - deviceId}, this.WipeDataFromDeviceOperationCompleted, userState); - } - - private void OnWipeDataFromDeviceOperationCompleted(object arg) - { - if ((this.WipeDataFromDeviceCompleted != null)) - { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.WipeDataFromDeviceCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CancelRemoteWipeRequest", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void CancelRemoteWipeRequest(int itemId, string deviceId) - { - this.Invoke("CancelRemoteWipeRequest", new object[] { - itemId, - deviceId}); - } - - /// - public System.IAsyncResult BeginCancelRemoteWipeRequest(int itemId, string deviceId, System.AsyncCallback callback, object asyncState) - { - return this.BeginInvoke("CancelRemoteWipeRequest", new object[] { - itemId, - deviceId}, callback, asyncState); - } - - /// - public void EndCancelRemoteWipeRequest(System.IAsyncResult asyncResult) - { - this.EndInvoke(asyncResult); - } - - /// - public void CancelRemoteWipeRequestAsync(int itemId, string deviceId) - { - this.CancelRemoteWipeRequestAsync(itemId, deviceId, null); - } - - /// - public void CancelRemoteWipeRequestAsync(int itemId, string deviceId, object userState) - { - if ((this.CancelRemoteWipeRequestOperationCompleted == null)) - { - this.CancelRemoteWipeRequestOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCancelRemoteWipeRequestOperationCompleted); - } - this.InvokeAsync("CancelRemoteWipeRequest", new object[] { - itemId, - deviceId}, this.CancelRemoteWipeRequestOperationCompleted, userState); - } - - private void OnCancelRemoteWipeRequestOperationCompleted(object arg) - { - if ((this.CancelRemoteWipeRequestCompleted != null)) - { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.CancelRemoteWipeRequestCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/RemoveDevice", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void RemoveDevice(int itemId, string deviceId) - { - this.Invoke("RemoveDevice", new object[] { - itemId, - deviceId}); - } - - /// - public System.IAsyncResult BeginRemoveDevice(int itemId, string deviceId, System.AsyncCallback callback, object asyncState) - { - return this.BeginInvoke("RemoveDevice", new object[] { - itemId, - deviceId}, callback, asyncState); - } - - /// - public void EndRemoveDevice(System.IAsyncResult asyncResult) - { - this.EndInvoke(asyncResult); - } - - /// - public void RemoveDeviceAsync(int itemId, string deviceId) - { - this.RemoveDeviceAsync(itemId, deviceId, null); - } - - /// - public void RemoveDeviceAsync(int itemId, string deviceId, object userState) - { - if ((this.RemoveDeviceOperationCompleted == null)) - { - this.RemoveDeviceOperationCompleted = new System.Threading.SendOrPostCallback(this.OnRemoveDeviceOperationCompleted); - } - this.InvokeAsync("RemoveDevice", new object[] { - itemId, - deviceId}, this.RemoveDeviceOperationCompleted, userState); - } - - private void OnRemoveDeviceOperationCompleted(object arg) - { - if ((this.RemoveDeviceCompleted != null)) - { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.RemoveDeviceCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - public new void CancelAsync(object userState) - { + public new void CancelAsync(object userState) { base.CancelAsync(userState); } } - + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void WipeDataFromDeviceCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void CancelRemoteWipeRequestCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void RemoveDeviceCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetExchangeMailboxPlansCompletedEventHandler(object sender, GetExchangeMailboxPlansCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetExchangeMailboxPlansCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetExchangeMailboxPlansCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetExchangeMailboxPlansCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal GetExchangeMailboxPlansCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public ExchangeMailboxPlan[] Result - { - get - { + public ExchangeMailboxPlan[] Result { + get { this.RaiseExceptionIfNecessary(); return ((ExchangeMailboxPlan[])(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetExchangeMailboxPlanCompletedEventHandler(object sender, GetExchangeMailboxPlanCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetExchangeMailboxPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetExchangeMailboxPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetExchangeMailboxPlanCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal GetExchangeMailboxPlanCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public ExchangeMailboxPlan Result - { - get - { + public ExchangeMailboxPlan Result { + get { this.RaiseExceptionIfNecessary(); return ((ExchangeMailboxPlan)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void AddExchangeMailboxPlanCompletedEventHandler(object sender, AddExchangeMailboxPlanCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class AddExchangeMailboxPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class AddExchangeMailboxPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal AddExchangeMailboxPlanCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal AddExchangeMailboxPlanCompletedEventArgs(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.42")] public delegate void UpdateExchangeMailboxPlanCompletedEventHandler(object sender, UpdateExchangeMailboxPlanCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class UpdateExchangeMailboxPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class UpdateExchangeMailboxPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal UpdateExchangeMailboxPlanCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal UpdateExchangeMailboxPlanCompletedEventArgs(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.42")] public delegate void DeleteExchangeMailboxPlanCompletedEventHandler(object sender, DeleteExchangeMailboxPlanCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DeleteExchangeMailboxPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class DeleteExchangeMailboxPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal DeleteExchangeMailboxPlanCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal DeleteExchangeMailboxPlanCompletedEventArgs(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.42")] public delegate void SetOrganizationDefaultExchangeMailboxPlanCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetExchangeRetentionPolicyTagsCompletedEventHandler(object sender, GetExchangeRetentionPolicyTagsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetExchangeRetentionPolicyTagsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetExchangeRetentionPolicyTagsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public ExchangeRetentionPolicyTag[] Result { + get { + this.RaiseExceptionIfNecessary(); + return ((ExchangeRetentionPolicyTag[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetExchangeRetentionPolicyTagCompletedEventHandler(object sender, GetExchangeRetentionPolicyTagCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetExchangeRetentionPolicyTagCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetExchangeRetentionPolicyTagCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public ExchangeRetentionPolicyTag Result { + get { + this.RaiseExceptionIfNecessary(); + return ((ExchangeRetentionPolicyTag)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void AddExchangeRetentionPolicyTagCompletedEventHandler(object sender, AddExchangeRetentionPolicyTagCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class AddExchangeRetentionPolicyTagCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal AddExchangeRetentionPolicyTagCompletedEventArgs(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.42")] + public delegate void UpdateExchangeRetentionPolicyTagCompletedEventHandler(object sender, UpdateExchangeRetentionPolicyTagCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class UpdateExchangeRetentionPolicyTagCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal UpdateExchangeRetentionPolicyTagCompletedEventArgs(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.42")] + public delegate void DeleteExchangeRetentionPolicyTagCompletedEventHandler(object sender, DeleteExchangeRetentionPolicyTagCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class DeleteExchangeRetentionPolicyTagCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal DeleteExchangeRetentionPolicyTagCompletedEventArgs(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.42")] + public delegate void GetExchangeMailboxPlanRetentionPolicyTagsCompletedEventHandler(object sender, GetExchangeMailboxPlanRetentionPolicyTagsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetExchangeMailboxPlanRetentionPolicyTagsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetExchangeMailboxPlanRetentionPolicyTagsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public ExchangeMailboxPlanRetentionPolicyTag[] Result { + get { + this.RaiseExceptionIfNecessary(); + return ((ExchangeMailboxPlanRetentionPolicyTag[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void AddExchangeMailboxPlanRetentionPolicyTagCompletedEventHandler(object sender, AddExchangeMailboxPlanRetentionPolicyTagCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class AddExchangeMailboxPlanRetentionPolicyTagCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal AddExchangeMailboxPlanRetentionPolicyTagCompletedEventArgs(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.42")] + public delegate void DeleteExchangeMailboxPlanRetentionPolicyTagCompletedEventHandler(object sender, DeleteExchangeMailboxPlanRetentionPolicyTagCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class DeleteExchangeMailboxPlanRetentionPolicyTagCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal DeleteExchangeMailboxPlanRetentionPolicyTagCompletedEventArgs(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.42")] public delegate void CreatePublicFolderCompletedEventHandler(object sender, CreatePublicFolderCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class CreatePublicFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class CreatePublicFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal CreatePublicFolderCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal CreatePublicFolderCompletedEventArgs(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.42")] public delegate void DeletePublicFoldersCompletedEventHandler(object sender, DeletePublicFoldersCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DeletePublicFoldersCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class DeletePublicFoldersCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal DeletePublicFoldersCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal DeletePublicFoldersCompletedEventArgs(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.42")] public delegate void DeletePublicFolderCompletedEventHandler(object sender, DeletePublicFolderCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DeletePublicFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class DeletePublicFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal DeletePublicFolderCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal DeletePublicFolderCompletedEventArgs(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.42")] public delegate void EnableMailPublicFolderCompletedEventHandler(object sender, EnableMailPublicFolderCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class EnableMailPublicFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class EnableMailPublicFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal EnableMailPublicFolderCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal EnableMailPublicFolderCompletedEventArgs(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.42")] public delegate void DisableMailPublicFolderCompletedEventHandler(object sender, DisableMailPublicFolderCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DisableMailPublicFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class DisableMailPublicFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal DisableMailPublicFolderCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal DisableMailPublicFolderCompletedEventArgs(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.42")] public delegate void GetPublicFolderGeneralSettingsCompletedEventHandler(object sender, GetPublicFolderGeneralSettingsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetPublicFolderGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetPublicFolderGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetPublicFolderGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal GetPublicFolderGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public ExchangePublicFolder Result - { - get - { + public ExchangePublicFolder Result { + get { this.RaiseExceptionIfNecessary(); return ((ExchangePublicFolder)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetPublicFolderGeneralSettingsCompletedEventHandler(object sender, SetPublicFolderGeneralSettingsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SetPublicFolderGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class SetPublicFolderGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal SetPublicFolderGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal SetPublicFolderGeneralSettingsCompletedEventArgs(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.42")] public delegate void GetPublicFolderMailFlowSettingsCompletedEventHandler(object sender, GetPublicFolderMailFlowSettingsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetPublicFolderMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetPublicFolderMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetPublicFolderMailFlowSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal GetPublicFolderMailFlowSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public ExchangePublicFolder Result - { - get - { + public ExchangePublicFolder Result { + get { this.RaiseExceptionIfNecessary(); return ((ExchangePublicFolder)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetPublicFolderMailFlowSettingsCompletedEventHandler(object sender, SetPublicFolderMailFlowSettingsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SetPublicFolderMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class SetPublicFolderMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal SetPublicFolderMailFlowSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal SetPublicFolderMailFlowSettingsCompletedEventArgs(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.42")] public delegate void GetPublicFolderEmailAddressesCompletedEventHandler(object sender, GetPublicFolderEmailAddressesCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetPublicFolderEmailAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetPublicFolderEmailAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetPublicFolderEmailAddressesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal GetPublicFolderEmailAddressesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public ExchangeEmailAddress[] Result - { - get - { + public ExchangeEmailAddress[] Result { + get { this.RaiseExceptionIfNecessary(); return ((ExchangeEmailAddress[])(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void AddPublicFolderEmailAddressCompletedEventHandler(object sender, AddPublicFolderEmailAddressCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class AddPublicFolderEmailAddressCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class AddPublicFolderEmailAddressCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal AddPublicFolderEmailAddressCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal AddPublicFolderEmailAddressCompletedEventArgs(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.42")] public delegate void SetPublicFolderPrimaryEmailAddressCompletedEventHandler(object sender, SetPublicFolderPrimaryEmailAddressCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SetPublicFolderPrimaryEmailAddressCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class SetPublicFolderPrimaryEmailAddressCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal SetPublicFolderPrimaryEmailAddressCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal SetPublicFolderPrimaryEmailAddressCompletedEventArgs(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.42")] public delegate void DeletePublicFolderEmailAddressesCompletedEventHandler(object sender, DeletePublicFolderEmailAddressesCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DeletePublicFolderEmailAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class DeletePublicFolderEmailAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal DeletePublicFolderEmailAddressesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal DeletePublicFolderEmailAddressesCompletedEventArgs(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.42")] public delegate void AddExchangeDisclaimerCompletedEventHandler(object sender, AddExchangeDisclaimerCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class AddExchangeDisclaimerCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class AddExchangeDisclaimerCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal AddExchangeDisclaimerCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal AddExchangeDisclaimerCompletedEventArgs(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.42")] public delegate void UpdateExchangeDisclaimerCompletedEventHandler(object sender, UpdateExchangeDisclaimerCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class UpdateExchangeDisclaimerCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class UpdateExchangeDisclaimerCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal UpdateExchangeDisclaimerCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal UpdateExchangeDisclaimerCompletedEventArgs(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.42")] public delegate void DeleteExchangeDisclaimerCompletedEventHandler(object sender, DeleteExchangeDisclaimerCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DeleteExchangeDisclaimerCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class DeleteExchangeDisclaimerCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal DeleteExchangeDisclaimerCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal DeleteExchangeDisclaimerCompletedEventArgs(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.42")] public delegate void GetExchangeDisclaimerCompletedEventHandler(object sender, GetExchangeDisclaimerCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetExchangeDisclaimerCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetExchangeDisclaimerCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetExchangeDisclaimerCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal GetExchangeDisclaimerCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public ExchangeDisclaimer Result - { - get - { + public ExchangeDisclaimer Result { + get { this.RaiseExceptionIfNecessary(); return ((ExchangeDisclaimer)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetExchangeDisclaimersCompletedEventHandler(object sender, GetExchangeDisclaimersCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetExchangeDisclaimersCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetExchangeDisclaimersCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetExchangeDisclaimersCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal GetExchangeDisclaimersCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public ExchangeDisclaimer[] Result - { - get - { + public ExchangeDisclaimer[] Result { + get { this.RaiseExceptionIfNecessary(); return ((ExchangeDisclaimer[])(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetExchangeAccountDisclaimerIdCompletedEventHandler(object sender, SetExchangeAccountDisclaimerIdCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SetExchangeAccountDisclaimerIdCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class SetExchangeAccountDisclaimerIdCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal SetExchangeAccountDisclaimerIdCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal SetExchangeAccountDisclaimerIdCompletedEventArgs(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.42")] public delegate void GetExchangeAccountDisclaimerIdCompletedEventHandler(object sender, GetExchangeAccountDisclaimerIdCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetExchangeAccountDisclaimerIdCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetExchangeAccountDisclaimerIdCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetExchangeAccountDisclaimerIdCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal GetExchangeAccountDisclaimerIdCompletedEventArgs(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.42")] public delegate void GetRawExchangeOrganizationsPagedCompletedEventHandler(object sender, GetRawExchangeOrganizationsPagedCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetRawExchangeOrganizationsPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetRawExchangeOrganizationsPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetRawExchangeOrganizationsPagedCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal GetRawExchangeOrganizationsPagedCompletedEventArgs(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.42")] public delegate void GetExchangeOrganizationsPagedCompletedEventHandler(object sender, GetExchangeOrganizationsPagedCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetExchangeOrganizationsPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetExchangeOrganizationsPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetExchangeOrganizationsPagedCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal GetExchangeOrganizationsPagedCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public OrganizationsPaged Result - { - get - { + public OrganizationsPaged Result { + get { this.RaiseExceptionIfNecessary(); return ((OrganizationsPaged)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetExchangeOrganizationsCompletedEventHandler(object sender, GetExchangeOrganizationsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetExchangeOrganizationsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetExchangeOrganizationsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetExchangeOrganizationsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal GetExchangeOrganizationsCompletedEventArgs(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.42")] public delegate void GetOrganizationCompletedEventHandler(object sender, GetOrganizationCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [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.42")] public delegate void GetOrganizationStatisticsCompletedEventHandler(object sender, GetOrganizationStatisticsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [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.42")] public delegate void GetOrganizationStatisticsByOrganizationCompletedEventHandler(object sender, GetOrganizationStatisticsByOrganizationCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [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.42")] public delegate void DeleteOrganizationCompletedEventHandler(object sender, DeleteOrganizationCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [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.42")] public delegate void GetOrganizationStorageLimitsCompletedEventHandler(object sender, GetOrganizationStorageLimitsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetOrganizationStorageLimitsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetOrganizationStorageLimitsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetOrganizationStorageLimitsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal GetOrganizationStorageLimitsCompletedEventArgs(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.42")] public delegate void SetOrganizationStorageLimitsCompletedEventHandler(object sender, SetOrganizationStorageLimitsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SetOrganizationStorageLimitsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class SetOrganizationStorageLimitsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal SetOrganizationStorageLimitsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal SetOrganizationStorageLimitsCompletedEventArgs(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.42")] public delegate void GetMailboxesStatisticsCompletedEventHandler(object sender, GetMailboxesStatisticsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetMailboxesStatisticsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetMailboxesStatisticsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetMailboxesStatisticsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal GetMailboxesStatisticsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public ExchangeItemStatistics[] Result - { - get - { + public ExchangeItemStatistics[] Result { + get { this.RaiseExceptionIfNecessary(); return ((ExchangeItemStatistics[])(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetMailboxStatisticsCompletedEventHandler(object sender, GetMailboxStatisticsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetMailboxStatisticsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetMailboxStatisticsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetMailboxStatisticsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal GetMailboxStatisticsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public ExchangeMailboxStatistics Result - { - get - { + public ExchangeMailboxStatistics Result { + get { this.RaiseExceptionIfNecessary(); return ((ExchangeMailboxStatistics)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void CalculateOrganizationDiskspaceCompletedEventHandler(object sender, CalculateOrganizationDiskspaceCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class CalculateOrganizationDiskspaceCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class CalculateOrganizationDiskspaceCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal CalculateOrganizationDiskspaceCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal CalculateOrganizationDiskspaceCompletedEventArgs(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.42")] public delegate void GetActiveSyncPolicyCompletedEventHandler(object sender, GetActiveSyncPolicyCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetActiveSyncPolicyCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetActiveSyncPolicyCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetActiveSyncPolicyCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal GetActiveSyncPolicyCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public ExchangeActiveSyncPolicy Result - { - get - { + public ExchangeActiveSyncPolicy Result { + get { this.RaiseExceptionIfNecessary(); return ((ExchangeActiveSyncPolicy)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetActiveSyncPolicyCompletedEventHandler(object sender, SetActiveSyncPolicyCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SetActiveSyncPolicyCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class SetActiveSyncPolicyCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal SetActiveSyncPolicyCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal SetActiveSyncPolicyCompletedEventArgs(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.42")] public delegate void AddAuthoritativeDomainCompletedEventHandler(object sender, AddAuthoritativeDomainCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class AddAuthoritativeDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class AddAuthoritativeDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal AddAuthoritativeDomainCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal AddAuthoritativeDomainCompletedEventArgs(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.42")] public delegate void DeleteAuthoritativeDomainCompletedEventHandler(object sender, DeleteAuthoritativeDomainCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DeleteAuthoritativeDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class DeleteAuthoritativeDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal DeleteAuthoritativeDomainCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal DeleteAuthoritativeDomainCompletedEventArgs(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.42")] public delegate void GetAccountsPagedCompletedEventHandler(object sender, GetAccountsPagedCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetAccountsPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetAccountsPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetAccountsPagedCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal GetAccountsPagedCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public ExchangeAccountsPaged Result - { - get - { + public ExchangeAccountsPaged Result { + get { this.RaiseExceptionIfNecessary(); return ((ExchangeAccountsPaged)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetAccountsCompletedEventHandler(object sender, GetAccountsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetAccountsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetAccountsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetAccountsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal GetAccountsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public ExchangeAccount[] Result - { - get - { + public ExchangeAccount[] Result { + get { this.RaiseExceptionIfNecessary(); return ((ExchangeAccount[])(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetExchangeAccountByMailboxPlanIdCompletedEventHandler(object sender, GetExchangeAccountByMailboxPlanIdCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetExchangeAccountByMailboxPlanIdCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetExchangeAccountByMailboxPlanIdCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetExchangeAccountByMailboxPlanIdCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal GetExchangeAccountByMailboxPlanIdCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public ExchangeAccount[] Result - { - get - { + public ExchangeAccount[] Result { + get { this.RaiseExceptionIfNecessary(); return ((ExchangeAccount[])(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SearchAccountsCompletedEventHandler(object sender, SearchAccountsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [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 ExchangeAccount[] Result - { - get - { + public ExchangeAccount[] Result { + get { this.RaiseExceptionIfNecessary(); return ((ExchangeAccount[])(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetAccountCompletedEventHandler(object sender, GetAccountCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetAccountCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetAccountCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetAccountCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal GetAccountCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public ExchangeAccount Result - { - get - { + public ExchangeAccount Result { + get { this.RaiseExceptionIfNecessary(); return ((ExchangeAccount)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SearchAccountCompletedEventHandler(object sender, SearchAccountCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SearchAccountCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class SearchAccountCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal SearchAccountCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal SearchAccountCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public ExchangeAccount Result - { - get - { + public ExchangeAccount Result { + get { this.RaiseExceptionIfNecessary(); return ((ExchangeAccount)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void CheckAccountCredentialsCompletedEventHandler(object sender, CheckAccountCredentialsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class CheckAccountCredentialsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class CheckAccountCredentialsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal CheckAccountCredentialsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal CheckAccountCredentialsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public bool Result - { - get - { + public bool Result { + get { this.RaiseExceptionIfNecessary(); return ((bool)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void CreateMailboxCompletedEventHandler(object sender, CreateMailboxCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class CreateMailboxCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class CreateMailboxCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal CreateMailboxCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal CreateMailboxCompletedEventArgs(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.42")] public delegate void DeleteMailboxCompletedEventHandler(object sender, DeleteMailboxCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DeleteMailboxCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class DeleteMailboxCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal DeleteMailboxCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal DeleteMailboxCompletedEventArgs(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.42")] public delegate void DisableMailboxCompletedEventHandler(object sender, DisableMailboxCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DisableMailboxCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class DisableMailboxCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal DisableMailboxCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal DisableMailboxCompletedEventArgs(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.42")] public delegate void GetMailboxAdvancedSettingsCompletedEventHandler(object sender, GetMailboxAdvancedSettingsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetMailboxAdvancedSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetMailboxAdvancedSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetMailboxAdvancedSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal GetMailboxAdvancedSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public ExchangeMailbox Result - { - get - { + public ExchangeMailbox Result { + get { this.RaiseExceptionIfNecessary(); return ((ExchangeMailbox)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetMailboxGeneralSettingsCompletedEventHandler(object sender, GetMailboxGeneralSettingsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetMailboxGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetMailboxGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetMailboxGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal GetMailboxGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public ExchangeMailbox Result - { - get - { + public ExchangeMailbox Result { + get { this.RaiseExceptionIfNecessary(); return ((ExchangeMailbox)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetMailboxGeneralSettingsCompletedEventHandler(object sender, SetMailboxGeneralSettingsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SetMailboxGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class SetMailboxGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal SetMailboxGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal SetMailboxGeneralSettingsCompletedEventArgs(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.42")] public delegate void GetMailboxEmailAddressesCompletedEventHandler(object sender, GetMailboxEmailAddressesCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetMailboxEmailAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetMailboxEmailAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetMailboxEmailAddressesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal GetMailboxEmailAddressesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public ExchangeEmailAddress[] Result - { - get - { + public ExchangeEmailAddress[] Result { + get { this.RaiseExceptionIfNecessary(); return ((ExchangeEmailAddress[])(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void AddMailboxEmailAddressCompletedEventHandler(object sender, AddMailboxEmailAddressCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class AddMailboxEmailAddressCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class AddMailboxEmailAddressCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal AddMailboxEmailAddressCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal AddMailboxEmailAddressCompletedEventArgs(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.42")] public delegate void SetMailboxPrimaryEmailAddressCompletedEventHandler(object sender, SetMailboxPrimaryEmailAddressCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SetMailboxPrimaryEmailAddressCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class SetMailboxPrimaryEmailAddressCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal SetMailboxPrimaryEmailAddressCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal SetMailboxPrimaryEmailAddressCompletedEventArgs(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.42")] public delegate void DeleteMailboxEmailAddressesCompletedEventHandler(object sender, DeleteMailboxEmailAddressesCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DeleteMailboxEmailAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class DeleteMailboxEmailAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal DeleteMailboxEmailAddressesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal DeleteMailboxEmailAddressesCompletedEventArgs(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.42")] public delegate void GetMailboxMailFlowSettingsCompletedEventHandler(object sender, GetMailboxMailFlowSettingsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetMailboxMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetMailboxMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetMailboxMailFlowSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal GetMailboxMailFlowSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public ExchangeMailbox Result - { - get - { + public ExchangeMailbox Result { + get { this.RaiseExceptionIfNecessary(); return ((ExchangeMailbox)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetMailboxMailFlowSettingsCompletedEventHandler(object sender, SetMailboxMailFlowSettingsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SetMailboxMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class SetMailboxMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal SetMailboxMailFlowSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal SetMailboxMailFlowSettingsCompletedEventArgs(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.42")] public delegate void SetExchangeMailboxPlanCompletedEventHandler(object sender, SetExchangeMailboxPlanCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SetExchangeMailboxPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class SetExchangeMailboxPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal SetExchangeMailboxPlanCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal SetExchangeMailboxPlanCompletedEventArgs(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.42")] public delegate void GetMailboxSetupInstructionsCompletedEventHandler(object sender, GetMailboxSetupInstructionsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetMailboxSetupInstructionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetMailboxSetupInstructionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetMailboxSetupInstructionsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal GetMailboxSetupInstructionsCompletedEventArgs(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.42")] public delegate void SendMailboxSetupInstructionsCompletedEventHandler(object sender, SendMailboxSetupInstructionsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SendMailboxSetupInstructionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class SendMailboxSetupInstructionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal SendMailboxSetupInstructionsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal SendMailboxSetupInstructionsCompletedEventArgs(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.42")] public delegate void SetMailboxManagerSettingsCompletedEventHandler(object sender, SetMailboxManagerSettingsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SetMailboxManagerSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class SetMailboxManagerSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal SetMailboxManagerSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal SetMailboxManagerSettingsCompletedEventArgs(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.42")] public delegate void GetMailboxPermissionsCompletedEventHandler(object sender, GetMailboxPermissionsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetMailboxPermissionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetMailboxPermissionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetMailboxPermissionsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal GetMailboxPermissionsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public ExchangeMailbox Result - { - get - { + public ExchangeMailbox Result { + get { this.RaiseExceptionIfNecessary(); return ((ExchangeMailbox)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetMailboxPermissionsCompletedEventHandler(object sender, SetMailboxPermissionsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SetMailboxPermissionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class SetMailboxPermissionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal SetMailboxPermissionsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal SetMailboxPermissionsCompletedEventArgs(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.42")] public delegate void CreateContactCompletedEventHandler(object sender, CreateContactCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class CreateContactCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class CreateContactCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal CreateContactCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal CreateContactCompletedEventArgs(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.42")] public delegate void DeleteContactCompletedEventHandler(object sender, DeleteContactCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DeleteContactCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class DeleteContactCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal DeleteContactCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal DeleteContactCompletedEventArgs(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.42")] public delegate void GetContactGeneralSettingsCompletedEventHandler(object sender, GetContactGeneralSettingsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetContactGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetContactGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetContactGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal GetContactGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public ExchangeContact Result - { - get - { + public ExchangeContact Result { + get { this.RaiseExceptionIfNecessary(); return ((ExchangeContact)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetContactGeneralSettingsCompletedEventHandler(object sender, SetContactGeneralSettingsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SetContactGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class SetContactGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal SetContactGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal SetContactGeneralSettingsCompletedEventArgs(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.42")] public delegate void GetContactMailFlowSettingsCompletedEventHandler(object sender, GetContactMailFlowSettingsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetContactMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetContactMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetContactMailFlowSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal GetContactMailFlowSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public ExchangeContact Result - { - get - { + public ExchangeContact Result { + get { this.RaiseExceptionIfNecessary(); return ((ExchangeContact)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetContactMailFlowSettingsCompletedEventHandler(object sender, SetContactMailFlowSettingsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SetContactMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class SetContactMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal SetContactMailFlowSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal SetContactMailFlowSettingsCompletedEventArgs(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.42")] public delegate void CreateDistributionListCompletedEventHandler(object sender, CreateDistributionListCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class CreateDistributionListCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class CreateDistributionListCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal CreateDistributionListCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal CreateDistributionListCompletedEventArgs(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.42")] public delegate void DeleteDistributionListCompletedEventHandler(object sender, DeleteDistributionListCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DeleteDistributionListCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class DeleteDistributionListCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal DeleteDistributionListCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal DeleteDistributionListCompletedEventArgs(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.42")] public delegate void GetDistributionListGeneralSettingsCompletedEventHandler(object sender, GetDistributionListGeneralSettingsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetDistributionListGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetDistributionListGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetDistributionListGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal GetDistributionListGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public ExchangeDistributionList Result - { - get - { + public ExchangeDistributionList Result { + get { this.RaiseExceptionIfNecessary(); return ((ExchangeDistributionList)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetDistributionListGeneralSettingsCompletedEventHandler(object sender, SetDistributionListGeneralSettingsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SetDistributionListGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class SetDistributionListGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal SetDistributionListGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal SetDistributionListGeneralSettingsCompletedEventArgs(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.42")] public delegate void GetDistributionListMailFlowSettingsCompletedEventHandler(object sender, GetDistributionListMailFlowSettingsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetDistributionListMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetDistributionListMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetDistributionListMailFlowSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal GetDistributionListMailFlowSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public ExchangeDistributionList Result - { - get - { + public ExchangeDistributionList Result { + get { this.RaiseExceptionIfNecessary(); return ((ExchangeDistributionList)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetDistributionListMailFlowSettingsCompletedEventHandler(object sender, SetDistributionListMailFlowSettingsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SetDistributionListMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class SetDistributionListMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal SetDistributionListMailFlowSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal SetDistributionListMailFlowSettingsCompletedEventArgs(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.42")] public delegate void GetDistributionListEmailAddressesCompletedEventHandler(object sender, GetDistributionListEmailAddressesCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetDistributionListEmailAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetDistributionListEmailAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetDistributionListEmailAddressesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal GetDistributionListEmailAddressesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public ExchangeEmailAddress[] Result - { - get - { + public ExchangeEmailAddress[] Result { + get { this.RaiseExceptionIfNecessary(); return ((ExchangeEmailAddress[])(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void AddDistributionListEmailAddressCompletedEventHandler(object sender, AddDistributionListEmailAddressCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class AddDistributionListEmailAddressCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class AddDistributionListEmailAddressCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal AddDistributionListEmailAddressCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal AddDistributionListEmailAddressCompletedEventArgs(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.42")] public delegate void SetDistributionListPrimaryEmailAddressCompletedEventHandler(object sender, SetDistributionListPrimaryEmailAddressCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SetDistributionListPrimaryEmailAddressCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class SetDistributionListPrimaryEmailAddressCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal SetDistributionListPrimaryEmailAddressCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal SetDistributionListPrimaryEmailAddressCompletedEventArgs(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.42")] public delegate void DeleteDistributionListEmailAddressesCompletedEventHandler(object sender, DeleteDistributionListEmailAddressesCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DeleteDistributionListEmailAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class DeleteDistributionListEmailAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal DeleteDistributionListEmailAddressesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal DeleteDistributionListEmailAddressesCompletedEventArgs(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.42")] public delegate void SetDistributionListPermissionsCompletedEventHandler(object sender, SetDistributionListPermissionsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SetDistributionListPermissionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class SetDistributionListPermissionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal SetDistributionListPermissionsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal SetDistributionListPermissionsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public ResultObject Result - { - get - { + public ResultObject Result { + get { this.RaiseExceptionIfNecessary(); return ((ResultObject)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetDistributionListPermissionsCompletedEventHandler(object sender, GetDistributionListPermissionsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetDistributionListPermissionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetDistributionListPermissionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetDistributionListPermissionsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal GetDistributionListPermissionsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public ExchangeDistributionListResult Result - { - get - { + public ExchangeDistributionListResult Result { + get { this.RaiseExceptionIfNecessary(); return ((ExchangeDistributionListResult)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void GetMobileDevicesCompletedEventHandler(object sender, GetMobileDevicesCompletedEventArgs e); - + public delegate void GetDistributionListsByMemberCompletedEventHandler(object sender, GetDistributionListsByMemberCompletedEventArgs e); + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetMobileDevicesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetDistributionListsByMemberCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetMobileDevicesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal GetDistributionListsByMemberCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public ExchangeMobileDevice[] Result - { - get - { + public ExchangeAccount[] Result { + get { + this.RaiseExceptionIfNecessary(); + return ((ExchangeAccount[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void AddDistributionListMemberCompletedEventHandler(object sender, AddDistributionListMemberCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class AddDistributionListMemberCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal AddDistributionListMemberCompletedEventArgs(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.42")] + public delegate void DeleteDistributionListMemberCompletedEventHandler(object sender, DeleteDistributionListMemberCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class DeleteDistributionListMemberCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal DeleteDistributionListMemberCompletedEventArgs(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.42")] + public delegate void GetMobileDevicesCompletedEventHandler(object sender, GetMobileDevicesCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetMobileDevicesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetMobileDevicesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public ExchangeMobileDevice[] Result { + get { this.RaiseExceptionIfNecessary(); return ((ExchangeMobileDevice[])(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetMobileDeviceCompletedEventHandler(object sender, GetMobileDeviceCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetMobileDeviceCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetMobileDeviceCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetMobileDeviceCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal GetMobileDeviceCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public ExchangeMobileDevice Result - { - get - { + public ExchangeMobileDevice Result { + get { this.RaiseExceptionIfNecessary(); return ((ExchangeMobileDevice)(this.results[0])); } } } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void WipeDataFromDeviceCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void CancelRemoteWipeRequestCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void RemoveDeviceCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Data/DataProvider.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Data/DataProvider.cs index 0e412178..ff34801b 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Data/DataProvider.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Data/DataProvider.cs @@ -2570,7 +2570,7 @@ namespace WebsitePanel.EnterpriseServer public static void UpdateExchangeAccount(int accountId, string accountName, ExchangeAccountType accountType, string displayName, string primaryEmailAddress, bool mailEnabledPublicFolder, - string mailboxManagerActions, string samAccountName, string accountPassword, int mailboxPlanId, string subscriberNumber) + string mailboxManagerActions, string samAccountName, string accountPassword, int mailboxPlanId, int archivePlanId, string subscriberNumber) { SqlHelper.ExecuteNonQuery( ConnectionString, @@ -2586,6 +2586,7 @@ namespace WebsitePanel.EnterpriseServer new SqlParameter("@Password", string.IsNullOrEmpty(accountPassword) ? (object)DBNull.Value : (object)accountPassword), new SqlParameter("@SamAccountName", samAccountName), new SqlParameter("@MailboxPlanId", (mailboxPlanId == 0) ? (object)DBNull.Value : (object)mailboxPlanId), + new SqlParameter("@ArchivingMailboxPlanId", (archivePlanId < 1) ? (object)DBNull.Value : (object)archivePlanId), new SqlParameter("@SubscriberNumber", (string.IsNullOrEmpty(subscriberNumber) ? (object)DBNull.Value : (object)subscriberNumber)) ); } @@ -2709,7 +2710,7 @@ namespace WebsitePanel.EnterpriseServer } public static DataSet GetExchangeAccountsPaged(int actorId, int itemId, string accountTypes, - string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) + string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, bool archiving) { // check input parameters string[] types = accountTypes.Split(','); @@ -2738,7 +2739,8 @@ namespace WebsitePanel.EnterpriseServer new SqlParameter("@FilterValue", VerifyColumnValue(filterValue)), new SqlParameter("@SortColumn", VerifyColumnName(sortColumn)), new SqlParameter("@StartRow", startRow), - new SqlParameter("@MaximumRows", maximumRows) + new SqlParameter("@MaximumRows", maximumRows), + new SqlParameter("@Archiving", archiving) ); } @@ -2782,7 +2784,8 @@ namespace WebsitePanel.EnterpriseServer public static int AddExchangeMailboxPlan(int itemID, string mailboxPlan, bool enableActiveSync, bool enableIMAP, bool enableMAPI, bool enableOWA, bool enablePOP, bool isDefault, int issueWarningPct, int keepDeletedItemsDays, int mailboxSizeMB, int maxReceiveMessageSizeKB, int maxRecipients, int maxSendMessageSizeKB, int prohibitSendPct, int prohibitSendReceivePct, bool hideFromAddressBook, int mailboxPlanType, - bool enabledLitigationHold, long recoverabelItemsSpace, long recoverabelItemsWarning, string litigationHoldUrl, string litigationHoldMsg) + bool enabledLitigationHold, long recoverabelItemsSpace, long recoverabelItemsWarning, string litigationHoldUrl, string litigationHoldMsg, + bool archiving, bool EnableArchiving) { SqlParameter outParam = new SqlParameter("@MailboxPlanId", SqlDbType.Int); outParam.Direction = ParameterDirection.Output; @@ -2814,7 +2817,9 @@ namespace WebsitePanel.EnterpriseServer new SqlParameter("@RecoverableItemsWarningPct", recoverabelItemsWarning), new SqlParameter("@RecoverableItemsSpace", recoverabelItemsSpace), new SqlParameter("@LitigationHoldUrl", litigationHoldUrl), - new SqlParameter("@LitigationHoldMsg", litigationHoldMsg) + new SqlParameter("@LitigationHoldMsg", litigationHoldMsg), + new SqlParameter("@Archiving", archiving), + new SqlParameter("@EnableArchiving", EnableArchiving) ); return Convert.ToInt32(outParam.Value); @@ -2825,7 +2830,8 @@ namespace WebsitePanel.EnterpriseServer public static void UpdateExchangeMailboxPlan(int mailboxPlanID, string mailboxPlan, bool enableActiveSync, bool enableIMAP, bool enableMAPI, bool enableOWA, bool enablePOP, bool isDefault, int issueWarningPct, int keepDeletedItemsDays, int mailboxSizeMB, int maxReceiveMessageSizeKB, int maxRecipients, int maxSendMessageSizeKB, int prohibitSendPct, int prohibitSendReceivePct, bool hideFromAddressBook, int mailboxPlanType, - bool enabledLitigationHold, long recoverabelItemsSpace, long recoverabelItemsWarning, string litigationHoldUrl, string litigationHoldMsg) + bool enabledLitigationHold, long recoverabelItemsSpace, long recoverabelItemsWarning, string litigationHoldUrl, string litigationHoldMsg, + bool Archiving, bool EnableArchiving) { SqlHelper.ExecuteNonQuery( ConnectionString, @@ -2853,7 +2859,9 @@ namespace WebsitePanel.EnterpriseServer new SqlParameter("@RecoverableItemsWarningPct", recoverabelItemsWarning), new SqlParameter("@RecoverableItemsSpace", recoverabelItemsSpace), new SqlParameter("@LitigationHoldUrl", litigationHoldUrl), - new SqlParameter("@LitigationHoldMsg", litigationHoldMsg) + new SqlParameter("@LitigationHoldMsg", litigationHoldMsg), + new SqlParameter("@Archiving", Archiving), + new SqlParameter("@EnableArchiving", EnableArchiving) ); } @@ -2881,13 +2889,14 @@ namespace WebsitePanel.EnterpriseServer ); } - public static IDataReader GetExchangeMailboxPlans(int itemId) + public static IDataReader GetExchangeMailboxPlans(int itemId, bool archiving) { return SqlHelper.ExecuteReader( ConnectionString, CommandType.StoredProcedure, "GetExchangeMailboxPlans", - new SqlParameter("@ItemID", itemId) + new SqlParameter("@ItemID", itemId), + new SqlParameter("@Archiving", archiving) ); } @@ -2914,17 +2923,124 @@ namespace WebsitePanel.EnterpriseServer ); } - public static void SetExchangeAccountMailboxPlan(int accountId, int mailboxPlanId) + public static void SetExchangeAccountMailboxPlan(int accountId, int mailboxPlanId, int archivePlanId) { SqlHelper.ExecuteNonQuery( ConnectionString, CommandType.StoredProcedure, "SetExchangeAccountMailboxplan", new SqlParameter("@AccountID", accountId), - new SqlParameter("@MailboxPlanId", (mailboxPlanId == 0) ? (object)DBNull.Value : (object)mailboxPlanId) + new SqlParameter("@MailboxPlanId", (mailboxPlanId == 0) ? (object)DBNull.Value : (object)mailboxPlanId), + new SqlParameter("@ArchivingMailboxPlanId", (archivePlanId < 1) ? (object)DBNull.Value : (object)archivePlanId) ); } + #endregion + + #region Exchange Retention Policy Tags + public static int AddExchangeRetentionPolicyTag(int ItemID, string TagName, int TagType, int AgeLimitForRetention, int RetentionAction) + { + SqlParameter outParam = new SqlParameter("@TagID", SqlDbType.Int); + outParam.Direction = ParameterDirection.Output; + + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "AddExchangeRetentionPolicyTag", + outParam, + new SqlParameter("@ItemID", ItemID), + new SqlParameter("@TagName", TagName), + new SqlParameter("@TagType", TagType), + new SqlParameter("@AgeLimitForRetention", AgeLimitForRetention), + new SqlParameter("@RetentionAction", RetentionAction) + ); + + return Convert.ToInt32(outParam.Value); + } + + public static void UpdateExchangeRetentionPolicyTag(int TagID, int ItemID, string TagName, int TagType, int AgeLimitForRetention, int RetentionAction) + { + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "UpdateExchangeRetentionPolicyTag", + new SqlParameter("@TagID", TagID), + new SqlParameter("@ItemID", ItemID), + new SqlParameter("@TagName", TagName), + new SqlParameter("@TagType", TagType), + new SqlParameter("@AgeLimitForRetention", AgeLimitForRetention), + new SqlParameter("@RetentionAction", RetentionAction) + ); + } + + public static void DeleteExchangeRetentionPolicyTag(int TagID) + { + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "DeleteExchangeRetentionPolicyTag", + new SqlParameter("@TagID", TagID) + ); + } + + public static IDataReader GetExchangeRetentionPolicyTag(int TagID) + { + return SqlHelper.ExecuteReader( + ConnectionString, + CommandType.StoredProcedure, + "GetExchangeRetentionPolicyTag", + new SqlParameter("@TagID", TagID) + ); + } + + public static IDataReader GetExchangeRetentionPolicyTags(int itemId) + { + return SqlHelper.ExecuteReader( + ConnectionString, + CommandType.StoredProcedure, + "GetExchangeRetentionPolicyTags", + new SqlParameter("@ItemID", itemId) + ); + } + + public static int AddExchangeMailboxPlanRetentionPolicyTag(int TagID, int MailboxPlanId) + { + SqlParameter outParam = new SqlParameter("@PlanTagID", SqlDbType.Int); + outParam.Direction = ParameterDirection.Output; + + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "AddExchangeMailboxPlanRetentionPolicyTag", + outParam, + new SqlParameter("@TagID", TagID), + new SqlParameter("@MailboxPlanId", MailboxPlanId) + ); + + return Convert.ToInt32(outParam.Value); + } + + public static void DeleteExchangeMailboxPlanRetentionPolicyTag(int PlanTagID) + { + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "DeleteExchangeMailboxPlanRetentionPolicyTag", + new SqlParameter("@PlanTagID", PlanTagID) + ); + } + + public static IDataReader GetExchangeMailboxPlanRetentionPolicyTags(int MailboxPlanId) + { + return SqlHelper.ExecuteReader( + ConnectionString, + CommandType.StoredProcedure, + "GetExchangeMailboxPlanRetentionPolicyTags", + new SqlParameter("@MailboxPlanId", MailboxPlanId) + ); + } + + #endregion #region Exchange Disclaimers diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/ExchangeServer/ExchangeServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/ExchangeServer/ExchangeServerController.cs index daeea8bf..9997dda7 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/ExchangeServer/ExchangeServerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/ExchangeServer/ExchangeServerController.cs @@ -950,7 +950,7 @@ namespace WebsitePanel.EnterpriseServer public static ExchangeAccountsPaged GetAccountsPaged(int itemId, string accountTypes, string filterColumn, string filterValue, string sortColumn, - int startRow, int maximumRows) + int startRow, int maximumRows, bool archiving) { #region Demo Mode if (IsDemoMode) @@ -965,7 +965,7 @@ namespace WebsitePanel.EnterpriseServer #endregion DataSet ds = DataProvider.GetExchangeAccountsPaged(SecurityContext.User.UserId, itemId, - accountTypes, filterColumn, filterValue, sortColumn, startRow, maximumRows); + accountTypes, filterColumn, filterValue, sortColumn, startRow, maximumRows, archiving); ExchangeAccountsPaged result = new ExchangeAccountsPaged(); result.RecordsCount = (int)ds.Tables[0].Rows[0][0]; @@ -1223,7 +1223,7 @@ namespace WebsitePanel.EnterpriseServer { DataProvider.UpdateExchangeAccount(account.AccountId, account.AccountName, account.AccountType, account.DisplayName, account.PrimaryEmailAddress, account.MailEnabledPublicFolder, - account.MailboxManagerActions.ToString(), account.SamAccountName, account.AccountPassword, account.MailboxPlanId, + account.MailboxManagerActions.ToString(), account.SamAccountName, account.AccountPassword, account.MailboxPlanId, account.ArchivingMailboxPlanId, (string.IsNullOrEmpty(account.SubscriberNumber) ? null : account.SubscriberNumber.Trim())); } @@ -1598,7 +1598,7 @@ namespace WebsitePanel.EnterpriseServer private static void UpdateExchangeAccount(int accountId, string accountName, ExchangeAccountType accountType, string displayName, string primaryEmailAddress, bool mailEnabledPublicFolder, - string mailboxManagerActions, string samAccountName, string accountPassword, int mailboxPlanId, string subscriberNumber) + string mailboxManagerActions, string samAccountName, string accountPassword, int mailboxPlanId, int archivePlanId, string subscriberNumber) { DataProvider.UpdateExchangeAccount(accountId, accountName, @@ -1609,13 +1609,13 @@ namespace WebsitePanel.EnterpriseServer mailboxManagerActions, samAccountName, CryptoUtils.Encrypt(accountPassword), - mailboxPlanId, + mailboxPlanId, archivePlanId, (string.IsNullOrEmpty(subscriberNumber) ? null : subscriberNumber.Trim())); } public static int CreateMailbox(int itemId, int accountId, ExchangeAccountType accountType, string accountName, - string displayName, string name, string domain, string password, bool sendSetupInstructions, string setupInstructionMailAddress, int mailboxPlanId, string subscriberNumber) + string displayName, string name, string domain, string password, bool sendSetupInstructions, string setupInstructionMailAddress, int mailboxPlanId, int archivedPlanId, string subscriberNumber) { // check account int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); @@ -1756,7 +1756,7 @@ namespace WebsitePanel.EnterpriseServer | MailboxManagerActions.EmailAddresses; - UpdateExchangeAccount(accountId, accountName, accountType, displayName, email, false, pmmActions.ToString(), samAccount, password, mailboxPlanId, subscriberNumber); + UpdateExchangeAccount(accountId, accountName, accountType, displayName, email, false, pmmActions.ToString(), samAccount, password, mailboxPlanId, archivedPlanId, subscriberNumber); @@ -2600,7 +2600,7 @@ namespace WebsitePanel.EnterpriseServer #region Mailbox plan - public static int SetExchangeMailboxPlan(int itemId, int accountId, int mailboxPlanId) + public static int SetExchangeMailboxPlan(int itemId, int accountId, int mailboxPlanId, int archivePlanId) { // check account int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); @@ -2679,6 +2679,7 @@ namespace WebsitePanel.EnterpriseServer int exchangeServiceId = GetExchangeServiceID(org.PackageId); ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); + //TDMX exchange.SetMailboxAdvancedSettings( org.OrganizationId, account.UserPrincipalName, @@ -2700,7 +2701,7 @@ namespace WebsitePanel.EnterpriseServer plan.LitigationHoldUrl, plan.LitigationHoldMsg); - DataProvider.SetExchangeAccountMailboxPlan(accountId, mailboxPlanId); + DataProvider.SetExchangeAccountMailboxPlan(accountId, mailboxPlanId, archivePlanId); return 0; } @@ -2714,7 +2715,7 @@ namespace WebsitePanel.EnterpriseServer } } - public static List GetExchangeMailboxPlans(int itemId) + public static List GetExchangeMailboxPlans(int itemId, bool archiving) { // place log record TaskManager.StartTask("EXCHANGE", "GET_EXCHANGE_MAILBOXPLANS", itemId); @@ -2726,9 +2727,9 @@ namespace WebsitePanel.EnterpriseServer UserInfo user = ObjectUtils.FillObjectFromDataReader(DataProvider.GetUserByExchangeOrganizationIdInternally(itemId)); if (user.Role == UserRole.User) - ExchangeServerController.GetExchangeMailboxPlansByUser(itemId, user, ref mailboxPlans); + ExchangeServerController.GetExchangeMailboxPlansByUser(itemId, user, ref mailboxPlans, archiving); else - ExchangeServerController.GetExchangeMailboxPlansByUser(0, user, ref mailboxPlans); + ExchangeServerController.GetExchangeMailboxPlansByUser(0, user, ref mailboxPlans, archiving); ExchangeOrganization ExchangeOrg = ObjectUtils.FillObjectFromDataReader(DataProvider.GetExchangeOrganization(itemId)); @@ -2753,7 +2754,7 @@ namespace WebsitePanel.EnterpriseServer } } - private static void GetExchangeMailboxPlansByUser(int itemId, UserInfo user, ref List mailboxPlans) + private static void GetExchangeMailboxPlansByUser(int itemId, UserInfo user, ref List mailboxPlans, bool archiving) { if ((user != null)) { @@ -2780,7 +2781,7 @@ namespace WebsitePanel.EnterpriseServer if (OrgId != -1) { - List Plans = ObjectUtils.CreateListFromDataReader(DataProvider.GetExchangeMailboxPlans(OrgId)); + List Plans = ObjectUtils.CreateListFromDataReader(DataProvider.GetExchangeMailboxPlans(OrgId, archiving)); foreach (ExchangeMailboxPlan p in Plans) { @@ -2790,7 +2791,7 @@ namespace WebsitePanel.EnterpriseServer UserInfo owner = UserController.GetUserInternally(user.OwnerId); - GetExchangeMailboxPlansByUser(0, owner, ref mailboxPlans); + GetExchangeMailboxPlansByUser(0, owner, ref mailboxPlans, archiving); } } @@ -2842,9 +2843,18 @@ namespace WebsitePanel.EnterpriseServer if (mailboxPlan.KeepDeletedItemsDays > cntx.Quotas[Quotas.EXCHANGE2007_KEEPDELETEDITEMSDAYS].QuotaAllocatedValue) mailboxPlan.KeepDeletedItemsDays = cntx.Quotas[Quotas.EXCHANGE2007_KEEPDELETEDITEMSDAYS].QuotaAllocatedValue; - if (cntx.Quotas[Quotas.EXCHANGE2007_DISKSPACE].QuotaAllocatedValue != -1) - if (mailboxPlan.MailboxSizeMB > cntx.Quotas[Quotas.EXCHANGE2007_DISKSPACE].QuotaAllocatedValue) - mailboxPlan.MailboxSizeMB = cntx.Quotas[Quotas.EXCHANGE2007_DISKSPACE].QuotaAllocatedValue; + if (mailboxPlan.Archiving) + { + if (cntx.Quotas[Quotas.EXCHANGE2013_ARCHIVINGSTORAGE].QuotaAllocatedValue != -1) + if (mailboxPlan.MailboxSizeMB > cntx.Quotas[Quotas.EXCHANGE2013_ARCHIVINGSTORAGE].QuotaAllocatedValue) + mailboxPlan.MailboxSizeMB = cntx.Quotas[Quotas.EXCHANGE2013_ARCHIVINGSTORAGE].QuotaAllocatedValue; + } + else + { + if (cntx.Quotas[Quotas.EXCHANGE2007_DISKSPACE].QuotaAllocatedValue != -1) + if (mailboxPlan.MailboxSizeMB > cntx.Quotas[Quotas.EXCHANGE2007_DISKSPACE].QuotaAllocatedValue) + mailboxPlan.MailboxSizeMB = cntx.Quotas[Quotas.EXCHANGE2007_DISKSPACE].QuotaAllocatedValue; + } if (cntx.Quotas[Quotas.EXCHANGE2007_MAXRECEIVEMESSAGESIZEKB].QuotaAllocatedValue != -1) if (mailboxPlan.MaxReceiveMessageSizeKB > cntx.Quotas[Quotas.EXCHANGE2007_MAXRECEIVEMESSAGESIZEKB].QuotaAllocatedValue) @@ -2871,7 +2881,7 @@ namespace WebsitePanel.EnterpriseServer mailboxPlan.IsDefault, mailboxPlan.IssueWarningPct, mailboxPlan.KeepDeletedItemsDays, mailboxPlan.MailboxSizeMB, mailboxPlan.MaxReceiveMessageSizeKB, mailboxPlan.MaxRecipients, mailboxPlan.MaxSendMessageSizeKB, mailboxPlan.ProhibitSendPct, mailboxPlan.ProhibitSendReceivePct, mailboxPlan.HideFromAddressBook, mailboxPlan.MailboxPlanType, mailboxPlan.AllowLitigationHold, mailboxPlan.RecoverableItemsSpace, mailboxPlan.RecoverableItemsWarningPct, - mailboxPlan.LitigationHoldUrl, mailboxPlan.LitigationHoldMsg); + mailboxPlan.LitigationHoldUrl, mailboxPlan.LitigationHoldMsg, mailboxPlan.Archiving, mailboxPlan.EnableArchiving); } catch (Exception ex) { @@ -2941,7 +2951,8 @@ namespace WebsitePanel.EnterpriseServer mailboxPlan.IsDefault, mailboxPlan.IssueWarningPct, mailboxPlan.KeepDeletedItemsDays, mailboxPlan.MailboxSizeMB, mailboxPlan.MaxReceiveMessageSizeKB, mailboxPlan.MaxRecipients, mailboxPlan.MaxSendMessageSizeKB, mailboxPlan.ProhibitSendPct, mailboxPlan.ProhibitSendReceivePct, mailboxPlan.HideFromAddressBook, mailboxPlan.MailboxPlanType, mailboxPlan.AllowLitigationHold, mailboxPlan.RecoverableItemsSpace, mailboxPlan.RecoverableItemsWarningPct, - mailboxPlan.LitigationHoldUrl, mailboxPlan.LitigationHoldMsg); + mailboxPlan.LitigationHoldUrl, mailboxPlan.LitigationHoldMsg, + mailboxPlan.Archiving, mailboxPlan.EnableArchiving); } catch (Exception ex) { @@ -3002,6 +3013,262 @@ namespace WebsitePanel.EnterpriseServer #endregion + #region Exchange Retention Policy Tags + + public static List GetExchangeRetentionPolicyTags(int itemId) + { + // place log record + TaskManager.StartTask("EXCHANGE", "GET_EXCHANGE_RETENTIONPOLICYTAGS", itemId); + + try + { + List retentionPolicyTags = new List(); + + UserInfo user = ObjectUtils.FillObjectFromDataReader(DataProvider.GetUserByExchangeOrganizationIdInternally(itemId)); + + if (user.Role == UserRole.User) + ExchangeServerController.GetExchangeRetentionPolicyTagsByUser(itemId, user, ref retentionPolicyTags); + else + ExchangeServerController.GetExchangeRetentionPolicyTagsByUser(0, user, ref retentionPolicyTags); + + return retentionPolicyTags; + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + } + + private static void GetExchangeRetentionPolicyTagsByUser(int itemId, UserInfo user, ref List retentionPolicyTags) + { + if ((user != null)) + { + List orgs = null; + + if (user.UserId != 1) + { + List Packages = PackageController.GetPackages(user.UserId); + + if ((Packages != null) & (Packages.Count > 0)) + { + orgs = GetExchangeOrganizationsInternal(Packages[0].PackageId, false); + } + } + else + { + orgs = GetExchangeOrganizationsInternal(1, false); + } + + int OrgId = -1; + if (itemId > 0) OrgId = itemId; + else if ((orgs != null) & (orgs.Count > 0)) OrgId = orgs[0].Id; + + + if (OrgId != -1) + { + List RetentionPolicy = ObjectUtils.CreateListFromDataReader(DataProvider.GetExchangeRetentionPolicyTags(OrgId)); + + foreach (ExchangeRetentionPolicyTag p in RetentionPolicy) + { + retentionPolicyTags.Add(p); + } + } + + UserInfo owner = UserController.GetUserInternally(user.OwnerId); + + GetExchangeRetentionPolicyTagsByUser(0, owner, ref retentionPolicyTags); + } + } + + public static ExchangeRetentionPolicyTag GetExchangeRetentionPolicyTag(int itemID, int tagId) + { + + // place log record + TaskManager.StartTask("EXCHANGE", "GET_EXCHANGE_RETENTIONPOLICYTAG", tagId); + + try + { + return ObjectUtils.FillObjectFromDataReader( + DataProvider.GetExchangeRetentionPolicyTag(tagId)); + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + } + + public static int AddExchangeRetentionPolicyTag(int itemID, ExchangeRetentionPolicyTag tag) + { + // place log record + TaskManager.StartTask("EXCHANGE", "ADD_EXCHANGE_RETENTIONPOLICYTAG", itemID); + + try + { + Organization org = GetOrganization(itemID); + if (org == null) + return -1; + + // load package context + PackageContext cntx = PackageController.GetPackageContext(org.PackageId); + + if (org.PackageId > 1) + { + // quotas + } + + return DataProvider.AddExchangeRetentionPolicyTag(itemID, tag.TagName, tag.TagType, tag.AgeLimitForRetention, tag.RetentionAction ); + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + + } + + public static int UpdateExchangeRetentionPolicyTag(int itemID, ExchangeRetentionPolicyTag tag) + { + // place log record + TaskManager.StartTask("EXCHANGE", "UPDATE_EXCHANGE_RETENTIONPOLICYTAG", itemID); + + try + { + Organization org = GetOrganization(itemID); + if (org == null) + return -1; + + // load package context + PackageContext cntx = PackageController.GetPackageContext(org.PackageId); + + if (org.PackageId > 1) + { + // quotas + } + + DataProvider.UpdateExchangeRetentionPolicyTag(tag.TagID, tag.ItemID, tag.TagName, tag.TagType, tag.AgeLimitForRetention, tag.RetentionAction); + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + + + return 0; + } + + public static int DeleteExchangeRetentionPolicyTag(int itemID, int tagId) + { + TaskManager.StartTask("EXCHANGE", "DELETE_EXCHANGE_RETENTIONPOLICYTAG", itemID); + + try + { + DataProvider.DeleteExchangeRetentionPolicyTag(tagId); + + return 0; + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + + } + + + public static List GetExchangeMailboxPlanRetentionPolicyTags(int policyId) + { + // place log record + TaskManager.StartTask("EXCHANGE", "GET_EXCHANGE_RETENTIONPOLICYTAGS", policyId); + + try + { + List tags = + ObjectUtils.CreateListFromDataReader(DataProvider.GetExchangeMailboxPlanRetentionPolicyTags(policyId)); + + return tags; + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + } + + public static int AddExchangeMailboxPlanRetentionPolicyTag(int itemID, ExchangeMailboxPlanRetentionPolicyTag planTag) + { + // place log record + TaskManager.StartTask("EXCHANGE", "ADD_EXCHANGE_RETENTIONPOLICYTAG", itemID); + + try + { + Organization org = GetOrganization(itemID); + if (org == null) + return -1; + + // load package context + PackageContext cntx = PackageController.GetPackageContext(org.PackageId); + + if (org.PackageId > 1) + { + // quotas + } + + return DataProvider.AddExchangeMailboxPlanRetentionPolicyTag(planTag.TagID, planTag.MailboxPlanId); + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + + } + + public static int DeleteExchangeMailboxPlanRetentionPolicyTag(int itemID, int planTagId) + { + TaskManager.StartTask("EXCHANGE", "DELETE_EXCHANGE_RETENTIONPOLICYTAG", itemID); + + try + { + DataProvider.DeleteExchangeMailboxPlanRetentionPolicyTag(planTagId); + + return 0; + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + + } + + #endregion #region Contacts public static int CreateContact(int itemId, string displayName, string email) diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/CRMController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/CRMController.cs index d9f66ae4..f986fbce 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/CRMController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/CRMController.cs @@ -49,8 +49,19 @@ namespace WebsitePanel.EnterpriseServer } private static int GetCRMServiceId(int packageId) - { - int serviceId = PackageController.GetPackageServiceId(packageId, ResourceGroups.HostedCRM); + { + int serviceId = PackageController.GetPackageServiceId(packageId, ResourceGroups.HostedCRM2013); + if (serviceId == 0) + serviceId = PackageController.GetPackageServiceId(packageId, ResourceGroups.HostedCRM); + return serviceId; + } + + private static int GetCRMServiceId(int packageId, ResultObject res) + { + int serviceId = GetCRMServiceId(packageId); + if (serviceId == 0) + CompleteTask(res, CrmErrorCodes.CRM_IS_NOT_SELECTED_IN_HOSTING_PLAN, null, + "CRM is not selected in hosting plan."); return serviceId; } @@ -226,7 +237,7 @@ namespace WebsitePanel.EnterpriseServer return value; } - public static OrganizationResult CreateOrganization(int organizationId, string baseCurrencyCode, string baseCurrencyName, string baseCurrencySymbol, string regionName, int userId, string collation) + public static OrganizationResult CreateOrganization(int organizationId, string baseCurrencyCode, string baseCurrencyName, string baseCurrencySymbol, string regionName, int userId, string collation, int baseLanguageCode) { OrganizationResult res = StartTask("CRM", "CREATE_ORGANIZATION"); @@ -269,7 +280,12 @@ namespace WebsitePanel.EnterpriseServer string rootOU = GetProviderProperty(serviceid, "rootou"); PackageContext cntx = PackageController.GetPackageContext(org.PackageId); - long maxDBSize = cntx.Quotas[Quotas.CRM_MAXDATABASESIZE].QuotaAllocatedValue; + + string maxDBSizeQuotaName = ""; + if (cntx.Groups.ContainsKey(ResourceGroups.HostedCRM2013)) maxDBSizeQuotaName = Quotas.CRM2013_MAXDATABASESIZE; + else if (cntx.Groups.ContainsKey(ResourceGroups.HostedCRM)) maxDBSizeQuotaName = Quotas.CRM_MAXDATABASESIZE; + + long maxDBSize = cntx.Quotas[maxDBSizeQuotaName].QuotaAllocatedValue; if (maxDBSize != -1) maxDBSize = maxDBSize * 1024 * 1024; org.CrmAdministratorId = user.AccountId; @@ -277,10 +293,12 @@ namespace WebsitePanel.EnterpriseServer string.Join("|", new[] {baseCurrencyCode, baseCurrencyName, baseCurrencySymbol, regionName}); org.CrmCollation = collation; org.CrmOrgState = (int) CrmOrganizationState.Enabled; + org.CrmLanguadgeCode = baseLanguageCode.ToString(); org.CrmOrganizationId = orgId; OrganizationResult serverRes = crm.CreateOrganization(orgId, org.OrganizationId, org.Name, + baseLanguageCode, org.OrganizationId + "." + rootOU, baseCurrencyCode, baseCurrencyName, baseCurrencySymbol, user.SamAccountName, user.FirstName, user.LastName, user.PrimaryEmailAddress, @@ -343,19 +361,35 @@ namespace WebsitePanel.EnterpriseServer return res; } - public static StringArrayResultObject GetCollationNames(int packageId) + public static StringArrayResultObject GetCollationByServiceId(int serviceId) + { + StringArrayResultObject ret = StartTask("CRM", "GET_COLLATION_NAMES"); + ret.IsSuccess = true; + try + { + CRM crm = new CRM(); + ServiceProviderProxy.Init(crm, serviceId); + ret.Value = crm.GetSupportedCollationNames(); + } + catch (Exception ex) + { + CompleteTask(ret, CrmErrorCodes.CANNOT_GET_COLLATION_NAMES, ex); + return ret; + } + CompleteTask(); + return ret; + } + + public static StringArrayResultObject GetCollation(int packageId) { StringArrayResultObject ret = StartTask("CRM", "GET_COLLATION_NAMES"); ret.IsSuccess = true; try { - int serviceId = PackageController.GetPackageServiceId(packageId, ResourceGroups.HostedCRM); + int serviceId = GetCRMServiceId(packageId, ret); if (serviceId == 0) - { - CompleteTask(ret, CrmErrorCodes.CRM_IS_NOT_SELECTED_IN_HOSTING_PLAN); return ret; - } CRM crm = new CRM(); ServiceProviderProxy.Init(crm, serviceId); @@ -372,18 +406,35 @@ namespace WebsitePanel.EnterpriseServer return ret; } + public static CurrencyArrayResultObject GetCurrencyByServiceId(int serviceId) + { + CurrencyArrayResultObject ret = StartTask("CRM", "GET_CURRENCY"); + ret.IsSuccess = true; + try + { + CRM crm = new CRM(); + ServiceProviderProxy.Init(crm, serviceId); + ret.Value = crm.GetCurrencyList(); + } + catch (Exception ex) + { + CompleteTask(ret, CrmErrorCodes.CANNOT_GET_CURRENCY_LIST, ex); + return ret; + } + CompleteTask(); + + return ret; + } + public static CurrencyArrayResultObject GetCurrency(int packageId) { CurrencyArrayResultObject ret = StartTask("CRM", "GET_CURRENCY"); ret.IsSuccess = true; try { - int serviceId = PackageController.GetPackageServiceId(packageId, ResourceGroups.HostedCRM); + int serviceId = GetCRMServiceId(packageId, ret); if (serviceId == 0) - { - CompleteTask(ret, CrmErrorCodes.CRM_IS_NOT_SELECTED_IN_HOSTING_PLAN, null, "CRM is not selected in hosting plan."); return ret; - } CRM crm = new CRM(); ServiceProviderProxy.Init(crm, serviceId); @@ -550,9 +601,12 @@ namespace WebsitePanel.EnterpriseServer PackageContext cntx = PackageController.GetPackageContext(packageId); - return (cntx.Quotas[Quotas.CRM_ORGANIZATION] != null && !cntx.Quotas[Quotas.CRM_ORGANIZATION].QuotaExhausted); - - + + string quotaName = ""; + if (cntx.Groups.ContainsKey(ResourceGroups.HostedCRM2013)) quotaName = Quotas.CRM2013_ORGANIZATION; + else if (cntx.Groups.ContainsKey(ResourceGroups.HostedCRM)) quotaName = Quotas.CRM_ORGANIZATION; + + return (cntx.Quotas[quotaName] != null && !cntx.Quotas[quotaName].QuotaExhausted); } catch(Exception ex) @@ -676,19 +730,22 @@ namespace WebsitePanel.EnterpriseServer if (!quotaRes.Value) { - CompleteTask(ret, CrmErrorCodes.USER_QUOTA_HAS_BEEN_REACHED + CALType.ToString(), null, "CRM user quota has been reached."); + string errorCode = CrmErrorCodes.USER_QUOTA_HAS_BEEN_REACHED; + PackageContext cntx = PackageController.GetPackageContext(packageId); + if (cntx.Groups.ContainsKey(ResourceGroups.HostedCRM2013)) + errorCode += "2013_"; + errorCode += CALType.ToString(); + + CompleteTask(ret, errorCode , null, "CRM user quota has been reached."); return ret; } Guid crmId; try { - int serviceId = PackageController.GetPackageServiceId(packageId, ResourceGroups.HostedCRM); + int serviceId = GetCRMServiceId(packageId, ret); if (serviceId == 0) - { - CompleteTask(ret, CrmErrorCodes.CRM_IS_NOT_SELECTED_IN_HOSTING_PLAN, null, "CRM is not selected in hosting plan."); return ret; - } Organization org = OrganizationController.GetOrganization(itemId); @@ -735,12 +792,9 @@ namespace WebsitePanel.EnterpriseServer CRMBusinessUnitsResult res = StartTask("CRM", "GET_CRM_BUSINESS_UNITS"); try { - int serviceId = PackageController.GetPackageServiceId(packageId, ResourceGroups.HostedCRM); + int serviceId = GetCRMServiceId(packageId, res); if (serviceId == 0) - { - CompleteTask(res, CrmErrorCodes.CRM_IS_NOT_SELECTED_IN_HOSTING_PLAN, null, "CRM is not selected in hosting plan."); return res; - } Organization org; try @@ -784,12 +838,9 @@ namespace WebsitePanel.EnterpriseServer try { - int serviceId = PackageController.GetPackageServiceId(packageId, ResourceGroups.HostedCRM); + int serviceId = GetCRMServiceId(packageId, res); if (serviceId == 0) - { - CompleteTask(res, CrmErrorCodes.CRM_IS_NOT_SELECTED_IN_HOSTING_PLAN, null, "CRM is not selected in hosting plan."); return res; - } CRM crm = new CRM(); ServiceProviderProxy.Init(crm, serviceId); @@ -874,13 +925,9 @@ namespace WebsitePanel.EnterpriseServer } - int serviceId = PackageController.GetPackageServiceId(org.PackageId, ResourceGroups.HostedCRM); + int serviceId = GetCRMServiceId(org.PackageId, res); if (serviceId == 0) - { - CompleteTask(res, CrmErrorCodes.CRM_IS_NOT_SELECTED_IN_HOSTING_PLAN, null, - "CRM is not selected in hosting plan."); return res; - } try { @@ -919,13 +966,9 @@ namespace WebsitePanel.EnterpriseServer try { - int serviceId = PackageController.GetPackageServiceId(packageId, ResourceGroups.HostedCRM); + int serviceId = GetCRMServiceId(packageId, res); if (serviceId == 0) - { - CompleteTask(res, CrmErrorCodes.CRM_IS_NOT_SELECTED_IN_HOSTING_PLAN, null, - "CRM is not selected in hosting plan."); return res; - } CRM crm = new CRM(); ServiceProviderProxy.Init(crm, serviceId); @@ -978,13 +1021,9 @@ namespace WebsitePanel.EnterpriseServer return res; } - int serviceId = PackageController.GetPackageServiceId(packageId, ResourceGroups.HostedCRM); + int serviceId = GetCRMServiceId(packageId, res); if (serviceId == 0) - { - CompleteTask(res, CrmErrorCodes.CRM_IS_NOT_SELECTED_IN_HOSTING_PLAN, null, - "CRM is not selected in hosting plan."); return res; - } CRM crm = new CRM(); ServiceProviderProxy.Init(crm, serviceId); @@ -1012,7 +1051,13 @@ namespace WebsitePanel.EnterpriseServer } if (!quotaRes.Value) { - CompleteTask(res, CrmErrorCodes.USER_QUOTA_HAS_BEEN_REACHED + CALType.ToString(), null, "CRM user quota has been reached."); + string errorCode = CrmErrorCodes.USER_QUOTA_HAS_BEEN_REACHED; + PackageContext cntx = PackageController.GetPackageContext(packageId); + if (cntx.Groups.ContainsKey(ResourceGroups.HostedCRM2013)) + errorCode += "2013_"; + errorCode += CALType.ToString(); + + CompleteTask(res, errorCode, null, "CRM user quota has been reached."); return res; } @@ -1058,13 +1103,9 @@ namespace WebsitePanel.EnterpriseServer return res; } - int serviceId = PackageController.GetPackageServiceId(org.PackageId, ResourceGroups.HostedCRM); + int serviceId = GetCRMServiceId(org.PackageId, res); if (serviceId == 0) - { - CompleteTask(res, CrmErrorCodes.CRM_IS_NOT_SELECTED_IN_HOSTING_PLAN, null, - "CRM is not selected in hosting plan."); return res; - } CRM crm = new CRM(); ServiceProviderProxy.Init(crm, serviceId); @@ -1105,19 +1146,37 @@ namespace WebsitePanel.EnterpriseServer return res; } - string quotaName = Quotas.CRM_USERS; + string quotaName = ""; - switch (CALType) + if (cntx.Groups.ContainsKey(ResourceGroups.HostedCRM2013)) { - case 0: - quotaName = Quotas.CRM_USERS; - break; - case 2: - quotaName = Quotas.CRM_LIMITEDUSERS; - break; - case 22: - quotaName = Quotas.CRM_ESSUSERS; - break; + switch (CALType) + { + case CRMUserLycenseTypes.PROFESSIONAL: + quotaName = Quotas.CRM2013_PROFESSIONALUSERS; + break; + case CRMUserLycenseTypes.BASIC: + quotaName = Quotas.CRM2013_BASICUSERS; + break; + case CRMUserLycenseTypes.ESSENTIAL: + quotaName = Quotas.CRM2013_ESSENTIALUSERS; + break; + } + } + else if (cntx.Groups.ContainsKey(ResourceGroups.HostedCRM)) + { + switch (CALType) + { + case CRMUserLycenseTypes.FULL: + quotaName = Quotas.CRM_USERS; + break; + case CRMUserLycenseTypes.LIMITED: + quotaName = Quotas.CRM_LIMITEDUSERS; + break; + case CRMUserLycenseTypes.ESS: + quotaName = Quotas.CRM_ESSUSERS; + break; + } } int allocatedCrmUsers = cntx.Quotas[quotaName].QuotaAllocatedValue; @@ -1137,18 +1196,14 @@ namespace WebsitePanel.EnterpriseServer public static ResultObject SetMaxDBSize(int itemId, int packageId, long maxSize) { - ResultObject res = StartTask("CRM", "SET_CRM_MAXDBSIZE"); + ResultObject res = StartTask("CRM", "SET_CRM_MAXDBSIZE"); try { - int serviceId = PackageController.GetPackageServiceId(packageId, ResourceGroups.HostedCRM); + int serviceId = GetCRMServiceId(packageId, res); if (serviceId == 0) - { - CompleteTask(res, CrmErrorCodes.CRM_IS_NOT_SELECTED_IN_HOSTING_PLAN, null, - "CRM is not selected in hosting plan."); return res; - } CRM crm = new CRM(); ServiceProviderProxy.Init(crm, serviceId); @@ -1169,7 +1224,11 @@ namespace WebsitePanel.EnterpriseServer PackageContext cntx = PackageController.GetPackageContext(packageId); - long limitSize = cntx.Quotas[Quotas.CRM_MAXDATABASESIZE].QuotaAllocatedValue; + string quotaName = ""; + if (cntx.Groups.ContainsKey(ResourceGroups.HostedCRM2013)) quotaName = Quotas.CRM2013_MAXDATABASESIZE; + else if (cntx.Groups.ContainsKey(ResourceGroups.HostedCRM)) quotaName = Quotas.CRM_MAXDATABASESIZE; + + long limitSize = cntx.Quotas[quotaName].QuotaAllocatedValue; if (limitSize != -1) { @@ -1199,19 +1258,15 @@ namespace WebsitePanel.EnterpriseServer public static long GetDBSize(int itemId, int packageId) { - ResultObject res = StartTask("CRM", "GET_CRM_DBSIZE"); + ResultObject res = StartTask("CRM", "GET_CRM_DBSIZE"); long size = -1; try { - int serviceId = PackageController.GetPackageServiceId(packageId, ResourceGroups.HostedCRM); + int serviceId = GetCRMServiceId(packageId, res); if (serviceId == 0) - { - CompleteTask(res, CrmErrorCodes.CRM_IS_NOT_SELECTED_IN_HOSTING_PLAN, null, - "CRM is not selected in hosting plan."); return -1; - } CRM crm = new CRM(); ServiceProviderProxy.Init(crm, serviceId); @@ -1244,19 +1299,15 @@ namespace WebsitePanel.EnterpriseServer public static long GetMaxDBSize(int itemId, int packageId) { - ResultObject res = StartTask("CRM", "GET_CRM_MAXDBSIZE"); + ResultObject res = StartTask("CRM", "GET_CRM_MAXDBSIZE"); long size = -1; try { - int serviceId = PackageController.GetPackageServiceId(packageId, ResourceGroups.HostedCRM); + int serviceId = GetCRMServiceId(packageId, res); if (serviceId == 0) - { - CompleteTask(res, CrmErrorCodes.CRM_IS_NOT_SELECTED_IN_HOSTING_PLAN, null, - "CRM is not selected in hosting plan."); return -1; - } CRM crm = new CRM(); ServiceProviderProxy.Init(crm, serviceId); @@ -1287,5 +1338,52 @@ namespace WebsitePanel.EnterpriseServer return size; } + + public static int[] GetInstalledLanguagePacks(int packageId) + { + ResultObject res = StartTask("CRM", "GET_CRM_MAXDBSIZE"); + int[] ret = null; + + try + { + int serviceId = GetCRMServiceId(packageId, res); + if (serviceId == 0) + return null; + + CRM crm = new CRM(); + ServiceProviderProxy.Init(crm, serviceId); + + ret = crm.GetInstalledLanguagePacks(); + } + catch (Exception ex) + { + CompleteTask(res, CrmErrorCodes.CANNOT_CONFIGURE_CRM_ORGANIZATION, ex); + return null; + } + CompleteTask(); + return ret; + } + + public static int[] GetInstalledLanguagePacksByServiceId(int serviceId) + { + ResultObject res = StartTask("CRM", "GET_CRM_MAXDBSIZE"); + int[] ret = null; + + try + { + CRM crm = new CRM(); + ServiceProviderProxy.Init(crm, serviceId); + + ret = crm.GetInstalledLanguagePacks(); + } + catch (Exception ex) + { + CompleteTask(res, CrmErrorCodes.CANNOT_CONFIGURE_CRM_ORGANIZATION, ex); + return null; + } + CompleteTask(); + return ret; + } + } } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/OrganizationController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/OrganizationController.cs index 89042c41..19ec20ae 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/OrganizationController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/OrganizationController.cs @@ -932,12 +932,20 @@ namespace WebsitePanel.EnterpriseServer if (cntxTmp.Groups.ContainsKey(ResourceGroups.HostedCRM)) { - stats.CreatedCRMUsers = CRMController.GetCRMUsersCount(org.Id, string.Empty, string.Empty, 0).Value; - stats.CreatedLimitedCRMUsers = CRMController.GetCRMUsersCount(org.Id, string.Empty, string.Empty, 2).Value; - stats.CreatedESSCRMUsers = CRMController.GetCRMUsersCount(org.Id, string.Empty, string.Empty, 22).Value; + stats.CreatedCRMUsers = CRMController.GetCRMUsersCount(org.Id, string.Empty, string.Empty, CRMUserLycenseTypes.FULL).Value; + stats.CreatedLimitedCRMUsers = CRMController.GetCRMUsersCount(org.Id, string.Empty, string.Empty, CRMUserLycenseTypes.LIMITED).Value; + stats.CreatedESSCRMUsers = CRMController.GetCRMUsersCount(org.Id, string.Empty, string.Empty, CRMUserLycenseTypes.ESS).Value; + stats.UsedCRMDiskSpace = CRMController.GetDBSize(org.Id, org.PackageId); + stats.AllocatedCRMDiskSpace = CRMController.GetMaxDBSize(org.Id, org.PackageId); + } + + if (cntxTmp.Groups.ContainsKey(ResourceGroups.HostedCRM2013)) + { + stats.CreatedProfessionalCRMUsers = CRMController.GetCRMUsersCount(org.Id, string.Empty, string.Empty, CRMUserLycenseTypes.PROFESSIONAL).Value; + stats.CreatedBasicCRMUsers = CRMController.GetCRMUsersCount(org.Id, string.Empty, string.Empty, CRMUserLycenseTypes.BASIC).Value; + stats.CreatedEssentialCRMUsers = CRMController.GetCRMUsersCount(org.Id, string.Empty, string.Empty, CRMUserLycenseTypes.ESSENTIAL).Value; stats.UsedCRMDiskSpace = CRMController.GetDBSize(org.Id, org.PackageId); stats.AllocatedCRMDiskSpace = CRMController.GetMaxDBSize(org.Id, org.PackageId); - } if (cntxTmp.Groups.ContainsKey(ResourceGroups.BlackBerry)) @@ -997,9 +1005,18 @@ namespace WebsitePanel.EnterpriseServer if (cntxTmp.Groups.ContainsKey(ResourceGroups.HostedCRM)) { - stats.CreatedCRMUsers += CRMController.GetCRMUsersCount(o.Id, string.Empty, string.Empty, 0 ).Value; - stats.CreatedLimitedCRMUsers += CRMController.GetCRMUsersCount(o.Id, string.Empty, string.Empty, 2).Value; - stats.CreatedESSCRMUsers += CRMController.GetCRMUsersCount(o.Id, string.Empty, string.Empty, 22).Value; + stats.CreatedCRMUsers += CRMController.GetCRMUsersCount(o.Id, string.Empty, string.Empty, CRMUserLycenseTypes.FULL ).Value; + stats.CreatedLimitedCRMUsers += CRMController.GetCRMUsersCount(o.Id, string.Empty, string.Empty, CRMUserLycenseTypes.LIMITED).Value; + stats.CreatedESSCRMUsers += CRMController.GetCRMUsersCount(o.Id, string.Empty, string.Empty, CRMUserLycenseTypes.ESS).Value; + stats.UsedCRMDiskSpace += CRMController.GetDBSize(o.Id, o.PackageId); + stats.AllocatedCRMDiskSpace += CRMController.GetMaxDBSize(o.Id, o.PackageId); + } + + if (cntxTmp.Groups.ContainsKey(ResourceGroups.HostedCRM2013)) + { + stats.CreatedProfessionalCRMUsers += CRMController.GetCRMUsersCount(o.Id, string.Empty, string.Empty, CRMUserLycenseTypes.PROFESSIONAL).Value; + stats.CreatedBasicCRMUsers += CRMController.GetCRMUsersCount(o.Id, string.Empty, string.Empty, CRMUserLycenseTypes.BASIC).Value; + stats.CreatedEssentialCRMUsers += CRMController.GetCRMUsersCount(o.Id, string.Empty, string.Empty, CRMUserLycenseTypes.ESSENTIAL).Value; stats.UsedCRMDiskSpace += CRMController.GetDBSize(o.Id, o.PackageId); stats.AllocatedCRMDiskSpace += CRMController.GetMaxDBSize(o.Id, o.PackageId); } @@ -1051,6 +1068,13 @@ namespace WebsitePanel.EnterpriseServer stats.AllocatedESSCRMUsers = cntx.Quotas[Quotas.CRM_ESSUSERS].QuotaAllocatedValue; } + if (cntx.Groups.ContainsKey(ResourceGroups.HostedCRM2013)) + { + stats.AllocatedProfessionalCRMUsers = cntx.Quotas[Quotas.CRM2013_PROFESSIONALUSERS].QuotaAllocatedValue; + stats.AllocatedBasicCRMUsers = cntx.Quotas[Quotas.CRM2013_BASICUSERS].QuotaAllocatedValue; + stats.AllocatedEssentialCRMUsers = cntx.Quotas[Quotas.CRM2013_ESSENTIALUSERS].QuotaAllocatedValue; + } + if (cntx.Groups.ContainsKey(ResourceGroups.BlackBerry)) { stats.AllocatedBlackBerryUsers = cntx.Quotas[Quotas.BLACKBERRY_USERS].QuotaAllocatedValue; @@ -1290,7 +1314,7 @@ namespace WebsitePanel.EnterpriseServer DataSet ds = DataProvider.GetExchangeAccountsPaged(SecurityContext.User.UserId, itemId, accountTypes, filterColumn, - filterValue, sortColumn, startRow, maximumRows); + filterValue, sortColumn, startRow, maximumRows, false); OrganizationUsersPaged result = new OrganizationUsersPaged(); result.RecordsCount = (int)ds.Tables[0].Rows[0][0]; @@ -2054,7 +2078,7 @@ namespace WebsitePanel.EnterpriseServer { DataProvider.UpdateExchangeAccount(account.AccountId, account.AccountName, account.AccountType, account.DisplayName, account.PrimaryEmailAddress, account.MailEnabledPublicFolder, - account.MailboxManagerActions.ToString(), account.SamAccountName, account.AccountPassword, account.MailboxPlanId, + account.MailboxManagerActions.ToString(), account.SamAccountName, account.AccountPassword, account.MailboxPlanId, account.ArchivingMailboxPlanId, (string.IsNullOrEmpty(account.SubscriberNumber) ? null : account.SubscriberNumber.Trim())); } @@ -2611,7 +2635,7 @@ namespace WebsitePanel.EnterpriseServer DataSet ds = DataProvider.GetExchangeAccountsPaged(SecurityContext.User.UserId, itemId, accountTypes, filterColumn, - filterValue, sortColumn, startRow, maximumRows); + filterValue, sortColumn, startRow, maximumRows, false); ExchangeAccountsPaged result = new ExchangeAccountsPaged(); result.RecordsCount = (int)ds.Tables[0].Rows[0][0]; diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esCRM.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esCRM.asmx.cs index 9e77c3db..f4f969ac 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esCRM.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esCRM.asmx.cs @@ -48,24 +48,34 @@ namespace WebsitePanel.EnterpriseServer { [WebMethod] - public OrganizationResult CreateOrganization(int organizationId, string baseCurrencyCode, string baseCurrencyName, string baseCurrencySymbol, string regionName, int userId, string collation) + public OrganizationResult CreateOrganization(int organizationId, string baseCurrencyCode, string baseCurrencyName, string baseCurrencySymbol, string regionName, int userId, string collation, int baseLanguageCode) { - return CRMController.CreateOrganization(organizationId, baseCurrencyCode, baseCurrencyName, baseCurrencySymbol, regionName, userId, collation); + return CRMController.CreateOrganization(organizationId, baseCurrencyCode, baseCurrencyName, baseCurrencySymbol, regionName, userId, collation, baseLanguageCode); } - [WebMethod] public StringArrayResultObject GetCollation(int packageId) { - return CRMController.GetCollationNames(packageId); + return CRMController.GetCollation(packageId); + } + + [WebMethod] + public StringArrayResultObject GetCollationByServiceId(int serviceId) + { + return CRMController.GetCollationByServiceId(serviceId); } [WebMethod] public CurrencyArrayResultObject GetCurrency(int packageId) { - return CRMController.GetCurrency(packageId); } + + [WebMethod] + public CurrencyArrayResultObject GetCurrencyByServiceId(int serviceId) + { + return CRMController.GetCurrencyByServiceId(serviceId); + } [WebMethod] public ResultObject DeleteCRMOrganization(int organizationId) @@ -149,5 +159,17 @@ namespace WebsitePanel.EnterpriseServer return CRMController.GetMaxDBSize(itemId, packageId); } + [WebMethod] + public int[] GetInstalledLanguagePacks(int packageId) + { + return CRMController.GetInstalledLanguagePacks(packageId); + } + + [WebMethod] + public int[] GetInstalledLanguagePacksByServiceId(int serviceId) + { + return CRMController.GetInstalledLanguagePacksByServiceId(serviceId); + } + } } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esExchangeServer.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esExchangeServer.asmx.cs index 2538483f..e5bb4a0a 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esExchangeServer.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esExchangeServer.asmx.cs @@ -166,11 +166,11 @@ namespace WebsitePanel.EnterpriseServer [WebMethod] public ExchangeAccountsPaged GetAccountsPaged(int itemId, string accountTypes, string filterColumn, string filterValue, string sortColumn, - int startRow, int maximumRows) + int startRow, int maximumRows, bool archiving) { return ExchangeServerController.GetAccountsPaged(itemId, accountTypes, filterColumn, filterValue, sortColumn, - startRow, maximumRows); + startRow, maximumRows, archiving); } [WebMethod] @@ -222,9 +222,9 @@ namespace WebsitePanel.EnterpriseServer #region Mailboxes [WebMethod] public int CreateMailbox(int itemId, int accountId, ExchangeAccountType accountType, string accountName, string displayName, - string name, string domain, string password, bool sendSetupInstructions, string setupInstructionMailAddress, int mailboxPlanId, string subscriberNumber) + string name, string domain, string password, bool sendSetupInstructions, string setupInstructionMailAddress, int mailboxPlanId, int archivedPlanId, string subscriberNumber) { - return ExchangeServerController.CreateMailbox(itemId, accountId, accountType, accountName, displayName, name, domain, password, sendSetupInstructions, setupInstructionMailAddress, mailboxPlanId, subscriberNumber); + return ExchangeServerController.CreateMailbox(itemId, accountId, accountType, accountName, displayName, name, domain, password, sendSetupInstructions, setupInstructionMailAddress, mailboxPlanId, archivedPlanId, subscriberNumber); } [WebMethod] @@ -303,9 +303,9 @@ namespace WebsitePanel.EnterpriseServer [WebMethod] - public int SetExchangeMailboxPlan(int itemId, int accountId, int mailboxPlanId) + public int SetExchangeMailboxPlan(int itemId, int accountId, int mailboxPlanId, int archivePlanId) { - return ExchangeServerController.SetExchangeMailboxPlan(itemId, accountId, mailboxPlanId); + return ExchangeServerController.SetExchangeMailboxPlan(itemId, accountId, mailboxPlanId, archivePlanId); } [WebMethod] @@ -527,9 +527,9 @@ namespace WebsitePanel.EnterpriseServer #region MailboxPlans [WebMethod] - public List GetExchangeMailboxPlans(int itemId) + public List GetExchangeMailboxPlans(int itemId, bool archiving) { - return ExchangeServerController.GetExchangeMailboxPlans(itemId); + return ExchangeServerController.GetExchangeMailboxPlans(itemId, archiving); } [WebMethod] @@ -549,8 +549,7 @@ namespace WebsitePanel.EnterpriseServer { return ExchangeServerController.UpdateExchangeMailboxPlan(itemId, mailboxPlan); } - - + [WebMethod] public int DeleteExchangeMailboxPlan(int itemId, int mailboxPlanId) { @@ -565,6 +564,59 @@ namespace WebsitePanel.EnterpriseServer #endregion + #region Exchange Retention Policy Tags + + [WebMethod] + public List GetExchangeRetentionPolicyTags(int itemId) + { + return ExchangeServerController.GetExchangeRetentionPolicyTags(itemId); + } + + [WebMethod] + public ExchangeRetentionPolicyTag GetExchangeRetentionPolicyTag(int itemId, int tagId) + { + return ExchangeServerController.GetExchangeRetentionPolicyTag(itemId, tagId); + } + + [WebMethod] + public int AddExchangeRetentionPolicyTag(int itemId, ExchangeRetentionPolicyTag tag) + { + return ExchangeServerController.AddExchangeRetentionPolicyTag(itemId, tag); + } + + [WebMethod] + public int UpdateExchangeRetentionPolicyTag(int itemId, ExchangeRetentionPolicyTag tag) + { + return ExchangeServerController.UpdateExchangeRetentionPolicyTag(itemId, tag); + } + + [WebMethod] + public int DeleteExchangeRetentionPolicyTag(int itemId, int tagId) + { + return ExchangeServerController.DeleteExchangeRetentionPolicyTag(itemId, tagId); + } + + + [WebMethod] + public List GetExchangeMailboxPlanRetentionPolicyTags(int policyId) + { + return ExchangeServerController.GetExchangeMailboxPlanRetentionPolicyTags(policyId); + } + + [WebMethod] + public int AddExchangeMailboxPlanRetentionPolicyTag(int itemId, ExchangeMailboxPlanRetentionPolicyTag planTag) + { + return ExchangeServerController.AddExchangeMailboxPlanRetentionPolicyTag(itemId, planTag); + } + + [WebMethod] + public int DeleteExchangeMailboxPlanRetentionPolicyTag(int itemId, int planTagId) + { + return ExchangeServerController.DeleteExchangeMailboxPlanRetentionPolicyTag(itemId, planTagId); + } + + #endregion + #region Public Folders [WebMethod] diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/Constants.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/Constants.cs index d0d9f493..cf933303 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/Constants.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/Constants.cs @@ -74,6 +74,11 @@ namespace WebsitePanel.Providers.Common public const string UsersHome = "UsersHome"; - + public const string Collation = "Collation"; + + public const string Currency = "Currency"; + + public const string BaseLanguage = "BaseLanguage"; + } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeAccount.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeAccount.cs index a7727a37..55d9c97d 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeAccount.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeAccount.cs @@ -155,5 +155,21 @@ namespace WebsitePanel.Providers.HostedSolution get { return this.notes; } set { this.notes = value; } } + + int archivingMailboxPlanId; + public int ArchivingMailboxPlanId + { + get { return this.archivingMailboxPlanId; } + set { this.archivingMailboxPlanId = value; } + } + + string archivingMailboxPlan; + public string ArchivingMailboxPlan + { + get { return this.archivingMailboxPlan; } + set { this.archivingMailboxPlan = value; } + } + + } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeMailboxPlan.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeMailboxPlan.cs index d34397cd..e2fb516c 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeMailboxPlan.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeMailboxPlan.cs @@ -209,5 +209,19 @@ namespace WebsitePanel.Providers.HostedSolution get { return this.litigationHoldMsg; } set { this.litigationHoldMsg = value; } } + + bool archiving; + public bool Archiving + { + get { return this.archiving; } + set { this.archiving = value; } + } + + bool enableArchiving; + public bool EnableArchiving + { + get { return this.enableArchiving; } + set { this.enableArchiving = value; } + } } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeMailboxPlanRetentionPolicyTag.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeMailboxPlanRetentionPolicyTag.cs new file mode 100644 index 00000000..2ed651d5 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeMailboxPlanRetentionPolicyTag.cs @@ -0,0 +1,76 @@ +// Copyright (c) 2014, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Text; + + +namespace WebsitePanel.Providers.HostedSolution +{ + [Serializable] + public class ExchangeMailboxPlanRetentionPolicyTag + { + int planTagID; + public int PlanTagID + { + get { return planTagID; } + set { planTagID = value; } + } + + int tagID; + public int TagID + { + get { return tagID; } + set { tagID = value; } + } + + int mailboxPlanId; + public int MailboxPlanId + { + get { return mailboxPlanId; } + set { mailboxPlanId = value; } + } + + string mailboxPlan; + public string MailboxPlan + { + get { return mailboxPlan; } + set { mailboxPlan = value; } + } + + string tagName; + public string TagName + { + get { return tagName; } + set { tagName = value; } + } + + + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeRetentionPolicyTag.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeRetentionPolicyTag.cs new file mode 100644 index 00000000..a9b6ba1c --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeRetentionPolicyTag.cs @@ -0,0 +1,80 @@ +// Copyright (c) 2014, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Text; + +namespace WebsitePanel.Providers.HostedSolution +{ + public class ExchangeRetentionPolicyTag + { + int tagID; + public int TagID + { + get { return tagID; } + set { tagID = value; } + } + + int itemID; + public int ItemID + { + get { return itemID; } + set { itemID = value; } + } + + string tagName; + public string TagName + { + get { return tagName; } + set { tagName = value; } + } + + int tagType; + public int TagType + { + get { return tagType; } + set { tagType = value; } + } + + int ageLimitForRetention; + public int AgeLimitForRetention + { + get { return ageLimitForRetention; } + set { ageLimitForRetention = value;} + } + + int retentionAction; + public int RetentionAction + { + get { return retentionAction; } + set { retentionAction = value; } + } + + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeRetentionPolicyTagAction.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeRetentionPolicyTagAction.cs new file mode 100644 index 00000000..89e26d7e --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeRetentionPolicyTagAction.cs @@ -0,0 +1,41 @@ +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Text; + +namespace WebsitePanel.Providers.HostedSolution +{ + public enum ExchangeRetentionPolicyTagAction + { + MoveToDeletedItems, + MoveToFolder, + DeleteAndAllowRecovery, + PermanentlyDelete, + MarkAsPastRetentionLimit, + MoveToArchive + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeRetentionPolicyTagType.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeRetentionPolicyTagType.cs new file mode 100644 index 00000000..66c68cba --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeRetentionPolicyTagType.cs @@ -0,0 +1,58 @@ +// Copyright (c) 2014, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Text; + +namespace WebsitePanel.Providers.HostedSolution +{ + public enum ExchangeRetentionPolicyTagType + { + Calendar, + Contacts, + DeletedItems, + Drafts, + Inbox, + JunkEmail, + Journal, + Notes, + Outbox, + SentItems, + Tasks, + All, + ManagedCustomFolder, + RssSubscriptions, + SyncIssues, + ConversationHistory, + Personal, + RecoverableItems, + NonIpmRoot, + LegacyArchiveJournals + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ICRM.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ICRM.cs index 3b007436..8127f015 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ICRM.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ICRM.cs @@ -35,6 +35,7 @@ namespace WebsitePanel.Providers.HostedSolution public interface ICRM { OrganizationResult CreateOrganization(Guid organizationId, string organizationUniqueName, string organizationFriendlyName, + int baseLanguageCode, string ou, string baseCurrencyCode, string baseCurrencyName, string baseCurrencySymbol, string initialUserDomainName, string initialUserFirstName, string initialUserLastName, string initialUserPrimaryEmail, @@ -44,6 +45,8 @@ namespace WebsitePanel.Providers.HostedSolution string[] GetSupportedCollationNames(); Currency[] GetCurrencyList(); + + int[] GetInstalledLanguagePacks(); ResultObject DeleteOrganization(Guid orgId); diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationStatistics.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationStatistics.cs index 0af7764a..81495034 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationStatistics.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationStatistics.cs @@ -75,7 +75,53 @@ namespace WebsitePanel.Providers.HostedSolution private int allocatedEnterpriseStorageSpace; private int usedEnterpriseStorageSpace; - + + private int createdProfessionalCRMUsers; + private int allocatedProfessionalCRMUsers; + + public int CreatedProfessionalCRMUsers + { + get { return createdProfessionalCRMUsers; } + set { createdProfessionalCRMUsers = value; } + } + + public int AllocatedProfessionalCRMUsers + { + get { return allocatedProfessionalCRMUsers; } + set { allocatedProfessionalCRMUsers = value; } + } + + + private int createdBasicCRMUsers; + private int allocatedBasicCRMUsers; + + public int CreatedBasicCRMUsers + { + get { return createdBasicCRMUsers; } + set { createdBasicCRMUsers = value; } + } + + public int AllocatedBasicCRMUsers + { + get { return allocatedBasicCRMUsers; } + set { allocatedBasicCRMUsers = value; } + } + + private int createdEssentialCRMUsers; + private int allocatedEssentialCRMUsers; + + public int CreatedEssentialCRMUsers + { + get { return createdEssentialCRMUsers; } + set { createdEssentialCRMUsers = value; } + } + + public int AllocatedEssentialCRMUsers + { + get { return allocatedEssentialCRMUsers; } + set { allocatedEssentialCRMUsers = value; } + } + public int CreatedCRMUsers { diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/WebsitePanel.Providers.Base.csproj b/WebsitePanel/Sources/WebsitePanel.Providers.Base/WebsitePanel.Providers.Base.csproj index 3e0c109c..6a3141a3 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/WebsitePanel.Providers.Base.csproj +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/WebsitePanel.Providers.Base.csproj @@ -93,10 +93,14 @@ + + + + diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Crm2011/CRMBase.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Crm2011/CRMBase.cs new file mode 100644 index 00000000..c07b7594 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Crm2011/CRMBase.cs @@ -0,0 +1,2096 @@ +// Copyright (c) 2012 - 2013, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Globalization; +using System.IO; +using System.Net; +using System.Reflection; +using System.Net.Security; +using System.Security.Principal; +using System.Security.Cryptography.X509Certificates; +using System.Threading; +using System.ServiceModel.Description; +using System.Text.RegularExpressions; +using Microsoft.Win32; +using WebsitePanel.Providers.Common; +using WebsitePanel.Providers.ResultObjects; +using WebsitePanel.Server.Utils; +using WebsitePanel.Providers.HostedSolution; +using WebsitePanel.Providers; +using WebsitePanel.Providers.Utils; +using Microsoft.Xrm.Sdk; +using Microsoft.Xrm.Sdk.Query; +using Microsoft.Xrm.Sdk.Discovery; +using Microsoft.Xrm.Sdk.Client; +using Microsoft.Xrm.Sdk.Deployment; +using Microsoft.Xrm.Sdk.Messages; + +namespace WebsitePanel.Providers.HostedSolution +{ + public class CRMBase : HostingServiceProviderBase, ICRM + { + #region Properties + + protected virtual string UserName + { + get { return ProviderSettings[Constants.UserName]; } + } + + protected virtual string Password + { + get { return ProviderSettings[Constants.Password]; } + } + + protected virtual string SqlServer + { + get { return ProviderSettings[Constants.SqlServer]; } + } + + protected virtual string ReportingServer + { + get { return ProviderSettings[Constants.ReportingServer]; } + } + + protected virtual string UrlSchema + { + get { return ProviderSettings[Constants.UrlSchema] == "http" ? "http://" : "https://"; } + } + + protected virtual string CRMDeploymentUrl + { + get + { + string uri = ProviderSettings[Constants.DeploymentWebService]; + if (String.IsNullOrEmpty(uri)) uri = ProviderSettings[Constants.AppRootDomain]; + string cRMServiceUrl = UrlSchema + uri + ":" + ProviderSettings[Constants.Port] + "/XRMDeployment/2011/Deployment.svc"; + return cRMServiceUrl; + } + } + + protected virtual string CRMDiscoveryUrl + { + get + { + string uri = ProviderSettings[Constants.DiscoveryWebService]; + if (String.IsNullOrEmpty(uri)) uri = ProviderSettings[Constants.AppRootDomain]; + string cRMDiscoveryUri = UrlSchema + uri + ":" + ProviderSettings[Constants.Port] + "/XRMServices/2011/Discovery.svc"; + return cRMDiscoveryUri; + } + } + + private static string crmPath = null; + protected static string CRMPath + { + get + { + if (string.IsNullOrEmpty(crmPath)) + { + RegistryKey root = Registry.LocalMachine; + RegistryKey rk = root.OpenSubKey("SOFTWARE\\Microsoft\\MSCRM"); + if (rk != null) + { + crmPath = (string)rk.GetValue("CRM_Server_InstallDir", string.Empty); + } + } + return crmPath; + } + } + + protected static string CRMDatabaseName = "MSCRM_CONFIG"; + + #endregion + + #region Service + + protected virtual ClientCredentials GetUserLogonCredentials() + { + ClientCredentials credentials = new ClientCredentials(); + + if (String.IsNullOrEmpty(UserName)) + { + credentials.Windows.ClientCredential = System.Net.CredentialCache.DefaultNetworkCredentials; + } + else + { + credentials.UserName.UserName = UserName; + credentials.UserName.Password = Password; + } + + return credentials; + } + + protected virtual DeploymentServiceClient GetDeploymentProxy() + { + Uri serviceUrl = new Uri(CRMDeploymentUrl); + + DeploymentServiceClient deploymentService = Microsoft.Xrm.Sdk.Deployment.Proxy.ProxyClientHelper.CreateClient(serviceUrl); + if (!String.IsNullOrEmpty(UserName)) + deploymentService.ClientCredentials.Windows.ClientCredential = new NetworkCredential(UserName, Password); + + return deploymentService; + } + + protected virtual DiscoveryServiceProxy GetDiscoveryProxy() + { + + IServiceManagement serviceManagement = + ServiceConfigurationFactory.CreateManagement( + new Uri(CRMDiscoveryUrl)); + + ClientCredentials Credentials = GetUserLogonCredentials(); + + DiscoveryServiceProxy r = new DiscoveryServiceProxy(serviceManagement, Credentials); + + return r; + } + + private OrganizationDetailCollection DiscoverOrganizations(IDiscoveryService service) + { + if (service == null) throw new ArgumentNullException("service"); + RetrieveOrganizationsRequest orgRequest = new RetrieveOrganizationsRequest(); + RetrieveOrganizationsResponse orgResponse = + (RetrieveOrganizationsResponse)service.Execute(orgRequest); + + return orgResponse.Details; + } + + protected virtual Uri GetCRMOrganizationUrl(string orgName) + { + //string url = "https://" + ProviderSettings[Constants.AppRootDomain] + ":" + ProviderSettings[Constants.Port] + "/" + orgName + "/XRMServices/2011/Organization.svc"; + + string url; + + string organizationWebServiceUri = ProviderSettings[Constants.OrganizationWebService]; + + if (String.IsNullOrEmpty(orgName)) + return null; + + if (!String.IsNullOrEmpty(organizationWebServiceUri)) + { + url = UrlSchema + organizationWebServiceUri + ":" + ProviderSettings[Constants.Port] + "/" + orgName + "/XRMServices/2011/Organization.svc"; + } + else + { + url = UrlSchema + orgName + "." + ProviderSettings[Constants.IFDWebApplicationRootDomain] + ":" + ProviderSettings[Constants.Port] + "/XRMServices/2011/Organization.svc"; + } + + try + { + + using (DiscoveryServiceProxy serviceProxy = GetDiscoveryProxy()) + { + // Obtain organization information from the Discovery service. + if (serviceProxy != null) + { + // Obtain information about the organizations that the system user belongs to. + OrganizationDetailCollection orgs = DiscoverOrganizations(serviceProxy); + + for (int n = 0; n < orgs.Count; n++) + { + if (orgs[n].UniqueName == orgName) + { + // Return the organization Uri. + return new System.Uri(orgs[n].Endpoints[EndpointType.OrganizationService]); + } + } + + } + } + } + catch { } + + return new Uri(url); + } + + private int getOrganizationProxyTryCount = 10; + private int getOrganizationProxyTryTimeout = 30000; + protected virtual OrganizationServiceProxy GetOrganizationProxy(string orgName) + { + return GetOrganizationProxy(orgName, getOrganizationProxyTryCount, getOrganizationProxyTryTimeout); + } + + protected virtual OrganizationServiceProxy GetOrganizationProxy(string orgName, int TryCount, int TryTimeout) + { + + Uri OrganizationUri = GetCRMOrganizationUrl(orgName); + + OrganizationServiceProxy r = null; + + bool success = false; + int tryItem = 0; + Exception exception = null; + + while (!success) + { + + try + { + // Set IServiceManagement for the current organization. + IServiceManagement orgServiceManagement = + ServiceConfigurationFactory.CreateManagement( + OrganizationUri); + + r = new OrganizationServiceProxy( + orgServiceManagement, + GetUserLogonCredentials()); + + success = true; + + } + catch (Exception exc) + { + Thread.Sleep(TryTimeout); + tryItem++; + if (tryItem >= TryCount) + { + exception = exc; + success = true; + } + } + + } + + if (exception != null) + throw new ArgumentException(exception.ToString()); + + r.EnableProxyTypes(); + + return r; + } + + #endregion + + #region Static constructor + + static CRMBase() + { + AppDomain.CurrentDomain.AssemblyResolve += ResolveCRMAssembly; + } + + static Assembly ResolveCRMAssembly(object sender, ResolveEventArgs args) + { + // Ensure we load DLLs only. + if (args.Name.ToLower().Contains("microsoft.crm") || args.Name.ToLower().Contains("antixsslibrary") || args.Name.ToLower().Contains("microsoft.xrm")) + { + string dllName = args.Name.Split(',')[0] + ".dll"; + + List paths = new List(); + + // assembly location + paths.Add( Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().EscapedCodeBase).LocalPath) ); + // crm tools path + paths.Add(CRMPath); + + foreach(string path in paths) + { + string filename = Path.Combine(path, dllName); + if (File.Exists(filename)) + return Assembly.LoadFrom(filename); + } + } + + return default(Assembly); + } + + #endregion + + #region Check environment + + protected virtual bool CheckCRMWebServicesAccess() + { + Log.WriteStart("CheckCRMWebServicesAccess"); + bool ret = false; + HttpWebResponse response = null; + HttpWebRequest request; + + try + { + WindowsIdentity.GetCurrent(); + + request = WebRequest.Create(CRMDeploymentUrl) as HttpWebRequest; + + if (request != null) + { + request.UseDefaultCredentials = true; + request.Credentials = CredentialCache.DefaultCredentials; + response = request.GetResponse() as HttpWebResponse; + + } + if (response != null) + ret = (response.StatusCode == HttpStatusCode.OK); + } + catch (Exception ex) + { + Log.WriteError(ex); + ret = false; + } + + Log.WriteEnd("CheckCRMWebServicesAccess"); + return ret; + } + + protected virtual bool CheckPermissions() + { + Log.WriteStart("CheckPermissions"); + bool res = false; + try + { + string group = "PrivUserGroup"; + string user = WindowsIdentity.GetCurrent().Name.Split(new char[] { '\\' })[1]; + res = ActiveDirectoryUtils.IsUserInGroup(user, group); + } + catch (Exception ex) + { + Log.WriteError(ex); + res = false; + } + + Log.WriteEnd("CheckPermissions"); + return res; + } + + protected virtual bool CheckOrganizationUnique(string databaseName, string orgName) + { + Log.WriteStart("CheckOrganizationUnique"); + bool res = false; + + SqlConnection connection = null; + try + { + connection = new SqlConnection(); + connection.ConnectionString = + string.Format("Server={1};Initial Catalog={0};Integrated Security=SSPI", + databaseName, SqlServer); + + connection.Open(); + + string commandText = string.Format("SELECT COUNT(*) FROM dbo.Organization WHERE UniqueName = '{0}'", orgName); + SqlCommand command = new SqlCommand(commandText, connection); + int count = (int)command.ExecuteScalar(); + res = count == 0; + + + } + catch (Exception ex) + { + res = false; + Log.WriteError(ex); + } + finally + { + if (connection != null) + connection.Dispose(); + + } + + Log.WriteEnd("CheckOrganizationUnique"); + return res; + } + + protected virtual bool CheckSqlServerConnection() + { + Log.WriteStart("CheckSqlServerConnection"); + bool res = false; + SqlConnection connection = null; + try + { + connection = new SqlConnection(); + connection.ConnectionString = + string.Format("server={0}; Integrated Security=SSPI", + SqlServer); + + connection.Open(); + res = true; + } + catch (Exception ex) + { + Log.WriteError(ex); + res = false; + } + finally + { + if (connection != null) + connection.Dispose(); + } + + Log.WriteEnd("CheckSqlServerConnection"); + + return res; + } + + protected virtual bool CheckReportServerConnection() + { + Log.WriteStart("CheckReportServerConnection"); + bool ret = false; + HttpWebResponse response = null; + HttpWebRequest request; + + try + { + WindowsIdentity.GetCurrent(); + + request = WebRequest.Create(ReportingServer) as HttpWebRequest; + + if (request != null) + { + request.UseDefaultCredentials = true; + request.Credentials = CredentialCache.DefaultCredentials; + response = request.GetResponse() as HttpWebResponse; + + } + if (response != null) + ret = (response.StatusCode == HttpStatusCode.OK); + } + catch (Exception ex) + { + Log.WriteError(ex); + ret = false; + } + + Log.WriteEnd("CheckReportServerConnection"); + return ret; + } + + protected virtual OrganizationResult CheckCrmEnvironment(string strDataBaseName, string organizationUniqueName) + { + OrganizationResult retOrganization = StartLog("CheckCrmEnvironment"); + bool res = CheckSqlServerConnection(); + + if (!res) + { + EndLog("CheckCrmEnvironment", retOrganization, CrmErrorCodes.CRM_SQL_SERVER_ERROR); + return retOrganization; + } + + res = CheckOrganizationUnique(strDataBaseName, organizationUniqueName); + if (!res) + { + EndLog("CheckCrmEnvironment", retOrganization, CrmErrorCodes.CRM_ORGANIZATION_ALREADY_EXISTS); + return retOrganization; + } + + res = CheckReportServerConnection(); + if (!res) + { + EndLog("CheckCrmEnvironment", retOrganization, CrmErrorCodes.CRM_REPORT_SERVER_ERROR); + return retOrganization; + } + + res = CheckPermissions(); + if (!res) + { + EndLog("CheckCrmEnvironment", retOrganization, CrmErrorCodes.CRM_PERMISSIONS_ERROR); + return retOrganization; + } + + res = CheckCRMWebServicesAccess(); + if (!res) + { + EndLog("CheckCrmEnvironment", retOrganization, CrmErrorCodes.CRM_WEB_SERVICE_ERROR); + return retOrganization; + } + + EndLog("CheckCrmEnvironment"); + return retOrganization; + } + + #endregion + + #region DataBase + + protected virtual string GetDataBaseName(Guid organizationId) + { + string databasename = null; + + SqlConnection connection = null; + try + { + connection = new SqlConnection(); + connection.ConnectionString = + string.Format("Server={1};Initial Catalog={0};Integrated Security=SSPI", + CRMDatabaseName, SqlServer); + + connection.Open(); + + string commandText = string.Format("SELECT DatabaseName FROM dbo.Organization where id = '{0}'", organizationId); + SqlCommand command = new SqlCommand(commandText, connection); + object result = command.ExecuteScalar(); + if (result!=null) + databasename = result.ToString(); + + } + catch (Exception ex) + { + Log.WriteError(ex); + } + finally + { + if (connection != null) + connection.Dispose(); + } + + return databasename; + } + + public virtual long GetDBSize(Guid organizationId) + { + StartLog("GetDBSize"); + long res = 0; + + string databasename = GetDataBaseName(organizationId); + if (databasename == null) return 0; + + if (databasename == null) return 0; + + SqlConnection connection = null; + try + { + connection = new SqlConnection(); + connection.ConnectionString = + string.Format("Server={1};Initial Catalog={0};Integrated Security=SSPI", + databasename, SqlServer); + + connection.Open(); + + string commandText = "SELECT ((dbsize ) * 8192 ) size FROM " + // + logsize + "( " + + "SELECT SUM(CONVERT(BIGINT,CASE WHEN status & 64 = 0 THEN size ELSE 0 END)) dbsize " + + ", SUM(CONVERT(BIGINT,CASE WHEN status & 64 <> 0 THEN size ELSE 0 END)) logsize " + + "FROM dbo.sysfiles " + + ") big"; + + SqlCommand command = new SqlCommand(commandText, connection); + res = (long)command.ExecuteScalar(); + + } + catch (Exception ex) + { + EndLog("GetDBSize", null, null, ex); + } + finally + { + if (connection != null) + connection.Dispose(); + + } + + EndLog("GetDBSize"); + return res; + + } + + public virtual long GetMaxDBSize(Guid organizationId) + { + StartLog("GetMaxDBSize"); + long res = 0; + + string databasename = GetDataBaseName(organizationId); + if (databasename == null) return 0; + + SqlConnection connection = null; + try + { + connection = new SqlConnection(); + connection.ConnectionString = + string.Format("Server={1};Initial Catalog={0};Integrated Security=SSPI", + databasename, SqlServer); + + connection.Open(); + + string commandText = "SELECT SUM(CONVERT(BIGINT,CASE WHEN status & 64 = 0 THEN maxsize ELSE 0 END)) dbsize FROM dbo.sysfiles"; + + SqlCommand command = new SqlCommand(commandText, connection); + res = (long)command.ExecuteScalar(); + if (res > 0) res = res * 8192; + + } + catch (Exception ex) + { + EndLog("GetMaxDBSize", null, null, ex); + } + finally + { + if (connection != null) + connection.Dispose(); + + } + + EndLog("GetMaxDBSize"); + return res; + } + + public virtual ResultObject SetMaxDBSize(Guid organizationId, long maxSize) + { + ResultObject res = StartLog("SetMaxDBSize"); + + SqlConnection connection = null; + try + { + string databasename = GetDataBaseName(organizationId); + if (databasename == null) throw new Exception("Can not get database name"); + + connection = new SqlConnection(); + connection.ConnectionString = + string.Format("Server={1};Initial Catalog={0};Integrated Security=SSPI", + databasename, SqlServer); + + connection.Open(); + + string maxSizeStr = maxSize == -1 ? "UNLIMITED" : (maxSize / (1024 * 1024)).ToString() + " MB"; + + string commandText = "ALTER DATABASE [" + databasename + "] MODIFY FILE ( NAME = N'mscrm', MAXSIZE = " + maxSizeStr + " )"; + + SqlCommand command = new SqlCommand(commandText, connection); + command.ExecuteNonQuery(); + + res.IsSuccess = true; + + } + catch (Exception ex) + { + EndLog("SetMaxDBSize", res, CrmErrorCodes.CANNOT_CHANGE_CRM_ORGANIZATION_STATE, ex); + } + finally + { + if (connection != null) + connection.Dispose(); + + } + + EndLog("SetMaxDBSize"); + return res; + } + + #endregion + + #region Organization + + public virtual OrganizationResult CreateOrganization(Guid organizationId, string organizationUniqueName, string organizationFriendlyName, + int baseLanguageCode, + string ou, + string baseCurrencyCode, string baseCurrencyName, string baseCurrencySymbol, + string initialUserDomainName, string initialUserFirstName, string initialUserLastName, string initialUserPrimaryEmail, + string organizationCollation, + long maxSize) + { + return CreateOrganizationInternal(organizationId, organizationUniqueName, organizationFriendlyName, + baseLanguageCode, + ou , baseCurrencyCode, baseCurrencyName, baseCurrencySymbol, + initialUserDomainName, initialUserFirstName, initialUserLastName, initialUserPrimaryEmail, + organizationCollation, + maxSize); + } + + protected const string CRMSysAdminRoleStr = "Системный администратор;System Administrator"; + + internal virtual OrganizationResult CreateOrganizationInternal(Guid organizationId, string organizationUniqueName, string organizationFriendlyName, + int baseLanguageCode, + string ou, + string baseCurrencyCode, string baseCurrencyName, string baseCurrencySymbol, + string initialUserDomainName, string initialUserFirstName, string initialUserLastName, string initialUserPrimaryEmail, + string organizationCollation, + long maxSize) + { + + OrganizationResult ret = StartLog("CreateOrganizationInternal"); + + organizationUniqueName = Regex.Replace(organizationUniqueName, @"[^\dA-Za-z]", "-", RegexOptions.Compiled); + + // calculate UserRootPath + string ldapstr = ""; + + string[] ouItems = ou.Split('.'); + foreach (string ouItem in ouItems) + { + if (ldapstr.Length != 0) ldapstr += ","; + ldapstr += "OU=" + ouItem; + } + + string rootDomain = ServerSettings.ADRootDomain; + string[] domainItems = rootDomain.Split('.'); + foreach (string domainItem in domainItems) + ldapstr += ",DC=" + domainItem; + + ldapstr = @"LDAP://" + rootDomain + "/" + ldapstr; + + + + if (organizationId == Guid.Empty) + throw new ArgumentException("OrganizationId is Guid.Empty"); + + if (string.IsNullOrEmpty(organizationFriendlyName)) + throw new ArgumentNullException("organizationFriendlyName"); + + if (string.IsNullOrEmpty(baseCurrencyCode)) + throw new ArgumentNullException("baseCurrencyCode"); + + if (string.IsNullOrEmpty(baseCurrencySymbol)) + throw new ArgumentNullException("baseCurrencySymbol"); + + if (string.IsNullOrEmpty(initialUserDomainName)) + throw new ArgumentNullException("initialUserDomainName"); + + OrganizationResult retCheckEn = CheckCrmEnvironment(CRMDatabaseName, organizationUniqueName); + + if (!retCheckEn.IsSuccess) + { + ret.ErrorCodes.AddRange(retCheckEn.ErrorCodes); + EndLog("CreateOrganizationInternal", ret, null, null); + return ret; + } + + try + { + + DeploymentServiceClient deploymentService = GetDeploymentProxy(); + + Microsoft.Xrm.Sdk.Deployment.Organization org = new Microsoft.Xrm.Sdk.Deployment.Organization + { + Id = organizationId, + UniqueName = organizationUniqueName, + FriendlyName = organizationFriendlyName, + SqlServerName = SqlServer, + SrsUrl = ReportingServer, + BaseCurrencyCode = baseCurrencyCode, + BaseCurrencyName = baseCurrencyName, + BaseCurrencySymbol = baseCurrencySymbol, + SqlCollation = organizationCollation, + State = Microsoft.Xrm.Sdk.Deployment.OrganizationState.Enabled + }; + + if (baseLanguageCode > 0) + org.BaseLanguageCode = baseLanguageCode; + + BeginCreateOrganizationRequest req = new BeginCreateOrganizationRequest + { + Organization = org + }; + + if (!String.IsNullOrEmpty(UserName)) + { + req.SysAdminName = UserName; + } + + BeginCreateOrganizationResponse resp = deploymentService.Execute(req) as BeginCreateOrganizationResponse; + + if (resp == null) + throw new ArgumentException("BeginCreateOrganizationResponse is Null"); + + EntityInstanceId id = new EntityInstanceId(); + id.Name = org.UniqueName; + + Microsoft.Xrm.Sdk.Deployment.OrganizationState OperationState = Microsoft.Xrm.Sdk.Deployment.OrganizationState.Pending; + + int timeout = 30000; + + do + { + Thread.Sleep(timeout); + try + { + Microsoft.Xrm.Sdk.Deployment.Organization getorg + = (Microsoft.Xrm.Sdk.Deployment.Organization)deploymentService.Retrieve(DeploymentEntityType.Organization, id); + OperationState = getorg.State; + } + catch { } + } while ((OperationState != Microsoft.Xrm.Sdk.Deployment.OrganizationState.Enabled) && + (OperationState != Microsoft.Xrm.Sdk.Deployment.OrganizationState.Failed)); + + if (OperationState == Microsoft.Xrm.Sdk.Deployment.OrganizationState.Failed) + throw new ArgumentException("Create organization failed."); + + // update UserRootPath setting + Microsoft.Xrm.Sdk.Deployment.ConfigurationEntity orgSettings = new Microsoft.Xrm.Sdk.Deployment.ConfigurationEntity + { + Id = org.Id, + LogicalName = "Organization" + }; + orgSettings.Attributes = new Microsoft.Xrm.Sdk.Deployment.AttributeCollection(); + orgSettings.Attributes.Add(new KeyValuePair("UserRootPath", ldapstr)); + Microsoft.Xrm.Sdk.Deployment.UpdateAdvancedSettingsRequest reqUpdateSettings = new Microsoft.Xrm.Sdk.Deployment.UpdateAdvancedSettingsRequest + { + Entity = orgSettings + }; + Microsoft.Xrm.Sdk.Deployment.UpdateAdvancedSettingsResponse respUpdateSettings = (Microsoft.Xrm.Sdk.Deployment.UpdateAdvancedSettingsResponse) deploymentService.Execute(reqUpdateSettings); + + // DB size limit + if (maxSize!=-1) + SetMaxDBSize(organizationId, maxSize); + + int tryTimeout = 30000; + int tryCount = 10; + + bool success = false; + int tryItem = 0; + + while (!success) + { + + try + { + Thread.Sleep(tryTimeout); + + OrganizationServiceProxy _serviceProxy = GetOrganizationProxy(organizationUniqueName, 0, 0); + + string ldap = ""; + + Guid SysAdminGuid = RetrieveSystemUser(GetDomainName(initialUserDomainName), initialUserFirstName, initialUserLastName, CRMSysAdminRoleStr, _serviceProxy, ref ldap, 0); + + success = true; + + } + catch + { + tryItem++; + if (tryItem >= tryCount) + success = true; + } + } + + + } + catch (Exception ex) + { + EndLog("CheckCrmEnvironment", ret, CrmErrorCodes.CREATE_CRM_ORGANIZATION_GENERAL_ERROR, ex); + return ret; + + } + + EndLog("CheckCrmEnvironment"); + + return ret; + } + + protected string GetDomainName(string username) + { + string domain = ActiveDirectoryUtils.GetNETBIOSDomainName(ServerSettings.ADRootDomain); + string ret = string.Format(@"{0}\{1}", domain, username); + return ret; + } + + public virtual string[] GetSupportedCollationNames() + { + return GetSupportedCollationNamesInternal(SqlServer); + } + + internal virtual string[] GetSupportedCollationNamesInternal(string SqlServer) + { + StartLog("GetSupportedCollationNamesInternal"); + + List ret = new List(); + + SqlConnection connection = null; + try + { + connection = new SqlConnection(); + connection.ConnectionString = + string.Format("Server={1};Initial Catalog={0};Integrated Security=SSPI", + CRMDatabaseName, SqlServer); + + connection.Open(); + + string commandText = "select * from fn_helpcollations() where " + + "(name not like '%_WS') AND (name not like '%_KS') AND (name not like '%_100_%') " + + " AND (name not like 'SQL_%') " + + " order by name"; + SqlCommand command = new SqlCommand(commandText, connection); + SqlDataReader reader = command.ExecuteReader(); + + while (reader.Read()) + { + string name = reader["name"] as string; + ret.Add(name); + } + + } + catch (Exception ex) + { + Log.WriteError(ex); + } + finally + { + if (connection != null) + connection.Dispose(); + + } + + EndLog("GetSupportedCollationNamesInternal"); + return ret.ToArray(); + } + + public virtual Currency[] GetCurrencyList() + { + return GetCurrencyListInternal(); + } + + internal virtual Currency[] GetCurrencyListInternal() + { + StartLog("GetCurrencyListInternal"); + List retList = new List(); + + CultureInfo[] cultures = CultureInfo.GetCultures(CultureTypes.AllCultures & ~CultureTypes.NeutralCultures); + + foreach (CultureInfo culture in cultures) + { + if (culture.IsNeutralCulture) continue; + + try + { + RegionInfo Region = new RegionInfo(culture.LCID); + + Currency currency = new Currency(); + currency.RegionName = Region.NativeName; + currency.CurrencyName = Region.CurrencyNativeName; + currency.CurrencyCode = Region.ISOCurrencySymbol; + currency.CurrencySymbol = Region.CurrencySymbol; + retList.Add(currency); + + } + catch + { + continue; + } + } + + retList.Sort(delegate(Currency a, Currency b) { return a.RegionName.CompareTo(b.RegionName); }); + + EndLog("GetCurrencyListInternal"); + return retList.ToArray(); + } + + public virtual int[] GetInstalledLanguagePacks() + { + return GetInstalledLanguagePacksInternal(); + } + + internal virtual int[] GetInstalledLanguagePacksInternal() + { + StartLog("GetInstalledLanguagePacks"); + List res = new List(); + + try + { + RegistryKey root = Registry.LocalMachine; + RegistryKey rk = root.OpenSubKey("SOFTWARE\\Microsoft\\MSCRM"); + + if (rk == null) + rk = root.OpenSubKey("SOFTWARE\\Wow6432Node\\Microsoft\\MSCRM"); + + if (rk == null) throw new Exception("Can't open SOFTWARE\\Microsoft\\MSCRM"); + + RegistryKey langPacksKey = rk.OpenSubKey("LangPacks"); + if (langPacksKey == null) throw new Exception("Can't open SOFTWARE\\Microsoft\\MSCRM\\LangPacks"); + + string[] langPacksId = langPacksKey.GetSubKeyNames(); + + foreach (string strLangId in langPacksId) + { + int langId = 0; + if (int.TryParse(strLangId, out langId)) + res.Add(langId); + } + + } + catch (Exception ex) + { + EndLog("GetInstalledLanguagePacks", null, null, ex); + return null; + } + + EndLog("GetInstalledLanguagePacks"); + return res.ToArray(); + } + + public virtual ResultObject DeleteOrganization(Guid orgId) + { + return DeleteOrganizationInternal(orgId); + } + + internal virtual ResultObject DeleteOrganizationInternal(Guid orgId) + { + ResultObject res = StartLog("DeleteOrganizationInternal"); + + + res.IsSuccess = true; + try + { + DeploymentServiceClient deploymentService = GetDeploymentProxy(); + + EntityInstanceId i = new EntityInstanceId(); + i.Id = orgId; //Organisation Id + + Microsoft.Xrm.Sdk.Deployment.Organization org = (Microsoft.Xrm.Sdk.Deployment.Organization)deploymentService.Retrieve(DeploymentEntityType.Organization, i); + + org.State = Microsoft.Xrm.Sdk.Deployment.OrganizationState.Disabled; + + Microsoft.Xrm.Sdk.Deployment.UpdateRequest updateRequest = new Microsoft.Xrm.Sdk.Deployment.UpdateRequest(); + updateRequest.Entity = org; + + deploymentService.Execute(updateRequest); + + } + catch (Exception ex) + { + EndLog("DeleteOrganizationInternal", res, CrmErrorCodes.DELETE_CRM_ORGANIZATION_GENERAL_ERROR, ex); + return res; + + } + + + EndLog("DeleteOrganizationInternal"); + return res; + } + + public override void DeleteServiceItems(ServiceProviderItem[] items) + { + foreach (ServiceProviderItem item in items) + { + try + { + if (item is Organization) + { + Organization org = item as Organization; + DeleteOrganization(org.CrmOrganizationId); + } + + } + catch (Exception ex) + { + Log.WriteError(String.Format("Error deleting '{0}' {1}", item.Name, item.GetType().Name), ex); + } + } + base.DeleteServiceItems(items); + + } + + #endregion + + #region Log + + private static void EndLog(string message, ResultObject res, string errorCode, Exception ex) + { + if (res != null) + { + res.IsSuccess = false; + + if (!string.IsNullOrEmpty(errorCode)) + res.ErrorCodes.Add(errorCode); + } + + if (ex != null) + HostedSolutionLog.LogError(ex); + + HostedSolutionLog.LogEnd(message); + } + + private static void EndLog(string message, ResultObject res, string errorCode) + { + EndLog(message, res, errorCode, null); + } + + private static void EndLog(string message, ResultObject res) + { + EndLog(message, res, null); + } + + private static void EndLog(string message) + { + EndLog(message, null); + } + + private static T StartLog(string message) where T : ResultObject, new() + { + HostedSolutionLog.LogStart(message); + T res = new T(); + res.IsSuccess = true; + return res; + } + + private static void StartLog(string message) + { + HostedSolutionLog.LogStart(message); + } + + #endregion + + #region User + + public virtual UserResult CreateCRMUser(OrganizationUser user, string orgName, Guid organizationId, Guid baseUnitId, int CALType) + { + return CreateCRMUserInternal(user, orgName, organizationId, baseUnitId, CALType); + } + + internal virtual UserResult CreateCRMUserInternal(OrganizationUser user, string orgName, Guid organizationId, Guid businessUnitId, int CALType) + { + UserResult res = StartLog("CreateCRMUserInternal"); + + try + { + if (user == null) + throw new ArgumentNullException("user"); + + if (string.IsNullOrEmpty(orgName)) + throw new ArgumentNullException("orgName"); + + if (organizationId == Guid.Empty) + throw new ArgumentException("organizationId"); + + if (businessUnitId == Guid.Empty) + throw new ArgumentException("businessUnitId"); + + try + { + OrganizationServiceProxy _serviceProxy = GetOrganizationProxy(orgName); + + + string ldap = ""; + Guid guid = RetrieveSystemUser(user.DomainUserName, user.FirstName, user.LastName, CRMSysAdminRoleStr, _serviceProxy, ref ldap, CALType); + + user.CrmUserId = guid; + res.Value = user; + + } + catch (Exception ex) + { + EndLog("CreateCRMUserInternal", res, CrmErrorCodes.CANNOT_CREATE_CRM_USER, ex); + return res; + } + } + catch (Exception ex) + { + EndLog("CreateCRMUserInternal", res, CrmErrorCodes.CANNOT_CREATE_CRM_USER_GENERAL_ERROR, ex); + return res; + + } + + EndLog("CreateCRMUserInternal"); + return res; + } + + protected virtual Guid CreateSystemUser(String userName, String firstName, + String lastName, String domain, String roleStr, + OrganizationServiceProxy serviceProxy, ref String ldapPath, int CALType) + { + + if (serviceProxy.ServiceConfiguration.AuthenticationType == AuthenticationProviderType.LiveId || + serviceProxy.ServiceConfiguration.AuthenticationType == AuthenticationProviderType.OnlineFederation) + throw new Exception(String.Format("To run this sample, {0} {1} must be an active system user in your Microsoft Dynamics CRM Online organization.", firstName, lastName)); + + Guid userId = Guid.Empty; + + Microsoft.Xrm.Sdk.Query.QueryExpression businessUnitQuery = new Microsoft.Xrm.Sdk.Query.QueryExpression + { + EntityName = BusinessUnit.EntityLogicalName, + ColumnSet = new Microsoft.Xrm.Sdk.Query.ColumnSet("businessunitid"), + Criteria = + { + Conditions = + { + new Microsoft.Xrm.Sdk.Query.ConditionExpression("parentbusinessunitid", + Microsoft.Xrm.Sdk.Query.ConditionOperator.Null) + } + } + }; + + BusinessUnit defaultBusinessUnit = serviceProxy.RetrieveMultiple( + businessUnitQuery).Entities[0].ToEntity(); + + // Retrieve the specified security role. + Role role = RetrieveRoleByName(serviceProxy, roleStr); + + // CALType and AccessMode + int accessmode = CALType / 10; + int caltype = CALType % 10; + + //Create a new system user. + SystemUser user = new SystemUser + { + DomainName = userName, + FirstName = firstName, + LastName = lastName, + BusinessUnitId = new EntityReference + { + LogicalName = BusinessUnit.EntityLogicalName, + Name = BusinessUnit.EntityLogicalName, + Id = defaultBusinessUnit.Id + }, + CALType = new OptionSetValue(caltype), + AccessMode = new OptionSetValue(accessmode) + }; + userId = serviceProxy.Create(user); + + // Assign the security role to the newly created Microsoft Dynamics CRM user. + AssociateRequest associate = new AssociateRequest() + { + Target = new EntityReference(SystemUser.EntityLogicalName, userId), + RelatedEntities = new EntityReferenceCollection() + { + new EntityReference(Role.EntityLogicalName, role.Id), + }, + Relationship = new Relationship("systemuserroles_association") + }; + serviceProxy.Execute(associate); + + return userId; + } + + + protected virtual Guid RetrieveSystemUser(String userName, String firstName, + String lastName, String roleStr, OrganizationServiceProxy serviceProxy, + ref String ldapPath, + int CALType) + { + String domain; + Guid userId = Guid.Empty; + + if (serviceProxy == null) + throw new ArgumentNullException("serviceProxy"); + + if (String.IsNullOrWhiteSpace(userName)) + throw new ArgumentNullException("UserName"); + + if (String.IsNullOrWhiteSpace(firstName)) + throw new ArgumentNullException("FirstName"); + + if (String.IsNullOrWhiteSpace(lastName)) + throw new ArgumentNullException("LastName"); + + if (String.IsNullOrWhiteSpace(roleStr)) + throw new ArgumentNullException("Role"); + + // Obtain the current user's information. + Microsoft.Crm.Sdk.Messages.WhoAmIRequest who = new Microsoft.Crm.Sdk.Messages.WhoAmIRequest(); + Microsoft.Crm.Sdk.Messages.WhoAmIResponse whoResp = (Microsoft.Crm.Sdk.Messages.WhoAmIResponse)serviceProxy.Execute(who); + Guid currentUserId = whoResp.UserId; + + SystemUser currentUser = + serviceProxy.Retrieve(SystemUser.EntityLogicalName, currentUserId, new Microsoft.Xrm.Sdk.Query.ColumnSet("domainname")).ToEntity(); + + // Extract the domain and create the LDAP object. + String[] userPath = currentUser.DomainName.Split(new char[] { '\\' }); + if (userPath.Length > 1) + domain = userPath[0] + "\\"; + else + domain = String.Empty; + + // Create the system user in Microsoft Dynamics CRM if the user doesn't + // already exist. + Microsoft.Xrm.Sdk.Query.QueryExpression userQuery = new Microsoft.Xrm.Sdk.Query.QueryExpression + { + EntityName = SystemUser.EntityLogicalName, + ColumnSet = new Microsoft.Xrm.Sdk.Query.ColumnSet("systemuserid"), + Criteria = + { + FilterOperator = Microsoft.Xrm.Sdk.Query.LogicalOperator.Or, + Filters = + { + new Microsoft.Xrm.Sdk.Query.FilterExpression + { + FilterOperator = Microsoft.Xrm.Sdk.Query.LogicalOperator.And, + Conditions = + { + new Microsoft.Xrm.Sdk.Query.ConditionExpression("domainname", Microsoft.Xrm.Sdk.Query.ConditionOperator.Equal, domain + userName) + } + }, + new Microsoft.Xrm.Sdk.Query.FilterExpression + { + FilterOperator = Microsoft.Xrm.Sdk.Query.LogicalOperator.And, + Conditions = + { + new Microsoft.Xrm.Sdk.Query.ConditionExpression("firstname", Microsoft.Xrm.Sdk.Query.ConditionOperator.Equal, firstName), + new Microsoft.Xrm.Sdk.Query.ConditionExpression("lastname", Microsoft.Xrm.Sdk.Query.ConditionOperator.Equal, lastName) + } + } + } + + } + }; + + DataCollection existingUsers = (DataCollection)serviceProxy.RetrieveMultiple(userQuery).Entities; + + SystemUser existingUser = null; + if (existingUsers.Count > 0) + existingUser = existingUsers[0].ToEntity(); + + if (existingUser != null) + { + userId = existingUser.SystemUserId.Value; + + // Check to make sure the user is assigned the correct role. + Role role = RetrieveRoleByName(serviceProxy, roleStr); + + // Associate the user with the role when needed. + if (!UserInRole(serviceProxy, userId, role.Id)) + { + AssociateRequest associate = new AssociateRequest() + { + Target = new EntityReference(SystemUser.EntityLogicalName, userId), + RelatedEntities = new EntityReferenceCollection() + { + new EntityReference(Role.EntityLogicalName, role.Id) + }, + Relationship = new Relationship("systemuserroles_association") + }; + serviceProxy.Execute(associate); + } + + } + else + { + userId = CreateSystemUser(userName, firstName, lastName, domain, + roleStr, serviceProxy, ref ldapPath, CALType); + } + + return userId; + } + + public virtual CrmUserResult GetCrmUserById(Guid crmUserId, string orgName) + { + return GetCrmUserByIdInternal(crmUserId, orgName); + } + + internal virtual CrmUserResult GetCrmUserByIdInternal(Guid crmUserId, string orgName) + { + CrmUserResult ret = StartLog("GetCrmUserByIdInternal"); + + try + { + if (crmUserId == Guid.Empty) + throw new ArgumentNullException("crmUserId"); + + if (string.IsNullOrEmpty(orgName)) + throw new ArgumentNullException("orgName"); + + OrganizationServiceProxy serviceProxy = GetOrganizationProxy(orgName); + + SystemUser retruveUser = + serviceProxy.Retrieve(SystemUser.EntityLogicalName, crmUserId, new Microsoft.Xrm.Sdk.Query.ColumnSet("domainname", "businessunitid", "accessmode", "isdisabled", "caltype")).ToEntity(); + + CrmUser user = null; + + if (retruveUser != null) + { + user = new CrmUser(); + user.BusinessUnitId = retruveUser.BusinessUnitId.Id; + user.CRMUserId = retruveUser.SystemUserId.Value; + user.ClientAccessMode = (CRMUserAccessMode)retruveUser.AccessMode.Value; + user.IsDisabled = (bool)retruveUser.IsDisabled; + user.CALType = retruveUser.CALType.Value; + + ret.Value = user; + } + } + catch (Exception ex) + { + EndLog("GetCrmUserByIdInternal", ret, CrmErrorCodes.CANONT_GET_CRM_USER_BY_ID, ex); + return ret; + } + + EndLog("GetCrmUserByIdInternal"); + return ret; + } + + internal virtual CrmUserResult GetCrmUserByDomainNameInternal(string domainName, string orgName) + { + CrmUserResult ret = StartLog("GetCrmUserByDomainNameInternal"); + + try + { + if (string.IsNullOrEmpty(domainName)) + throw new ArgumentNullException("domainName"); + + if (string.IsNullOrEmpty(orgName)) + throw new ArgumentNullException("orgName"); + + + OrganizationServiceProxy serviceProxy = GetOrganizationProxy(orgName); + + Microsoft.Xrm.Sdk.Query.QueryExpression usereQuery = new Microsoft.Xrm.Sdk.Query.QueryExpression + { + EntityName = SystemUser.EntityLogicalName, + ColumnSet = new Microsoft.Xrm.Sdk.Query.ColumnSet("domainname", "businessunitid", "accessmode", "isdisabled", "systemuserid", "caltype"), + }; + + EntityCollection users = serviceProxy.RetrieveMultiple(usereQuery); + + foreach (Entity entityuser in users.Entities) + { + SystemUser sysuser = entityuser.ToEntity(); + + if (sysuser == null) continue; + if (sysuser.DomainName != domainName) continue; + + CrmUser user = new CrmUser(); + user.BusinessUnitId = sysuser.BusinessUnitId.Id; + user.CRMUserId = sysuser.SystemUserId.Value; + user.ClientAccessMode = (CRMUserAccessMode)sysuser.AccessMode.Value; + user.IsDisabled = sysuser.IsDisabled.Value; + user.CALType = sysuser.CALType.Value; + ret.Value = user; + } + } + catch (Exception ex) + { + EndLog("GetCrmUserByDomainNameInternal", ret, CrmErrorCodes.CANONT_GET_CRM_USER_BY_DOMAIN_NAME, ex); + return ret; + } + + EndLog("GetCrmUserByDomainNameInternal"); + return ret; + } + + public virtual CrmUserResult GetCrmUserByDomainName(string domainName, string orgName) + { + return GetCrmUserByDomainNameInternal(domainName, orgName); + } + + public virtual ResultObject ChangeUserState(bool disable, string orgName, Guid crmUserId) + { + return ChangeUserStateInternal(disable, orgName, crmUserId); + } + + internal virtual ResultObject ChangeUserStateInternal(bool disable, string orgName, Guid crmUserId) + { + ResultObject res = StartLog("ChangeUserStateInternal"); + + res.IsSuccess = true; + try + { + if (crmUserId == Guid.Empty) + throw new ArgumentNullException("crmUserId"); + + if (string.IsNullOrEmpty(orgName)) + throw new ArgumentNullException("orgName"); + + OrganizationServiceProxy serviceProxy = GetOrganizationProxy(orgName); + + // Retrieve a user. + SystemUser user = serviceProxy.Retrieve(SystemUser.EntityLogicalName, + crmUserId, new Microsoft.Xrm.Sdk.Query.ColumnSet(new String[] { "systemuserid", "firstname", "lastname" })).ToEntity(); + + if (user != null) + { + Microsoft.Crm.Sdk.Messages.SetStateRequest request = new Microsoft.Crm.Sdk.Messages.SetStateRequest() + { + EntityMoniker = user.ToEntityReference(), + + // Required by request but always valued at -1 in this context. + Status = new OptionSetValue(-1), + + // Sets the user to disabled. + State = disable ? new OptionSetValue(-1) : new OptionSetValue(0) + }; + + serviceProxy.Execute(request); + + } + } + catch (Exception ex) + { + EndLog("ChangeUserStateInternal", res, CrmErrorCodes.CANNOT_CHANGE_USER_STATE, ex); + return res; + } + + + EndLog("ChangeUserStateInternal"); + return res; + } + + public virtual ResultObject SetUserCALType(string orgName, Guid userId, int CALType) + { + return SetUserCALTypeInternal(orgName, userId, CALType); + } + + internal virtual ResultObject SetUserCALTypeInternal(string orgName, Guid userId, int CALType) + { + ResultObject ret = StartLog("SetUserCALTypeInternal"); + + try + { + if (userId == Guid.Empty) + throw new ArgumentNullException("crmUserId"); + + if (string.IsNullOrEmpty(orgName)) + throw new ArgumentNullException("orgName"); + + OrganizationServiceProxy serviceProxy = GetOrganizationProxy(orgName); + + SystemUser user = + serviceProxy.Retrieve(SystemUser.EntityLogicalName, userId, new Microsoft.Xrm.Sdk.Query.ColumnSet("domainname", "businessunitid", "accessmode", "isdisabled", "caltype")).ToEntity(); + + // CALType and AccessMode + int accessmode = CALType / 10; + int caltype = CALType % 10; + + user.CALType = new OptionSetValue(caltype); + user.AccessMode = new OptionSetValue(accessmode); + + serviceProxy.Update(user); + + } + catch (Exception ex) + { + EndLog("SetUserCALTypeInternal", ret, CrmErrorCodes.CANONT_GET_CRM_USER_BY_ID, ex); + return ret; + } + + EndLog("SetUserCALTypeInternal"); + return ret; + } + + #endregion + + #region Role + + protected virtual Role RetrieveRoleByName(OrganizationServiceProxy serviceProxy, + String roleSplitStr) + { + string[] RolesStr = roleSplitStr.Split(';'); + + foreach (string roleStr in RolesStr) + { + + Microsoft.Xrm.Sdk.Query.QueryExpression roleQuery = new Microsoft.Xrm.Sdk.Query.QueryExpression + { + EntityName = Role.EntityLogicalName, + ColumnSet = new Microsoft.Xrm.Sdk.Query.ColumnSet("roleid"), + Criteria = + { + Conditions = + { + new Microsoft.Xrm.Sdk.Query.ConditionExpression("name", Microsoft.Xrm.Sdk.Query.ConditionOperator.Equal, roleStr) + } + } + }; + + DataCollection roles = serviceProxy.RetrieveMultiple(roleQuery).Entities; + + if (roles.Count > 0) return roles[0].ToEntity(); + } + + return null; + } + + protected virtual bool UserInRole(OrganizationServiceProxy serviceProxy, + Guid userId, Guid roleId) + { + // Establish a SystemUser link for a query. + Microsoft.Xrm.Sdk.Query.LinkEntity systemUserLink = new Microsoft.Xrm.Sdk.Query.LinkEntity() + { + LinkFromEntityName = SystemUserRoles.EntityLogicalName, + LinkFromAttributeName = "systemuserid", + LinkToEntityName = SystemUser.EntityLogicalName, + LinkToAttributeName = "systemuserid", + LinkCriteria = + { + Conditions = + { + new Microsoft.Xrm.Sdk.Query.ConditionExpression( + "systemuserid", Microsoft.Xrm.Sdk.Query.ConditionOperator.Equal, userId) + } + } + }; + + // Build the query. + Microsoft.Xrm.Sdk.Query.QueryExpression query = new Microsoft.Xrm.Sdk.Query.QueryExpression() + { + EntityName = Role.EntityLogicalName, + ColumnSet = new Microsoft.Xrm.Sdk.Query.ColumnSet("roleid"), + LinkEntities = + { + new Microsoft.Xrm.Sdk.Query.LinkEntity() + { + LinkFromEntityName = Role.EntityLogicalName, + LinkFromAttributeName = "roleid", + LinkToEntityName = SystemUserRoles.EntityLogicalName, + LinkToAttributeName = "roleid", + LinkEntities = {systemUserLink} + } + }, + Criteria = + { + Conditions = + { + new Microsoft.Xrm.Sdk.Query.ConditionExpression("roleid", Microsoft.Xrm.Sdk.Query.ConditionOperator.Equal, roleId) + } + } + }; + + // Retrieve matching roles. + EntityCollection ec = serviceProxy.RetrieveMultiple(query); + + if (ec.Entities.Count > 0) + return true; + + return false; + } + + public virtual CrmRolesResult GetAllCrmRoles(string orgName, Guid businessUnitId) + { + return GetAllCrmRolesInternal(orgName, businessUnitId); + } + + public virtual CrmRolesResult GetCrmUserRoles(string orgName, Guid userId) + { + return GetCrmUserRolesInternal(userId, orgName); + } + + public virtual EntityCollection GetUserRoles(Guid userId, string orgName) + { + OrganizationServiceProxy serviceProxy = GetOrganizationProxy(orgName); + + // Establish a SystemUser link for a query. + Microsoft.Xrm.Sdk.Query.LinkEntity systemUserLink = new Microsoft.Xrm.Sdk.Query.LinkEntity() + { + LinkFromEntityName = SystemUserRoles.EntityLogicalName, + LinkFromAttributeName = "systemuserid", + LinkToEntityName = SystemUser.EntityLogicalName, + LinkToAttributeName = "systemuserid", + LinkCriteria = + { + Conditions = + { + new Microsoft.Xrm.Sdk.Query.ConditionExpression( + "systemuserid", Microsoft.Xrm.Sdk.Query.ConditionOperator.Equal, userId) + } + } + }; + + // Build the query. + Microsoft.Xrm.Sdk.Query.QueryExpression query = new Microsoft.Xrm.Sdk.Query.QueryExpression() + { + EntityName = Role.EntityLogicalName, + ColumnSet = new Microsoft.Xrm.Sdk.Query.ColumnSet("roleid"), + LinkEntities = + { + new Microsoft.Xrm.Sdk.Query.LinkEntity() + { + LinkFromEntityName = Role.EntityLogicalName, + LinkFromAttributeName = "roleid", + LinkToEntityName = SystemUserRoles.EntityLogicalName, + LinkToAttributeName = "roleid", + LinkEntities = {systemUserLink} + } + } + }; + + // Retrieve matching roles. + EntityCollection relations = serviceProxy.RetrieveMultiple(query); + + return relations; + } + + internal virtual CrmRolesResult GetCrmUserRolesInternal(Guid userId, string orgName) + { + CrmRolesResult res = StartLog("GetCrmUserRolesInternal"); + + try + { + EntityCollection relations; + + if (userId == Guid.Empty) + throw new ArgumentException("userId"); + + if (string.IsNullOrEmpty(orgName)) + throw new ArgumentNullException("orgName"); + + try + { + relations = GetUserRoles(userId, orgName); + } + catch (Exception ex) + { + EndLog("GetCrmUserRolesInternal", res, CrmErrorCodes.CANNOT_GET_CRM_USER_ROLES, ex); + return res; + } + + try + { + res.Value = FillCrmRoles(relations, true, Guid.Empty); + } + catch (Exception ex) + { + EndLog("GetCrmUserRolesInternal", res, CrmErrorCodes.CANNOT_FILL_ROLES_COLLECTION, ex); + return res; + } + } + catch (Exception ex) + { + EndLog("GetCrmUserRolesInternal", res, CrmErrorCodes.GET_CRM_USER_ROLE_GENERAL_ERROR, ex); + return res; + } + + EndLog("GetCrmUserRolesInternal"); + return res; + } + + protected static string excludedRolesStr = ";пользователь поддержки;support user;"; + + protected virtual List FillCrmRoles(EntityCollection entities, bool isUserRole, Guid businessUnitId) + { + List res = new List(); + + foreach (Entity current in entities.Entities) + { + Role role = current.ToEntity(); + + if (role == null) continue; + + if (businessUnitId != Guid.Empty) + { + if (businessUnitId != role.BusinessUnitId.Id) + continue; + } + + string roleName = role.Name; + + if (roleName != null) + if (excludedRolesStr.IndexOf(";" + roleName.ToLower() + ";") != -1) + continue; + + CrmRole crmRole = new CrmRole(); + crmRole.IsCurrentUserRole = isUserRole; + crmRole.RoleId = (Guid)role.RoleId; + crmRole.RoleName = roleName; + + res.Add(crmRole); + } + + return res; + } + + protected virtual List FillCrmRoles(EntityCollection entities, Guid businessUnitId) + { + return FillCrmRoles(entities, false, businessUnitId); + } + + internal virtual CrmRolesResult GetAllCrmRolesInternal(string orgName, Guid businessUnitId) + { + CrmRolesResult res = StartLog("GetAllCrmRoles"); + + try + { + if (string.IsNullOrEmpty(orgName)) + throw new ArgumentNullException("orgName"); + + EntityCollection roles; + try + { + OrganizationServiceProxy serviceProxy = GetOrganizationProxy(orgName); + + Microsoft.Xrm.Sdk.Query.QueryExpression roleQuery = new Microsoft.Xrm.Sdk.Query.QueryExpression + { + EntityName = Role.EntityLogicalName, + ColumnSet = new Microsoft.Xrm.Sdk.Query.ColumnSet(new string[] { "roleid", "name", "businessunitid" }), + }; + + roles = serviceProxy.RetrieveMultiple(roleQuery); + + + } + catch (Exception ex) + { + EndLog("GetAllCrmRoles", res, CrmErrorCodes.CANNOT_GET_ALL_CRM_ROLES, ex); + return res; + } + + try + { + List crmRoles = FillCrmRoles(roles, businessUnitId); + res.Value = crmRoles; + } + catch (Exception ex) + { + EndLog("GetAllCrmRoles", res, CrmErrorCodes.CANNOT_FILL_ROLES_COLLECTION, ex); + return res; + } + } + catch (Exception ex) + { + EndLog("GetAllCrmRoles", res, CrmErrorCodes.GET_ALL_CRM_ROLES_GENERAL_ERROR, ex); + return res; + } + + EndLog("GetAllCrmRoles"); + return res; + } + + public virtual ResultObject SetUserRoles(string orgName, Guid userId, Guid[] roles) + { + return SetUserRolesInternal(orgName, userId, roles); + } + + internal virtual ResultObject SetUserRolesInternal(string orgName, Guid userId, Guid[] roles) + { + CrmRolesResult res = StartLog("SetUserRolesInternal"); + + try + { + if (string.IsNullOrEmpty(orgName)) + throw new ArgumentNullException("orgName"); + + if (userId == Guid.Empty) + throw new ArgumentException("userId"); + + if (roles == null) + throw new ArgumentNullException("roles"); + + OrganizationServiceProxy serviceProxy = GetOrganizationProxy(orgName); + + + CrmRolesResult tmpRoles = GetCrmUserRoles(orgName, userId); + res.ErrorCodes.AddRange(tmpRoles.ErrorCodes); + + if (!tmpRoles.IsSuccess) + return res; + + List remRoles = new List(); + + for (int i = 0; i < tmpRoles.Value.Count; i++) + { + if (Array.Find(roles, delegate(Guid current) { return current == tmpRoles.Value[i].RoleId; }) == Guid.Empty) + { + remRoles.Add(tmpRoles.Value[i].RoleId); + } + } + + try + { + DisassociateRequest removeRole = new DisassociateRequest() + { + Target = new EntityReference(SystemUser.EntityLogicalName, userId), + RelatedEntities = new EntityReferenceCollection(), + Relationship = new Relationship("systemuserroles_association") + }; + + for (int i = 0; i < remRoles.Count; i++) + removeRole.RelatedEntities.Add(new EntityReference(Role.EntityLogicalName, remRoles[i])); + + serviceProxy.Execute(removeRole); + + } + catch (Exception ex) + { + EndLog("SetUserRolesInternal", res, CrmErrorCodes.CANNOT_REMOVE_CRM_USER_ROLES, ex); + return res; + } + + + try + { + // Assign the security role to the newly created Microsoft Dynamics CRM user. + AssociateRequest associate = new AssociateRequest() + { + Target = new EntityReference(SystemUser.EntityLogicalName, userId), + RelatedEntities = new EntityReferenceCollection(), + Relationship = new Relationship("systemuserroles_association") + }; + + for (int i = 0; i < roles.Length; i++) + { + bool find = false; + foreach (CrmRole current in tmpRoles.Value) + { + if (current.RoleId == roles[i]) + find = true; + } + if (find) continue; + + associate.RelatedEntities.Add(new EntityReference(Role.EntityLogicalName, roles[i])); + } + + serviceProxy.Execute(associate); + } + catch (Exception ex) + { + EndLog("SetUserRolesInternal", res, CrmErrorCodes.CANNOT_ASSIGN_CRM_USER_ROLES, ex); + return res; + } + + } + catch (Exception ex) + { + EndLog("SetUserRolesInternal", res, CrmErrorCodes.CANNOT_SET_CRM_USER_ROLES_GENERAL_ERROR, ex); + return res; + } + + + EndLog("SetUserRolesInternal"); + return res; + + } + + #endregion + + #region Business Units + + internal virtual CRMBusinessUnitsResult GetOrganizationBusinessUnitsInternal(Guid organizationId, string orgName) + { + CRMBusinessUnitsResult res = StartLog("GetOrganizationBusinessUnitsInternal"); + + try + { + if (organizationId == Guid.Empty) + throw new ArgumentException("organizationId"); + + if (string.IsNullOrEmpty(orgName)) + throw new ArgumentNullException("orgName"); + + OrganizationServiceProxy serviceProxy; + + try + { + serviceProxy = GetOrganizationProxy(orgName); + } + catch (Exception ex) + { + EndLog("GetOrganizationBusinessUnitsInternal", res, CrmErrorCodes.CANNOT_GET_CRM_SERVICE, ex); + return res; + } + + DataCollection BusinessUnits; + + try + { + + Microsoft.Xrm.Sdk.Query.QueryExpression businessUnitQuery = new Microsoft.Xrm.Sdk.Query.QueryExpression + { + EntityName = BusinessUnit.EntityLogicalName, + ColumnSet = new Microsoft.Xrm.Sdk.Query.ColumnSet(new string[] { "businessunitid", "name" }), + Criteria = + { + Conditions = + { + new Microsoft.Xrm.Sdk.Query.ConditionExpression("parentbusinessunitid", + Microsoft.Xrm.Sdk.Query.ConditionOperator.Null) + } + } + }; + + BusinessUnits = serviceProxy.RetrieveMultiple( + businessUnitQuery).Entities; + + } + catch (Exception ex) + { + EndLog("GetOrganizationBusinessUnitsInternal", res, CrmErrorCodes.CANNOT_GET_CRM_BUSINESS_UNITS, ex); + return res; + } + + List businessUnits = new List(); + + try + { + for (int i = 0; i < BusinessUnits.Count; i++) + { + BusinessUnit bu = BusinessUnits[i].ToEntity(); + + CRMBusinessUnit unit = new CRMBusinessUnit(); + unit.BusinessUnitId = (Guid)bu.BusinessUnitId; + unit.BusinessUnitName = bu.Name; + + if (unit.BusinessUnitName == null) + unit.BusinessUnitName = "default"; + + businessUnits.Add(unit); + + } + + res.Value = businessUnits; + } + catch (Exception ex) + { + EndLog("GetOrganizationBusinessUnitsInternal", res, CrmErrorCodes.CANNOT_FILL_BASE_UNITS_COLLECTION, + ex); + return res; + } + } + catch (Exception ex) + { + EndLog("GetOrganizationBusinessUnitsInternal", res, CrmErrorCodes.GET_ORGANIZATION_BUSINESS_UNITS_GENERAL_ERROR, + ex); + return res; + + } + + EndLog("GetOrganizationBusinessUnitsInternal"); + return res; + + } + + public virtual CRMBusinessUnitsResult GetOrganizationBusinessUnits(Guid organizationId, string orgName) + { + return GetOrganizationBusinessUnitsInternal(organizationId, orgName); + } + + #endregion + + #region Version + + public virtual string CRMServerVersion + { + get + { + string value = ""; + try + { + RegistryKey root = Registry.LocalMachine; + RegistryKey rk = root.OpenSubKey("SOFTWARE\\Microsoft\\MSCRM"); + + if (rk == null) + rk = root.OpenSubKey("SOFTWARE\\Wow6432Node\\Microsoft\\MSCRM"); + + if (rk != null) + { + value = (string)rk.GetValue("CRM_Server_Version", null); + rk.Close(); + } + } + catch (Exception ex) + { + Log.WriteError(ex); + } + + return value; + } + + } + + public override bool IsInstalled() + { + return false; + } + + #endregion + + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Crm2011/CRMProvider2011.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Crm2011/CRMProvider2011.cs index bc57d5e3..e5b51975 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Crm2011/CRMProvider2011.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Crm2011/CRMProvider2011.cs @@ -26,1964 +26,47 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + using System; -using System.Collections.Generic; -using System.Data; -using System.Data.SqlClient; -using System.Globalization; -using System.IO; -using System.Net; -using System.Reflection; -using System.Net.Security; -using System.Security.Principal; -using System.Security.Cryptography.X509Certificates; -using System.Threading; -using System.ServiceModel.Description; -using System.Text.RegularExpressions; -using Microsoft.Win32; -using WebsitePanel.Providers.Common; -using WebsitePanel.Providers.ResultObjects; -using WebsitePanel.Server.Utils; using WebsitePanel.Providers.HostedSolution; -using WebsitePanel.Providers; -using WebsitePanel.Providers.Utils; -using Microsoft.Xrm.Sdk; -using Microsoft.Xrm.Sdk.Query; -using Microsoft.Xrm.Sdk.Discovery; -using Microsoft.Xrm.Sdk.Client; -using Microsoft.Xrm.Sdk.Deployment; -using Microsoft.Xrm.Sdk.Messages; namespace WebsitePanel.Providers.HostedSolution { - public class CRMProvider2011 : HostingServiceProviderBase, ICRM + public class CRMProvider2011 : CRMBase { - private static string crmPath = null; - - #region Properties - - private string UserName - { - get { return ProviderSettings[Constants.UserName]; } - } - - private string Password - { - get { return ProviderSettings[Constants.Password]; } - } - - private string SqlServer - { - get { return ProviderSettings[Constants.SqlServer]; } - } - - private string ReportingServer - { - get { return ProviderSettings[Constants.ReportingServer]; } - } - - private string CRMServiceUrl - { - get - { - string uri = ProviderSettings[Constants.DeploymentWebService]; - if (String.IsNullOrEmpty(uri)) uri = ProviderSettings[Constants.AppRootDomain]; - string cRMServiceUrl = "https://" + uri + ":" + ProviderSettings[Constants.Port] + "/XRMDeployment/2011/Deployment.svc"; - return cRMServiceUrl; - } - } - - private string CRMDiscoveryUri - { - get - { - string uri = ProviderSettings[Constants.DiscoveryWebService]; - if (String.IsNullOrEmpty(uri)) uri = ProviderSettings[Constants.AppRootDomain]; - string cRMDiscoveryUri = "https://" + uri + ":" + ProviderSettings[Constants.Port] + "/XRMServices/2011/Discovery.svc"; - return cRMDiscoveryUri; - } - } - - private static string CrmPath - { - get - { - if (string.IsNullOrEmpty(crmPath)) - { - RegistryKey root = Registry.LocalMachine; - RegistryKey rk = root.OpenSubKey("SOFTWARE\\Microsoft\\MSCRM"); - if (rk != null) - { - crmPath = (string)rk.GetValue("CRM_Server_InstallDir", string.Empty); - } - } - return crmPath; - } - } - - #endregion - - - #region Static constructor - - static CRMProvider2011() - { - AppDomain.CurrentDomain.AssemblyResolve += ResolveCRMAssembly; - } - - #endregion - - static Assembly ResolveCRMAssembly(object sender, ResolveEventArgs args) - { - var loadedAssembly = default(Assembly); - // Ensure we load DLLs only. - if (args.Name.ToLower().Contains("microsoft.crm") || args.Name.ToLower().Contains("antixsslibrary")) - { - // - string crmToolsPath = Path.Combine(CrmPath, "tools"); - // - string path = Path.Combine(crmToolsPath, args.Name.Split(',')[0] + ".dll"); - // Call to load an assembly only if its existence is confirmed. - if (File.Exists(path)) - { - loadedAssembly = Assembly.LoadFrom(path); - } - } - // - return loadedAssembly; - } - - private bool CheckCRMWebServicesAccess() - { - Log.WriteStart("CheckCRMWebServicesAccess"); - bool ret = false; - HttpWebResponse response = null; - HttpWebRequest request; - - try - { - WindowsIdentity.GetCurrent(); - - request = WebRequest.Create(CRMServiceUrl) as HttpWebRequest; - - if (request != null) - { - request.UseDefaultCredentials = true; - request.Credentials = CredentialCache.DefaultCredentials; - response = request.GetResponse() as HttpWebResponse; - - } - if (response != null) - ret = (response.StatusCode == HttpStatusCode.OK); - } - catch (Exception ex) - { - Log.WriteError(ex); - ret = false; - } - - Log.WriteEnd("CheckCRMWebServicesAccess"); - return ret; - } - - private static bool CheckPermissions() - { - Log.WriteStart("CheckPermissions"); - bool res = false; - try - { - string group = "PrivUserGroup"; - string user = WindowsIdentity.GetCurrent().Name.Split(new char[] { '\\' })[1]; - res = ActiveDirectoryUtils.IsUserInGroup(user, group); - } - catch (Exception ex) - { - Log.WriteError(ex); - res = false; - } - - Log.WriteEnd("CheckPermissions"); - return res; - } - - private string GetDataBaseName(Guid organizationId) - { - string crmDatabaseName = "MSCRM_CONFIG"; - string databasename = ""; - - SqlConnection connection = null; - try - { - connection = new SqlConnection(); - connection.ConnectionString = - string.Format("Server={1};Initial Catalog={0};Integrated Security=SSPI", - crmDatabaseName, SqlServer); - - connection.Open(); - - string commandText = string.Format("SELECT DatabaseName FROM dbo.Organization where id = '{0}'", organizationId); - SqlCommand command = new SqlCommand(commandText, connection); - databasename = command.ExecuteScalar().ToString(); - - } - catch (Exception ex) - { - Log.WriteError(ex); - } - finally - { - if (connection != null) - connection.Dispose(); - } - - return databasename; - } - - public long GetDBSize(Guid organizationId) - { - Log.WriteStart("GetDBSize"); - long res = 0; - - string databasename = GetDataBaseName(organizationId); - - SqlConnection connection = null; - try - { - connection = new SqlConnection(); - connection.ConnectionString = - string.Format("Server={1};Initial Catalog={0};Integrated Security=SSPI", - databasename, SqlServer); - - connection.Open(); - - string commandText = "SELECT ((dbsize ) * 8192 ) size FROM " + // + logsize - "( " + - "SELECT SUM(CONVERT(BIGINT,CASE WHEN status & 64 = 0 THEN size ELSE 0 END)) dbsize " + - ", SUM(CONVERT(BIGINT,CASE WHEN status & 64 <> 0 THEN size ELSE 0 END)) logsize " + - "FROM dbo.sysfiles " + - ") big"; - - SqlCommand command = new SqlCommand(commandText, connection); - res = (long)command.ExecuteScalar(); - - } - catch (Exception ex) - { - Log.WriteError(ex); - } - finally - { - if (connection != null) - connection.Dispose(); - - } - - Log.WriteEnd("GetDBSize"); - return res; - - } - - public long GetMaxDBSize(Guid organizationId) - { - Log.WriteStart("GetMaxDBSize"); - long res = 0; - - string databasename = GetDataBaseName(organizationId); - - SqlConnection connection = null; - try - { - connection = new SqlConnection(); - connection.ConnectionString = - string.Format("Server={1};Initial Catalog={0};Integrated Security=SSPI", - databasename, SqlServer); - - connection.Open(); - - string commandText = "SELECT SUM(CONVERT(BIGINT,CASE WHEN status & 64 = 0 THEN maxsize ELSE 0 END)) dbsize FROM dbo.sysfiles"; - - SqlCommand command = new SqlCommand(commandText, connection); - res = (long)command.ExecuteScalar(); - if (res > 0) res = res * 8192; - - } - catch (Exception ex) - { - Log.WriteError(ex); - } - finally - { - if (connection != null) - connection.Dispose(); - - } - - Log.WriteEnd("GetMaxDBSize"); - return res; - - } - - public ResultObject SetMaxDBSize(Guid organizationId, long maxSize) - { - ResultObject res = StartLog("SetMaxDBSize"); - - string databasename = GetDataBaseName(organizationId); - - SqlConnection connection = null; - try - { - connection = new SqlConnection(); - connection.ConnectionString = - string.Format("Server={1};Initial Catalog={0};Integrated Security=SSPI", - databasename, SqlServer); - - connection.Open(); - - string maxSizeStr = maxSize == -1 ? "UNLIMITED" : (maxSize/(1024*1024)).ToString() +" MB"; - - string commandText = "ALTER DATABASE [" + databasename + "] MODIFY FILE ( NAME = N'mscrm', MAXSIZE = " + maxSizeStr + " )"; - - SqlCommand command = new SqlCommand(commandText, connection); - command.ExecuteNonQuery(); - - res.IsSuccess = true; - - } - catch (Exception ex) - { - EndLog("SetMaxDBSize", res, CrmErrorCodes.CANNOT_CHANGE_CRM_ORGANIZATION_STATE, ex); - } - finally - { - if (connection != null) - connection.Dispose(); - - } - - - EndLog("SetMaxDBSize"); - return res; - } - - private bool CheckOrganizationUnique(string databaseName, string orgName) - { - Log.WriteStart("CheckOrganizationUnique"); - bool res = false; - - SqlConnection connection = null; - try - { - connection = new SqlConnection(); - connection.ConnectionString = - string.Format("Server={1};Initial Catalog={0};Integrated Security=SSPI", - databaseName, SqlServer); - - connection.Open(); - - string commandText = string.Format("SELECT COUNT(*) FROM dbo.Organization WHERE UniqueName = '{0}'", orgName); - SqlCommand command = new SqlCommand(commandText, connection); - int count = (int)command.ExecuteScalar(); - res = count == 0; - - - } - catch (Exception ex) - { - res = false; - Log.WriteError(ex); - } - finally - { - if (connection != null) - connection.Dispose(); - - } - - Log.WriteEnd("CheckOrganizationUnique"); - return res; - } - - private bool CheckSqlServerConnection() - { - Log.WriteStart("CheckSqlServerConnection"); - bool res = false; - SqlConnection connection = null; - try - { - connection = new SqlConnection(); - connection.ConnectionString = - string.Format("server={0}; Integrated Security=SSPI", - SqlServer); - - connection.Open(); - res = true; - } - catch (Exception ex) - { - Log.WriteError(ex); - res = false; - } - finally - { - if (connection != null) - connection.Dispose(); - } - - Log.WriteEnd("CheckSqlServerConnection"); - - return res; - } - - private bool CheckReportServerConnection() - { - Log.WriteStart("CheckReportServerConnection"); - bool ret = false; - HttpWebResponse response = null; - HttpWebRequest request; - - try - { - WindowsIdentity.GetCurrent(); - - request = WebRequest.Create(ReportingServer) as HttpWebRequest; - - if (request != null) - { - request.UseDefaultCredentials = true; - request.Credentials = CredentialCache.DefaultCredentials; - response = request.GetResponse() as HttpWebResponse; - - } - if (response != null) - ret = (response.StatusCode == HttpStatusCode.OK); - } - catch (Exception ex) - { - Log.WriteError(ex); - ret = false; - } - - Log.WriteEnd("CheckReportServerConnection"); - return ret; - } - - private OrganizationResult CheckCrmEnvironment(string strDataBaseName, string organizationUniqueName) - { - OrganizationResult retOrganization = StartLog("CheckCrmEnvironment"); - bool res = CheckSqlServerConnection(); - - if (!res) - { - EndLog("CheckCrmEnvironment", retOrganization, CrmErrorCodes.CRM_SQL_SERVER_ERROR); - return retOrganization; - } - - res = CheckOrganizationUnique(strDataBaseName, organizationUniqueName); - if (!res) - { - EndLog("CheckCrmEnvironment", retOrganization, CrmErrorCodes.CRM_ORGANIZATION_ALREADY_EXISTS); - return retOrganization; - } - - res = CheckReportServerConnection(); - if (!res) - { - EndLog("CheckCrmEnvironment", retOrganization, CrmErrorCodes.CRM_REPORT_SERVER_ERROR); - return retOrganization; - } - - res = CheckPermissions(); - if (!res) - { - EndLog("CheckCrmEnvironment", retOrganization, CrmErrorCodes.CRM_PERMISSIONS_ERROR); - return retOrganization; - } - - res = CheckCRMWebServicesAccess(); - if (!res) - { - EndLog("CheckCrmEnvironment", retOrganization, CrmErrorCodes.CRM_WEB_SERVICE_ERROR); - return retOrganization; - } - - EndLog("CheckCrmEnvironment"); - return retOrganization; - } - - public OrganizationResult CreateOrganization(Guid organizationId, string organizationUniqueName, string organizationFriendlyName, string ou, string baseCurrencyCode, string baseCurrencyName, string baseCurrencySymbol, string initialUserDomainName, string initialUserFirstName, string initialUserLastName, string initialUserPrimaryEmail, string organizationCollation, long maxSize) - { - return CreateOrganizationInternal(organizationId, organizationUniqueName, organizationFriendlyName, ou , baseCurrencyCode, baseCurrencyName, baseCurrencySymbol, initialUserDomainName, initialUserFirstName, initialUserLastName, initialUserPrimaryEmail, organizationCollation, maxSize); - } - - const string CRMSysAdminRoleStr = "Системный администратор;System Administrator"; - - internal OrganizationResult CreateOrganizationInternal(Guid organizationId, string organizationUniqueName, string organizationFriendlyName, string ou, string baseCurrencyCode, string baseCurrencyName, string baseCurrencySymbol, string initialUserDomainName, string initialUserFirstName, string initialUserLastName, string initialUserPrimaryEmail, string organizationCollation, long maxSize) - { - - OrganizationResult ret = StartLog("CreateOrganizationInternal"); - - organizationUniqueName = Regex.Replace(organizationUniqueName, @"[^\dA-Za-z]", "-", RegexOptions.Compiled); - - // calculate UserRootPath - string ldapstr = ""; - - string[] ouItems = ou.Split('.'); - foreach (string ouItem in ouItems) - { - if (ldapstr.Length != 0) ldapstr += ","; - ldapstr += "OU=" + ouItem; - } - - string rootDomain = ServerSettings.ADRootDomain; - string[] domainItems = rootDomain.Split('.'); - foreach (string domainItem in domainItems) - ldapstr += ",DC=" + domainItem; - - ldapstr = @"LDAP://" + rootDomain + "/" + ldapstr; - - - - if (organizationId == Guid.Empty) - throw new ArgumentException("OrganizationId is Guid.Empty"); - - if (string.IsNullOrEmpty(organizationFriendlyName)) - throw new ArgumentNullException("organizationFriendlyName"); - - if (string.IsNullOrEmpty(baseCurrencyCode)) - throw new ArgumentNullException("baseCurrencyCode"); - - if (string.IsNullOrEmpty(baseCurrencySymbol)) - throw new ArgumentNullException("baseCurrencySymbol"); - - if (string.IsNullOrEmpty(initialUserDomainName)) - throw new ArgumentNullException("initialUserDomainName"); - - string strDataBaseName = "MSCRM_CONFIG"; - - OrganizationResult retCheckEn = CheckCrmEnvironment(strDataBaseName, organizationUniqueName); - - if (!retCheckEn.IsSuccess) - { - ret.ErrorCodes.AddRange(retCheckEn.ErrorCodes); - EndLog("CreateOrganizationInternal", ret, null, null); - return ret; - } - - try - { - - Uri serviceUrl = new Uri(CRMServiceUrl); - - DeploymentServiceClient deploymentService = Microsoft.Xrm.Sdk.Deployment.Proxy.ProxyClientHelper.CreateClient(serviceUrl); - if (!String.IsNullOrEmpty(UserName)) - deploymentService.ClientCredentials.Windows.ClientCredential = new NetworkCredential(UserName, Password); - - Microsoft.Xrm.Sdk.Deployment.Organization org = new Microsoft.Xrm.Sdk.Deployment.Organization - { - Id = organizationId, - UniqueName = organizationUniqueName, - FriendlyName = organizationFriendlyName, - SqlServerName = SqlServer, - SrsUrl = ReportingServer, - BaseCurrencyCode = baseCurrencyCode, - BaseCurrencyName = baseCurrencyName, - BaseCurrencySymbol = baseCurrencySymbol, - SqlCollation = organizationCollation, - State = Microsoft.Xrm.Sdk.Deployment.OrganizationState.Enabled - }; - - BeginCreateOrganizationRequest req = new BeginCreateOrganizationRequest - { - Organization = org - }; - - if (!String.IsNullOrEmpty(UserName)) - { - req.SysAdminName = UserName; - } - - BeginCreateOrganizationResponse resp = deploymentService.Execute(req) as BeginCreateOrganizationResponse; - - if (resp == null) - throw new ArgumentException("BeginCreateOrganizationResponse is Null"); - - EntityInstanceId id = new EntityInstanceId(); - id.Name = org.UniqueName; - - Microsoft.Xrm.Sdk.Deployment.OrganizationState OperationState = Microsoft.Xrm.Sdk.Deployment.OrganizationState.Pending; - - int timeout = 30000; - - do - { - Thread.Sleep(timeout); - try - { - Microsoft.Xrm.Sdk.Deployment.Organization getorg - = (Microsoft.Xrm.Sdk.Deployment.Organization)deploymentService.Retrieve(DeploymentEntityType.Organization, id); - OperationState = getorg.State; - } - catch { } - } while ((OperationState != Microsoft.Xrm.Sdk.Deployment.OrganizationState.Enabled) && - (OperationState != Microsoft.Xrm.Sdk.Deployment.OrganizationState.Failed)); - - if (OperationState == Microsoft.Xrm.Sdk.Deployment.OrganizationState.Failed) - throw new ArgumentException("Create organization failed."); - - // update UserRootPath setting - Microsoft.Xrm.Sdk.Deployment.ConfigurationEntity orgSettings = new Microsoft.Xrm.Sdk.Deployment.ConfigurationEntity - { - Id = org.Id, - LogicalName = "Organization" - }; - orgSettings.Attributes = new Microsoft.Xrm.Sdk.Deployment.AttributeCollection(); - orgSettings.Attributes.Add(new KeyValuePair("UserRootPath", ldapstr)); - Microsoft.Xrm.Sdk.Deployment.UpdateAdvancedSettingsRequest reqUpdateSettings = new Microsoft.Xrm.Sdk.Deployment.UpdateAdvancedSettingsRequest - { - Entity = orgSettings - }; - Microsoft.Xrm.Sdk.Deployment.UpdateAdvancedSettingsResponse respUpdateSettings = (Microsoft.Xrm.Sdk.Deployment.UpdateAdvancedSettingsResponse) deploymentService.Execute(reqUpdateSettings); - - // DB size limit - if (maxSize!=-1) - SetMaxDBSize(organizationId, maxSize); - - int tryTimeout = 30000; - int tryCount = 10; - - bool success = false; - int tryItem = 0; - - while (!success) - { - - try - { - Thread.Sleep(tryTimeout); - - OrganizationServiceProxy _serviceProxy = GetOrganizationProxy(organizationUniqueName, 0, 0); - - string ldap = ""; - - Guid SysAdminGuid = RetrieveSystemUser(GetDomainName(initialUserDomainName), initialUserFirstName, initialUserLastName, CRMSysAdminRoleStr, _serviceProxy, ref ldap, 0); - - success = true; - - } - catch (Exception exc) - { - tryItem++; - if (tryItem >= tryCount) - success = true; - } - } - - - } - catch (Exception ex) - { - HostedSolutionLog.LogError(ex); - EndLog("CheckCrmEnvironment", ret, CrmErrorCodes.CREATE_CRM_ORGANIZATION_GENERAL_ERROR, ex); - return ret; - - } - - EndLog("CheckCrmEnvironment"); - - return ret; - } - - private string GetDomainName(string username) - { - string domain = ActiveDirectoryUtils.GetNETBIOSDomainName(ServerSettings.ADRootDomain); - string ret = string.Format(@"{0}\{1}", domain, username); - return ret; - } - - public string[] GetSupportedCollationNames() - { - return GetSupportedCollationNamesInternal(SqlServer); - } - - internal static string[] GetSupportedCollationNamesInternal(string SqlServer) - { - HostedSolutionLog.LogStart("GetSupportedCollationNamesInternal"); - - List ret = new List(); - - string databaseName = "MSCRM_CONFIG"; - - SqlConnection connection = null; - try - { - connection = new SqlConnection(); - connection.ConnectionString = - string.Format("Server={1};Initial Catalog={0};Integrated Security=SSPI", - databaseName, SqlServer); - - connection.Open(); - - string commandText = "select * from fn_helpcollations() where " + - "(name not like '%_WS') AND (name not like '%_KS') AND (name not like '%_100_%') " + - " AND (name not like 'SQL_%') " + - " order by name"; - SqlCommand command = new SqlCommand(commandText, connection); - SqlDataReader reader = command.ExecuteReader(); - - while (reader.Read()) - { - string name = reader["name"] as string; - ret.Add(name); - } - - } - catch (Exception) - { - } - finally - { - if (connection != null) - connection.Dispose(); - - } - - HostedSolutionLog.LogEnd("GetSupportedCollationNamesInternal"); - return ret.ToArray(); - } - - public Currency[] GetCurrencyList() - { - return GetCurrencyListInternal(); - } - - private Currency[] GetCurrencyListInternal() - { - HostedSolutionLog.LogStart("GetCurrencyListInternal"); - List retList = new List(); - - CultureInfo[] cultures = CultureInfo.GetCultures(CultureTypes.AllCultures & ~CultureTypes.NeutralCultures); - - foreach (CultureInfo cultire in cultures) - { - try - { - RegionInfo Region = new RegionInfo(cultire.LCID); - - Console.WriteLine(cultire.NativeName + " " + Region.CurrencyNativeName); - - Currency currency = new Currency(); - currency.RegionName = Region.NativeName; - currency.CurrencyName = Region.CurrencyNativeName; - currency.CurrencyCode = Region.ISOCurrencySymbol; - currency.CurrencySymbol = Region.CurrencySymbol; - retList.Add(currency); - - } - catch - { - continue; - } - } - - retList.Sort(delegate(Currency a, Currency b) { return a.RegionName.CompareTo(b.RegionName); }); - - HostedSolutionLog.LogEnd("GetCurrencyListInternal"); - return retList.ToArray(); - } - - - public ResultObject DeleteOrganization(Guid orgId) - { - return DeleteOrganizationInternal(orgId); - } - - internal ResultObject DeleteOrganizationInternal(Guid orgId) - { - ResultObject res = StartLog("DeleteOrganizationInternal"); - - - res.IsSuccess = true; - try - { - Uri serviceUrl = new Uri(CRMServiceUrl); - - DeploymentServiceClient deploymentService = Microsoft.Xrm.Sdk.Deployment.Proxy.ProxyClientHelper.CreateClient(serviceUrl); - - EntityInstanceId i = new EntityInstanceId(); - i.Id = orgId; //Organisation Id - - Microsoft.Xrm.Sdk.Deployment.Organization org = (Microsoft.Xrm.Sdk.Deployment.Organization)deploymentService.Retrieve(DeploymentEntityType.Organization, i); - - org.State = Microsoft.Xrm.Sdk.Deployment.OrganizationState.Disabled; - - Microsoft.Xrm.Sdk.Deployment.UpdateRequest updateRequest = new Microsoft.Xrm.Sdk.Deployment.UpdateRequest(); - updateRequest.Entity = org; - - deploymentService.Execute(updateRequest); - - } - catch (Exception ex) - { - EndLog("DeleteOrganizationInternal", res, CrmErrorCodes.DELETE_CRM_ORGANIZATION_GENERAL_ERROR, ex); - return res; - - } - - - EndLog("DeleteOrganizationInternal"); - return res; - } - - public override void DeleteServiceItems(ServiceProviderItem[] items) - { - foreach (ServiceProviderItem item in items) - { - try - { - if (item is Organization) - { - Organization org = item as Organization; - DeleteOrganization(org.CrmOrganizationId); - } - - } - catch (Exception ex) - { - Log.WriteError(String.Format("Error deleting '{0}' {1}", item.Name, item.GetType().Name), ex); - } - } - base.DeleteServiceItems(items); - - } - - private static void EndLog(string message, ResultObject res, string errorCode, Exception ex) - { - if (res != null) - { - res.IsSuccess = false; - - if (!string.IsNullOrEmpty(errorCode)) - res.ErrorCodes.Add(errorCode); - } - - if (ex != null) - HostedSolutionLog.LogError(ex); - - HostedSolutionLog.LogEnd(message); - } - - private static void EndLog(string message, ResultObject res, string errorCode) - { - EndLog(message, res, errorCode, null); - } - - private static void EndLog(string message, ResultObject res) - { - EndLog(message, res, null); - } - - private static void EndLog(string message) - { - EndLog(message, null); - } - - private static T StartLog(string message) where T : ResultObject, new() - { - HostedSolutionLog.LogStart(message); - T res = new T(); - res.IsSuccess = true; - return res; - } - - public UserResult CreateCRMUser(OrganizationUser user, string orgName, Guid organizationId, Guid baseUnitId, int CALType) - { - return CreateCRMUserInternal(user, orgName, organizationId, baseUnitId, CALType); - } - - internal UserResult CreateCRMUserInternal(OrganizationUser user, string orgName, Guid organizationId, Guid businessUnitId, int CALType) - { - UserResult res = StartLog("CreateCRMUserInternal"); - - try - { - if (user == null) - throw new ArgumentNullException("user"); - - if (string.IsNullOrEmpty(orgName)) - throw new ArgumentNullException("orgName"); - - if (organizationId == Guid.Empty) - throw new ArgumentException("organizationId"); - - if (businessUnitId == Guid.Empty) - throw new ArgumentException("businessUnitId"); - - try - { - OrganizationServiceProxy _serviceProxy = GetOrganizationProxy(orgName); - - - string ldap = ""; - Guid guid = RetrieveSystemUser(user.DomainUserName, user.FirstName, user.LastName, CRMSysAdminRoleStr, _serviceProxy, ref ldap, CALType); - - user.CrmUserId = guid; - res.Value = user; - - } - catch (Exception ex) - { - EndLog("CreateCRMUserInternal", res, CrmErrorCodes.CANNOT_CREATE_CRM_USER, ex); - return res; - } - } - catch (Exception ex) - { - EndLog("CreateCRMUserInternal", res, CrmErrorCodes.CANNOT_CREATE_CRM_USER_GENERAL_ERROR, ex); - return res; - - } - - EndLog("CreateCRMUserInternal"); - return res; - } - - private static Guid CreateSystemUser(String userName, String firstName, - String lastName, String domain, String roleStr, - OrganizationServiceProxy serviceProxy, ref String ldapPath, int CALType) - { - - if (serviceProxy.ServiceConfiguration.AuthenticationType == AuthenticationProviderType.LiveId || - serviceProxy.ServiceConfiguration.AuthenticationType == AuthenticationProviderType.OnlineFederation) - throw new Exception(String.Format("To run this sample, {0} {1} must be an active system user in your Microsoft Dynamics CRM Online organization.", firstName, lastName)); - - Guid userId = Guid.Empty; - - Microsoft.Xrm.Sdk.Query.QueryExpression businessUnitQuery = new Microsoft.Xrm.Sdk.Query.QueryExpression - { - EntityName = BusinessUnit.EntityLogicalName, - ColumnSet = new Microsoft.Xrm.Sdk.Query.ColumnSet("businessunitid"), - Criteria = - { - Conditions = - { - new Microsoft.Xrm.Sdk.Query.ConditionExpression("parentbusinessunitid", - Microsoft.Xrm.Sdk.Query.ConditionOperator.Null) - } - } - }; - - BusinessUnit defaultBusinessUnit = serviceProxy.RetrieveMultiple( - businessUnitQuery).Entities[0].ToEntity(); - - // Retrieve the specified security role. - Role role = RetrieveRoleByName(serviceProxy, roleStr); - - // CALType and AccessMode - int accessmode = CALType / 10; - int caltype = CALType % 10; - - //Create a new system user. - SystemUser user = new SystemUser - { - DomainName = userName, - FirstName = firstName, - LastName = lastName, - BusinessUnitId = new EntityReference - { - LogicalName = BusinessUnit.EntityLogicalName, - Name = BusinessUnit.EntityLogicalName, - Id = defaultBusinessUnit.Id - }, - CALType = new OptionSetValue(caltype), - AccessMode = new OptionSetValue(accessmode) - }; - userId = serviceProxy.Create(user); - - // Assign the security role to the newly created Microsoft Dynamics CRM user. - AssociateRequest associate = new AssociateRequest() - { - Target = new EntityReference(SystemUser.EntityLogicalName, userId), - RelatedEntities = new EntityReferenceCollection() - { - new EntityReference(Role.EntityLogicalName, role.Id), - }, - Relationship = new Relationship("systemuserroles_association") - }; - serviceProxy.Execute(associate); - - return userId; - } - - - public static Guid RetrieveSystemUser(String userName, String firstName, - String lastName, String roleStr, OrganizationServiceProxy serviceProxy, - ref String ldapPath, - int CALType) - { - String domain; - Guid userId = Guid.Empty; - - if (serviceProxy == null) - throw new ArgumentNullException("serviceProxy"); - - if (String.IsNullOrWhiteSpace(userName)) - throw new ArgumentNullException("UserName"); - - if (String.IsNullOrWhiteSpace(firstName)) - throw new ArgumentNullException("FirstName"); - - if (String.IsNullOrWhiteSpace(lastName)) - throw new ArgumentNullException("LastName"); - - if (String.IsNullOrWhiteSpace(roleStr)) - throw new ArgumentNullException("Role"); - - // Obtain the current user's information. - Microsoft.Crm.Sdk.Messages.WhoAmIRequest who = new Microsoft.Crm.Sdk.Messages.WhoAmIRequest(); - Microsoft.Crm.Sdk.Messages.WhoAmIResponse whoResp = (Microsoft.Crm.Sdk.Messages.WhoAmIResponse)serviceProxy.Execute(who); - Guid currentUserId = whoResp.UserId; - - SystemUser currentUser = - serviceProxy.Retrieve(SystemUser.EntityLogicalName, currentUserId, new Microsoft.Xrm.Sdk.Query.ColumnSet("domainname")).ToEntity(); - - // Extract the domain and create the LDAP object. - String[] userPath = currentUser.DomainName.Split(new char[] { '\\' }); - if (userPath.Length > 1) - domain = userPath[0] + "\\"; - else - domain = String.Empty; - - // Create the system user in Microsoft Dynamics CRM if the user doesn't - // already exist. - Microsoft.Xrm.Sdk.Query.QueryExpression userQuery = new Microsoft.Xrm.Sdk.Query.QueryExpression - { - EntityName = SystemUser.EntityLogicalName, - ColumnSet = new Microsoft.Xrm.Sdk.Query.ColumnSet("systemuserid"), - Criteria = - { - FilterOperator = Microsoft.Xrm.Sdk.Query.LogicalOperator.Or, - Filters = - { - new Microsoft.Xrm.Sdk.Query.FilterExpression - { - FilterOperator = Microsoft.Xrm.Sdk.Query.LogicalOperator.And, - Conditions = - { - new Microsoft.Xrm.Sdk.Query.ConditionExpression("domainname", Microsoft.Xrm.Sdk.Query.ConditionOperator.Equal, domain + userName) - } - }, - new Microsoft.Xrm.Sdk.Query.FilterExpression - { - FilterOperator = Microsoft.Xrm.Sdk.Query.LogicalOperator.And, - Conditions = - { - new Microsoft.Xrm.Sdk.Query.ConditionExpression("firstname", Microsoft.Xrm.Sdk.Query.ConditionOperator.Equal, firstName), - new Microsoft.Xrm.Sdk.Query.ConditionExpression("lastname", Microsoft.Xrm.Sdk.Query.ConditionOperator.Equal, lastName) - } - } - } - - } - }; - - DataCollection existingUsers = (DataCollection)serviceProxy.RetrieveMultiple(userQuery).Entities; - - SystemUser existingUser = null; - if (existingUsers.Count > 0) - existingUser = existingUsers[0].ToEntity(); - - if (existingUser != null) - { - userId = existingUser.SystemUserId.Value; - - // Check to make sure the user is assigned the correct role. - Role role = RetrieveRoleByName(serviceProxy, roleStr); - - // Associate the user with the role when needed. - if (!UserInRole(serviceProxy, userId, role.Id)) - { - AssociateRequest associate = new AssociateRequest() - { - Target = new EntityReference(SystemUser.EntityLogicalName, userId), - RelatedEntities = new EntityReferenceCollection() - { - new EntityReference(Role.EntityLogicalName, role.Id) - }, - Relationship = new Relationship("systemuserroles_association") - }; - serviceProxy.Execute(associate); - } - - } - else - { - userId = CreateSystemUser(userName, firstName, lastName, domain, - roleStr, serviceProxy, ref ldapPath, CALType); - } - - return userId; - } - - private static Role RetrieveRoleByName(OrganizationServiceProxy serviceProxy, - String roleSplitStr) - { - string[] RolesStr = roleSplitStr.Split(';'); - - foreach (string roleStr in RolesStr) - { - - Microsoft.Xrm.Sdk.Query.QueryExpression roleQuery = new Microsoft.Xrm.Sdk.Query.QueryExpression - { - EntityName = Role.EntityLogicalName, - ColumnSet = new Microsoft.Xrm.Sdk.Query.ColumnSet("roleid"), - Criteria = - { - Conditions = - { - new Microsoft.Xrm.Sdk.Query.ConditionExpression("name", Microsoft.Xrm.Sdk.Query.ConditionOperator.Equal, roleStr) - } - } - }; - - DataCollection roles = serviceProxy.RetrieveMultiple(roleQuery).Entities; - - if (roles.Count > 0) return roles[0].ToEntity(); - } - - return null; - } - - private static bool UserInRole(OrganizationServiceProxy serviceProxy, - Guid userId, Guid roleId) - { - // Establish a SystemUser link for a query. - Microsoft.Xrm.Sdk.Query.LinkEntity systemUserLink = new Microsoft.Xrm.Sdk.Query.LinkEntity() - { - LinkFromEntityName = SystemUserRoles.EntityLogicalName, - LinkFromAttributeName = "systemuserid", - LinkToEntityName = SystemUser.EntityLogicalName, - LinkToAttributeName = "systemuserid", - LinkCriteria = - { - Conditions = - { - new Microsoft.Xrm.Sdk.Query.ConditionExpression( - "systemuserid", Microsoft.Xrm.Sdk.Query.ConditionOperator.Equal, userId) - } - } - }; - - // Build the query. - Microsoft.Xrm.Sdk.Query.QueryExpression query = new Microsoft.Xrm.Sdk.Query.QueryExpression() - { - EntityName = Role.EntityLogicalName, - ColumnSet = new Microsoft.Xrm.Sdk.Query.ColumnSet("roleid"), - LinkEntities = - { - new Microsoft.Xrm.Sdk.Query.LinkEntity() - { - LinkFromEntityName = Role.EntityLogicalName, - LinkFromAttributeName = "roleid", - LinkToEntityName = SystemUserRoles.EntityLogicalName, - LinkToAttributeName = "roleid", - LinkEntities = {systemUserLink} - } - }, - Criteria = - { - Conditions = - { - new Microsoft.Xrm.Sdk.Query.ConditionExpression("roleid", Microsoft.Xrm.Sdk.Query.ConditionOperator.Equal, roleId) - } - } - }; - - // Retrieve matching roles. - EntityCollection ec = serviceProxy.RetrieveMultiple(query); - - if (ec.Entities.Count > 0) - return true; - - return false; - } - - int GetOrganizationProxyTryCount = 10; - int GetOrganizationProxyTryTimeout = 30000; - - private OrganizationServiceProxy GetOrganizationProxy(string orgName) - { - return GetOrganizationProxy(orgName, GetOrganizationProxyTryCount, GetOrganizationProxyTryTimeout); - } - - private OrganizationServiceProxy GetOrganizationProxy(string orgName, int TryCount, int TryTimeout) - { - - Uri OrganizationUri = GetOrganizationAddress(orgName); - - OrganizationServiceProxy r = null; - - bool success = false; - int tryItem = 0; - Exception exception = null; - - while (!success) - { - - try - { - // Set IServiceManagement for the current organization. - IServiceManagement orgServiceManagement = - ServiceConfigurationFactory.CreateManagement( - OrganizationUri); - - r = new OrganizationServiceProxy( - orgServiceManagement, - GetUserLogonCredentials()); - - success = true; - - } - catch (Exception exc) - { - Thread.Sleep(TryTimeout); - tryItem++; - if (tryItem >= TryCount) - { - exception = exc; - success = true; - } - } - - } - - if (exception != null) - throw new ArgumentException(exception.ToString()); - - r.EnableProxyTypes(); - - return r; - } - - protected virtual ClientCredentials GetUserLogonCredentials() - { - ClientCredentials credentials = new ClientCredentials(); - - if (String.IsNullOrEmpty(UserName)) - { - credentials.Windows.ClientCredential = System.Net.CredentialCache.DefaultNetworkCredentials; - } - else - { - credentials.UserName.UserName = UserName; - credentials.UserName.Password = Password; - } - - return credentials; - } - - private DiscoveryServiceProxy GetDiscoveryProxy() - { - - IServiceManagement serviceManagement = - ServiceConfigurationFactory.CreateManagement( - new Uri(CRMDiscoveryUri)); - - ClientCredentials Credentials = GetUserLogonCredentials(); - - DiscoveryServiceProxy r = new DiscoveryServiceProxy(serviceManagement, Credentials); - - return r; - } - - - public OrganizationDetailCollection DiscoverOrganizations(IDiscoveryService service) - { - if (service == null) throw new ArgumentNullException("service"); - RetrieveOrganizationsRequest orgRequest = new RetrieveOrganizationsRequest(); - RetrieveOrganizationsResponse orgResponse = - (RetrieveOrganizationsResponse)service.Execute(orgRequest); - - return orgResponse.Details; - } - - protected virtual Uri GetOrganizationAddress(string orgName) - { - //string url = "https://" + ProviderSettings[Constants.AppRootDomain] + ":" + ProviderSettings[Constants.Port] + "/" + orgName + "/XRMServices/2011/Organization.svc"; - - string url; - - string organizationWebServiceUri = ProviderSettings[Constants.OrganizationWebService]; - - if (!String.IsNullOrEmpty(organizationWebServiceUri)) - { - url = "https://" + organizationWebServiceUri + ":" + ProviderSettings[Constants.Port] + "/" + orgName + "/XRMServices/2011/Organization.svc"; - } - else - { - url = "https://" + orgName + "." + ProviderSettings[Constants.IFDWebApplicationRootDomain] + ":" + ProviderSettings[Constants.Port] + "/XRMServices/2011/Organization.svc"; - } - - try - { - - using (DiscoveryServiceProxy serviceProxy = GetDiscoveryProxy()) - { - // Obtain organization information from the Discovery service. - if (serviceProxy != null) - { - // Obtain information about the organizations that the system user belongs to. - OrganizationDetailCollection orgs = DiscoverOrganizations(serviceProxy); - - for (int n = 0; n < orgs.Count; n++) - { - if (orgs[n].UniqueName == orgName) - { - // Return the organization Uri. - return new System.Uri(orgs[n].Endpoints[EndpointType.OrganizationService]); - } - } - - } - } - } - catch { } - - return new Uri(url); - - } - - - internal CRMBusinessUnitsResult GetOrganizationBusinessUnitsInternal(Guid organizationId, string orgName) - { - CRMBusinessUnitsResult res = StartLog("GetOrganizationBusinessUnitsInternal"); - - try - { - if (organizationId == Guid.Empty) - throw new ArgumentException("organizationId"); - - if (string.IsNullOrEmpty(orgName)) - throw new ArgumentNullException("orgName"); - - OrganizationServiceProxy serviceProxy; - - try - { - serviceProxy = GetOrganizationProxy(orgName); - } - catch (Exception ex) - { - EndLog("GetOrganizationBusinessUnitsInternal", res, CrmErrorCodes.CANNOT_GET_CRM_SERVICE, ex); - return res; - } - - DataCollection BusinessUnits; - - try - { - - Microsoft.Xrm.Sdk.Query.QueryExpression businessUnitQuery = new Microsoft.Xrm.Sdk.Query.QueryExpression - { - EntityName = BusinessUnit.EntityLogicalName, - ColumnSet = new Microsoft.Xrm.Sdk.Query.ColumnSet(new string[] { "businessunitid", "name" }), - Criteria = - { - Conditions = - { - new Microsoft.Xrm.Sdk.Query.ConditionExpression("parentbusinessunitid", - Microsoft.Xrm.Sdk.Query.ConditionOperator.Null) - } - } - }; - - BusinessUnits = serviceProxy.RetrieveMultiple( - businessUnitQuery).Entities; - - } - catch (Exception ex) - { - EndLog("GetOrganizationBusinessUnitsInternal", res, CrmErrorCodes.CANNOT_GET_CRM_BUSINESS_UNITS, ex); - return res; - } - - List businessUnits = new List(); - - try - { - for (int i = 0; i < BusinessUnits.Count; i++) - { - BusinessUnit bu = BusinessUnits[i].ToEntity(); - - CRMBusinessUnit unit = new CRMBusinessUnit(); - unit.BusinessUnitId = (Guid)bu.BusinessUnitId; - unit.BusinessUnitName = bu.Name; - - if (unit.BusinessUnitName == null) - unit.BusinessUnitName = "default"; - - businessUnits.Add(unit); - - } - - res.Value = businessUnits; - } - catch (Exception ex) - { - EndLog("GetOrganizationBusinessUnitsInternal", res, CrmErrorCodes.CANNOT_FILL_BASE_UNITS_COLLECTION, - ex); - return res; - } - } - catch (Exception ex) - { - EndLog("GetOrganizationBusinessUnitsInternal", res, CrmErrorCodes.GET_ORGANIZATION_BUSINESS_UNITS_GENERAL_ERROR, - ex); - return res; - - } - - EndLog("GetOrganizationBusinessUnitsInternal"); - return res; - - } - - public CRMBusinessUnitsResult GetOrganizationBusinessUnits(Guid organizationId, string orgName) - { - return GetOrganizationBusinessUnitsInternal(organizationId, orgName); - } - - public CrmRolesResult GetAllCrmRoles(string orgName, Guid businessUnitId) - { - return GetAllCrmRolesInternal(orgName, businessUnitId); - } - - public CrmRolesResult GetCrmUserRoles(string orgName, Guid userId) - { - return GetCrmUserRolesInternal(userId, orgName); - } - - public EntityCollection GetUserRoles(Guid userId, string orgName) - { - OrganizationServiceProxy serviceProxy = GetOrganizationProxy(orgName); - - // Establish a SystemUser link for a query. - Microsoft.Xrm.Sdk.Query.LinkEntity systemUserLink = new Microsoft.Xrm.Sdk.Query.LinkEntity() - { - LinkFromEntityName = SystemUserRoles.EntityLogicalName, - LinkFromAttributeName = "systemuserid", - LinkToEntityName = SystemUser.EntityLogicalName, - LinkToAttributeName = "systemuserid", - LinkCriteria = - { - Conditions = - { - new Microsoft.Xrm.Sdk.Query.ConditionExpression( - "systemuserid", Microsoft.Xrm.Sdk.Query.ConditionOperator.Equal, userId) - } - } - }; - - // Build the query. - Microsoft.Xrm.Sdk.Query.QueryExpression query = new Microsoft.Xrm.Sdk.Query.QueryExpression() - { - EntityName = Role.EntityLogicalName, - ColumnSet = new Microsoft.Xrm.Sdk.Query.ColumnSet("roleid"), - LinkEntities = - { - new Microsoft.Xrm.Sdk.Query.LinkEntity() - { - LinkFromEntityName = Role.EntityLogicalName, - LinkFromAttributeName = "roleid", - LinkToEntityName = SystemUserRoles.EntityLogicalName, - LinkToAttributeName = "roleid", - LinkEntities = {systemUserLink} - } - } - }; - - // Retrieve matching roles. - EntityCollection relations = serviceProxy.RetrieveMultiple(query); - - return relations; - } - - internal CrmRolesResult GetCrmUserRolesInternal(Guid userId, string orgName) - { - CrmRolesResult res = StartLog("GetCrmUserRolesInternal"); - - - try - { - EntityCollection relations; - - if (userId == Guid.Empty) - throw new ArgumentException("userId"); - - if (string.IsNullOrEmpty(orgName)) - throw new ArgumentNullException("orgName"); - - try - { - relations = GetUserRoles(userId, orgName); - } - catch (Exception ex) - { - EndLog("GetCrmUserRolesInternal", res, CrmErrorCodes.CANNOT_GET_CRM_USER_ROLES, ex); - return res; - } - - try - { - res.Value = FillCrmRoles(relations, true, Guid.Empty); - } - catch (Exception ex) - { - EndLog("GetCrmUserRolesInternal", res, CrmErrorCodes.CANNOT_FILL_ROLES_COLLECTION, ex); - return res; - } - } - catch (Exception ex) - { - EndLog("GetCrmUserRolesInternal", res, CrmErrorCodes.GET_CRM_USER_ROLE_GENERAL_ERROR, ex); - return res; - } - - EndLog("GetCrmUserRolesInternal"); - return res; - } - - static string excludedRolesStr = ";пользователь поддержки;support user;"; - - private static List FillCrmRoles(EntityCollection entities, bool isUserRole, Guid businessUnitId) - { - List res = new List(); - - foreach (Entity current in entities.Entities) - { - Role role = current.ToEntity(); - - if (role == null) continue; - - if (businessUnitId != Guid.Empty) - { - if (businessUnitId != role.BusinessUnitId.Id) - continue; - } - - string roleName = role.Name; - - if (roleName!=null) - if (excludedRolesStr.IndexOf(";" + roleName.ToLower() + ";") != -1) - continue; - - CrmRole crmRole = new CrmRole(); - crmRole.IsCurrentUserRole = isUserRole; - crmRole.RoleId = (Guid)role.RoleId; - crmRole.RoleName = roleName; - - res.Add(crmRole); - } - - return res; - } - - - private static List FillCrmRoles(EntityCollection entities, Guid businessUnitId) - { - return FillCrmRoles(entities, false, businessUnitId); - } - - internal CrmRolesResult GetAllCrmRolesInternal(string orgName, Guid businessUnitId) - { - CrmRolesResult res = StartLog("GetAllCrmRoles"); - - try - { - if (string.IsNullOrEmpty(orgName)) - throw new ArgumentNullException("orgName"); - - EntityCollection roles; - try - { - OrganizationServiceProxy serviceProxy = GetOrganizationProxy(orgName); - - Microsoft.Xrm.Sdk.Query.QueryExpression roleQuery = new Microsoft.Xrm.Sdk.Query.QueryExpression - { - EntityName = Role.EntityLogicalName, - ColumnSet = new Microsoft.Xrm.Sdk.Query.ColumnSet(new string[] { "roleid", "name", "businessunitid" }), - }; - - roles = serviceProxy.RetrieveMultiple(roleQuery); - - - } - catch (Exception ex) - { - EndLog("GetAllCrmRoles", res, CrmErrorCodes.CANNOT_GET_ALL_CRM_ROLES, ex); - return res; - } - - try - { - List crmRoles = FillCrmRoles(roles, businessUnitId); - res.Value = crmRoles; - } - catch (Exception ex) - { - EndLog("GetAllCrmRoles", res, CrmErrorCodes.CANNOT_FILL_ROLES_COLLECTION, ex); - return res; - } - } - catch (Exception ex) - { - EndLog("GetAllCrmRoles", res, CrmErrorCodes.GET_ALL_CRM_ROLES_GENERAL_ERROR, ex); - return res; - } - - EndLog("GetAllCrmRoles"); - return res; - } - - public ResultObject SetUserRoles(string orgName, Guid userId, Guid[] roles) - { - return SetUserRolesInternal(orgName, userId, roles); - } - - internal ResultObject SetUserRolesInternal(string orgName, Guid userId, Guid[] roles) - { - CrmRolesResult res = StartLog("SetUserRolesInternal"); - - try - { - if (string.IsNullOrEmpty(orgName)) - throw new ArgumentNullException("orgName"); - - if (userId == Guid.Empty) - throw new ArgumentException("userId"); - - if (roles == null) - throw new ArgumentNullException("roles"); - - OrganizationServiceProxy serviceProxy = GetOrganizationProxy(orgName); - - - CrmRolesResult tmpRoles = GetCrmUserRoles(orgName, userId); - res.ErrorCodes.AddRange(tmpRoles.ErrorCodes); - - if (!tmpRoles.IsSuccess) - return res; - - List remRoles = new List(); - - for (int i = 0; i < tmpRoles.Value.Count; i++) - { - if (Array.Find(roles, delegate(Guid current) { return current == tmpRoles.Value[i].RoleId; }) == Guid.Empty) - { - remRoles.Add(tmpRoles.Value[i].RoleId); - } - } - - try - { - DisassociateRequest removeRole = new DisassociateRequest() - { - Target = new EntityReference(SystemUser.EntityLogicalName, userId), - RelatedEntities = new EntityReferenceCollection(), - Relationship = new Relationship("systemuserroles_association") - }; - - for (int i = 0; i < remRoles.Count; i++) - removeRole.RelatedEntities.Add(new EntityReference(Role.EntityLogicalName, remRoles[i])); - - serviceProxy.Execute(removeRole); - - } - catch (Exception ex) - { - EndLog("SetUserRolesInternal", res, CrmErrorCodes.CANNOT_REMOVE_CRM_USER_ROLES, ex); - return res; - } - - - try - { - // Assign the security role to the newly created Microsoft Dynamics CRM user. - AssociateRequest associate = new AssociateRequest() - { - Target = new EntityReference(SystemUser.EntityLogicalName, userId), - RelatedEntities = new EntityReferenceCollection(), - Relationship = new Relationship("systemuserroles_association") - }; - - for (int i = 0; i < roles.Length; i++) - { - bool find = false; - foreach (CrmRole current in tmpRoles.Value) - { - if (current.RoleId == roles[i]) - find = true; - } - if (find) continue; - - associate.RelatedEntities.Add(new EntityReference(Role.EntityLogicalName, roles[i])); - } - - serviceProxy.Execute(associate); - } - catch (Exception ex) - { - EndLog("SetUserRolesInternal", res, CrmErrorCodes.CANNOT_ASSIGN_CRM_USER_ROLES, ex); - return res; - } - - } - catch (Exception ex) - { - EndLog("SetUserRolesInternal", res, CrmErrorCodes.CANNOT_SET_CRM_USER_ROLES_GENERAL_ERROR, ex); - return res; - } - - - EndLog("SetUserRolesInternal"); - return res; - - } - - - public CrmUserResult GetCrmUserById(Guid crmUserId, string orgName) - { - return GetCrmUserByIdInternal(crmUserId, orgName); - } - - internal CrmUserResult GetCrmUserByIdInternal(Guid crmUserId, string orgName) - { - CrmUserResult ret = StartLog("GetCrmUserByIdInternal"); - - try - { - if (crmUserId == Guid.Empty) - throw new ArgumentNullException("crmUserId"); - - if (string.IsNullOrEmpty(orgName)) - throw new ArgumentNullException("orgName"); - - OrganizationServiceProxy serviceProxy = GetOrganizationProxy(orgName); - - SystemUser retruveUser = - serviceProxy.Retrieve(SystemUser.EntityLogicalName, crmUserId, new Microsoft.Xrm.Sdk.Query.ColumnSet("domainname", "businessunitid", "accessmode", "isdisabled", "caltype")).ToEntity(); - - CrmUser user = null; - - if (retruveUser != null) - { - user = new CrmUser(); - user.BusinessUnitId = retruveUser.BusinessUnitId.Id; - user.CRMUserId = retruveUser.SystemUserId.Value; - user.ClientAccessMode = (CRMUserAccessMode)retruveUser.AccessMode.Value; - user.IsDisabled = (bool)retruveUser.IsDisabled; - user.CALType = retruveUser.CALType.Value; - - ret.Value = user; - } - } - catch (Exception ex) - { - EndLog("GetCrmUserByIdInternal", ret, CrmErrorCodes.CANONT_GET_CRM_USER_BY_ID, ex); - return ret; - } - - EndLog("GetCrmUserByIdInternal"); - return ret; - } - - - internal CrmUserResult GetCrmUserByDomainNameInternal(string domainName, string orgName) - { - CrmUserResult ret = StartLog("GetCrmUserByDomainNameInternal"); - - try - { - if (string.IsNullOrEmpty(domainName)) - throw new ArgumentNullException("domainName"); - - if (string.IsNullOrEmpty(orgName)) - throw new ArgumentNullException("orgName"); - - - OrganizationServiceProxy serviceProxy = GetOrganizationProxy(orgName); - - Microsoft.Xrm.Sdk.Query.QueryExpression usereQuery = new Microsoft.Xrm.Sdk.Query.QueryExpression - { - EntityName = SystemUser.EntityLogicalName, - ColumnSet = new Microsoft.Xrm.Sdk.Query.ColumnSet("domainname", "businessunitid", "accessmode", "isdisabled", "systemuserid", "caltype"), - }; - - EntityCollection users = serviceProxy.RetrieveMultiple(usereQuery); - - foreach (Entity entityuser in users.Entities) - { - SystemUser sysuser = entityuser.ToEntity(); - - if (sysuser == null) continue; - if (sysuser.DomainName != domainName) continue; - - CrmUser user = new CrmUser(); - user.BusinessUnitId = sysuser.BusinessUnitId.Id; - user.CRMUserId = sysuser.SystemUserId.Value; - user.ClientAccessMode = (CRMUserAccessMode)sysuser.AccessMode.Value; - user.IsDisabled = sysuser.IsDisabled.Value; - user.CALType = sysuser.CALType.Value; - ret.Value = user; - } - } - catch (Exception ex) - { - EndLog("GetCrmUserByDomainNameInternal", ret, CrmErrorCodes.CANONT_GET_CRM_USER_BY_DOMAIN_NAME, ex); - return ret; - } - - EndLog("GetCrmUserByDomainNameInternal"); - return ret; - } - - public CrmUserResult GetCrmUserByDomainName(string domainName, string orgName) - { - return GetCrmUserByDomainNameInternal(domainName, orgName); - } - - - private static Guid GetFetureId(string name) - { - if (string.IsNullOrEmpty(name)) - throw new ArgumentNullException("name"); - - return Guid.Empty; - } - - - public ResultObject ChangeUserState(bool disable, string orgName, Guid crmUserId) - { - return ChangeUserStateInternal(disable, orgName, crmUserId); - } - - - internal ResultObject ChangeUserStateInternal(bool disable, string orgName, Guid crmUserId) - { - ResultObject res = StartLog("ChangeUserStateInternal"); - - res.IsSuccess = true; - try - { - if (crmUserId == Guid.Empty) - throw new ArgumentNullException("crmUserId"); - - if (string.IsNullOrEmpty(orgName)) - throw new ArgumentNullException("orgName"); - - OrganizationServiceProxy serviceProxy = GetOrganizationProxy(orgName); - - // Retrieve a user. - SystemUser user = serviceProxy.Retrieve(SystemUser.EntityLogicalName, - crmUserId, new Microsoft.Xrm.Sdk.Query.ColumnSet(new String[] { "systemuserid", "firstname", "lastname" })).ToEntity(); - - if (user != null) - { - Microsoft.Crm.Sdk.Messages.SetStateRequest request = new Microsoft.Crm.Sdk.Messages.SetStateRequest() - { - EntityMoniker = user.ToEntityReference(), - - // Required by request but always valued at -1 in this context. - Status = new OptionSetValue(-1), - - // Sets the user to disabled. - State = disable ? new OptionSetValue(-1) : new OptionSetValue(0) - }; - - serviceProxy.Execute(request); - - } - } - catch (Exception ex) - { - EndLog("ChangeUserStateInternal", res, CrmErrorCodes.CANNOT_CHANGE_USER_STATE, ex); - return res; - } - - - EndLog("ChangeUserStateInternal"); - return res; - } - public override bool IsInstalled() { - string value = string.Empty; - try - { - RegistryKey root = Registry.LocalMachine; - RegistryKey rk = root.OpenSubKey("SOFTWARE\\Microsoft\\MSCRM"); - if (rk == null) - rk = root.OpenSubKey("SOFTWARE\\Wow6432Node\\Microsoft\\MSCRM"); - - if (rk != null) - { - value = (string)rk.GetValue("CRM_Server_Version", null); - rk.Close(); - } - } - catch (Exception ex) - { - Log.WriteError(ex); - } - - return value.StartsWith("5."); + return CRMServerVersion.StartsWith("5."); } - public ResultObject SetUserCALType(string orgName, Guid userId, int CALType) - { - return SetUserCALTypeInternal(orgName, userId, CALType); - } - - internal ResultObject SetUserCALTypeInternal(string orgName, Guid userId, int CALType) - { - ResultObject ret = StartLog("SetUserCALTypeInternal"); - - try - { - if (userId == Guid.Empty) - throw new ArgumentNullException("crmUserId"); - - if (string.IsNullOrEmpty(orgName)) - throw new ArgumentNullException("orgName"); - - OrganizationServiceProxy serviceProxy = GetOrganizationProxy(orgName); - - SystemUser user = - serviceProxy.Retrieve(SystemUser.EntityLogicalName, userId, new Microsoft.Xrm.Sdk.Query.ColumnSet("domainname", "businessunitid", "accessmode", "isdisabled", "caltype")).ToEntity(); - - // CALType and AccessMode - int accessmode = CALType / 10; - int caltype = CALType % 10; - - user.CALType = new OptionSetValue(caltype); - user.AccessMode = new OptionSetValue(accessmode); - - serviceProxy.Update(user); - - } - catch (Exception ex) - { - EndLog("SetUserCALTypeInternal", ret, CrmErrorCodes.CANONT_GET_CRM_USER_BY_ID, ex); - return ret; - } - - EndLog("SetUserCALTypeInternal"); - return ret; - } - - } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Crm2011/HostedSolutionLog.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Crm2011/HostedSolutionLog.cs new file mode 100644 index 00000000..83257a78 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Crm2011/HostedSolutionLog.cs @@ -0,0 +1,152 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using WebsitePanel.Providers.Common; +using WebsitePanel.Server.Utils; +using System.Text; +using System.Management.Automation.Runspaces; + +namespace WebsitePanel.Providers.HostedSolution +{ + public class HostedSolutionLog + { + public static string LogPrefix = "HostedSolution"; + + public static void LogStart(string message, params object[] args) + { + string text = String.Format(message, args); + Log.WriteStart("{0} {1}", LogPrefix, text); + } + + public static void LogEnd(string message, params object[] args) + { + string text = String.Format(message, args); + Log.WriteEnd("{0} {1}", LogPrefix, text); + } + + public static void LogInfo(string message) + { + Log.WriteInfo("{0} {1}", LogPrefix, message); + } + + public static void LogInfo(string message, params object[] args) + { + string text = String.Format(message, args); + Log.WriteInfo("{0} {1}", LogPrefix, text); + } + + public static void LogWarning(string message) + { + Log.WriteWarning("{0} {1}", LogPrefix, message); + } + + public static void LogWarning(string message, params object[] args) + { + string text = String.Format(message, args); + Log.WriteWarning("{0} {1}", LogPrefix, text); + } + + public static void LogError(Exception ex) + { + Log.WriteError(LogPrefix, ex); + } + + public static void LogError(string message, Exception ex) + { + string text = String.Format("{0} {1}", LogPrefix, message); + Log.WriteError(text, ex); + } + + public static void DebugInfo(string message, params object[] args) + { + string text = String.Format(message, args); + Log.WriteInfo("{0} {1}", LogPrefix, text); + } + + public static void EndLog(string message, ResultObject res, string errorCode, Exception ex) + { + if (res != null) + { + res.IsSuccess = false; + + if (!string.IsNullOrEmpty(errorCode)) + res.ErrorCodes.Add(errorCode); + } + + if (ex != null) + LogError(ex); + + + //LogRecord. + LogEnd(message); + + + } + + public static void EndLog(string message, ResultObject res, string errorCode) + { + EndLog(message, res, errorCode, null); + } + + public static void EndLog(string message, ResultObject res) + { + EndLog(message, res, null); + } + + public static void EndLog(string message) + { + EndLog(message, null); + } + + internal static T StartLog(string message) where T : ResultObject, new() + { + LogStart(message); + T res = new T(); + res.IsSuccess = true; + return res; + } + + public static void DebugCommand(Command cmd) + { + StringBuilder sb = new StringBuilder(cmd.CommandText); + foreach (CommandParameter parameter in cmd.Parameters) + { + string formatString = " -{0} {1}"; + if (parameter.Value is string) + formatString = " -{0} '{1}'"; + else if (parameter.Value is bool) + formatString = " -{0} ${1}"; + sb.AppendFormat(formatString, parameter.Name, parameter.Value); + } + Log.WriteInfo("{0} {1}", LogPrefix, sb.ToString()); + } + + + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Crm2011/WebsitePanel.Providers.HostedSolution.Crm2011.csproj b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Crm2011/WebsitePanel.Providers.HostedSolution.Crm2011.csproj index 4ce83413..7a97058e 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Crm2011/WebsitePanel.Providers.HostedSolution.Crm2011.csproj +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Crm2011/WebsitePanel.Providers.HostedSolution.Crm2011.csproj @@ -31,40 +31,44 @@ 4 - - ..\..\Lib\References\Microsoft\microsoft.crm.sdk.proxy.dll - True + + False + ..\..\Lib\References\Microsoft\CRM2011\microsoft.crm.sdk.proxy.dll - - ..\..\Lib\References\Microsoft\microsoft.xrm.client.dll - True + + False + ..\..\Lib\References\Microsoft\CRM2011\microsoft.xrm.client.dll - - ..\..\Lib\References\Microsoft\microsoft.xrm.client.codegeneration.dll - True + + False + ..\..\Lib\References\Microsoft\CRM2011\microsoft.xrm.client.codegeneration.dll - - ..\..\Lib\References\Microsoft\microsoft.xrm.portal.dll - True + + False + ..\..\Lib\References\Microsoft\CRM2011\microsoft.xrm.portal.dll - - ..\..\Lib\References\Microsoft\microsoft.xrm.portal.files.dll - True + + False + ..\..\Lib\References\Microsoft\CRM2011\microsoft.xrm.portal.files.dll - - ..\..\Lib\References\Microsoft\microsoft.xrm.sdk.dll - True + + False + ..\..\Lib\References\Microsoft\CRM2011\microsoft.xrm.sdk.dll - - ..\..\Lib\References\Microsoft\microsoft.xrm.sdk.deployment.dll - True + + False + ..\..\Lib\References\Microsoft\CRM2011\microsoft.xrm.sdk.deployment.dll - - ..\..\Lib\References\Microsoft\microsoft.xrm.sdk.workflow.dll - True + + False + ..\..\Lib\References\Microsoft\CRM2011\microsoft.xrm.sdk.workflow.dll + + False + ..\..\Lib\System.Management.Automation.dll + @@ -74,7 +78,9 @@ + + @@ -84,11 +90,6 @@ WebsitePanel.Providers.Base False - - {A06DE5E4-4331-47E1-8F46-7B846146B559} - WebsitePanel.Providers.HostedSolution - False - {E91E52F3-9555-4D00-B577-2B1DBDD87CA7} WebsitePanel.Server.Utils diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Crm2011/myorganizationcrmsdktypes.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Crm2011/myorganizationcrmsdktypes.cs index a01d0077..fdd8b415 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Crm2011/myorganizationcrmsdktypes.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Crm2011/myorganizationcrmsdktypes.cs @@ -37,7 +37,9 @@ //------------------------------------------------------------------------------ [assembly: Microsoft.Xrm.Sdk.Client.ProxyTypesAssemblyAttribute()] -/* + + + [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "5.0.9690.2153")] public enum AccountState @@ -48,7 +50,7 @@ public enum AccountState [System.Runtime.Serialization.EnumMemberAttribute()] Inactive = 1, -}*/ +} /// /// Business that represents a customer or potential customer. The company that is billed in business transactions. @@ -4903,7 +4905,7 @@ public partial class ActivityParty : Microsoft.Xrm.Sdk.Entity, System.ComponentM } } } -/* + [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "5.0.9690.2153")] public enum ActivityPointerState @@ -4920,7 +4922,7 @@ public enum ActivityPointerState [System.Runtime.Serialization.EnumMemberAttribute()] Scheduled = 3, -}*/ +} /// /// Task performed, or to be performed, by a user. An activity is any action for which an entry can be made on a calendar. @@ -8098,7 +8100,7 @@ public partial class AnnualFiscalCalendar : Microsoft.Xrm.Sdk.Entity, System.Com } } } -/* + [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "5.0.9690.2153")] public enum AppointmentState @@ -8115,7 +8117,7 @@ public enum AppointmentState [System.Runtime.Serialization.EnumMemberAttribute()] Scheduled = 3, -}*/ +} /// /// Commitment representing a time interval with start/end times and duration. @@ -9650,7 +9652,7 @@ public partial class Appointment : Microsoft.Xrm.Sdk.Entity, System.ComponentMod } } } -/* + [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "5.0.9690.2153")] public enum AsyncOperationState @@ -9667,7 +9669,7 @@ public enum AsyncOperationState [System.Runtime.Serialization.EnumMemberAttribute()] Completed = 3, -}*/ +} /// /// Process whose execution can proceed independently or in the background. @@ -14719,7 +14721,7 @@ public partial class BulkDeleteFailure : Microsoft.Xrm.Sdk.Entity, System.Compon } } } -/* + [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "5.0.9690.2153")] public enum BulkDeleteOperationState @@ -14736,7 +14738,7 @@ public enum BulkDeleteOperationState [System.Runtime.Serialization.EnumMemberAttribute()] Completed = 3, -}*/ +} /// /// User-submitted bulk deletion job. @@ -15177,7 +15179,7 @@ public partial class BulkDeleteOperation : Microsoft.Xrm.Sdk.Entity, System.Comp } } } -/* + [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "5.0.9690.2153")] public enum BulkOperationState @@ -15191,7 +15193,7 @@ public enum BulkOperationState [System.Runtime.Serialization.EnumMemberAttribute()] Canceled = 2, -}*/ +} /// /// System operation used to perform lengthy and asynchronous operations on large data sets, such as distributing a campaign activity or quick campaign. @@ -21136,7 +21138,7 @@ public partial class CalendarRule : Microsoft.Xrm.Sdk.Entity, System.ComponentMo } } } -/* + [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "5.0.9690.2153")] public enum CampaignState @@ -21147,7 +21149,7 @@ public enum CampaignState [System.Runtime.Serialization.EnumMemberAttribute()] Inactive = 1, -}*/ +} /// /// Container for campaign activities and responses, sales literature, products, and lists to create, plan, execute, and track the results of a specific marketing campaign through its life. @@ -22584,7 +22586,7 @@ public partial class Campaign : Microsoft.Xrm.Sdk.Entity, System.ComponentModel. } } } -/* + [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "5.0.9690.2153")] public enum CampaignActivityState @@ -22598,7 +22600,7 @@ public enum CampaignActivityState [System.Runtime.Serialization.EnumMemberAttribute()] Canceled = 2, -}*/ +} /// /// Task performed, or to be performed, by a user for planning or running a campaign. @@ -24525,7 +24527,7 @@ public partial class CampaignItem : Microsoft.Xrm.Sdk.Entity, System.ComponentMo } } } -/* + [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "5.0.9690.2153")] public enum CampaignResponseState @@ -24539,7 +24541,7 @@ public enum CampaignResponseState [System.Runtime.Serialization.EnumMemberAttribute()] Canceled = 2, -}*/ +} /// /// Response from an existing or a potential new customer for a campaign. @@ -26021,7 +26023,7 @@ public partial class CampaignResponse : Microsoft.Xrm.Sdk.Entity, System.Compone } } } -/* + [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "5.0.9690.2153")] public enum ColumnMappingState @@ -26029,7 +26031,7 @@ public enum ColumnMappingState [System.Runtime.Serialization.EnumMemberAttribute()] Active = 0, -}*/ +} /// /// Mapping for columns in a data map. @@ -31740,7 +31742,7 @@ public partial class ConstraintBasedGroup : Microsoft.Xrm.Sdk.Entity, System.Com } } } -/* + [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "5.0.9690.2153")] public enum ContactState @@ -31751,7 +31753,7 @@ public enum ContactState [System.Runtime.Serialization.EnumMemberAttribute()] Inactive = 1, -}*/ +} /// /// Person with whom a business unit has a relationship, such as customer, supplier, and colleague. @@ -35973,7 +35975,7 @@ public partial class ContactQuotes : Microsoft.Xrm.Sdk.Entity, System.ComponentM } } } -/* + [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "5.0.9690.2153")] public enum ContractState @@ -35996,7 +35998,7 @@ public enum ContractState [System.Runtime.Serialization.EnumMemberAttribute()] Expired = 5, -}*/ +} /// /// Agreement to provide customer service during a specified amount of time or number of cases. @@ -37530,7 +37532,7 @@ public partial class Contract : Microsoft.Xrm.Sdk.Entity, System.ComponentModel. } } } -/* + [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "5.0.9690.2153")] public enum ContractDetailState @@ -37547,7 +37549,7 @@ public enum ContractDetailState [System.Runtime.Serialization.EnumMemberAttribute()] Expired = 3, -}*/ +} /// /// Line item in a contract that specifies the type of service a customer is entitled to. @@ -42299,7 +42301,7 @@ public partial class Discount : Microsoft.Xrm.Sdk.Entity, System.ComponentModel. } } } -/* + [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "5.0.9690.2153")] public enum DiscountTypeState @@ -42310,7 +42312,7 @@ public enum DiscountTypeState [System.Runtime.Serialization.EnumMemberAttribute()] Inactive = 1, -}*/ +} /// /// Type of discount specified as either a percentage or an amount. @@ -44221,7 +44223,7 @@ public partial class DuplicateRecord : Microsoft.Xrm.Sdk.Entity, System.Componen } } } -/* + [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "5.0.9690.2153")] public enum DuplicateRuleState @@ -44232,7 +44234,7 @@ public enum DuplicateRuleState [System.Runtime.Serialization.EnumMemberAttribute()] Active = 1, -}*/ +} /// /// Rule used to identify potential duplicates. @@ -45219,7 +45221,7 @@ public partial class DuplicateRuleCondition : Microsoft.Xrm.Sdk.Entity, System.C } } } -/* + [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "5.0.9690.2153")] public enum EmailState @@ -45233,7 +45235,7 @@ public enum EmailState [System.Runtime.Serialization.EnumMemberAttribute()] Canceled = 2, -}*/ +} /// /// Activity that is delivered using e-mail protocols. @@ -48173,7 +48175,7 @@ public partial class Equipment : Microsoft.Xrm.Sdk.Entity, System.ComponentModel } } } -/* + [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "5.0.9690.2153")] public enum FaxState @@ -48187,7 +48189,7 @@ public enum FaxState [System.Runtime.Serialization.EnumMemberAttribute()] Canceled = 2, -}*/ +} /// /// Activity that tracks call outcome and number of pages for a fax and optionally stores an electronic copy of the document. @@ -53718,7 +53720,7 @@ public partial class GoalRollupQuery : Microsoft.Xrm.Sdk.Entity, System.Componen } } } -/* + [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "5.0.9690.2153")] public enum ImportState @@ -53726,7 +53728,7 @@ public enum ImportState [System.Runtime.Serialization.EnumMemberAttribute()] Active = 0, -}*/ +} /// /// Status and ownership information for an import job. @@ -54617,7 +54619,7 @@ public partial class ImportEntityMapping : Microsoft.Xrm.Sdk.Entity, System.Comp } } } -/* + [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "5.0.9690.2153")] public enum ImportFileState @@ -54625,7 +54627,7 @@ public enum ImportFileState [System.Runtime.Serialization.EnumMemberAttribute()] Active = 0, -}*/ +} /// /// File name of file used for import. @@ -55976,7 +55978,7 @@ public partial class ImportJob : Microsoft.Xrm.Sdk.Entity, System.ComponentModel } } } -/* + [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "5.0.9690.2153")] public enum ImportLogState @@ -55984,7 +55986,7 @@ public enum ImportLogState [System.Runtime.Serialization.EnumMemberAttribute()] Active = 0, -}*/ +} /// /// Failure reason and other detailed information for a record that failed to import. @@ -56568,7 +56570,7 @@ public partial class ImportLog : Microsoft.Xrm.Sdk.Entity, System.ComponentModel } } } -/* + [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "5.0.9690.2153")] public enum ImportMapState @@ -56579,7 +56581,7 @@ public enum ImportMapState [System.Runtime.Serialization.EnumMemberAttribute()] Inactive = 1, -}*/ +} /// /// Data map used in import. @@ -57282,7 +57284,7 @@ public partial class ImportMap : Microsoft.Xrm.Sdk.Entity, System.ComponentModel } } } -/* + [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "5.0.9690.2153")] public enum IncidentState @@ -57296,7 +57298,7 @@ public enum IncidentState [System.Runtime.Serialization.EnumMemberAttribute()] Canceled = 2, -}*/ +} /// /// Service request case associated with a contract. @@ -58752,7 +58754,7 @@ public partial class Incident : Microsoft.Xrm.Sdk.Entity, System.ComponentModel. } } } -/* + [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "5.0.9690.2153")] public enum IncidentResolutionState @@ -58766,7 +58768,7 @@ public enum IncidentResolutionState [System.Runtime.Serialization.EnumMemberAttribute()] Canceled = 2, -}*/ +} /// /// Special type of activity that includes description of the resolution, billing status, and the duration of the case. @@ -59809,7 +59811,7 @@ public partial class InvalidDependency : Microsoft.Xrm.Sdk.Entity, System.Compon } } } -/* + [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "5.0.9690.2153")] public enum InvoiceState @@ -59826,7 +59828,7 @@ public enum InvoiceState [System.Runtime.Serialization.EnumMemberAttribute()] Canceled = 3, -}*/ +} /// /// Order that has been billed. @@ -63207,7 +63209,7 @@ public partial class IsvConfig : Microsoft.Xrm.Sdk.Entity, System.ComponentModel } } } -/* + [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "5.0.9690.2153")] public enum KbArticleState @@ -63221,7 +63223,7 @@ public enum KbArticleState [System.Runtime.Serialization.EnumMemberAttribute()] Published = 3, -}*/ +} /// /// Structured content that is part of the knowledge base. @@ -64919,7 +64921,7 @@ public partial class KbArticleTemplate : Microsoft.Xrm.Sdk.Entity, System.Compon } } } -/* + [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "5.0.9690.2153")] public enum LeadState @@ -64933,7 +64935,7 @@ public enum LeadState [System.Runtime.Serialization.EnumMemberAttribute()] Disqualified = 2, -}*/ +} /// /// Prospect or potential sales opportunity. Leads are converted into accounts, contacts, or opportunities when they are qualified. Otherwise, they are deleted or archived. @@ -68716,7 +68718,7 @@ public partial class LeadProduct : Microsoft.Xrm.Sdk.Entity, System.ComponentMod } } } -/* + [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "5.0.9690.2153")] public enum LetterState @@ -68730,7 +68732,7 @@ public enum LetterState [System.Runtime.Serialization.EnumMemberAttribute()] Canceled = 2, -}*/ +} /// /// Activity that tracks the delivery of a letter. The activity can contain the electronic copy of the letter. @@ -70392,7 +70394,7 @@ public partial class License : Microsoft.Xrm.Sdk.Entity, System.ComponentModel.I } } } -/* + [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "5.0.9690.2153")] public enum ListState @@ -70403,7 +70405,7 @@ public enum ListState [System.Runtime.Serialization.EnumMemberAttribute()] Inactive = 1, -}*/ +} /// /// Group of existing or potential customers created for a marketing campaign or other sales purposes. @@ -71792,7 +71794,7 @@ public partial class ListMember : Microsoft.Xrm.Sdk.Entity, System.ComponentMode } } } -/* + [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "5.0.9690.2153")] public enum LookUpMappingState @@ -71800,7 +71802,7 @@ public enum LookUpMappingState [System.Runtime.Serialization.EnumMemberAttribute()] Active = 0, -}*/ +} /// /// In a data map, maps a lookup attribute in a source file to Microsoft Dynamics CRM. @@ -72208,7 +72210,7 @@ public partial class LookUpMapping : Microsoft.Xrm.Sdk.Entity, System.ComponentM } } } -/* + [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "5.0.9690.2153")] public enum MailMergeTemplateState @@ -72219,7 +72221,7 @@ public enum MailMergeTemplateState [System.Runtime.Serialization.EnumMemberAttribute()] Inactive = 1, -}*/ +} /// /// Template for a mail merge document that contains the standard attributes of that document. @@ -74308,7 +74310,7 @@ public partial class MonthlyFiscalCalendar : Microsoft.Xrm.Sdk.Entity, System.Co } } } -/* + [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "5.0.9690.2153")] public enum OpportunityState @@ -74322,7 +74324,7 @@ public enum OpportunityState [System.Runtime.Serialization.EnumMemberAttribute()] Lost = 2, -}*/ +} /// /// Potential revenue-generating event, or sale to an account, which needs to be tracked through a sales process to completion. @@ -76039,7 +76041,7 @@ public partial class Opportunity : Microsoft.Xrm.Sdk.Entity, System.ComponentMod } } } -/* + [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "5.0.9690.2153")] public enum OpportunityCloseState @@ -76053,7 +76055,7 @@ public enum OpportunityCloseState [System.Runtime.Serialization.EnumMemberAttribute()] Canceled = 2, -}*/ +} /// /// Activity that is created automatically when an opportunity is closed, containing information such as the description of the closing and actual revenue. @@ -78005,7 +78007,7 @@ public partial class OpportunityProduct : Microsoft.Xrm.Sdk.Entity, System.Compo } } } -/* + [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "5.0.9690.2153")] public enum OrderCloseState @@ -78019,7 +78021,7 @@ public enum OrderCloseState [System.Runtime.Serialization.EnumMemberAttribute()] Canceled = 2, -}*/ +} /// /// Activity generated automatically when an order is closed. @@ -83492,7 +83494,7 @@ public partial class OrganizationUI : Microsoft.Xrm.Sdk.Entity, System.Component } } } -/* + [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "5.0.9690.2153")] public enum OwnerMappingState @@ -83500,7 +83502,7 @@ public enum OwnerMappingState [System.Runtime.Serialization.EnumMemberAttribute()] Active = 0, -}*/ +} /// /// In a data map, maps ownership data from the source file to Microsoft Dynamics CRM. @@ -83926,7 +83928,7 @@ public partial class OwnerMapping : Microsoft.Xrm.Sdk.Entity, System.ComponentMo } } } -/* + [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "5.0.9690.2153")] public enum PhoneCallState @@ -83940,7 +83942,7 @@ public enum PhoneCallState [System.Runtime.Serialization.EnumMemberAttribute()] Canceled = 2, -}*/ +} /// /// Activity to track a telephone call. @@ -85338,7 +85340,7 @@ public partial class PhoneCall : Microsoft.Xrm.Sdk.Entity, System.ComponentModel } } } -/* + [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "5.0.9690.2153")] public enum PickListMappingState @@ -85346,7 +85348,7 @@ public enum PickListMappingState [System.Runtime.Serialization.EnumMemberAttribute()] Active = 0, -}*/ +} /// /// In a data map, maps list values from the source file to Microsoft Dynamics CRM. @@ -88747,7 +88749,7 @@ public partial class PostLike : Microsoft.Xrm.Sdk.Entity, System.ComponentModel. } } } -/* + [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "5.0.9690.2153")] public enum PriceLevelState @@ -88758,7 +88760,7 @@ public enum PriceLevelState [System.Runtime.Serialization.EnumMemberAttribute()] Inactive = 1, -}*/ +} /// /// Entity that defines pricing levels. @@ -93323,7 +93325,7 @@ public partial class ProcessSession : Microsoft.Xrm.Sdk.Entity, System.Component } } } -/* + [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "5.0.9690.2153")] public enum ProductState @@ -93334,7 +93336,7 @@ public enum ProductState [System.Runtime.Serialization.EnumMemberAttribute()] Inactive = 1, -}*/ +} /// /// Information about products and their pricing information. @@ -100310,7 +100312,7 @@ public partial class QueueItem : Microsoft.Xrm.Sdk.Entity, System.ComponentModel } } } -/* + [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "5.0.9690.2153")] public enum QuoteState @@ -100327,7 +100329,7 @@ public enum QuoteState [System.Runtime.Serialization.EnumMemberAttribute()] Closed = 3, -}*/ +} /// /// Formal offer for products and/or services, proposed at specific prices and related payment terms, which is sent to a prospective customer. @@ -102356,7 +102358,7 @@ public partial class Quote : Microsoft.Xrm.Sdk.Entity, System.ComponentModel.INo } } } -/* + [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "5.0.9690.2153")] public enum QuoteCloseState @@ -102370,7 +102372,7 @@ public enum QuoteCloseState [System.Runtime.Serialization.EnumMemberAttribute()] Canceled = 2, -}*/ +} /// /// Activity generated when a quote is closed. @@ -107032,7 +107034,7 @@ public partial class RecurringAppointmentMaster : Microsoft.Xrm.Sdk.Entity, Syst } } } -/* + [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "5.0.9690.2153")] public enum RelationshipRoleState @@ -107043,7 +107045,7 @@ public enum RelationshipRoleState [System.Runtime.Serialization.EnumMemberAttribute()] Inactive = 1, -}*/ +} /// /// Relationship between an account or contact and an opportunity. @@ -115100,7 +115102,7 @@ public partial class SalesLiteratureItem : Microsoft.Xrm.Sdk.Entity, System.Comp } } } -/* + [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "5.0.9690.2153")] public enum SalesOrderState @@ -115120,7 +115122,7 @@ public enum SalesOrderState [System.Runtime.Serialization.EnumMemberAttribute()] Invoiced = 4, -}*/ +} /// /// Quote that has been accepted. @@ -120880,7 +120882,7 @@ public partial class SdkMessagePair : Microsoft.Xrm.Sdk.Entity, System.Component } } } -/* + [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "5.0.9690.2153")] public enum SdkMessageProcessingStepState @@ -120891,7 +120893,7 @@ public enum SdkMessageProcessingStepState [System.Runtime.Serialization.EnumMemberAttribute()] Disabled = 1, -}*/ +} /// /// Stage in the execution pipeline that a plug-in is to execute. @@ -125578,7 +125580,7 @@ public partial class Service : Microsoft.Xrm.Sdk.Entity, System.ComponentModel.I } } } -/* + [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "5.0.9690.2153")] public enum ServiceAppointmentState @@ -125595,7 +125597,7 @@ public enum ServiceAppointmentState [System.Runtime.Serialization.EnumMemberAttribute()] Scheduled = 3, -}*/ +} /// /// Activity offered by the organization to satisfy its customer's needs. Each service activity includes date, time, duration, and required resources. @@ -132619,8 +132621,6 @@ public partial class SystemForm : Microsoft.Xrm.Sdk.Entity, System.ComponentMode } } - - /// /// Person with access to the Microsoft CRM system and who owns objects in the Microsoft CRM database. /// @@ -146928,7 +146928,6 @@ public partial class SystemUser : Microsoft.Xrm.Sdk.Entity, System.ComponentMode } } - /// /// /// @@ -147303,7 +147302,7 @@ public partial class SystemUserRoles : Microsoft.Xrm.Sdk.Entity, System.Componen } } } -/* + [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "5.0.9690.2153")] public enum TaskState @@ -147317,7 +147316,7 @@ public enum TaskState [System.Runtime.Serialization.EnumMemberAttribute()] Canceled = 2, -}*/ +} /// /// Generic activity representing work needed to be done. @@ -153408,7 +153407,7 @@ public partial class TimeZoneRule : Microsoft.Xrm.Sdk.Entity, System.ComponentMo } } } -/* + [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "5.0.9690.2153")] public enum TransactionCurrencyState @@ -153419,7 +153418,7 @@ public enum TransactionCurrencyState [System.Runtime.Serialization.EnumMemberAttribute()] Inactive = 1, -}*/ +} /// /// Currency in which a financial transaction is carried out. @@ -154924,7 +154923,7 @@ public partial class TransactionCurrency : Microsoft.Xrm.Sdk.Entity, System.Comp } } } -/* + [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "5.0.9690.2153")] public enum TransformationMappingState @@ -154932,7 +154931,7 @@ public enum TransformationMappingState [System.Runtime.Serialization.EnumMemberAttribute()] Active = 0, -}*/ +} /// /// In a data map, maps the transformation of source attributes to Microsoft Dynamics CRM attributes. @@ -161230,7 +161229,7 @@ public partial class UserForm : Microsoft.Xrm.Sdk.Entity, System.ComponentModel. } } } -/* + [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "5.0.9690.2153")] public enum UserQueryState @@ -161241,7 +161240,7 @@ public enum UserQueryState [System.Runtime.Serialization.EnumMemberAttribute()] Inactive = 1, -}*/ +} /// /// Saved database query that is owned by a user. @@ -164543,7 +164542,7 @@ public partial class WebResource : Microsoft.Xrm.Sdk.Entity, System.ComponentMod } } } -/* + [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "5.0.9690.2153")] public enum WorkflowState @@ -164554,7 +164553,7 @@ public enum WorkflowState [System.Runtime.Serialization.EnumMemberAttribute()] Activated = 1, -}*/ +} /// /// Set of logical rules that define the steps necessary to automate a specific business process, task, or set of actions to be performed. @@ -168712,4 +168711,3 @@ public partial class ServiceContext : Microsoft.Xrm.Sdk.Client.OrganizationServi } } } - diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Crm2013/CRMBase.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Crm2013/CRMBase.cs new file mode 100644 index 00000000..3a52bdca --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Crm2013/CRMBase.cs @@ -0,0 +1,2096 @@ +// Copyright (c) 2012 - 2013, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Globalization; +using System.IO; +using System.Net; +using System.Reflection; +using System.Net.Security; +using System.Security.Principal; +using System.Security.Cryptography.X509Certificates; +using System.Threading; +using System.ServiceModel.Description; +using System.Text.RegularExpressions; +using Microsoft.Win32; +using WebsitePanel.Providers.Common; +using WebsitePanel.Providers.ResultObjects; +using WebsitePanel.Server.Utils; +using WebsitePanel.Providers.HostedSolution; +using WebsitePanel.Providers; +using WebsitePanel.Providers.Utils; +using Microsoft.Xrm.Sdk; +using Microsoft.Xrm.Sdk.Query; +using Microsoft.Xrm.Sdk.Discovery; +using Microsoft.Xrm.Sdk.Client; +using Microsoft.Xrm.Sdk.Deployment; +using Microsoft.Xrm.Sdk.Messages; + +namespace WebsitePanel.Providers.HostedSolution +{ + public class CRMBase : HostingServiceProviderBase, ICRM + { + #region Properties + + protected virtual string UserName + { + get { return ProviderSettings[Constants.UserName]; } + } + + protected virtual string Password + { + get { return ProviderSettings[Constants.Password]; } + } + + protected virtual string SqlServer + { + get { return ProviderSettings[Constants.SqlServer]; } + } + + protected virtual string ReportingServer + { + get { return ProviderSettings[Constants.ReportingServer]; } + } + + protected virtual string UrlSchema + { + get { return ProviderSettings[Constants.UrlSchema] == "http" ? "http://" : "https://"; } + } + + protected virtual string CRMDeploymentUrl + { + get + { + string uri = ProviderSettings[Constants.DeploymentWebService]; + if (String.IsNullOrEmpty(uri)) uri = ProviderSettings[Constants.AppRootDomain]; + string cRMServiceUrl = UrlSchema + uri + ":" + ProviderSettings[Constants.Port] + "/XRMDeployment/2011/Deployment.svc"; + return cRMServiceUrl; + } + } + + protected virtual string CRMDiscoveryUrl + { + get + { + string uri = ProviderSettings[Constants.DiscoveryWebService]; + if (String.IsNullOrEmpty(uri)) uri = ProviderSettings[Constants.AppRootDomain]; + string cRMDiscoveryUri = UrlSchema + uri + ":" + ProviderSettings[Constants.Port] + "/XRMServices/2011/Discovery.svc"; + return cRMDiscoveryUri; + } + } + + private static string crmPath = null; + protected static string CRMPath + { + get + { + if (string.IsNullOrEmpty(crmPath)) + { + RegistryKey root = Registry.LocalMachine; + RegistryKey rk = root.OpenSubKey("SOFTWARE\\Microsoft\\MSCRM"); + if (rk != null) + { + crmPath = (string)rk.GetValue("CRM_Server_InstallDir", string.Empty); + } + } + return crmPath; + } + } + + protected static string CRMDatabaseName = "MSCRM_CONFIG"; + + #endregion + + #region Service + + protected virtual ClientCredentials GetUserLogonCredentials() + { + ClientCredentials credentials = new ClientCredentials(); + + if (String.IsNullOrEmpty(UserName)) + { + credentials.Windows.ClientCredential = System.Net.CredentialCache.DefaultNetworkCredentials; + } + else + { + credentials.UserName.UserName = UserName; + credentials.UserName.Password = Password; + } + + return credentials; + } + + protected virtual DeploymentServiceClient GetDeploymentProxy() + { + Uri serviceUrl = new Uri(CRMDeploymentUrl); + + DeploymentServiceClient deploymentService = Microsoft.Xrm.Sdk.Deployment.Proxy.ProxyClientHelper.CreateClient(serviceUrl); + if (!String.IsNullOrEmpty(UserName)) + deploymentService.ClientCredentials.Windows.ClientCredential = new NetworkCredential(UserName, Password); + + return deploymentService; + } + + protected virtual DiscoveryServiceProxy GetDiscoveryProxy() + { + + IServiceManagement serviceManagement = + ServiceConfigurationFactory.CreateManagement( + new Uri(CRMDiscoveryUrl)); + + ClientCredentials Credentials = GetUserLogonCredentials(); + + DiscoveryServiceProxy r = new DiscoveryServiceProxy(serviceManagement, Credentials); + + return r; + } + + private OrganizationDetailCollection DiscoverOrganizations(IDiscoveryService service) + { + if (service == null) throw new ArgumentNullException("service"); + RetrieveOrganizationsRequest orgRequest = new RetrieveOrganizationsRequest(); + RetrieveOrganizationsResponse orgResponse = + (RetrieveOrganizationsResponse)service.Execute(orgRequest); + + return orgResponse.Details; + } + + protected virtual Uri GetCRMOrganizationUrl(string orgName) + { + //string url = "https://" + ProviderSettings[Constants.AppRootDomain] + ":" + ProviderSettings[Constants.Port] + "/" + orgName + "/XRMServices/2011/Organization.svc"; + + string url; + + string organizationWebServiceUri = ProviderSettings[Constants.OrganizationWebService]; + + if (String.IsNullOrEmpty(orgName)) + return null; + + if (!String.IsNullOrEmpty(organizationWebServiceUri)) + { + url = UrlSchema + organizationWebServiceUri + ":" + ProviderSettings[Constants.Port] + "/" + orgName + "/XRMServices/2011/Organization.svc"; + } + else + { + url = UrlSchema + orgName + "." + ProviderSettings[Constants.IFDWebApplicationRootDomain] + ":" + ProviderSettings[Constants.Port] + "/XRMServices/2011/Organization.svc"; + } + + try + { + + using (DiscoveryServiceProxy serviceProxy = GetDiscoveryProxy()) + { + // Obtain organization information from the Discovery service. + if (serviceProxy != null) + { + // Obtain information about the organizations that the system user belongs to. + OrganizationDetailCollection orgs = DiscoverOrganizations(serviceProxy); + + for (int n = 0; n < orgs.Count; n++) + { + if (orgs[n].UniqueName == orgName) + { + // Return the organization Uri. + return new System.Uri(orgs[n].Endpoints[EndpointType.OrganizationService]); + } + } + + } + } + } + catch { } + + return new Uri(url); + } + + private int getOrganizationProxyTryCount = 10; + private int getOrganizationProxyTryTimeout = 30000; + protected virtual OrganizationServiceProxy GetOrganizationProxy(string orgName) + { + return GetOrganizationProxy(orgName, getOrganizationProxyTryCount, getOrganizationProxyTryTimeout); + } + + protected virtual OrganizationServiceProxy GetOrganizationProxy(string orgName, int TryCount, int TryTimeout) + { + + Uri OrganizationUri = GetCRMOrganizationUrl(orgName); + + OrganizationServiceProxy r = null; + + bool success = false; + int tryItem = 0; + Exception exception = null; + + while (!success) + { + + try + { + // Set IServiceManagement for the current organization. + IServiceManagement orgServiceManagement = + ServiceConfigurationFactory.CreateManagement( + OrganizationUri); + + r = new OrganizationServiceProxy( + orgServiceManagement, + GetUserLogonCredentials()); + + success = true; + + } + catch (Exception exc) + { + Thread.Sleep(TryTimeout); + tryItem++; + if (tryItem >= TryCount) + { + exception = exc; + success = true; + } + } + + } + + if (exception != null) + throw new ArgumentException(exception.ToString()); + + r.EnableProxyTypes(); + + return r; + } + + #endregion + + #region Static constructor + + static CRMBase() + { + AppDomain.CurrentDomain.AssemblyResolve += ResolveCRMAssembly; + } + + static Assembly ResolveCRMAssembly(object sender, ResolveEventArgs args) + { + // Ensure we load DLLs only. + if (args.Name.ToLower().Contains("microsoft.crm") || args.Name.ToLower().Contains("antixsslibrary") || args.Name.ToLower().Contains("microsoft.xrm")) + { + string dllName = args.Name.Split(',')[0] + ".dll"; + + List paths = new List(); + + // assembly location + paths.Add( Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().EscapedCodeBase).LocalPath) ); + // crm tools path + paths.Add(CRMPath); + + foreach(string path in paths) + { + string filename = Path.Combine(path, dllName); + if (File.Exists(filename)) + return Assembly.LoadFrom(filename); + } + } + + return default(Assembly); + } + + #endregion + + #region Check environment + + protected virtual bool CheckCRMWebServicesAccess() + { + Log.WriteStart("CheckCRMWebServicesAccess"); + bool ret = false; + HttpWebResponse response = null; + HttpWebRequest request; + + try + { + WindowsIdentity.GetCurrent(); + + request = WebRequest.Create(CRMDeploymentUrl) as HttpWebRequest; + + if (request != null) + { + request.UseDefaultCredentials = true; + request.Credentials = CredentialCache.DefaultCredentials; + response = request.GetResponse() as HttpWebResponse; + + } + if (response != null) + ret = (response.StatusCode == HttpStatusCode.OK); + } + catch (Exception ex) + { + Log.WriteError(ex); + ret = false; + } + + Log.WriteEnd("CheckCRMWebServicesAccess"); + return ret; + } + + protected virtual bool CheckPermissions() + { + Log.WriteStart("CheckPermissions"); + bool res = false; + try + { + string group = "PrivUserGroup"; + string user = WindowsIdentity.GetCurrent().Name.Split(new char[] { '\\' })[1]; + res = ActiveDirectoryUtils.IsUserInGroup(user, group); + } + catch (Exception ex) + { + Log.WriteError(ex); + res = false; + } + + Log.WriteEnd("CheckPermissions"); + return res; + } + + protected virtual bool CheckOrganizationUnique(string databaseName, string orgName) + { + Log.WriteStart("CheckOrganizationUnique"); + bool res = false; + + SqlConnection connection = null; + try + { + connection = new SqlConnection(); + connection.ConnectionString = + string.Format("Server={1};Initial Catalog={0};Integrated Security=SSPI", + databaseName, SqlServer); + + connection.Open(); + + string commandText = string.Format("SELECT COUNT(*) FROM dbo.Organization WHERE UniqueName = '{0}'", orgName); + SqlCommand command = new SqlCommand(commandText, connection); + int count = (int)command.ExecuteScalar(); + res = count == 0; + + + } + catch (Exception ex) + { + res = false; + Log.WriteError(ex); + } + finally + { + if (connection != null) + connection.Close(); + + } + + Log.WriteEnd("CheckOrganizationUnique"); + return res; + } + + protected virtual bool CheckSqlServerConnection() + { + Log.WriteStart("CheckSqlServerConnection"); + bool res = false; + SqlConnection connection = null; + try + { + connection = new SqlConnection(); + connection.ConnectionString = + string.Format("server={0}; Integrated Security=SSPI", + SqlServer); + + connection.Open(); + res = true; + } + catch (Exception ex) + { + Log.WriteError(ex); + res = false; + } + finally + { + if (connection != null) + connection.Close(); + } + + Log.WriteEnd("CheckSqlServerConnection"); + + return res; + } + + protected virtual bool CheckReportServerConnection() + { + Log.WriteStart("CheckReportServerConnection"); + bool ret = false; + HttpWebResponse response = null; + HttpWebRequest request; + + try + { + WindowsIdentity.GetCurrent(); + + request = WebRequest.Create(ReportingServer) as HttpWebRequest; + + if (request != null) + { + request.UseDefaultCredentials = true; + request.Credentials = CredentialCache.DefaultCredentials; + response = request.GetResponse() as HttpWebResponse; + + } + if (response != null) + ret = (response.StatusCode == HttpStatusCode.OK); + } + catch (Exception ex) + { + Log.WriteError(ex); + ret = false; + } + + Log.WriteEnd("CheckReportServerConnection"); + return ret; + } + + protected virtual OrganizationResult CheckCrmEnvironment(string strDataBaseName, string organizationUniqueName) + { + OrganizationResult retOrganization = StartLog("CheckCrmEnvironment"); + bool res = CheckSqlServerConnection(); + + if (!res) + { + EndLog("CheckCrmEnvironment", retOrganization, CrmErrorCodes.CRM_SQL_SERVER_ERROR); + return retOrganization; + } + + res = CheckOrganizationUnique(strDataBaseName, organizationUniqueName); + if (!res) + { + EndLog("CheckCrmEnvironment", retOrganization, CrmErrorCodes.CRM_ORGANIZATION_ALREADY_EXISTS); + return retOrganization; + } + + res = CheckReportServerConnection(); + if (!res) + { + EndLog("CheckCrmEnvironment", retOrganization, CrmErrorCodes.CRM_REPORT_SERVER_ERROR); + return retOrganization; + } + + res = CheckPermissions(); + if (!res) + { + EndLog("CheckCrmEnvironment", retOrganization, CrmErrorCodes.CRM_PERMISSIONS_ERROR); + return retOrganization; + } + + res = CheckCRMWebServicesAccess(); + if (!res) + { + EndLog("CheckCrmEnvironment", retOrganization, CrmErrorCodes.CRM_WEB_SERVICE_ERROR); + return retOrganization; + } + + EndLog("CheckCrmEnvironment"); + return retOrganization; + } + + #endregion + + #region DataBase + + protected virtual string GetDataBaseName(Guid organizationId) + { + string databasename = null; + + SqlConnection connection = null; + try + { + connection = new SqlConnection(); + connection.ConnectionString = + string.Format("Server={1};Initial Catalog={0};Integrated Security=SSPI", + CRMDatabaseName, SqlServer); + + connection.Open(); + + string commandText = string.Format("SELECT DatabaseName FROM dbo.Organization where id = '{0}'", organizationId); + SqlCommand command = new SqlCommand(commandText, connection); + object result = command.ExecuteScalar(); + if (result!=null) + databasename = String.Concat(result.ToString()); + + } + catch (Exception ex) + { + Log.WriteError(ex); + } + finally + { + if (connection != null) + connection.Close(); + } + + return databasename; + } + + public virtual long GetDBSize(Guid organizationId) + { + StartLog("GetDBSize"); + long res = 0; + + string databasename = GetDataBaseName(organizationId); + if (databasename == null) return 0; + + if (databasename == null) return 0; + + SqlConnection connection = null; + try + { + connection = new SqlConnection(); + connection.ConnectionString = + string.Format("Server={1};Initial Catalog={0};Integrated Security=SSPI", + databasename, SqlServer); + + connection.Open(); + + string commandText = "SELECT ((dbsize ) * 8192 ) size FROM " + // + logsize + "( " + + "SELECT SUM(CONVERT(BIGINT,CASE WHEN status & 64 = 0 THEN size ELSE 0 END)) dbsize " + + ", SUM(CONVERT(BIGINT,CASE WHEN status & 64 <> 0 THEN size ELSE 0 END)) logsize " + + "FROM dbo.sysfiles " + + ") big"; + + SqlCommand command = new SqlCommand(commandText, connection); + res = (long)command.ExecuteScalar(); + + } + catch (Exception ex) + { + EndLog("GetDBSize", null, null, ex); + } + finally + { + if (connection != null) + connection.Close(); + + } + + EndLog("GetDBSize"); + return res; + + } + + public virtual long GetMaxDBSize(Guid organizationId) + { + StartLog("GetMaxDBSize"); + long res = 0; + + string databasename = GetDataBaseName(organizationId); + if (databasename == null) return 0; + + SqlConnection connection = null; + try + { + connection = new SqlConnection(); + connection.ConnectionString = + string.Format("Server={1};Initial Catalog={0};Integrated Security=SSPI", + databasename, SqlServer); + + connection.Open(); + + string commandText = "SELECT SUM(CONVERT(BIGINT,CASE WHEN status & 64 = 0 THEN maxsize ELSE 0 END)) dbsize FROM dbo.sysfiles"; + + SqlCommand command = new SqlCommand(commandText, connection); + res = (long)command.ExecuteScalar(); + if (res > 0) res = res * 8192; + + } + catch (Exception ex) + { + EndLog("GetMaxDBSize", null, null, ex); + } + finally + { + if (connection != null) + connection.Close(); + + } + + EndLog("GetMaxDBSize"); + return res; + } + + public virtual ResultObject SetMaxDBSize(Guid organizationId, long maxSize) + { + ResultObject res = StartLog("SetMaxDBSize"); + + SqlConnection connection = null; + try + { + string databasename = GetDataBaseName(organizationId); + if (databasename == null) throw new Exception("Can not get database name"); + + connection = new SqlConnection(); + connection.ConnectionString = + string.Format("Server={1};Initial Catalog={0};Integrated Security=SSPI", + databasename, SqlServer); + + connection.Open(); + + string maxSizeStr = maxSize == -1 ? "UNLIMITED" : (maxSize / (1024 * 1024)).ToString() + " MB"; + + string commandText = "ALTER DATABASE [" + databasename + "] MODIFY FILE ( NAME = N'mscrm', MAXSIZE = " + maxSizeStr + " )"; + + SqlCommand command = new SqlCommand(commandText, connection); + command.ExecuteNonQuery(); + + res.IsSuccess = true; + + } + catch (Exception ex) + { + EndLog("SetMaxDBSize", res, CrmErrorCodes.CANNOT_CHANGE_CRM_ORGANIZATION_STATE, ex); + } + finally + { + if (connection != null) + connection.Close(); + + } + + EndLog("SetMaxDBSize"); + return res; + } + + #endregion + + #region Organization + + public virtual OrganizationResult CreateOrganization(Guid organizationId, string organizationUniqueName, string organizationFriendlyName, + int baseLanguageCode, + string ou, + string baseCurrencyCode, string baseCurrencyName, string baseCurrencySymbol, + string initialUserDomainName, string initialUserFirstName, string initialUserLastName, string initialUserPrimaryEmail, + string organizationCollation, + long maxSize) + { + return CreateOrganizationInternal(organizationId, organizationUniqueName, organizationFriendlyName, + baseLanguageCode, + ou , baseCurrencyCode, baseCurrencyName, baseCurrencySymbol, + initialUserDomainName, initialUserFirstName, initialUserLastName, initialUserPrimaryEmail, + organizationCollation, + maxSize); + } + + protected const string CRMSysAdminRoleStr = "Системный администратор;System Administrator"; + + internal virtual OrganizationResult CreateOrganizationInternal(Guid organizationId, string organizationUniqueName, string organizationFriendlyName, + int baseLanguageCode, + string ou, + string baseCurrencyCode, string baseCurrencyName, string baseCurrencySymbol, + string initialUserDomainName, string initialUserFirstName, string initialUserLastName, string initialUserPrimaryEmail, + string organizationCollation, + long maxSize) + { + + OrganizationResult ret = StartLog("CreateOrganizationInternal"); + + organizationUniqueName = Regex.Replace(organizationUniqueName, @"[^\dA-Za-z]", "-", RegexOptions.Compiled); + + // calculate UserRootPath + string ldapstr = ""; + + string[] ouItems = ou.Split('.'); + foreach (string ouItem in ouItems) + { + if (ldapstr.Length != 0) ldapstr += ","; + ldapstr += "OU=" + ouItem; + } + + string rootDomain = ServerSettings.ADRootDomain; + string[] domainItems = rootDomain.Split('.'); + foreach (string domainItem in domainItems) + ldapstr += ",DC=" + domainItem; + + ldapstr = @"LDAP://" + rootDomain + "/" + ldapstr; + + + + if (organizationId == Guid.Empty) + throw new ArgumentException("OrganizationId is Guid.Empty"); + + if (string.IsNullOrEmpty(organizationFriendlyName)) + throw new ArgumentNullException("organizationFriendlyName"); + + if (string.IsNullOrEmpty(baseCurrencyCode)) + throw new ArgumentNullException("baseCurrencyCode"); + + if (string.IsNullOrEmpty(baseCurrencySymbol)) + throw new ArgumentNullException("baseCurrencySymbol"); + + if (string.IsNullOrEmpty(initialUserDomainName)) + throw new ArgumentNullException("initialUserDomainName"); + + OrganizationResult retCheckEn = CheckCrmEnvironment(CRMDatabaseName, organizationUniqueName); + + if (!retCheckEn.IsSuccess) + { + ret.ErrorCodes.AddRange(retCheckEn.ErrorCodes); + EndLog("CreateOrganizationInternal", ret, null, null); + return ret; + } + + try + { + + DeploymentServiceClient deploymentService = GetDeploymentProxy(); + + Microsoft.Xrm.Sdk.Deployment.Organization org = new Microsoft.Xrm.Sdk.Deployment.Organization + { + Id = organizationId, + UniqueName = organizationUniqueName, + FriendlyName = organizationFriendlyName, + SqlServerName = SqlServer, + SrsUrl = ReportingServer, + BaseCurrencyCode = baseCurrencyCode, + BaseCurrencyName = baseCurrencyName, + BaseCurrencySymbol = baseCurrencySymbol, + SqlCollation = organizationCollation, + State = Microsoft.Xrm.Sdk.Deployment.OrganizationState.Enabled + }; + + if (baseLanguageCode > 0) + org.BaseLanguageCode = baseLanguageCode; + + BeginCreateOrganizationRequest req = new BeginCreateOrganizationRequest + { + Organization = org + }; + + if (!String.IsNullOrEmpty(UserName)) + { + req.SysAdminName = UserName; + } + + BeginCreateOrganizationResponse resp = deploymentService.Execute(req) as BeginCreateOrganizationResponse; + + if (resp == null) + throw new ArgumentException("BeginCreateOrganizationResponse is Null"); + + EntityInstanceId id = new EntityInstanceId(); + id.Name = org.UniqueName; + + Microsoft.Xrm.Sdk.Deployment.OrganizationState OperationState = Microsoft.Xrm.Sdk.Deployment.OrganizationState.Pending; + + int timeout = 30000; + + do + { + Thread.Sleep(timeout); + try + { + Microsoft.Xrm.Sdk.Deployment.Organization getorg + = (Microsoft.Xrm.Sdk.Deployment.Organization)deploymentService.Retrieve(DeploymentEntityType.Organization, id); + OperationState = getorg.State; + } + catch { } + } while ((OperationState != Microsoft.Xrm.Sdk.Deployment.OrganizationState.Enabled) && + (OperationState != Microsoft.Xrm.Sdk.Deployment.OrganizationState.Failed)); + + if (OperationState == Microsoft.Xrm.Sdk.Deployment.OrganizationState.Failed) + throw new ArgumentException("Create organization failed."); + + // update UserRootPath setting + Microsoft.Xrm.Sdk.Deployment.ConfigurationEntity orgSettings = new Microsoft.Xrm.Sdk.Deployment.ConfigurationEntity + { + Id = org.Id, + LogicalName = "Organization" + }; + orgSettings.Attributes = new Microsoft.Xrm.Sdk.Deployment.AttributeCollection(); + orgSettings.Attributes.Add(new KeyValuePair("UserRootPath", ldapstr)); + Microsoft.Xrm.Sdk.Deployment.UpdateAdvancedSettingsRequest reqUpdateSettings = new Microsoft.Xrm.Sdk.Deployment.UpdateAdvancedSettingsRequest + { + Entity = orgSettings + }; + Microsoft.Xrm.Sdk.Deployment.UpdateAdvancedSettingsResponse respUpdateSettings = (Microsoft.Xrm.Sdk.Deployment.UpdateAdvancedSettingsResponse) deploymentService.Execute(reqUpdateSettings); + + // DB size limit + if (maxSize!=-1) + SetMaxDBSize(organizationId, maxSize); + + int tryTimeout = 30000; + int tryCount = 10; + + bool success = false; + int tryItem = 0; + + while (!success) + { + + try + { + Thread.Sleep(tryTimeout); + + OrganizationServiceProxy _serviceProxy = GetOrganizationProxy(organizationUniqueName, 0, 0); + + string ldap = ""; + + Guid SysAdminGuid = RetrieveSystemUser(GetDomainName(initialUserDomainName), initialUserFirstName, initialUserLastName, CRMSysAdminRoleStr, _serviceProxy, ref ldap, 0); + + success = true; + + } + catch + { + tryItem++; + if (tryItem >= tryCount) + success = true; + } + } + + + } + catch (Exception ex) + { + EndLog("CheckCrmEnvironment", ret, CrmErrorCodes.CREATE_CRM_ORGANIZATION_GENERAL_ERROR, ex); + return ret; + + } + + EndLog("CheckCrmEnvironment"); + + return ret; + } + + protected string GetDomainName(string username) + { + string domain = ActiveDirectoryUtils.GetNETBIOSDomainName(ServerSettings.ADRootDomain); + string ret = string.Format(@"{0}\{1}", domain, username); + return ret; + } + + public virtual string[] GetSupportedCollationNames() + { + return GetSupportedCollationNamesInternal(SqlServer); + } + + internal virtual string[] GetSupportedCollationNamesInternal(string SqlServer) + { + StartLog("GetSupportedCollationNamesInternal"); + + List ret = new List(); + + SqlConnection connection = null; + try + { + connection = new SqlConnection(); + connection.ConnectionString = + string.Format("Server={1};Initial Catalog={0};Integrated Security=SSPI", + CRMDatabaseName, SqlServer); + + connection.Open(); + + string commandText = "select * from fn_helpcollations() where " + + "(name not like '%_WS') AND (name not like '%_KS') AND (name not like '%_100_%') " + + " AND (name not like 'SQL_%') " + + " order by name"; + SqlCommand command = new SqlCommand(commandText, connection); + SqlDataReader reader = command.ExecuteReader(); + + while (reader.Read()) + { + string name = reader["name"] as string; + ret.Add(name); + } + + } + catch (Exception ex) + { + Log.WriteError(ex); + } + finally + { + if (connection != null) + connection.Close(); + + } + + EndLog("GetSupportedCollationNamesInternal"); + return ret.ToArray(); + } + + public virtual Currency[] GetCurrencyList() + { + return GetCurrencyListInternal(); + } + + internal virtual Currency[] GetCurrencyListInternal() + { + StartLog("GetCurrencyListInternal"); + List retList = new List(); + + CultureInfo[] cultures = CultureInfo.GetCultures(CultureTypes.AllCultures & ~CultureTypes.NeutralCultures); + + foreach (CultureInfo culture in cultures) + { + if (culture.IsNeutralCulture) continue; + + try + { + RegionInfo Region = new RegionInfo(culture.LCID); + + Currency currency = new Currency(); + currency.RegionName = Region.NativeName; + currency.CurrencyName = Region.CurrencyNativeName; + currency.CurrencyCode = Region.ISOCurrencySymbol; + currency.CurrencySymbol = Region.CurrencySymbol; + retList.Add(currency); + + } + catch + { + continue; + } + } + + retList.Sort(delegate(Currency a, Currency b) { return a.RegionName.CompareTo(b.RegionName); }); + + EndLog("GetCurrencyListInternal"); + return retList.ToArray(); + } + + public virtual int[] GetInstalledLanguagePacks() + { + return GetInstalledLanguagePacksInternal(); + } + + internal virtual int[] GetInstalledLanguagePacksInternal() + { + StartLog("GetInstalledLanguagePacks"); + List res = new List(); + + try + { + RegistryKey root = Registry.LocalMachine; + RegistryKey rk = root.OpenSubKey("SOFTWARE\\Microsoft\\MSCRM"); + + if (rk == null) + rk = root.OpenSubKey("SOFTWARE\\Wow6432Node\\Microsoft\\MSCRM"); + + if (rk == null) throw new Exception("Can't open SOFTWARE\\Microsoft\\MSCRM"); + + RegistryKey langPacksKey = rk.OpenSubKey("LangPacks"); + if (langPacksKey == null) throw new Exception("Can't open SOFTWARE\\Microsoft\\MSCRM\\LangPacks"); + + string[] langPacksId = langPacksKey.GetSubKeyNames(); + + foreach (string strLangId in langPacksId) + { + int langId = 0; + if (int.TryParse(strLangId, out langId)) + res.Add(langId); + } + + } + catch (Exception ex) + { + EndLog("GetInstalledLanguagePacks", null, null, ex); + return null; + } + + EndLog("GetInstalledLanguagePacks"); + return res.ToArray(); + } + + public virtual ResultObject DeleteOrganization(Guid orgId) + { + return DeleteOrganizationInternal(orgId); + } + + internal virtual ResultObject DeleteOrganizationInternal(Guid orgId) + { + ResultObject res = StartLog("DeleteOrganizationInternal"); + + + res.IsSuccess = true; + try + { + DeploymentServiceClient deploymentService = GetDeploymentProxy(); + + EntityInstanceId i = new EntityInstanceId(); + i.Id = orgId; //Organisation Id + + Microsoft.Xrm.Sdk.Deployment.Organization org = (Microsoft.Xrm.Sdk.Deployment.Organization)deploymentService.Retrieve(DeploymentEntityType.Organization, i); + + org.State = Microsoft.Xrm.Sdk.Deployment.OrganizationState.Disabled; + + Microsoft.Xrm.Sdk.Deployment.UpdateRequest updateRequest = new Microsoft.Xrm.Sdk.Deployment.UpdateRequest(); + updateRequest.Entity = org; + + deploymentService.Execute(updateRequest); + + } + catch (Exception ex) + { + EndLog("DeleteOrganizationInternal", res, CrmErrorCodes.DELETE_CRM_ORGANIZATION_GENERAL_ERROR, ex); + return res; + + } + + + EndLog("DeleteOrganizationInternal"); + return res; + } + + public override void DeleteServiceItems(ServiceProviderItem[] items) + { + foreach (ServiceProviderItem item in items) + { + try + { + if (item is Organization) + { + Organization org = item as Organization; + DeleteOrganization(org.CrmOrganizationId); + } + + } + catch (Exception ex) + { + Log.WriteError(String.Format("Error deleting '{0}' {1}", item.Name, item.GetType().Name), ex); + } + } + base.DeleteServiceItems(items); + + } + + #endregion + + #region Log + + private static void EndLog(string message, ResultObject res, string errorCode, Exception ex) + { + if (res != null) + { + res.IsSuccess = false; + + if (!string.IsNullOrEmpty(errorCode)) + res.ErrorCodes.Add(errorCode); + } + + if (ex != null) + HostedSolutionLog.LogError(ex); + + HostedSolutionLog.LogEnd(message); + } + + private static void EndLog(string message, ResultObject res, string errorCode) + { + EndLog(message, res, errorCode, null); + } + + private static void EndLog(string message, ResultObject res) + { + EndLog(message, res, null); + } + + private static void EndLog(string message) + { + EndLog(message, null); + } + + private static T StartLog(string message) where T : ResultObject, new() + { + HostedSolutionLog.LogStart(message); + T res = new T(); + res.IsSuccess = true; + return res; + } + + private static void StartLog(string message) + { + HostedSolutionLog.LogStart(message); + } + + #endregion + + #region User + + public virtual UserResult CreateCRMUser(OrganizationUser user, string orgName, Guid organizationId, Guid baseUnitId, int CALType) + { + return CreateCRMUserInternal(user, orgName, organizationId, baseUnitId, CALType); + } + + internal virtual UserResult CreateCRMUserInternal(OrganizationUser user, string orgName, Guid organizationId, Guid businessUnitId, int CALType) + { + UserResult res = StartLog("CreateCRMUserInternal"); + + try + { + if (user == null) + throw new ArgumentNullException("user"); + + if (string.IsNullOrEmpty(orgName)) + throw new ArgumentNullException("orgName"); + + if (organizationId == Guid.Empty) + throw new ArgumentException("organizationId"); + + if (businessUnitId == Guid.Empty) + throw new ArgumentException("businessUnitId"); + + try + { + OrganizationServiceProxy _serviceProxy = GetOrganizationProxy(orgName); + + + string ldap = ""; + Guid guid = RetrieveSystemUser(user.DomainUserName, user.FirstName, user.LastName, CRMSysAdminRoleStr, _serviceProxy, ref ldap, CALType); + + user.CrmUserId = guid; + res.Value = user; + + } + catch (Exception ex) + { + EndLog("CreateCRMUserInternal", res, CrmErrorCodes.CANNOT_CREATE_CRM_USER, ex); + return res; + } + } + catch (Exception ex) + { + EndLog("CreateCRMUserInternal", res, CrmErrorCodes.CANNOT_CREATE_CRM_USER_GENERAL_ERROR, ex); + return res; + + } + + EndLog("CreateCRMUserInternal"); + return res; + } + + protected virtual Guid CreateSystemUser(String userName, String firstName, + String lastName, String domain, String roleStr, + OrganizationServiceProxy serviceProxy, ref String ldapPath, int CALType) + { + + if (serviceProxy.ServiceConfiguration.AuthenticationType == AuthenticationProviderType.LiveId || + serviceProxy.ServiceConfiguration.AuthenticationType == AuthenticationProviderType.OnlineFederation) + throw new Exception(String.Format("To run this sample, {0} {1} must be an active system user in your Microsoft Dynamics CRM Online organization.", firstName, lastName)); + + Guid userId = Guid.Empty; + + Microsoft.Xrm.Sdk.Query.QueryExpression businessUnitQuery = new Microsoft.Xrm.Sdk.Query.QueryExpression + { + EntityName = BusinessUnit.EntityLogicalName, + ColumnSet = new Microsoft.Xrm.Sdk.Query.ColumnSet("businessunitid"), + Criteria = + { + Conditions = + { + new Microsoft.Xrm.Sdk.Query.ConditionExpression("parentbusinessunitid", + Microsoft.Xrm.Sdk.Query.ConditionOperator.Null) + } + } + }; + + BusinessUnit defaultBusinessUnit = serviceProxy.RetrieveMultiple( + businessUnitQuery).Entities[0].ToEntity(); + + // Retrieve the specified security role. + Role role = RetrieveRoleByName(serviceProxy, roleStr); + + // CALType and AccessMode + int accessmode = CALType / 10; + int caltype = CALType % 10; + + //Create a new system user. + SystemUser user = new SystemUser + { + DomainName = userName, + FirstName = firstName, + LastName = lastName, + BusinessUnitId = new EntityReference + { + LogicalName = BusinessUnit.EntityLogicalName, + Name = BusinessUnit.EntityLogicalName, + Id = defaultBusinessUnit.Id + }, + CALType = new OptionSetValue(caltype), + AccessMode = new OptionSetValue(accessmode) + }; + userId = serviceProxy.Create(user); + + // Assign the security role to the newly created Microsoft Dynamics CRM user. + AssociateRequest associate = new AssociateRequest() + { + Target = new EntityReference(SystemUser.EntityLogicalName, userId), + RelatedEntities = new EntityReferenceCollection() + { + new EntityReference(Role.EntityLogicalName, role.Id), + }, + Relationship = new Relationship("systemuserroles_association") + }; + serviceProxy.Execute(associate); + + return userId; + } + + + protected virtual Guid RetrieveSystemUser(String userName, String firstName, + String lastName, String roleStr, OrganizationServiceProxy serviceProxy, + ref String ldapPath, + int CALType) + { + String domain; + Guid userId = Guid.Empty; + + if (serviceProxy == null) + throw new ArgumentNullException("serviceProxy"); + + if (String.IsNullOrWhiteSpace(userName)) + throw new ArgumentNullException("UserName"); + + if (String.IsNullOrWhiteSpace(firstName)) + throw new ArgumentNullException("FirstName"); + + if (String.IsNullOrWhiteSpace(lastName)) + throw new ArgumentNullException("LastName"); + + if (String.IsNullOrWhiteSpace(roleStr)) + throw new ArgumentNullException("Role"); + + // Obtain the current user's information. + Microsoft.Crm.Sdk.Messages.WhoAmIRequest who = new Microsoft.Crm.Sdk.Messages.WhoAmIRequest(); + Microsoft.Crm.Sdk.Messages.WhoAmIResponse whoResp = (Microsoft.Crm.Sdk.Messages.WhoAmIResponse)serviceProxy.Execute(who); + Guid currentUserId = whoResp.UserId; + + SystemUser currentUser = + serviceProxy.Retrieve(SystemUser.EntityLogicalName, currentUserId, new Microsoft.Xrm.Sdk.Query.ColumnSet("domainname")).ToEntity(); + + // Extract the domain and create the LDAP object. + String[] userPath = currentUser.DomainName.Split(new char[] { '\\' }); + if (userPath.Length > 1) + domain = userPath[0] + "\\"; + else + domain = String.Empty; + + // Create the system user in Microsoft Dynamics CRM if the user doesn't + // already exist. + Microsoft.Xrm.Sdk.Query.QueryExpression userQuery = new Microsoft.Xrm.Sdk.Query.QueryExpression + { + EntityName = SystemUser.EntityLogicalName, + ColumnSet = new Microsoft.Xrm.Sdk.Query.ColumnSet("systemuserid"), + Criteria = + { + FilterOperator = Microsoft.Xrm.Sdk.Query.LogicalOperator.Or, + Filters = + { + new Microsoft.Xrm.Sdk.Query.FilterExpression + { + FilterOperator = Microsoft.Xrm.Sdk.Query.LogicalOperator.And, + Conditions = + { + new Microsoft.Xrm.Sdk.Query.ConditionExpression("domainname", Microsoft.Xrm.Sdk.Query.ConditionOperator.Equal, domain + userName) + } + }, + new Microsoft.Xrm.Sdk.Query.FilterExpression + { + FilterOperator = Microsoft.Xrm.Sdk.Query.LogicalOperator.And, + Conditions = + { + new Microsoft.Xrm.Sdk.Query.ConditionExpression("firstname", Microsoft.Xrm.Sdk.Query.ConditionOperator.Equal, firstName), + new Microsoft.Xrm.Sdk.Query.ConditionExpression("lastname", Microsoft.Xrm.Sdk.Query.ConditionOperator.Equal, lastName) + } + } + } + + } + }; + + DataCollection existingUsers = (DataCollection)serviceProxy.RetrieveMultiple(userQuery).Entities; + + SystemUser existingUser = null; + if (existingUsers.Count > 0) + existingUser = existingUsers[0].ToEntity(); + + if (existingUser != null) + { + userId = existingUser.SystemUserId.Value; + + // Check to make sure the user is assigned the correct role. + Role role = RetrieveRoleByName(serviceProxy, roleStr); + + // Associate the user with the role when needed. + if (!UserInRole(serviceProxy, userId, role.Id)) + { + AssociateRequest associate = new AssociateRequest() + { + Target = new EntityReference(SystemUser.EntityLogicalName, userId), + RelatedEntities = new EntityReferenceCollection() + { + new EntityReference(Role.EntityLogicalName, role.Id) + }, + Relationship = new Relationship("systemuserroles_association") + }; + serviceProxy.Execute(associate); + } + + } + else + { + userId = CreateSystemUser(userName, firstName, lastName, domain, + roleStr, serviceProxy, ref ldapPath, CALType); + } + + return userId; + } + + public virtual CrmUserResult GetCrmUserById(Guid crmUserId, string orgName) + { + return GetCrmUserByIdInternal(crmUserId, orgName); + } + + internal virtual CrmUserResult GetCrmUserByIdInternal(Guid crmUserId, string orgName) + { + CrmUserResult ret = StartLog("GetCrmUserByIdInternal"); + + try + { + if (crmUserId == Guid.Empty) + throw new ArgumentNullException("crmUserId"); + + if (string.IsNullOrEmpty(orgName)) + throw new ArgumentNullException("orgName"); + + OrganizationServiceProxy serviceProxy = GetOrganizationProxy(orgName); + + SystemUser retruveUser = + serviceProxy.Retrieve(SystemUser.EntityLogicalName, crmUserId, new Microsoft.Xrm.Sdk.Query.ColumnSet("domainname", "businessunitid", "accessmode", "isdisabled", "caltype")).ToEntity(); + + CrmUser user = null; + + if (retruveUser != null) + { + user = new CrmUser(); + user.BusinessUnitId = retruveUser.BusinessUnitId.Id; + user.CRMUserId = retruveUser.SystemUserId.Value; + user.ClientAccessMode = (CRMUserAccessMode)retruveUser.AccessMode.Value; + user.IsDisabled = (bool)retruveUser.IsDisabled; + user.CALType = retruveUser.CALType.Value; + + ret.Value = user; + } + } + catch (Exception ex) + { + EndLog("GetCrmUserByIdInternal", ret, CrmErrorCodes.CANONT_GET_CRM_USER_BY_ID, ex); + return ret; + } + + EndLog("GetCrmUserByIdInternal"); + return ret; + } + + internal virtual CrmUserResult GetCrmUserByDomainNameInternal(string domainName, string orgName) + { + CrmUserResult ret = StartLog("GetCrmUserByDomainNameInternal"); + + try + { + if (string.IsNullOrEmpty(domainName)) + throw new ArgumentNullException("domainName"); + + if (string.IsNullOrEmpty(orgName)) + throw new ArgumentNullException("orgName"); + + + OrganizationServiceProxy serviceProxy = GetOrganizationProxy(orgName); + + Microsoft.Xrm.Sdk.Query.QueryExpression usereQuery = new Microsoft.Xrm.Sdk.Query.QueryExpression + { + EntityName = SystemUser.EntityLogicalName, + ColumnSet = new Microsoft.Xrm.Sdk.Query.ColumnSet("domainname", "businessunitid", "accessmode", "isdisabled", "systemuserid", "caltype"), + }; + + EntityCollection users = serviceProxy.RetrieveMultiple(usereQuery); + + foreach (Entity entityuser in users.Entities) + { + SystemUser sysuser = entityuser.ToEntity(); + + if (sysuser == null) continue; + if (sysuser.DomainName != domainName) continue; + + CrmUser user = new CrmUser(); + user.BusinessUnitId = sysuser.BusinessUnitId.Id; + user.CRMUserId = sysuser.SystemUserId.Value; + user.ClientAccessMode = (CRMUserAccessMode)sysuser.AccessMode.Value; + user.IsDisabled = sysuser.IsDisabled.Value; + user.CALType = sysuser.CALType.Value; + ret.Value = user; + } + } + catch (Exception ex) + { + EndLog("GetCrmUserByDomainNameInternal", ret, CrmErrorCodes.CANONT_GET_CRM_USER_BY_DOMAIN_NAME, ex); + return ret; + } + + EndLog("GetCrmUserByDomainNameInternal"); + return ret; + } + + public virtual CrmUserResult GetCrmUserByDomainName(string domainName, string orgName) + { + return GetCrmUserByDomainNameInternal(domainName, orgName); + } + + public virtual ResultObject ChangeUserState(bool disable, string orgName, Guid crmUserId) + { + return ChangeUserStateInternal(disable, orgName, crmUserId); + } + + internal virtual ResultObject ChangeUserStateInternal(bool disable, string orgName, Guid crmUserId) + { + ResultObject res = StartLog("ChangeUserStateInternal"); + + res.IsSuccess = true; + try + { + if (crmUserId == Guid.Empty) + throw new ArgumentNullException("crmUserId"); + + if (string.IsNullOrEmpty(orgName)) + throw new ArgumentNullException("orgName"); + + OrganizationServiceProxy serviceProxy = GetOrganizationProxy(orgName); + + // Retrieve a user. + SystemUser user = serviceProxy.Retrieve(SystemUser.EntityLogicalName, + crmUserId, new Microsoft.Xrm.Sdk.Query.ColumnSet(new String[] { "systemuserid", "firstname", "lastname" })).ToEntity(); + + if (user != null) + { + Microsoft.Crm.Sdk.Messages.SetStateRequest request = new Microsoft.Crm.Sdk.Messages.SetStateRequest() + { + EntityMoniker = user.ToEntityReference(), + + // Required by request but always valued at -1 in this context. + Status = new OptionSetValue(-1), + + // Sets the user to disabled. + State = disable ? new OptionSetValue(-1) : new OptionSetValue(0) + }; + + serviceProxy.Execute(request); + + } + } + catch (Exception ex) + { + EndLog("ChangeUserStateInternal", res, CrmErrorCodes.CANNOT_CHANGE_USER_STATE, ex); + return res; + } + + + EndLog("ChangeUserStateInternal"); + return res; + } + + public virtual ResultObject SetUserCALType(string orgName, Guid userId, int CALType) + { + return SetUserCALTypeInternal(orgName, userId, CALType); + } + + internal virtual ResultObject SetUserCALTypeInternal(string orgName, Guid userId, int CALType) + { + ResultObject ret = StartLog("SetUserCALTypeInternal"); + + try + { + if (userId == Guid.Empty) + throw new ArgumentNullException("crmUserId"); + + if (string.IsNullOrEmpty(orgName)) + throw new ArgumentNullException("orgName"); + + OrganizationServiceProxy serviceProxy = GetOrganizationProxy(orgName); + + SystemUser user = + serviceProxy.Retrieve(SystemUser.EntityLogicalName, userId, new Microsoft.Xrm.Sdk.Query.ColumnSet("domainname", "businessunitid", "accessmode", "isdisabled", "caltype")).ToEntity(); + + // CALType and AccessMode + int accessmode = CALType / 10; + int caltype = CALType % 10; + + user.CALType = new OptionSetValue(caltype); + user.AccessMode = new OptionSetValue(accessmode); + + serviceProxy.Update(user); + + } + catch (Exception ex) + { + EndLog("SetUserCALTypeInternal", ret, CrmErrorCodes.CANONT_GET_CRM_USER_BY_ID, ex); + return ret; + } + + EndLog("SetUserCALTypeInternal"); + return ret; + } + + #endregion + + #region Role + + protected virtual Role RetrieveRoleByName(OrganizationServiceProxy serviceProxy, + String roleSplitStr) + { + string[] RolesStr = roleSplitStr.Split(';'); + + foreach (string roleStr in RolesStr) + { + + Microsoft.Xrm.Sdk.Query.QueryExpression roleQuery = new Microsoft.Xrm.Sdk.Query.QueryExpression + { + EntityName = Role.EntityLogicalName, + ColumnSet = new Microsoft.Xrm.Sdk.Query.ColumnSet("roleid"), + Criteria = + { + Conditions = + { + new Microsoft.Xrm.Sdk.Query.ConditionExpression("name", Microsoft.Xrm.Sdk.Query.ConditionOperator.Equal, roleStr) + } + } + }; + + DataCollection roles = serviceProxy.RetrieveMultiple(roleQuery).Entities; + + if (roles.Count > 0) return roles[0].ToEntity(); + } + + return null; + } + + protected virtual bool UserInRole(OrganizationServiceProxy serviceProxy, + Guid userId, Guid roleId) + { + // Establish a SystemUser link for a query. + Microsoft.Xrm.Sdk.Query.LinkEntity systemUserLink = new Microsoft.Xrm.Sdk.Query.LinkEntity() + { + LinkFromEntityName = SystemUserRoles.EntityLogicalName, + LinkFromAttributeName = "systemuserid", + LinkToEntityName = SystemUser.EntityLogicalName, + LinkToAttributeName = "systemuserid", + LinkCriteria = + { + Conditions = + { + new Microsoft.Xrm.Sdk.Query.ConditionExpression( + "systemuserid", Microsoft.Xrm.Sdk.Query.ConditionOperator.Equal, userId) + } + } + }; + + // Build the query. + Microsoft.Xrm.Sdk.Query.QueryExpression query = new Microsoft.Xrm.Sdk.Query.QueryExpression() + { + EntityName = Role.EntityLogicalName, + ColumnSet = new Microsoft.Xrm.Sdk.Query.ColumnSet("roleid"), + LinkEntities = + { + new Microsoft.Xrm.Sdk.Query.LinkEntity() + { + LinkFromEntityName = Role.EntityLogicalName, + LinkFromAttributeName = "roleid", + LinkToEntityName = SystemUserRoles.EntityLogicalName, + LinkToAttributeName = "roleid", + LinkEntities = {systemUserLink} + } + }, + Criteria = + { + Conditions = + { + new Microsoft.Xrm.Sdk.Query.ConditionExpression("roleid", Microsoft.Xrm.Sdk.Query.ConditionOperator.Equal, roleId) + } + } + }; + + // Retrieve matching roles. + EntityCollection ec = serviceProxy.RetrieveMultiple(query); + + if (ec.Entities.Count > 0) + return true; + + return false; + } + + public virtual CrmRolesResult GetAllCrmRoles(string orgName, Guid businessUnitId) + { + return GetAllCrmRolesInternal(orgName, businessUnitId); + } + + public virtual CrmRolesResult GetCrmUserRoles(string orgName, Guid userId) + { + return GetCrmUserRolesInternal(userId, orgName); + } + + public virtual EntityCollection GetUserRoles(Guid userId, string orgName) + { + OrganizationServiceProxy serviceProxy = GetOrganizationProxy(orgName); + + // Establish a SystemUser link for a query. + Microsoft.Xrm.Sdk.Query.LinkEntity systemUserLink = new Microsoft.Xrm.Sdk.Query.LinkEntity() + { + LinkFromEntityName = SystemUserRoles.EntityLogicalName, + LinkFromAttributeName = "systemuserid", + LinkToEntityName = SystemUser.EntityLogicalName, + LinkToAttributeName = "systemuserid", + LinkCriteria = + { + Conditions = + { + new Microsoft.Xrm.Sdk.Query.ConditionExpression( + "systemuserid", Microsoft.Xrm.Sdk.Query.ConditionOperator.Equal, userId) + } + } + }; + + // Build the query. + Microsoft.Xrm.Sdk.Query.QueryExpression query = new Microsoft.Xrm.Sdk.Query.QueryExpression() + { + EntityName = Role.EntityLogicalName, + ColumnSet = new Microsoft.Xrm.Sdk.Query.ColumnSet("roleid"), + LinkEntities = + { + new Microsoft.Xrm.Sdk.Query.LinkEntity() + { + LinkFromEntityName = Role.EntityLogicalName, + LinkFromAttributeName = "roleid", + LinkToEntityName = SystemUserRoles.EntityLogicalName, + LinkToAttributeName = "roleid", + LinkEntities = {systemUserLink} + } + } + }; + + // Retrieve matching roles. + EntityCollection relations = serviceProxy.RetrieveMultiple(query); + + return relations; + } + + internal virtual CrmRolesResult GetCrmUserRolesInternal(Guid userId, string orgName) + { + CrmRolesResult res = StartLog("GetCrmUserRolesInternal"); + + try + { + EntityCollection relations; + + if (userId == Guid.Empty) + throw new ArgumentException("userId"); + + if (string.IsNullOrEmpty(orgName)) + throw new ArgumentNullException("orgName"); + + try + { + relations = GetUserRoles(userId, orgName); + } + catch (Exception ex) + { + EndLog("GetCrmUserRolesInternal", res, CrmErrorCodes.CANNOT_GET_CRM_USER_ROLES, ex); + return res; + } + + try + { + res.Value = FillCrmRoles(relations, true, Guid.Empty); + } + catch (Exception ex) + { + EndLog("GetCrmUserRolesInternal", res, CrmErrorCodes.CANNOT_FILL_ROLES_COLLECTION, ex); + return res; + } + } + catch (Exception ex) + { + EndLog("GetCrmUserRolesInternal", res, CrmErrorCodes.GET_CRM_USER_ROLE_GENERAL_ERROR, ex); + return res; + } + + EndLog("GetCrmUserRolesInternal"); + return res; + } + + protected static string excludedRolesStr = ";пользователь поддержки;support user;"; + + protected virtual List FillCrmRoles(EntityCollection entities, bool isUserRole, Guid businessUnitId) + { + List res = new List(); + + foreach (Entity current in entities.Entities) + { + Role role = current.ToEntity(); + + if (role == null) continue; + + if (businessUnitId != Guid.Empty) + { + if (businessUnitId != role.BusinessUnitId.Id) + continue; + } + + string roleName = role.Name; + + if (roleName != null) + if (excludedRolesStr.IndexOf(";" + roleName.ToLower() + ";") != -1) + continue; + + CrmRole crmRole = new CrmRole(); + crmRole.IsCurrentUserRole = isUserRole; + crmRole.RoleId = (Guid)role.RoleId; + crmRole.RoleName = roleName; + + res.Add(crmRole); + } + + return res; + } + + protected virtual List FillCrmRoles(EntityCollection entities, Guid businessUnitId) + { + return FillCrmRoles(entities, false, businessUnitId); + } + + internal virtual CrmRolesResult GetAllCrmRolesInternal(string orgName, Guid businessUnitId) + { + CrmRolesResult res = StartLog("GetAllCrmRoles"); + + try + { + if (string.IsNullOrEmpty(orgName)) + throw new ArgumentNullException("orgName"); + + EntityCollection roles; + try + { + OrganizationServiceProxy serviceProxy = GetOrganizationProxy(orgName); + + Microsoft.Xrm.Sdk.Query.QueryExpression roleQuery = new Microsoft.Xrm.Sdk.Query.QueryExpression + { + EntityName = Role.EntityLogicalName, + ColumnSet = new Microsoft.Xrm.Sdk.Query.ColumnSet(new string[] { "roleid", "name", "businessunitid" }), + }; + + roles = serviceProxy.RetrieveMultiple(roleQuery); + + + } + catch (Exception ex) + { + EndLog("GetAllCrmRoles", res, CrmErrorCodes.CANNOT_GET_ALL_CRM_ROLES, ex); + return res; + } + + try + { + List crmRoles = FillCrmRoles(roles, businessUnitId); + res.Value = crmRoles; + } + catch (Exception ex) + { + EndLog("GetAllCrmRoles", res, CrmErrorCodes.CANNOT_FILL_ROLES_COLLECTION, ex); + return res; + } + } + catch (Exception ex) + { + EndLog("GetAllCrmRoles", res, CrmErrorCodes.GET_ALL_CRM_ROLES_GENERAL_ERROR, ex); + return res; + } + + EndLog("GetAllCrmRoles"); + return res; + } + + public virtual ResultObject SetUserRoles(string orgName, Guid userId, Guid[] roles) + { + return SetUserRolesInternal(orgName, userId, roles); + } + + internal virtual ResultObject SetUserRolesInternal(string orgName, Guid userId, Guid[] roles) + { + CrmRolesResult res = StartLog("SetUserRolesInternal"); + + try + { + if (string.IsNullOrEmpty(orgName)) + throw new ArgumentNullException("orgName"); + + if (userId == Guid.Empty) + throw new ArgumentException("userId"); + + if (roles == null) + throw new ArgumentNullException("roles"); + + OrganizationServiceProxy serviceProxy = GetOrganizationProxy(orgName); + + + CrmRolesResult tmpRoles = GetCrmUserRoles(orgName, userId); + res.ErrorCodes.AddRange(tmpRoles.ErrorCodes); + + if (!tmpRoles.IsSuccess) + return res; + + List remRoles = new List(); + + for (int i = 0; i < tmpRoles.Value.Count; i++) + { + if (Array.Find(roles, delegate(Guid current) { return current == tmpRoles.Value[i].RoleId; }) == Guid.Empty) + { + remRoles.Add(tmpRoles.Value[i].RoleId); + } + } + + try + { + DisassociateRequest removeRole = new DisassociateRequest() + { + Target = new EntityReference(SystemUser.EntityLogicalName, userId), + RelatedEntities = new EntityReferenceCollection(), + Relationship = new Relationship("systemuserroles_association") + }; + + for (int i = 0; i < remRoles.Count; i++) + removeRole.RelatedEntities.Add(new EntityReference(Role.EntityLogicalName, remRoles[i])); + + serviceProxy.Execute(removeRole); + + } + catch (Exception ex) + { + EndLog("SetUserRolesInternal", res, CrmErrorCodes.CANNOT_REMOVE_CRM_USER_ROLES, ex); + return res; + } + + + try + { + // Assign the security role to the newly created Microsoft Dynamics CRM user. + AssociateRequest associate = new AssociateRequest() + { + Target = new EntityReference(SystemUser.EntityLogicalName, userId), + RelatedEntities = new EntityReferenceCollection(), + Relationship = new Relationship("systemuserroles_association") + }; + + for (int i = 0; i < roles.Length; i++) + { + bool find = false; + foreach (CrmRole current in tmpRoles.Value) + { + if (current.RoleId == roles[i]) + find = true; + } + if (find) continue; + + associate.RelatedEntities.Add(new EntityReference(Role.EntityLogicalName, roles[i])); + } + + serviceProxy.Execute(associate); + } + catch (Exception ex) + { + EndLog("SetUserRolesInternal", res, CrmErrorCodes.CANNOT_ASSIGN_CRM_USER_ROLES, ex); + return res; + } + + } + catch (Exception ex) + { + EndLog("SetUserRolesInternal", res, CrmErrorCodes.CANNOT_SET_CRM_USER_ROLES_GENERAL_ERROR, ex); + return res; + } + + + EndLog("SetUserRolesInternal"); + return res; + + } + + #endregion + + #region Business Units + + internal virtual CRMBusinessUnitsResult GetOrganizationBusinessUnitsInternal(Guid organizationId, string orgName) + { + CRMBusinessUnitsResult res = StartLog("GetOrganizationBusinessUnitsInternal"); + + try + { + if (organizationId == Guid.Empty) + throw new ArgumentException("organizationId"); + + if (string.IsNullOrEmpty(orgName)) + throw new ArgumentNullException("orgName"); + + OrganizationServiceProxy serviceProxy; + + try + { + serviceProxy = GetOrganizationProxy(orgName); + } + catch (Exception ex) + { + EndLog("GetOrganizationBusinessUnitsInternal", res, CrmErrorCodes.CANNOT_GET_CRM_SERVICE, ex); + return res; + } + + DataCollection BusinessUnits; + + try + { + + Microsoft.Xrm.Sdk.Query.QueryExpression businessUnitQuery = new Microsoft.Xrm.Sdk.Query.QueryExpression + { + EntityName = BusinessUnit.EntityLogicalName, + ColumnSet = new Microsoft.Xrm.Sdk.Query.ColumnSet(new string[] { "businessunitid", "name" }), + Criteria = + { + Conditions = + { + new Microsoft.Xrm.Sdk.Query.ConditionExpression("parentbusinessunitid", + Microsoft.Xrm.Sdk.Query.ConditionOperator.Null) + } + } + }; + + BusinessUnits = serviceProxy.RetrieveMultiple( + businessUnitQuery).Entities; + + } + catch (Exception ex) + { + EndLog("GetOrganizationBusinessUnitsInternal", res, CrmErrorCodes.CANNOT_GET_CRM_BUSINESS_UNITS, ex); + return res; + } + + List businessUnits = new List(); + + try + { + for (int i = 0; i < BusinessUnits.Count; i++) + { + BusinessUnit bu = BusinessUnits[i].ToEntity(); + + CRMBusinessUnit unit = new CRMBusinessUnit(); + unit.BusinessUnitId = (Guid)bu.BusinessUnitId; + unit.BusinessUnitName = bu.Name; + + if (unit.BusinessUnitName == null) + unit.BusinessUnitName = "default"; + + businessUnits.Add(unit); + + } + + res.Value = businessUnits; + } + catch (Exception ex) + { + EndLog("GetOrganizationBusinessUnitsInternal", res, CrmErrorCodes.CANNOT_FILL_BASE_UNITS_COLLECTION, + ex); + return res; + } + } + catch (Exception ex) + { + EndLog("GetOrganizationBusinessUnitsInternal", res, CrmErrorCodes.GET_ORGANIZATION_BUSINESS_UNITS_GENERAL_ERROR, + ex); + return res; + + } + + EndLog("GetOrganizationBusinessUnitsInternal"); + return res; + + } + + public virtual CRMBusinessUnitsResult GetOrganizationBusinessUnits(Guid organizationId, string orgName) + { + return GetOrganizationBusinessUnitsInternal(organizationId, orgName); + } + + #endregion + + #region Version + + public virtual string CRMServerVersion + { + get + { + string value = ""; + try + { + RegistryKey root = Registry.LocalMachine; + RegistryKey rk = root.OpenSubKey("SOFTWARE\\Microsoft\\MSCRM"); + + if (rk == null) + rk = root.OpenSubKey("SOFTWARE\\Wow6432Node\\Microsoft\\MSCRM"); + + if (rk != null) + { + value = (string)rk.GetValue("CRM_Server_Version", null); + rk.Close(); + } + } + catch (Exception ex) + { + Log.WriteError(ex); + } + + return value; + } + + } + + public override bool IsInstalled() + { + return false; + } + + #endregion + + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Crm2013/CRMProvider2013.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Crm2013/CRMProvider2013.cs new file mode 100644 index 00000000..3b1b7dde --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Crm2013/CRMProvider2013.cs @@ -0,0 +1,46 @@ +// Copyright (c) 2012 - 2013, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using WebsitePanel.Providers.HostedSolution; + + +namespace WebsitePanel.Providers.HostedSolution +{ + public class CRMProvider2013 : CRMBase + { + + public override bool IsInstalled() + { + + return CRMServerVersion.StartsWith("6."); + } + + } + +} diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Crm2013/HostedSolutionLog.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Crm2013/HostedSolutionLog.cs new file mode 100644 index 00000000..83257a78 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Crm2013/HostedSolutionLog.cs @@ -0,0 +1,152 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using WebsitePanel.Providers.Common; +using WebsitePanel.Server.Utils; +using System.Text; +using System.Management.Automation.Runspaces; + +namespace WebsitePanel.Providers.HostedSolution +{ + public class HostedSolutionLog + { + public static string LogPrefix = "HostedSolution"; + + public static void LogStart(string message, params object[] args) + { + string text = String.Format(message, args); + Log.WriteStart("{0} {1}", LogPrefix, text); + } + + public static void LogEnd(string message, params object[] args) + { + string text = String.Format(message, args); + Log.WriteEnd("{0} {1}", LogPrefix, text); + } + + public static void LogInfo(string message) + { + Log.WriteInfo("{0} {1}", LogPrefix, message); + } + + public static void LogInfo(string message, params object[] args) + { + string text = String.Format(message, args); + Log.WriteInfo("{0} {1}", LogPrefix, text); + } + + public static void LogWarning(string message) + { + Log.WriteWarning("{0} {1}", LogPrefix, message); + } + + public static void LogWarning(string message, params object[] args) + { + string text = String.Format(message, args); + Log.WriteWarning("{0} {1}", LogPrefix, text); + } + + public static void LogError(Exception ex) + { + Log.WriteError(LogPrefix, ex); + } + + public static void LogError(string message, Exception ex) + { + string text = String.Format("{0} {1}", LogPrefix, message); + Log.WriteError(text, ex); + } + + public static void DebugInfo(string message, params object[] args) + { + string text = String.Format(message, args); + Log.WriteInfo("{0} {1}", LogPrefix, text); + } + + public static void EndLog(string message, ResultObject res, string errorCode, Exception ex) + { + if (res != null) + { + res.IsSuccess = false; + + if (!string.IsNullOrEmpty(errorCode)) + res.ErrorCodes.Add(errorCode); + } + + if (ex != null) + LogError(ex); + + + //LogRecord. + LogEnd(message); + + + } + + public static void EndLog(string message, ResultObject res, string errorCode) + { + EndLog(message, res, errorCode, null); + } + + public static void EndLog(string message, ResultObject res) + { + EndLog(message, res, null); + } + + public static void EndLog(string message) + { + EndLog(message, null); + } + + internal static T StartLog(string message) where T : ResultObject, new() + { + LogStart(message); + T res = new T(); + res.IsSuccess = true; + return res; + } + + public static void DebugCommand(Command cmd) + { + StringBuilder sb = new StringBuilder(cmd.CommandText); + foreach (CommandParameter parameter in cmd.Parameters) + { + string formatString = " -{0} {1}"; + if (parameter.Value is string) + formatString = " -{0} '{1}'"; + else if (parameter.Value is bool) + formatString = " -{0} ${1}"; + sb.AppendFormat(formatString, parameter.Name, parameter.Value); + } + Log.WriteInfo("{0} {1}", LogPrefix, sb.ToString()); + } + + + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Crm2013/MyOrganizationCrmSdkTypes.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Crm2013/MyOrganizationCrmSdkTypes.cs new file mode 100644 index 00000000..01cbdb17 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Crm2013/MyOrganizationCrmSdkTypes.cs @@ -0,0 +1,185223 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34003 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +[assembly: Microsoft.Xrm.Sdk.Client.ProxyTypesAssemblyAttribute()] + + + +[System.Runtime.Serialization.DataContractAttribute()] +[System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "6.0.0001.0059")] +public enum AccountState +{ + + [System.Runtime.Serialization.EnumMemberAttribute()] + Active = 0, + + [System.Runtime.Serialization.EnumMemberAttribute()] + Inactive = 1, +} + +/// +/// Business that represents a customer or potential customer. The company that is billed in business transactions. +/// +[System.Runtime.Serialization.DataContractAttribute()] +[Microsoft.Xrm.Sdk.Client.EntityLogicalNameAttribute("account")] +[System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "6.0.0001.0059")] +public partial class Account : Microsoft.Xrm.Sdk.Entity, System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged +{ + + /// + /// Default Constructor. + /// + public Account() : + base(EntityLogicalName) + { + } + + public const string EntityLogicalName = "account"; + + public const int EntityTypeCode = 1; + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + public event System.ComponentModel.PropertyChangingEventHandler PropertyChanging; + + private void OnPropertyChanged(string propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + private void OnPropertyChanging(string propertyName) + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, new System.ComponentModel.PropertyChangingEventArgs(propertyName)); + } + } + + /// + /// Select a category to indicate whether the customer account is standard or preferred. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("accountcategorycode")] + public Microsoft.Xrm.Sdk.OptionSetValue AccountCategoryCode + { + get + { + return this.GetAttributeValue("accountcategorycode"); + } + set + { + this.OnPropertyChanging("AccountCategoryCode"); + this.SetAttributeValue("accountcategorycode", value); + this.OnPropertyChanged("AccountCategoryCode"); + } + } + + /// + /// Select a classification code to indicate the potential value of the customer account based on the projected return on investment, cooperation level, sales cycle length or other criteria. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("accountclassificationcode")] + public Microsoft.Xrm.Sdk.OptionSetValue AccountClassificationCode + { + get + { + return this.GetAttributeValue("accountclassificationcode"); + } + set + { + this.OnPropertyChanging("AccountClassificationCode"); + this.SetAttributeValue("accountclassificationcode", value); + this.OnPropertyChanged("AccountClassificationCode"); + } + } + + /// + /// Unique identifier of the account. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("accountid")] + public System.Nullable AccountId + { + get + { + return this.GetAttributeValue>("accountid"); + } + set + { + this.OnPropertyChanging("AccountId"); + this.SetAttributeValue("accountid", value); + if (value.HasValue) + { + base.Id = value.Value; + } + else + { + base.Id = System.Guid.Empty; + } + this.OnPropertyChanged("AccountId"); + } + } + + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("accountid")] + public override System.Guid Id + { + get + { + return base.Id; + } + set + { + this.AccountId = value; + } + } + + /// + /// Type an ID number or code for the account to quickly search and identify the account in system views. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("accountnumber")] + public string AccountNumber + { + get + { + return this.GetAttributeValue("accountnumber"); + } + set + { + this.OnPropertyChanging("AccountNumber"); + this.SetAttributeValue("accountnumber", value); + this.OnPropertyChanged("AccountNumber"); + } + } + + /// + /// Select a rating to indicate the value of the customer account. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("accountratingcode")] + public Microsoft.Xrm.Sdk.OptionSetValue AccountRatingCode + { + get + { + return this.GetAttributeValue("accountratingcode"); + } + set + { + this.OnPropertyChanging("AccountRatingCode"); + this.SetAttributeValue("accountratingcode", value); + this.OnPropertyChanged("AccountRatingCode"); + } + } + + /// + /// Unique identifier for address 1. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address1_addressid")] + public System.Nullable Address1_AddressId + { + get + { + return this.GetAttributeValue>("address1_addressid"); + } + set + { + this.OnPropertyChanging("Address1_AddressId"); + this.SetAttributeValue("address1_addressid", value); + this.OnPropertyChanged("Address1_AddressId"); + } + } + + /// + /// Select the primary address type. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address1_addresstypecode")] + public Microsoft.Xrm.Sdk.OptionSetValue Address1_AddressTypeCode + { + get + { + return this.GetAttributeValue("address1_addresstypecode"); + } + set + { + this.OnPropertyChanging("Address1_AddressTypeCode"); + this.SetAttributeValue("address1_addresstypecode", value); + this.OnPropertyChanged("Address1_AddressTypeCode"); + } + } + + /// + /// Type the city for the primary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address1_city")] + public string Address1_City + { + get + { + return this.GetAttributeValue("address1_city"); + } + set + { + this.OnPropertyChanging("Address1_City"); + this.SetAttributeValue("address1_city", value); + this.OnPropertyChanged("Address1_City"); + } + } + + /// + /// Shows the complete primary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address1_composite")] + public string Address1_Composite + { + get + { + return this.GetAttributeValue("address1_composite"); + } + } + + /// + /// Type the country or region for the primary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address1_country")] + public string Address1_Country + { + get + { + return this.GetAttributeValue("address1_country"); + } + set + { + this.OnPropertyChanging("Address1_Country"); + this.SetAttributeValue("address1_country", value); + this.OnPropertyChanged("Address1_Country"); + } + } + + /// + /// Type the county for the primary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address1_county")] + public string Address1_County + { + get + { + return this.GetAttributeValue("address1_county"); + } + set + { + this.OnPropertyChanging("Address1_County"); + this.SetAttributeValue("address1_county", value); + this.OnPropertyChanged("Address1_County"); + } + } + + /// + /// Type the fax number associated with the primary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address1_fax")] + public string Address1_Fax + { + get + { + return this.GetAttributeValue("address1_fax"); + } + set + { + this.OnPropertyChanging("Address1_Fax"); + this.SetAttributeValue("address1_fax", value); + this.OnPropertyChanged("Address1_Fax"); + } + } + + /// + /// Select the freight terms for the primary address to make sure shipping orders are processed correctly. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address1_freighttermscode")] + public Microsoft.Xrm.Sdk.OptionSetValue Address1_FreightTermsCode + { + get + { + return this.GetAttributeValue("address1_freighttermscode"); + } + set + { + this.OnPropertyChanging("Address1_FreightTermsCode"); + this.SetAttributeValue("address1_freighttermscode", value); + this.OnPropertyChanged("Address1_FreightTermsCode"); + } + } + + /// + /// Type the latitude value for the primary address for use in mapping and other applications. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address1_latitude")] + public System.Nullable Address1_Latitude + { + get + { + return this.GetAttributeValue>("address1_latitude"); + } + set + { + this.OnPropertyChanging("Address1_Latitude"); + this.SetAttributeValue("address1_latitude", value); + this.OnPropertyChanged("Address1_Latitude"); + } + } + + /// + /// Type the first line of the primary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address1_line1")] + public string Address1_Line1 + { + get + { + return this.GetAttributeValue("address1_line1"); + } + set + { + this.OnPropertyChanging("Address1_Line1"); + this.SetAttributeValue("address1_line1", value); + this.OnPropertyChanged("Address1_Line1"); + } + } + + /// + /// Type the second line of the primary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address1_line2")] + public string Address1_Line2 + { + get + { + return this.GetAttributeValue("address1_line2"); + } + set + { + this.OnPropertyChanging("Address1_Line2"); + this.SetAttributeValue("address1_line2", value); + this.OnPropertyChanged("Address1_Line2"); + } + } + + /// + /// Type the third line of the primary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address1_line3")] + public string Address1_Line3 + { + get + { + return this.GetAttributeValue("address1_line3"); + } + set + { + this.OnPropertyChanging("Address1_Line3"); + this.SetAttributeValue("address1_line3", value); + this.OnPropertyChanged("Address1_Line3"); + } + } + + /// + /// Type the longitude value for the primary address for use in mapping and other applications. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address1_longitude")] + public System.Nullable Address1_Longitude + { + get + { + return this.GetAttributeValue>("address1_longitude"); + } + set + { + this.OnPropertyChanging("Address1_Longitude"); + this.SetAttributeValue("address1_longitude", value); + this.OnPropertyChanged("Address1_Longitude"); + } + } + + /// + /// Type a descriptive name for the primary address, such as Corporate Headquarters. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address1_name")] + public string Address1_Name + { + get + { + return this.GetAttributeValue("address1_name"); + } + set + { + this.OnPropertyChanging("Address1_Name"); + this.SetAttributeValue("address1_name", value); + this.OnPropertyChanged("Address1_Name"); + } + } + + /// + /// Type the ZIP Code or postal code for the primary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address1_postalcode")] + public string Address1_PostalCode + { + get + { + return this.GetAttributeValue("address1_postalcode"); + } + set + { + this.OnPropertyChanging("Address1_PostalCode"); + this.SetAttributeValue("address1_postalcode", value); + this.OnPropertyChanged("Address1_PostalCode"); + } + } + + /// + /// Type the post office box number of the primary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address1_postofficebox")] + public string Address1_PostOfficeBox + { + get + { + return this.GetAttributeValue("address1_postofficebox"); + } + set + { + this.OnPropertyChanging("Address1_PostOfficeBox"); + this.SetAttributeValue("address1_postofficebox", value); + this.OnPropertyChanged("Address1_PostOfficeBox"); + } + } + + /// + /// Type the name of the main contact at the account's primary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address1_primarycontactname")] + public string Address1_PrimaryContactName + { + get + { + return this.GetAttributeValue("address1_primarycontactname"); + } + set + { + this.OnPropertyChanging("Address1_PrimaryContactName"); + this.SetAttributeValue("address1_primarycontactname", value); + this.OnPropertyChanged("Address1_PrimaryContactName"); + } + } + + /// + /// Select a shipping method for deliveries sent to this address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address1_shippingmethodcode")] + public Microsoft.Xrm.Sdk.OptionSetValue Address1_ShippingMethodCode + { + get + { + return this.GetAttributeValue("address1_shippingmethodcode"); + } + set + { + this.OnPropertyChanging("Address1_ShippingMethodCode"); + this.SetAttributeValue("address1_shippingmethodcode", value); + this.OnPropertyChanged("Address1_ShippingMethodCode"); + } + } + + /// + /// Type the state or province of the primary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address1_stateorprovince")] + public string Address1_StateOrProvince + { + get + { + return this.GetAttributeValue("address1_stateorprovince"); + } + set + { + this.OnPropertyChanging("Address1_StateOrProvince"); + this.SetAttributeValue("address1_stateorprovince", value); + this.OnPropertyChanged("Address1_StateOrProvince"); + } + } + + /// + /// Type the main phone number associated with the primary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address1_telephone1")] + public string Address1_Telephone1 + { + get + { + return this.GetAttributeValue("address1_telephone1"); + } + set + { + this.OnPropertyChanging("Address1_Telephone1"); + this.SetAttributeValue("address1_telephone1", value); + this.OnPropertyChanged("Address1_Telephone1"); + } + } + + /// + /// Type a second phone number associated with the primary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address1_telephone2")] + public string Address1_Telephone2 + { + get + { + return this.GetAttributeValue("address1_telephone2"); + } + set + { + this.OnPropertyChanging("Address1_Telephone2"); + this.SetAttributeValue("address1_telephone2", value); + this.OnPropertyChanged("Address1_Telephone2"); + } + } + + /// + /// Type a third phone number associated with the primary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address1_telephone3")] + public string Address1_Telephone3 + { + get + { + return this.GetAttributeValue("address1_telephone3"); + } + set + { + this.OnPropertyChanging("Address1_Telephone3"); + this.SetAttributeValue("address1_telephone3", value); + this.OnPropertyChanged("Address1_Telephone3"); + } + } + + /// + /// Type the UPS zone of the primary address to make sure shipping charges are calculated correctly and deliveries are made promptly, if shipped by UPS. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address1_upszone")] + public string Address1_UPSZone + { + get + { + return this.GetAttributeValue("address1_upszone"); + } + set + { + this.OnPropertyChanging("Address1_UPSZone"); + this.SetAttributeValue("address1_upszone", value); + this.OnPropertyChanged("Address1_UPSZone"); + } + } + + /// + /// Select the time zone, or UTC offset, for this address so that other people can reference it when they contact someone at this address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address1_utcoffset")] + public System.Nullable Address1_UTCOffset + { + get + { + return this.GetAttributeValue>("address1_utcoffset"); + } + set + { + this.OnPropertyChanging("Address1_UTCOffset"); + this.SetAttributeValue("address1_utcoffset", value); + this.OnPropertyChanged("Address1_UTCOffset"); + } + } + + /// + /// Unique identifier for address 2. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address2_addressid")] + public System.Nullable Address2_AddressId + { + get + { + return this.GetAttributeValue>("address2_addressid"); + } + set + { + this.OnPropertyChanging("Address2_AddressId"); + this.SetAttributeValue("address2_addressid", value); + this.OnPropertyChanged("Address2_AddressId"); + } + } + + /// + /// Select the secondary address type. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address2_addresstypecode")] + public Microsoft.Xrm.Sdk.OptionSetValue Address2_AddressTypeCode + { + get + { + return this.GetAttributeValue("address2_addresstypecode"); + } + set + { + this.OnPropertyChanging("Address2_AddressTypeCode"); + this.SetAttributeValue("address2_addresstypecode", value); + this.OnPropertyChanged("Address2_AddressTypeCode"); + } + } + + /// + /// Type the city for the secondary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address2_city")] + public string Address2_City + { + get + { + return this.GetAttributeValue("address2_city"); + } + set + { + this.OnPropertyChanging("Address2_City"); + this.SetAttributeValue("address2_city", value); + this.OnPropertyChanged("Address2_City"); + } + } + + /// + /// Shows the complete secondary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address2_composite")] + public string Address2_Composite + { + get + { + return this.GetAttributeValue("address2_composite"); + } + } + + /// + /// Type the country or region for the secondary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address2_country")] + public string Address2_Country + { + get + { + return this.GetAttributeValue("address2_country"); + } + set + { + this.OnPropertyChanging("Address2_Country"); + this.SetAttributeValue("address2_country", value); + this.OnPropertyChanged("Address2_Country"); + } + } + + /// + /// Type the county for the secondary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address2_county")] + public string Address2_County + { + get + { + return this.GetAttributeValue("address2_county"); + } + set + { + this.OnPropertyChanging("Address2_County"); + this.SetAttributeValue("address2_county", value); + this.OnPropertyChanged("Address2_County"); + } + } + + /// + /// Type the fax number associated with the secondary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address2_fax")] + public string Address2_Fax + { + get + { + return this.GetAttributeValue("address2_fax"); + } + set + { + this.OnPropertyChanging("Address2_Fax"); + this.SetAttributeValue("address2_fax", value); + this.OnPropertyChanged("Address2_Fax"); + } + } + + /// + /// Select the freight terms for the secondary address to make sure shipping orders are processed correctly. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address2_freighttermscode")] + public Microsoft.Xrm.Sdk.OptionSetValue Address2_FreightTermsCode + { + get + { + return this.GetAttributeValue("address2_freighttermscode"); + } + set + { + this.OnPropertyChanging("Address2_FreightTermsCode"); + this.SetAttributeValue("address2_freighttermscode", value); + this.OnPropertyChanged("Address2_FreightTermsCode"); + } + } + + /// + /// Type the latitude value for the secondary address for use in mapping and other applications. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address2_latitude")] + public System.Nullable Address2_Latitude + { + get + { + return this.GetAttributeValue>("address2_latitude"); + } + set + { + this.OnPropertyChanging("Address2_Latitude"); + this.SetAttributeValue("address2_latitude", value); + this.OnPropertyChanged("Address2_Latitude"); + } + } + + /// + /// Type the first line of the secondary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address2_line1")] + public string Address2_Line1 + { + get + { + return this.GetAttributeValue("address2_line1"); + } + set + { + this.OnPropertyChanging("Address2_Line1"); + this.SetAttributeValue("address2_line1", value); + this.OnPropertyChanged("Address2_Line1"); + } + } + + /// + /// Type the second line of the secondary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address2_line2")] + public string Address2_Line2 + { + get + { + return this.GetAttributeValue("address2_line2"); + } + set + { + this.OnPropertyChanging("Address2_Line2"); + this.SetAttributeValue("address2_line2", value); + this.OnPropertyChanged("Address2_Line2"); + } + } + + /// + /// Type the third line of the secondary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address2_line3")] + public string Address2_Line3 + { + get + { + return this.GetAttributeValue("address2_line3"); + } + set + { + this.OnPropertyChanging("Address2_Line3"); + this.SetAttributeValue("address2_line3", value); + this.OnPropertyChanged("Address2_Line3"); + } + } + + /// + /// Type the longitude value for the secondary address for use in mapping and other applications. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address2_longitude")] + public System.Nullable Address2_Longitude + { + get + { + return this.GetAttributeValue>("address2_longitude"); + } + set + { + this.OnPropertyChanging("Address2_Longitude"); + this.SetAttributeValue("address2_longitude", value); + this.OnPropertyChanged("Address2_Longitude"); + } + } + + /// + /// Type a descriptive name for the secondary address, such as Corporate Headquarters. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address2_name")] + public string Address2_Name + { + get + { + return this.GetAttributeValue("address2_name"); + } + set + { + this.OnPropertyChanging("Address2_Name"); + this.SetAttributeValue("address2_name", value); + this.OnPropertyChanged("Address2_Name"); + } + } + + /// + /// Type the ZIP Code or postal code for the secondary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address2_postalcode")] + public string Address2_PostalCode + { + get + { + return this.GetAttributeValue("address2_postalcode"); + } + set + { + this.OnPropertyChanging("Address2_PostalCode"); + this.SetAttributeValue("address2_postalcode", value); + this.OnPropertyChanged("Address2_PostalCode"); + } + } + + /// + /// Type the post office box number of the secondary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address2_postofficebox")] + public string Address2_PostOfficeBox + { + get + { + return this.GetAttributeValue("address2_postofficebox"); + } + set + { + this.OnPropertyChanging("Address2_PostOfficeBox"); + this.SetAttributeValue("address2_postofficebox", value); + this.OnPropertyChanged("Address2_PostOfficeBox"); + } + } + + /// + /// Type the name of the main contact at the account's secondary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address2_primarycontactname")] + public string Address2_PrimaryContactName + { + get + { + return this.GetAttributeValue("address2_primarycontactname"); + } + set + { + this.OnPropertyChanging("Address2_PrimaryContactName"); + this.SetAttributeValue("address2_primarycontactname", value); + this.OnPropertyChanged("Address2_PrimaryContactName"); + } + } + + /// + /// Select a shipping method for deliveries sent to this address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address2_shippingmethodcode")] + public Microsoft.Xrm.Sdk.OptionSetValue Address2_ShippingMethodCode + { + get + { + return this.GetAttributeValue("address2_shippingmethodcode"); + } + set + { + this.OnPropertyChanging("Address2_ShippingMethodCode"); + this.SetAttributeValue("address2_shippingmethodcode", value); + this.OnPropertyChanged("Address2_ShippingMethodCode"); + } + } + + /// + /// Type the state or province of the secondary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address2_stateorprovince")] + public string Address2_StateOrProvince + { + get + { + return this.GetAttributeValue("address2_stateorprovince"); + } + set + { + this.OnPropertyChanging("Address2_StateOrProvince"); + this.SetAttributeValue("address2_stateorprovince", value); + this.OnPropertyChanged("Address2_StateOrProvince"); + } + } + + /// + /// Type the main phone number associated with the secondary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address2_telephone1")] + public string Address2_Telephone1 + { + get + { + return this.GetAttributeValue("address2_telephone1"); + } + set + { + this.OnPropertyChanging("Address2_Telephone1"); + this.SetAttributeValue("address2_telephone1", value); + this.OnPropertyChanged("Address2_Telephone1"); + } + } + + /// + /// Type a second phone number associated with the secondary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address2_telephone2")] + public string Address2_Telephone2 + { + get + { + return this.GetAttributeValue("address2_telephone2"); + } + set + { + this.OnPropertyChanging("Address2_Telephone2"); + this.SetAttributeValue("address2_telephone2", value); + this.OnPropertyChanged("Address2_Telephone2"); + } + } + + /// + /// Type a third phone number associated with the secondary address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address2_telephone3")] + public string Address2_Telephone3 + { + get + { + return this.GetAttributeValue("address2_telephone3"); + } + set + { + this.OnPropertyChanging("Address2_Telephone3"); + this.SetAttributeValue("address2_telephone3", value); + this.OnPropertyChanged("Address2_Telephone3"); + } + } + + /// + /// Type the UPS zone of the secondary address to make sure shipping charges are calculated correctly and deliveries are made promptly, if shipped by UPS. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address2_upszone")] + public string Address2_UPSZone + { + get + { + return this.GetAttributeValue("address2_upszone"); + } + set + { + this.OnPropertyChanging("Address2_UPSZone"); + this.SetAttributeValue("address2_upszone", value); + this.OnPropertyChanged("Address2_UPSZone"); + } + } + + /// + /// Select the time zone, or UTC offset, for this address so that other people can reference it when they contact someone at this address. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("address2_utcoffset")] + public System.Nullable Address2_UTCOffset + { + get + { + return this.GetAttributeValue>("address2_utcoffset"); + } + set + { + this.OnPropertyChanging("Address2_UTCOffset"); + this.SetAttributeValue("address2_utcoffset", value); + this.OnPropertyChanged("Address2_UTCOffset"); + } + } + + /// + /// For system use only. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("aging30")] + public Microsoft.Xrm.Sdk.Money Aging30 + { + get + { + return this.GetAttributeValue("aging30"); + } + } + + /// + /// The base currency equivalent of the aging 30 field. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("aging30_base")] + public Microsoft.Xrm.Sdk.Money Aging30_Base + { + get + { + return this.GetAttributeValue("aging30_base"); + } + } + + /// + /// For system use only. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("aging60")] + public Microsoft.Xrm.Sdk.Money Aging60 + { + get + { + return this.GetAttributeValue("aging60"); + } + } + + /// + /// The base currency equivalent of the aging 60 field. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("aging60_base")] + public Microsoft.Xrm.Sdk.Money Aging60_Base + { + get + { + return this.GetAttributeValue("aging60_base"); + } + } + + /// + /// For system use only. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("aging90")] + public Microsoft.Xrm.Sdk.Money Aging90 + { + get + { + return this.GetAttributeValue("aging90"); + } + } + + /// + /// The base currency equivalent of the aging 90 field. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("aging90_base")] + public Microsoft.Xrm.Sdk.Money Aging90_Base + { + get + { + return this.GetAttributeValue("aging90_base"); + } + } + + /// + /// Select the legal designation or other business type of the account for contracts or reporting purposes. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("businesstypecode")] + public Microsoft.Xrm.Sdk.OptionSetValue BusinessTypeCode + { + get + { + return this.GetAttributeValue("businesstypecode"); + } + set + { + this.OnPropertyChanging("BusinessTypeCode"); + this.SetAttributeValue("businesstypecode", value); + this.OnPropertyChanged("BusinessTypeCode"); + } + } + + /// + /// Shows who created the record. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("createdby")] + public Microsoft.Xrm.Sdk.EntityReference CreatedBy + { + get + { + return this.GetAttributeValue("createdby"); + } + } + + /// + /// Shows the date and time when the record was created. The date and time are displayed in the time zone selected in Microsoft Dynamics CRM options. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("createdon")] + public System.Nullable CreatedOn + { + get + { + return this.GetAttributeValue>("createdon"); + } + } + + /// + /// Shows who created the record on behalf of another user. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("createdonbehalfby")] + public Microsoft.Xrm.Sdk.EntityReference CreatedOnBehalfBy + { + get + { + return this.GetAttributeValue("createdonbehalfby"); + } + } + + /// + /// Type the credit limit of the account. This is a useful reference when you address invoice and accounting issues with the customer. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("creditlimit")] + public Microsoft.Xrm.Sdk.Money CreditLimit + { + get + { + return this.GetAttributeValue("creditlimit"); + } + set + { + this.OnPropertyChanging("CreditLimit"); + this.SetAttributeValue("creditlimit", value); + this.OnPropertyChanged("CreditLimit"); + } + } + + /// + /// Shows the credit limit converted to the system's default base currency for reporting purposes. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("creditlimit_base")] + public Microsoft.Xrm.Sdk.Money CreditLimit_Base + { + get + { + return this.GetAttributeValue("creditlimit_base"); + } + } + + /// + /// Select whether the credit for the account is on hold. This is a useful reference while addressing the invoice and accounting issues with the customer. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("creditonhold")] + public System.Nullable CreditOnHold + { + get + { + return this.GetAttributeValue>("creditonhold"); + } + set + { + this.OnPropertyChanging("CreditOnHold"); + this.SetAttributeValue("creditonhold", value); + this.OnPropertyChanged("CreditOnHold"); + } + } + + /// + /// Select the size category or range of the account for segmentation and reporting purposes. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("customersizecode")] + public Microsoft.Xrm.Sdk.OptionSetValue CustomerSizeCode + { + get + { + return this.GetAttributeValue("customersizecode"); + } + set + { + this.OnPropertyChanging("CustomerSizeCode"); + this.SetAttributeValue("customersizecode", value); + this.OnPropertyChanged("CustomerSizeCode"); + } + } + + /// + /// Select the category that best describes the relationship between the account and your organization. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("customertypecode")] + public Microsoft.Xrm.Sdk.OptionSetValue CustomerTypeCode + { + get + { + return this.GetAttributeValue("customertypecode"); + } + set + { + this.OnPropertyChanging("CustomerTypeCode"); + this.SetAttributeValue("customertypecode", value); + this.OnPropertyChanged("CustomerTypeCode"); + } + } + + /// + /// Choose the default price list associated with the account to make sure the correct product prices for this customer are applied in sales opportunities, quotes, and orders. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("defaultpricelevelid")] + public Microsoft.Xrm.Sdk.EntityReference DefaultPriceLevelId + { + get + { + return this.GetAttributeValue("defaultpricelevelid"); + } + set + { + this.OnPropertyChanging("DefaultPriceLevelId"); + this.SetAttributeValue("defaultpricelevelid", value); + this.OnPropertyChanged("DefaultPriceLevelId"); + } + } + + /// + /// Type additional information to describe the account, such as an excerpt from the company's website. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("description")] + public string Description + { + get + { + return this.GetAttributeValue("description"); + } + set + { + this.OnPropertyChanging("Description"); + this.SetAttributeValue("description", value); + this.OnPropertyChanged("Description"); + } + } + + /// + /// Select whether the account allows bulk email sent through campaigns. If Do Not Allow is selected, the account can be added to marketing lists, but is excluded from email. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("donotbulkemail")] + public System.Nullable DoNotBulkEMail + { + get + { + return this.GetAttributeValue>("donotbulkemail"); + } + set + { + this.OnPropertyChanging("DoNotBulkEMail"); + this.SetAttributeValue("donotbulkemail", value); + this.OnPropertyChanged("DoNotBulkEMail"); + } + } + + /// + /// Select whether the account allows bulk postal mail sent through marketing campaigns or quick campaigns. If Do Not Allow is selected, the account can be added to marketing lists, but will be excluded from the postal mail. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("donotbulkpostalmail")] + public System.Nullable DoNotBulkPostalMail + { + get + { + return this.GetAttributeValue>("donotbulkpostalmail"); + } + set + { + this.OnPropertyChanging("DoNotBulkPostalMail"); + this.SetAttributeValue("donotbulkpostalmail", value); + this.OnPropertyChanged("DoNotBulkPostalMail"); + } + } + + /// + /// Select whether the account allows direct email sent from Microsoft Dynamics CRM. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("donotemail")] + public System.Nullable DoNotEMail + { + get + { + return this.GetAttributeValue>("donotemail"); + } + set + { + this.OnPropertyChanging("DoNotEMail"); + this.SetAttributeValue("donotemail", value); + this.OnPropertyChanged("DoNotEMail"); + } + } + + /// + /// Select whether the account allows faxes. If Do Not Allow is selected, the account will be excluded from fax activities distributed in marketing campaigns. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("donotfax")] + public System.Nullable DoNotFax + { + get + { + return this.GetAttributeValue>("donotfax"); + } + set + { + this.OnPropertyChanging("DoNotFax"); + this.SetAttributeValue("donotfax", value); + this.OnPropertyChanged("DoNotFax"); + } + } + + /// + /// Select whether the account allows phone calls. If Do Not Allow is selected, the account will be excluded from phone call activities distributed in marketing campaigns. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("donotphone")] + public System.Nullable DoNotPhone + { + get + { + return this.GetAttributeValue>("donotphone"); + } + set + { + this.OnPropertyChanging("DoNotPhone"); + this.SetAttributeValue("donotphone", value); + this.OnPropertyChanged("DoNotPhone"); + } + } + + /// + /// Select whether the account allows direct mail. If Do Not Allow is selected, the account will be excluded from letter activities distributed in marketing campaigns. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("donotpostalmail")] + public System.Nullable DoNotPostalMail + { + get + { + return this.GetAttributeValue>("donotpostalmail"); + } + set + { + this.OnPropertyChanging("DoNotPostalMail"); + this.SetAttributeValue("donotpostalmail", value); + this.OnPropertyChanged("DoNotPostalMail"); + } + } + + /// + /// Select whether the account accepts marketing materials, such as brochures or catalogs. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("donotsendmm")] + public System.Nullable DoNotSendMM + { + get + { + return this.GetAttributeValue>("donotsendmm"); + } + set + { + this.OnPropertyChanging("DoNotSendMM"); + this.SetAttributeValue("donotsendmm", value); + this.OnPropertyChanged("DoNotSendMM"); + } + } + + /// + /// Type the primary email address for the account. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("emailaddress1")] + public string EMailAddress1 + { + get + { + return this.GetAttributeValue("emailaddress1"); + } + set + { + this.OnPropertyChanging("EMailAddress1"); + this.SetAttributeValue("emailaddress1", value); + this.OnPropertyChanged("EMailAddress1"); + } + } + + /// + /// Type the secondary email address for the account. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("emailaddress2")] + public string EMailAddress2 + { + get + { + return this.GetAttributeValue("emailaddress2"); + } + set + { + this.OnPropertyChanging("EMailAddress2"); + this.SetAttributeValue("emailaddress2", value); + this.OnPropertyChanged("EMailAddress2"); + } + } + + /// + /// Type an alternate email address for the account. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("emailaddress3")] + public string EMailAddress3 + { + get + { + return this.GetAttributeValue("emailaddress3"); + } + set + { + this.OnPropertyChanging("EMailAddress3"); + this.SetAttributeValue("emailaddress3", value); + this.OnPropertyChanged("EMailAddress3"); + } + } + + /// + /// Shows the default image for the record. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("entityimage")] + public byte[] EntityImage + { + get + { + return this.GetAttributeValue("entityimage"); + } + set + { + this.OnPropertyChanging("EntityImage"); + this.SetAttributeValue("entityimage", value); + this.OnPropertyChanged("EntityImage"); + } + } + + /// + /// + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("entityimage_timestamp")] + public System.Nullable EntityImage_Timestamp + { + get + { + return this.GetAttributeValue>("entityimage_timestamp"); + } + } + + /// + /// + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("entityimage_url")] + public string EntityImage_URL + { + get + { + return this.GetAttributeValue("entityimage_url"); + } + } + + /// + /// For internal use only. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("entityimageid")] + public System.Nullable EntityImageId + { + get + { + return this.GetAttributeValue>("entityimageid"); + } + } + + /// + /// Shows the conversion rate of the record's currency. The exchange rate is used to convert all money fields in the record from the local currency to the system's default currency. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("exchangerate")] + public System.Nullable ExchangeRate + { + get + { + return this.GetAttributeValue>("exchangerate"); + } + } + + /// + /// Type the fax number for the account. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("fax")] + public string Fax + { + get + { + return this.GetAttributeValue("fax"); + } + set + { + this.OnPropertyChanging("Fax"); + this.SetAttributeValue("fax", value); + this.OnPropertyChanged("Fax"); + } + } + + /// + /// Type the URL for the account's FTP site to enable users to access data and share documents. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("ftpsiteurl")] + public string FtpSiteURL + { + get + { + return this.GetAttributeValue("ftpsiteurl"); + } + set + { + this.OnPropertyChanging("FtpSiteURL"); + this.SetAttributeValue("ftpsiteurl", value); + this.OnPropertyChanged("FtpSiteURL"); + } + } + + /// + /// Unique identifier of the data import or data migration that created this record. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("importsequencenumber")] + public System.Nullable ImportSequenceNumber + { + get + { + return this.GetAttributeValue>("importsequencenumber"); + } + set + { + this.OnPropertyChanging("ImportSequenceNumber"); + this.SetAttributeValue("importsequencenumber", value); + this.OnPropertyChanged("ImportSequenceNumber"); + } + } + + /// + /// Select the account's primary industry for use in marketing segmentation and demographic analysis. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("industrycode")] + public Microsoft.Xrm.Sdk.OptionSetValue IndustryCode + { + get + { + return this.GetAttributeValue("industrycode"); + } + set + { + this.OnPropertyChanging("IndustryCode"); + this.SetAttributeValue("industrycode", value); + this.OnPropertyChanged("IndustryCode"); + } + } + + /// + /// Shows the date when the account was last included in a marketing campaign or quick campaign. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("lastusedincampaign")] + public System.Nullable LastUsedInCampaign + { + get + { + return this.GetAttributeValue>("lastusedincampaign"); + } + set + { + this.OnPropertyChanging("LastUsedInCampaign"); + this.SetAttributeValue("lastusedincampaign", value); + this.OnPropertyChanged("LastUsedInCampaign"); + } + } + + /// + /// Type the market capitalization of the account to identify the company's equity, used as an indicator in financial performance analysis. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("marketcap")] + public Microsoft.Xrm.Sdk.Money MarketCap + { + get + { + return this.GetAttributeValue("marketcap"); + } + set + { + this.OnPropertyChanging("MarketCap"); + this.SetAttributeValue("marketcap", value); + this.OnPropertyChanged("MarketCap"); + } + } + + /// + /// Shows the market capitalization converted to the system's default base currency. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("marketcap_base")] + public Microsoft.Xrm.Sdk.Money MarketCap_Base + { + get + { + return this.GetAttributeValue("marketcap_base"); + } + } + + /// + /// Shows the master account that the account was merged with. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("masterid")] + public Microsoft.Xrm.Sdk.EntityReference MasterId + { + get + { + return this.GetAttributeValue("masterid"); + } + } + + /// + /// Shows whether the account has been merged with another account. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("merged")] + public System.Nullable Merged + { + get + { + return this.GetAttributeValue>("merged"); + } + } + + /// + /// Shows who last updated the record. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("modifiedby")] + public Microsoft.Xrm.Sdk.EntityReference ModifiedBy + { + get + { + return this.GetAttributeValue("modifiedby"); + } + } + + /// + /// Shows the date and time when the record was last updated. The date and time are displayed in the time zone selected in Microsoft Dynamics CRM options. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("modifiedon")] + public System.Nullable ModifiedOn + { + get + { + return this.GetAttributeValue>("modifiedon"); + } + } + + /// + /// Shows who created the record on behalf of another user. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("modifiedonbehalfby")] + public Microsoft.Xrm.Sdk.EntityReference ModifiedOnBehalfBy + { + get + { + return this.GetAttributeValue("modifiedonbehalfby"); + } + } + + /// + /// Type the company or business name. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("name")] + public string Name + { + get + { + return this.GetAttributeValue("name"); + } + set + { + this.OnPropertyChanging("Name"); + this.SetAttributeValue("name", value); + this.OnPropertyChanged("Name"); + } + } + + /// + /// Type the number of employees that work at the account for use in marketing segmentation and demographic analysis. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("numberofemployees")] + public System.Nullable NumberOfEmployees + { + get + { + return this.GetAttributeValue>("numberofemployees"); + } + set + { + this.OnPropertyChanging("NumberOfEmployees"); + this.SetAttributeValue("numberofemployees", value); + this.OnPropertyChanged("NumberOfEmployees"); + } + } + + /// + /// Shows the lead that the account was created from if the account was created by converting a lead in Microsoft Dynamics CRM. This is used to relate the account to data on the originating lead for use in reporting and analytics. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("originatingleadid")] + public Microsoft.Xrm.Sdk.EntityReference OriginatingLeadId + { + get + { + return this.GetAttributeValue("originatingleadid"); + } + set + { + this.OnPropertyChanging("OriginatingLeadId"); + this.SetAttributeValue("originatingleadid", value); + this.OnPropertyChanged("OriginatingLeadId"); + } + } + + /// + /// Date and time that the record was migrated. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("overriddencreatedon")] + public System.Nullable OverriddenCreatedOn + { + get + { + return this.GetAttributeValue>("overriddencreatedon"); + } + set + { + this.OnPropertyChanging("OverriddenCreatedOn"); + this.SetAttributeValue("overriddencreatedon", value); + this.OnPropertyChanged("OverriddenCreatedOn"); + } + } + + /// + /// Enter the user or team who is assigned to manage the record. This field is updated every time the record is assigned to a different user. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("ownerid")] + public Microsoft.Xrm.Sdk.EntityReference OwnerId + { + get + { + return this.GetAttributeValue("ownerid"); + } + set + { + this.OnPropertyChanging("OwnerId"); + this.SetAttributeValue("ownerid", value); + this.OnPropertyChanged("OwnerId"); + } + } + + /// + /// Select the account's ownership structure, such as public or private. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("ownershipcode")] + public Microsoft.Xrm.Sdk.OptionSetValue OwnershipCode + { + get + { + return this.GetAttributeValue("ownershipcode"); + } + set + { + this.OnPropertyChanging("OwnershipCode"); + this.SetAttributeValue("ownershipcode", value); + this.OnPropertyChanged("OwnershipCode"); + } + } + + /// + /// Shows the business unit that the record owner belongs to. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("owningbusinessunit")] + public Microsoft.Xrm.Sdk.EntityReference OwningBusinessUnit + { + get + { + return this.GetAttributeValue("owningbusinessunit"); + } + } + + /// + /// Unique identifier of the team who owns the account. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("owningteam")] + public Microsoft.Xrm.Sdk.EntityReference OwningTeam + { + get + { + return this.GetAttributeValue("owningteam"); + } + } + + /// + /// Unique identifier of the user who owns the account. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("owninguser")] + public Microsoft.Xrm.Sdk.EntityReference OwningUser + { + get + { + return this.GetAttributeValue("owninguser"); + } + } + + /// + /// Choose the parent account associated with this account to show parent and child businesses in reporting and analytics. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("parentaccountid")] + public Microsoft.Xrm.Sdk.EntityReference ParentAccountId + { + get + { + return this.GetAttributeValue("parentaccountid"); + } + set + { + this.OnPropertyChanging("ParentAccountId"); + this.SetAttributeValue("parentaccountid", value); + this.OnPropertyChanged("ParentAccountId"); + } + } + + /// + /// For system use only. Legacy Microsoft Dynamics CRM 3.0 workflow data. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("participatesinworkflow")] + public System.Nullable ParticipatesInWorkflow + { + get + { + return this.GetAttributeValue>("participatesinworkflow"); + } + set + { + this.OnPropertyChanging("ParticipatesInWorkflow"); + this.SetAttributeValue("participatesinworkflow", value); + this.OnPropertyChanged("ParticipatesInWorkflow"); + } + } + + /// + /// Select the payment terms to indicate when the customer needs to pay the total amount. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("paymenttermscode")] + public Microsoft.Xrm.Sdk.OptionSetValue PaymentTermsCode + { + get + { + return this.GetAttributeValue("paymenttermscode"); + } + set + { + this.OnPropertyChanging("PaymentTermsCode"); + this.SetAttributeValue("paymenttermscode", value); + this.OnPropertyChanged("PaymentTermsCode"); + } + } + + /// + /// Select the preferred day of the week for service appointments. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("preferredappointmentdaycode")] + public Microsoft.Xrm.Sdk.OptionSetValue PreferredAppointmentDayCode + { + get + { + return this.GetAttributeValue("preferredappointmentdaycode"); + } + set + { + this.OnPropertyChanging("PreferredAppointmentDayCode"); + this.SetAttributeValue("preferredappointmentdaycode", value); + this.OnPropertyChanged("PreferredAppointmentDayCode"); + } + } + + /// + /// Select the preferred time of day for service appointments. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("preferredappointmenttimecode")] + public Microsoft.Xrm.Sdk.OptionSetValue PreferredAppointmentTimeCode + { + get + { + return this.GetAttributeValue("preferredappointmenttimecode"); + } + set + { + this.OnPropertyChanging("PreferredAppointmentTimeCode"); + this.SetAttributeValue("preferredappointmenttimecode", value); + this.OnPropertyChanged("PreferredAppointmentTimeCode"); + } + } + + /// + /// Select the preferred method of contact. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("preferredcontactmethodcode")] + public Microsoft.Xrm.Sdk.OptionSetValue PreferredContactMethodCode + { + get + { + return this.GetAttributeValue("preferredcontactmethodcode"); + } + set + { + this.OnPropertyChanging("PreferredContactMethodCode"); + this.SetAttributeValue("preferredcontactmethodcode", value); + this.OnPropertyChanged("PreferredContactMethodCode"); + } + } + + /// + /// Choose the account's preferred service facility or equipment to make sure services are scheduled correctly for the customer. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("preferredequipmentid")] + public Microsoft.Xrm.Sdk.EntityReference PreferredEquipmentId + { + get + { + return this.GetAttributeValue("preferredequipmentid"); + } + set + { + this.OnPropertyChanging("PreferredEquipmentId"); + this.SetAttributeValue("preferredequipmentid", value); + this.OnPropertyChanged("PreferredEquipmentId"); + } + } + + /// + /// Choose the account's preferred service for reference when you schedule service activities. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("preferredserviceid")] + public Microsoft.Xrm.Sdk.EntityReference PreferredServiceId + { + get + { + return this.GetAttributeValue("preferredserviceid"); + } + set + { + this.OnPropertyChanging("PreferredServiceId"); + this.SetAttributeValue("preferredserviceid", value); + this.OnPropertyChanged("PreferredServiceId"); + } + } + + /// + /// Choose the preferred service representative for reference when you schedule service activities for the account. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("preferredsystemuserid")] + public Microsoft.Xrm.Sdk.EntityReference PreferredSystemUserId + { + get + { + return this.GetAttributeValue("preferredsystemuserid"); + } + set + { + this.OnPropertyChanging("PreferredSystemUserId"); + this.SetAttributeValue("preferredsystemuserid", value); + this.OnPropertyChanged("PreferredSystemUserId"); + } + } + + /// + /// Choose the primary contact for the account to provide quick access to contact details. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("primarycontactid")] + public Microsoft.Xrm.Sdk.EntityReference PrimaryContactId + { + get + { + return this.GetAttributeValue("primarycontactid"); + } + set + { + this.OnPropertyChanging("PrimaryContactId"); + this.SetAttributeValue("primarycontactid", value); + this.OnPropertyChanged("PrimaryContactId"); + } + } + + /// + /// Shows the ID of the process. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("processid")] + public System.Nullable ProcessId + { + get + { + return this.GetAttributeValue>("processid"); + } + set + { + this.OnPropertyChanging("ProcessId"); + this.SetAttributeValue("processid", value); + this.OnPropertyChanged("ProcessId"); + } + } + + /// + /// Type the annual revenue for the account, used as an indicator in financial performance analysis. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("revenue")] + public Microsoft.Xrm.Sdk.Money Revenue + { + get + { + return this.GetAttributeValue("revenue"); + } + set + { + this.OnPropertyChanging("Revenue"); + this.SetAttributeValue("revenue", value); + this.OnPropertyChanged("Revenue"); + } + } + + /// + /// Shows the annual revenue converted to the system's default base currency. The calculations use the exchange rate specified in the Currencies area. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("revenue_base")] + public Microsoft.Xrm.Sdk.Money Revenue_Base + { + get + { + return this.GetAttributeValue("revenue_base"); + } + } + + /// + /// Type the number of shares available to the public for the account. This number is used as an indicator in financial performance analysis. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("sharesoutstanding")] + public System.Nullable SharesOutstanding + { + get + { + return this.GetAttributeValue>("sharesoutstanding"); + } + set + { + this.OnPropertyChanging("SharesOutstanding"); + this.SetAttributeValue("sharesoutstanding", value); + this.OnPropertyChanged("SharesOutstanding"); + } + } + + /// + /// Select a shipping method for deliveries sent to the account's address to designate the preferred carrier or other delivery option. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("shippingmethodcode")] + public Microsoft.Xrm.Sdk.OptionSetValue ShippingMethodCode + { + get + { + return this.GetAttributeValue("shippingmethodcode"); + } + set + { + this.OnPropertyChanging("ShippingMethodCode"); + this.SetAttributeValue("shippingmethodcode", value); + this.OnPropertyChanged("ShippingMethodCode"); + } + } + + /// + /// Type the Standard Industrial Classification (SIC) code that indicates the account's primary industry of business, for use in marketing segmentation and demographic analysis. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("sic")] + public string SIC + { + get + { + return this.GetAttributeValue("sic"); + } + set + { + this.OnPropertyChanging("SIC"); + this.SetAttributeValue("sic", value); + this.OnPropertyChanged("SIC"); + } + } + + /// + /// Shows the ID of the stage. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("stageid")] + public System.Nullable StageId + { + get + { + return this.GetAttributeValue>("stageid"); + } + set + { + this.OnPropertyChanging("StageId"); + this.SetAttributeValue("stageid", value); + this.OnPropertyChanged("StageId"); + } + } + + /// + /// Shows whether the account is active or inactive. Inactive accounts are read-only and can't be edited unless they are reactivated. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("statecode")] + public System.Nullable StateCode + { + get + { + Microsoft.Xrm.Sdk.OptionSetValue optionSet = this.GetAttributeValue("statecode"); + if ((optionSet != null)) + { + return ((AccountState)(System.Enum.ToObject(typeof(AccountState), optionSet.Value))); + } + else + { + return null; + } + } + } + + /// + /// Select the account's status. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("statuscode")] + public Microsoft.Xrm.Sdk.OptionSetValue StatusCode + { + get + { + return this.GetAttributeValue("statuscode"); + } + set + { + this.OnPropertyChanging("StatusCode"); + this.SetAttributeValue("statuscode", value); + this.OnPropertyChanged("StatusCode"); + } + } + + /// + /// Type the stock exchange at which the account is listed to track their stock and financial performance of the company. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("stockexchange")] + public string StockExchange + { + get + { + return this.GetAttributeValue("stockexchange"); + } + set + { + this.OnPropertyChanging("StockExchange"); + this.SetAttributeValue("stockexchange", value); + this.OnPropertyChanged("StockExchange"); + } + } + + /// + /// Type the main phone number for this account. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("telephone1")] + public string Telephone1 + { + get + { + return this.GetAttributeValue("telephone1"); + } + set + { + this.OnPropertyChanging("Telephone1"); + this.SetAttributeValue("telephone1", value); + this.OnPropertyChanged("Telephone1"); + } + } + + /// + /// Type a second phone number for this account. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("telephone2")] + public string Telephone2 + { + get + { + return this.GetAttributeValue("telephone2"); + } + set + { + this.OnPropertyChanging("Telephone2"); + this.SetAttributeValue("telephone2", value); + this.OnPropertyChanged("Telephone2"); + } + } + + /// + /// Type a third phone number for this account. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("telephone3")] + public string Telephone3 + { + get + { + return this.GetAttributeValue("telephone3"); + } + set + { + this.OnPropertyChanging("Telephone3"); + this.SetAttributeValue("telephone3", value); + this.OnPropertyChanged("Telephone3"); + } + } + + /// + /// Select a region or territory for the account for use in segmentation and analysis. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("territorycode")] + public Microsoft.Xrm.Sdk.OptionSetValue TerritoryCode + { + get + { + return this.GetAttributeValue("territorycode"); + } + set + { + this.OnPropertyChanging("TerritoryCode"); + this.SetAttributeValue("territorycode", value); + this.OnPropertyChanged("TerritoryCode"); + } + } + + /// + /// Choose the sales region or territory for the account to make sure the account is assigned to the correct representative and for use in segmentation and analysis. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("territoryid")] + public Microsoft.Xrm.Sdk.EntityReference TerritoryId + { + get + { + return this.GetAttributeValue("territoryid"); + } + set + { + this.OnPropertyChanging("TerritoryId"); + this.SetAttributeValue("territoryid", value); + this.OnPropertyChanged("TerritoryId"); + } + } + + /// + /// Type the stock exchange symbol for the account to track financial performance of the company. You can click the code entered in this field to access the latest trading information from MSN Money. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("tickersymbol")] + public string TickerSymbol + { + get + { + return this.GetAttributeValue("tickersymbol"); + } + set + { + this.OnPropertyChanging("TickerSymbol"); + this.SetAttributeValue("tickersymbol", value); + this.OnPropertyChanged("TickerSymbol"); + } + } + + /// + /// For internal use only. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("timezoneruleversionnumber")] + public System.Nullable TimeZoneRuleVersionNumber + { + get + { + return this.GetAttributeValue>("timezoneruleversionnumber"); + } + set + { + this.OnPropertyChanging("TimeZoneRuleVersionNumber"); + this.SetAttributeValue("timezoneruleversionnumber", value); + this.OnPropertyChanged("TimeZoneRuleVersionNumber"); + } + } + + /// + /// Choose the local currency for the record to make sure budgets are reported in the correct currency. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("transactioncurrencyid")] + public Microsoft.Xrm.Sdk.EntityReference TransactionCurrencyId + { + get + { + return this.GetAttributeValue("transactioncurrencyid"); + } + set + { + this.OnPropertyChanging("TransactionCurrencyId"); + this.SetAttributeValue("transactioncurrencyid", value); + this.OnPropertyChanged("TransactionCurrencyId"); + } + } + + /// + /// Time zone code that was in use when the record was created. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("utcconversiontimezonecode")] + public System.Nullable UTCConversionTimeZoneCode + { + get + { + return this.GetAttributeValue>("utcconversiontimezonecode"); + } + set + { + this.OnPropertyChanging("UTCConversionTimeZoneCode"); + this.SetAttributeValue("utcconversiontimezonecode", value); + this.OnPropertyChanged("UTCConversionTimeZoneCode"); + } + } + + /// + /// Version number of the account. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("versionnumber")] + public System.Nullable VersionNumber + { + get + { + return this.GetAttributeValue>("versionnumber"); + } + } + + /// + /// Type the account's website URL to get quick details about the company profile. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("websiteurl")] + public string WebSiteURL + { + get + { + return this.GetAttributeValue("websiteurl"); + } + set + { + this.OnPropertyChanging("WebSiteURL"); + this.SetAttributeValue("websiteurl", value); + this.OnPropertyChanged("WebSiteURL"); + } + } + + /// + /// Type the phonetic spelling of the company name, if specified in Japanese, to make sure the name is pronounced correctly in phone calls and other communications. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("yominame")] + public string YomiName + { + get + { + return this.GetAttributeValue("yominame"); + } + set + { + this.OnPropertyChanging("YomiName"); + this.SetAttributeValue("yominame", value); + this.OnPropertyChanged("YomiName"); + } + } + + /// + /// 1:N account_activity_parties + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("account_activity_parties")] + public System.Collections.Generic.IEnumerable account_activity_parties + { + get + { + return this.GetRelatedEntities("account_activity_parties", null); + } + set + { + this.OnPropertyChanging("account_activity_parties"); + this.SetRelatedEntities("account_activity_parties", null, value); + this.OnPropertyChanged("account_activity_parties"); + } + } + + /// + /// 1:N Account_ActivityPointers + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("Account_ActivityPointers")] + public System.Collections.Generic.IEnumerable Account_ActivityPointers + { + get + { + return this.GetRelatedEntities("Account_ActivityPointers", null); + } + set + { + this.OnPropertyChanging("Account_ActivityPointers"); + this.SetRelatedEntities("Account_ActivityPointers", null, value); + this.OnPropertyChanged("Account_ActivityPointers"); + } + } + + /// + /// 1:N Account_Annotation + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("Account_Annotation")] + public System.Collections.Generic.IEnumerable Account_Annotation + { + get + { + return this.GetRelatedEntities("Account_Annotation", null); + } + set + { + this.OnPropertyChanging("Account_Annotation"); + this.SetRelatedEntities("Account_Annotation", null, value); + this.OnPropertyChanged("Account_Annotation"); + } + } + + /// + /// 1:N Account_Appointments + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("Account_Appointments")] + public System.Collections.Generic.IEnumerable Account_Appointments + { + get + { + return this.GetRelatedEntities("Account_Appointments", null); + } + set + { + this.OnPropertyChanging("Account_Appointments"); + this.SetRelatedEntities("Account_Appointments", null, value); + this.OnPropertyChanged("Account_Appointments"); + } + } + + /// + /// 1:N Account_AsyncOperations + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("Account_AsyncOperations")] + public System.Collections.Generic.IEnumerable Account_AsyncOperations + { + get + { + return this.GetRelatedEntities("Account_AsyncOperations", null); + } + set + { + this.OnPropertyChanging("Account_AsyncOperations"); + this.SetRelatedEntities("Account_AsyncOperations", null, value); + this.OnPropertyChanged("Account_AsyncOperations"); + } + } + + /// + /// 1:N Account_BulkDeleteFailures + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("Account_BulkDeleteFailures")] + public System.Collections.Generic.IEnumerable Account_BulkDeleteFailures + { + get + { + return this.GetRelatedEntities("Account_BulkDeleteFailures", null); + } + set + { + this.OnPropertyChanging("Account_BulkDeleteFailures"); + this.SetRelatedEntities("Account_BulkDeleteFailures", null, value); + this.OnPropertyChanged("Account_BulkDeleteFailures"); + } + } + + /// + /// 1:N account_connections1 + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("account_connections1")] + public System.Collections.Generic.IEnumerable account_connections1 + { + get + { + return this.GetRelatedEntities("account_connections1", null); + } + set + { + this.OnPropertyChanging("account_connections1"); + this.SetRelatedEntities("account_connections1", null, value); + this.OnPropertyChanged("account_connections1"); + } + } + + /// + /// 1:N account_connections2 + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("account_connections2")] + public System.Collections.Generic.IEnumerable account_connections2 + { + get + { + return this.GetRelatedEntities("account_connections2", null); + } + set + { + this.OnPropertyChanging("account_connections2"); + this.SetRelatedEntities("account_connections2", null, value); + this.OnPropertyChanged("account_connections2"); + } + } + + /// + /// 1:N account_customer_opportunity_roles + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("account_customer_opportunity_roles")] + public System.Collections.Generic.IEnumerable account_customer_opportunity_roles + { + get + { + return this.GetRelatedEntities("account_customer_opportunity_roles", null); + } + set + { + this.OnPropertyChanging("account_customer_opportunity_roles"); + this.SetRelatedEntities("account_customer_opportunity_roles", null, value); + this.OnPropertyChanged("account_customer_opportunity_roles"); + } + } + + /// + /// 1:N account_customer_relationship_customer + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("account_customer_relationship_customer")] + public System.Collections.Generic.IEnumerable account_customer_relationship_customer + { + get + { + return this.GetRelatedEntities("account_customer_relationship_customer", null); + } + set + { + this.OnPropertyChanging("account_customer_relationship_customer"); + this.SetRelatedEntities("account_customer_relationship_customer", null, value); + this.OnPropertyChanged("account_customer_relationship_customer"); + } + } + + /// + /// 1:N account_customer_relationship_partner + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("account_customer_relationship_partner")] + public System.Collections.Generic.IEnumerable account_customer_relationship_partner + { + get + { + return this.GetRelatedEntities("account_customer_relationship_partner", null); + } + set + { + this.OnPropertyChanging("account_customer_relationship_partner"); + this.SetRelatedEntities("account_customer_relationship_partner", null, value); + this.OnPropertyChanged("account_customer_relationship_partner"); + } + } + + /// + /// 1:N Account_CustomerAddress + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("Account_CustomerAddress")] + public System.Collections.Generic.IEnumerable Account_CustomerAddress + { + get + { + return this.GetRelatedEntities("Account_CustomerAddress", null); + } + set + { + this.OnPropertyChanging("Account_CustomerAddress"); + this.SetRelatedEntities("Account_CustomerAddress", null, value); + this.OnPropertyChanged("Account_CustomerAddress"); + } + } + + /// + /// 1:N Account_DuplicateBaseRecord + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("Account_DuplicateBaseRecord")] + public System.Collections.Generic.IEnumerable Account_DuplicateBaseRecord + { + get + { + return this.GetRelatedEntities("Account_DuplicateBaseRecord", null); + } + set + { + this.OnPropertyChanging("Account_DuplicateBaseRecord"); + this.SetRelatedEntities("Account_DuplicateBaseRecord", null, value); + this.OnPropertyChanged("Account_DuplicateBaseRecord"); + } + } + + /// + /// 1:N Account_DuplicateMatchingRecord + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("Account_DuplicateMatchingRecord")] + public System.Collections.Generic.IEnumerable Account_DuplicateMatchingRecord + { + get + { + return this.GetRelatedEntities("Account_DuplicateMatchingRecord", null); + } + set + { + this.OnPropertyChanging("Account_DuplicateMatchingRecord"); + this.SetRelatedEntities("Account_DuplicateMatchingRecord", null, value); + this.OnPropertyChanged("Account_DuplicateMatchingRecord"); + } + } + + /// + /// 1:N Account_Emails + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("Account_Emails")] + public System.Collections.Generic.IEnumerable Account_Emails + { + get + { + return this.GetRelatedEntities("Account_Emails", null); + } + set + { + this.OnPropertyChanging("Account_Emails"); + this.SetRelatedEntities("Account_Emails", null, value); + this.OnPropertyChanged("Account_Emails"); + } + } + + /// + /// 1:N Account_Faxes + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("Account_Faxes")] + public System.Collections.Generic.IEnumerable Account_Faxes + { + get + { + return this.GetRelatedEntities("Account_Faxes", null); + } + set + { + this.OnPropertyChanging("Account_Faxes"); + this.SetRelatedEntities("Account_Faxes", null, value); + this.OnPropertyChanged("Account_Faxes"); + } + } + + /// + /// 1:N Account_Letters + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("Account_Letters")] + public System.Collections.Generic.IEnumerable Account_Letters + { + get + { + return this.GetRelatedEntities("Account_Letters", null); + } + set + { + this.OnPropertyChanging("Account_Letters"); + this.SetRelatedEntities("Account_Letters", null, value); + this.OnPropertyChanged("Account_Letters"); + } + } + + /// + /// 1:N account_master_account + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("account_master_account", Microsoft.Xrm.Sdk.EntityRole.Referenced)] + public System.Collections.Generic.IEnumerable Referencedaccount_master_account + { + get + { + return this.GetRelatedEntities("account_master_account", Microsoft.Xrm.Sdk.EntityRole.Referenced); + } + set + { + this.OnPropertyChanging("Referencedaccount_master_account"); + this.SetRelatedEntities("account_master_account", Microsoft.Xrm.Sdk.EntityRole.Referenced, value); + this.OnPropertyChanged("Referencedaccount_master_account"); + } + } + + /// + /// 1:N account_parent_account + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("account_parent_account", Microsoft.Xrm.Sdk.EntityRole.Referenced)] + public System.Collections.Generic.IEnumerable Referencedaccount_parent_account + { + get + { + return this.GetRelatedEntities("account_parent_account", Microsoft.Xrm.Sdk.EntityRole.Referenced); + } + set + { + this.OnPropertyChanging("Referencedaccount_parent_account"); + this.SetRelatedEntities("account_parent_account", Microsoft.Xrm.Sdk.EntityRole.Referenced, value); + this.OnPropertyChanged("Referencedaccount_parent_account"); + } + } + + /// + /// 1:N Account_Phonecalls + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("Account_Phonecalls")] + public System.Collections.Generic.IEnumerable Account_Phonecalls + { + get + { + return this.GetRelatedEntities("Account_Phonecalls", null); + } + set + { + this.OnPropertyChanging("Account_Phonecalls"); + this.SetRelatedEntities("Account_Phonecalls", null, value); + this.OnPropertyChanged("Account_Phonecalls"); + } + } + + /// + /// 1:N account_PostFollows + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("account_PostFollows")] + public System.Collections.Generic.IEnumerable account_PostFollows + { + get + { + return this.GetRelatedEntities("account_PostFollows", null); + } + set + { + this.OnPropertyChanging("account_PostFollows"); + this.SetRelatedEntities("account_PostFollows", null, value); + this.OnPropertyChanged("account_PostFollows"); + } + } + + /// + /// 1:N account_principalobjectattributeaccess + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("account_principalobjectattributeaccess")] + public System.Collections.Generic.IEnumerable account_principalobjectattributeaccess + { + get + { + return this.GetRelatedEntities("account_principalobjectattributeaccess", null); + } + set + { + this.OnPropertyChanging("account_principalobjectattributeaccess"); + this.SetRelatedEntities("account_principalobjectattributeaccess", null, value); + this.OnPropertyChanged("account_principalobjectattributeaccess"); + } + } + + /// + /// 1:N Account_ProcessSessions + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("Account_ProcessSessions")] + public System.Collections.Generic.IEnumerable Account_ProcessSessions + { + get + { + return this.GetRelatedEntities("Account_ProcessSessions", null); + } + set + { + this.OnPropertyChanging("Account_ProcessSessions"); + this.SetRelatedEntities("Account_ProcessSessions", null, value); + this.OnPropertyChanged("Account_ProcessSessions"); + } + } + + /// + /// 1:N Account_RecurringAppointmentMasters + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("Account_RecurringAppointmentMasters")] + public System.Collections.Generic.IEnumerable Account_RecurringAppointmentMasters + { + get + { + return this.GetRelatedEntities("Account_RecurringAppointmentMasters", null); + } + set + { + this.OnPropertyChanging("Account_RecurringAppointmentMasters"); + this.SetRelatedEntities("Account_RecurringAppointmentMasters", null, value); + this.OnPropertyChanged("Account_RecurringAppointmentMasters"); + } + } + + /// + /// 1:N Account_ServiceAppointments + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("Account_ServiceAppointments")] + public System.Collections.Generic.IEnumerable Account_ServiceAppointments + { + get + { + return this.GetRelatedEntities("Account_ServiceAppointments", null); + } + set + { + this.OnPropertyChanging("Account_ServiceAppointments"); + this.SetRelatedEntities("Account_ServiceAppointments", null, value); + this.OnPropertyChanged("Account_ServiceAppointments"); + } + } + + /// + /// 1:N Account_SharepointDocumentLocation + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("Account_SharepointDocumentLocation")] + public System.Collections.Generic.IEnumerable Account_SharepointDocumentLocation + { + get + { + return this.GetRelatedEntities("Account_SharepointDocumentLocation", null); + } + set + { + this.OnPropertyChanging("Account_SharepointDocumentLocation"); + this.SetRelatedEntities("Account_SharepointDocumentLocation", null, value); + this.OnPropertyChanged("Account_SharepointDocumentLocation"); + } + } + + /// + /// 1:N Account_Tasks + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("Account_Tasks")] + public System.Collections.Generic.IEnumerable Account_Tasks + { + get + { + return this.GetRelatedEntities("Account_Tasks", null); + } + set + { + this.OnPropertyChanging("Account_Tasks"); + this.SetRelatedEntities("Account_Tasks", null, value); + this.OnPropertyChanged("Account_Tasks"); + } + } + + /// + /// 1:N contact_customer_accounts + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("contact_customer_accounts")] + public System.Collections.Generic.IEnumerable contact_customer_accounts + { + get + { + return this.GetRelatedEntities("contact_customer_accounts", null); + } + set + { + this.OnPropertyChanging("contact_customer_accounts"); + this.SetRelatedEntities("contact_customer_accounts", null, value); + this.OnPropertyChanged("contact_customer_accounts"); + } + } + + /// + /// 1:N contract_billingcustomer_accounts + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("contract_billingcustomer_accounts")] + public System.Collections.Generic.IEnumerable contract_billingcustomer_accounts + { + get + { + return this.GetRelatedEntities("contract_billingcustomer_accounts", null); + } + set + { + this.OnPropertyChanging("contract_billingcustomer_accounts"); + this.SetRelatedEntities("contract_billingcustomer_accounts", null, value); + this.OnPropertyChanged("contract_billingcustomer_accounts"); + } + } + + /// + /// 1:N contract_customer_accounts + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("contract_customer_accounts")] + public System.Collections.Generic.IEnumerable contract_customer_accounts + { + get + { + return this.GetRelatedEntities("contract_customer_accounts", null); + } + set + { + this.OnPropertyChanging("contract_customer_accounts"); + this.SetRelatedEntities("contract_customer_accounts", null, value); + this.OnPropertyChanged("contract_customer_accounts"); + } + } + + /// + /// 1:N contractlineitem_customer_accounts + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("contractlineitem_customer_accounts")] + public System.Collections.Generic.IEnumerable contractlineitem_customer_accounts + { + get + { + return this.GetRelatedEntities("contractlineitem_customer_accounts", null); + } + set + { + this.OnPropertyChanging("contractlineitem_customer_accounts"); + this.SetRelatedEntities("contractlineitem_customer_accounts", null, value); + this.OnPropertyChanged("contractlineitem_customer_accounts"); + } + } + + /// + /// 1:N CreatedAccount_BulkOperationLogs2 + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("CreatedAccount_BulkOperationLogs2")] + public System.Collections.Generic.IEnumerable CreatedAccount_BulkOperationLogs2 + { + get + { + return this.GetRelatedEntities("CreatedAccount_BulkOperationLogs2", null); + } + set + { + this.OnPropertyChanging("CreatedAccount_BulkOperationLogs2"); + this.SetRelatedEntities("CreatedAccount_BulkOperationLogs2", null, value); + this.OnPropertyChanged("CreatedAccount_BulkOperationLogs2"); + } + } + + /// + /// 1:N incident_customer_accounts + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("incident_customer_accounts")] + public System.Collections.Generic.IEnumerable incident_customer_accounts + { + get + { + return this.GetRelatedEntities("incident_customer_accounts", null); + } + set + { + this.OnPropertyChanging("incident_customer_accounts"); + this.SetRelatedEntities("incident_customer_accounts", null, value); + this.OnPropertyChanged("incident_customer_accounts"); + } + } + + /// + /// 1:N invoice_customer_accounts + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("invoice_customer_accounts")] + public System.Collections.Generic.IEnumerable invoice_customer_accounts + { + get + { + return this.GetRelatedEntities("invoice_customer_accounts", null); + } + set + { + this.OnPropertyChanging("invoice_customer_accounts"); + this.SetRelatedEntities("invoice_customer_accounts", null, value); + this.OnPropertyChanged("invoice_customer_accounts"); + } + } + + /// + /// 1:N lead_customer_accounts + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("lead_customer_accounts")] + public System.Collections.Generic.IEnumerable lead_customer_accounts + { + get + { + return this.GetRelatedEntities("lead_customer_accounts", null); + } + set + { + this.OnPropertyChanging("lead_customer_accounts"); + this.SetRelatedEntities("lead_customer_accounts", null, value); + this.OnPropertyChanged("lead_customer_accounts"); + } + } + + /// + /// 1:N lead_parent_account + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("lead_parent_account")] + public System.Collections.Generic.IEnumerable lead_parent_account + { + get + { + return this.GetRelatedEntities("lead_parent_account", null); + } + set + { + this.OnPropertyChanging("lead_parent_account"); + this.SetRelatedEntities("lead_parent_account", null, value); + this.OnPropertyChanged("lead_parent_account"); + } + } + + /// + /// 1:N opportunity_customer_accounts + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("opportunity_customer_accounts")] + public System.Collections.Generic.IEnumerable opportunity_customer_accounts + { + get + { + return this.GetRelatedEntities("opportunity_customer_accounts", null); + } + set + { + this.OnPropertyChanging("opportunity_customer_accounts"); + this.SetRelatedEntities("opportunity_customer_accounts", null, value); + this.OnPropertyChanged("opportunity_customer_accounts"); + } + } + + /// + /// 1:N opportunity_parent_account + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("opportunity_parent_account")] + public System.Collections.Generic.IEnumerable opportunity_parent_account + { + get + { + return this.GetRelatedEntities("opportunity_parent_account", null); + } + set + { + this.OnPropertyChanging("opportunity_parent_account"); + this.SetRelatedEntities("opportunity_parent_account", null, value); + this.OnPropertyChanged("opportunity_parent_account"); + } + } + + /// + /// 1:N order_customer_accounts + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("order_customer_accounts")] + public System.Collections.Generic.IEnumerable order_customer_accounts + { + get + { + return this.GetRelatedEntities("order_customer_accounts", null); + } + set + { + this.OnPropertyChanging("order_customer_accounts"); + this.SetRelatedEntities("order_customer_accounts", null, value); + this.OnPropertyChanged("order_customer_accounts"); + } + } + + /// + /// 1:N quote_customer_accounts + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("quote_customer_accounts")] + public System.Collections.Generic.IEnumerable quote_customer_accounts + { + get + { + return this.GetRelatedEntities("quote_customer_accounts", null); + } + set + { + this.OnPropertyChanging("quote_customer_accounts"); + this.SetRelatedEntities("quote_customer_accounts", null, value); + this.OnPropertyChanged("quote_customer_accounts"); + } + } + + /// + /// 1:N SourceAccount_BulkOperationLogs + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("SourceAccount_BulkOperationLogs")] + public System.Collections.Generic.IEnumerable SourceAccount_BulkOperationLogs + { + get + { + return this.GetRelatedEntities("SourceAccount_BulkOperationLogs", null); + } + set + { + this.OnPropertyChanging("SourceAccount_BulkOperationLogs"); + this.SetRelatedEntities("SourceAccount_BulkOperationLogs", null, value); + this.OnPropertyChanged("SourceAccount_BulkOperationLogs"); + } + } + + /// + /// 1:N userentityinstancedata_account + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("userentityinstancedata_account")] + public System.Collections.Generic.IEnumerable userentityinstancedata_account + { + get + { + return this.GetRelatedEntities("userentityinstancedata_account", null); + } + set + { + this.OnPropertyChanging("userentityinstancedata_account"); + this.SetRelatedEntities("userentityinstancedata_account", null, value); + this.OnPropertyChanged("userentityinstancedata_account"); + } + } + + /// + /// N:N accountleads_association + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("accountleads_association")] + public System.Collections.Generic.IEnumerable accountleads_association + { + get + { + return this.GetRelatedEntities("accountleads_association", null); + } + set + { + this.OnPropertyChanging("accountleads_association"); + this.SetRelatedEntities("accountleads_association", null, value); + this.OnPropertyChanged("accountleads_association"); + } + } + + /// + /// N:N listaccount_association + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("listaccount_association")] + public System.Collections.Generic.IEnumerable listaccount_association + { + get + { + return this.GetRelatedEntities("listaccount_association", null); + } + set + { + this.OnPropertyChanging("listaccount_association"); + this.SetRelatedEntities("listaccount_association", null, value); + this.OnPropertyChanged("listaccount_association"); + } + } + + /// + /// N:1 account_master_account + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("masterid")] + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("account_master_account", Microsoft.Xrm.Sdk.EntityRole.Referencing)] + public Account Referencingaccount_master_account + { + get + { + return this.GetRelatedEntity("account_master_account", Microsoft.Xrm.Sdk.EntityRole.Referencing); + } + } + + /// + /// N:1 account_originating_lead + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("originatingleadid")] + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("account_originating_lead")] + public Lead account_originating_lead + { + get + { + return this.GetRelatedEntity("account_originating_lead", null); + } + set + { + this.OnPropertyChanging("account_originating_lead"); + this.SetRelatedEntity("account_originating_lead", null, value); + this.OnPropertyChanged("account_originating_lead"); + } + } + + /// + /// N:1 account_parent_account + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("parentaccountid")] + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("account_parent_account", Microsoft.Xrm.Sdk.EntityRole.Referencing)] + public Account Referencingaccount_parent_account + { + get + { + return this.GetRelatedEntity("account_parent_account", Microsoft.Xrm.Sdk.EntityRole.Referencing); + } + set + { + this.OnPropertyChanging("Referencingaccount_parent_account"); + this.SetRelatedEntity("account_parent_account", Microsoft.Xrm.Sdk.EntityRole.Referencing, value); + this.OnPropertyChanged("Referencingaccount_parent_account"); + } + } + + /// + /// N:1 account_primary_contact + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("primarycontactid")] + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("account_primary_contact")] + public Contact account_primary_contact + { + get + { + return this.GetRelatedEntity("account_primary_contact", null); + } + set + { + this.OnPropertyChanging("account_primary_contact"); + this.SetRelatedEntity("account_primary_contact", null, value); + this.OnPropertyChanged("account_primary_contact"); + } + } + + /// + /// N:1 business_unit_accounts + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("owningbusinessunit")] + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("business_unit_accounts")] + public BusinessUnit business_unit_accounts + { + get + { + return this.GetRelatedEntity("business_unit_accounts", null); + } + } + + /// + /// N:1 equipment_accounts + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("preferredequipmentid")] + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("equipment_accounts")] + public Equipment equipment_accounts + { + get + { + return this.GetRelatedEntity("equipment_accounts", null); + } + set + { + this.OnPropertyChanging("equipment_accounts"); + this.SetRelatedEntity("equipment_accounts", null, value); + this.OnPropertyChanged("equipment_accounts"); + } + } + + /// + /// N:1 lk_accountbase_createdby + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("createdby")] + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("lk_accountbase_createdby")] + public SystemUser lk_accountbase_createdby + { + get + { + return this.GetRelatedEntity("lk_accountbase_createdby", null); + } + } + + /// + /// N:1 lk_accountbase_createdonbehalfby + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("createdonbehalfby")] + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("lk_accountbase_createdonbehalfby")] + public SystemUser lk_accountbase_createdonbehalfby + { + get + { + return this.GetRelatedEntity("lk_accountbase_createdonbehalfby", null); + } + } + + /// + /// N:1 lk_accountbase_modifiedby + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("modifiedby")] + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("lk_accountbase_modifiedby")] + public SystemUser lk_accountbase_modifiedby + { + get + { + return this.GetRelatedEntity("lk_accountbase_modifiedby", null); + } + } + + /// + /// N:1 lk_accountbase_modifiedonbehalfby + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("modifiedonbehalfby")] + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("lk_accountbase_modifiedonbehalfby")] + public SystemUser lk_accountbase_modifiedonbehalfby + { + get + { + return this.GetRelatedEntity("lk_accountbase_modifiedonbehalfby", null); + } + } + + /// + /// N:1 price_level_accounts + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("defaultpricelevelid")] + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("price_level_accounts")] + public PriceLevel price_level_accounts + { + get + { + return this.GetRelatedEntity("price_level_accounts", null); + } + set + { + this.OnPropertyChanging("price_level_accounts"); + this.SetRelatedEntity("price_level_accounts", null, value); + this.OnPropertyChanged("price_level_accounts"); + } + } + + /// + /// N:1 processstage_account + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("stageid")] + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("processstage_account")] + public ProcessStage processstage_account + { + get + { + return this.GetRelatedEntity("processstage_account", null); + } + set + { + this.OnPropertyChanging("processstage_account"); + this.SetRelatedEntity("processstage_account", null, value); + this.OnPropertyChanged("processstage_account"); + } + } + + /// + /// N:1 service_accounts + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("preferredserviceid")] + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("service_accounts")] + public Service service_accounts + { + get + { + return this.GetRelatedEntity("service_accounts", null); + } + set + { + this.OnPropertyChanging("service_accounts"); + this.SetRelatedEntity("service_accounts", null, value); + this.OnPropertyChanged("service_accounts"); + } + } + + /// + /// N:1 system_user_accounts + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("preferredsystemuserid")] + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("system_user_accounts")] + public SystemUser system_user_accounts + { + get + { + return this.GetRelatedEntity("system_user_accounts", null); + } + set + { + this.OnPropertyChanging("system_user_accounts"); + this.SetRelatedEntity("system_user_accounts", null, value); + this.OnPropertyChanged("system_user_accounts"); + } + } + + /// + /// N:1 team_accounts + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("owningteam")] + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("team_accounts")] + public Team team_accounts + { + get + { + return this.GetRelatedEntity("team_accounts", null); + } + } + + /// + /// N:1 territory_accounts + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("territoryid")] + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("territory_accounts")] + public Territory territory_accounts + { + get + { + return this.GetRelatedEntity("territory_accounts", null); + } + set + { + this.OnPropertyChanging("territory_accounts"); + this.SetRelatedEntity("territory_accounts", null, value); + this.OnPropertyChanged("territory_accounts"); + } + } + + /// + /// N:1 transactioncurrency_account + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("transactioncurrencyid")] + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("transactioncurrency_account")] + public TransactionCurrency transactioncurrency_account + { + get + { + return this.GetRelatedEntity("transactioncurrency_account", null); + } + set + { + this.OnPropertyChanging("transactioncurrency_account"); + this.SetRelatedEntity("transactioncurrency_account", null, value); + this.OnPropertyChanged("transactioncurrency_account"); + } + } + + /// + /// N:1 user_accounts + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("owninguser")] + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("user_accounts")] + public SystemUser user_accounts + { + get + { + return this.GetRelatedEntity("user_accounts", null); + } + } +} + +/// +/// +/// +[System.Runtime.Serialization.DataContractAttribute()] +[Microsoft.Xrm.Sdk.Client.EntityLogicalNameAttribute("accountleads")] +[System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "6.0.0001.0059")] +public partial class AccountLeads : Microsoft.Xrm.Sdk.Entity, System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged +{ + + /// + /// Default Constructor. + /// + public AccountLeads() : + base(EntityLogicalName) + { + } + + public const string EntityLogicalName = "accountleads"; + + public const int EntityTypeCode = 16; + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + public event System.ComponentModel.PropertyChangingEventHandler PropertyChanging; + + private void OnPropertyChanged(string propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + private void OnPropertyChanging(string propertyName) + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, new System.ComponentModel.PropertyChangingEventArgs(propertyName)); + } + } + + /// + /// + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("accountid")] + public System.Nullable AccountId + { + get + { + return this.GetAttributeValue>("accountid"); + } + } + + /// + /// Unique identifier of the lead for the account. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("accountleadid")] + public System.Nullable AccountLeadId + { + get + { + return this.GetAttributeValue>("accountleadid"); + } + set + { + this.OnPropertyChanging("AccountLeadId"); + this.SetAttributeValue("accountleadid", value); + if (value.HasValue) + { + base.Id = value.Value; + } + else + { + base.Id = System.Guid.Empty; + } + this.OnPropertyChanged("AccountLeadId"); + } + } + + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("accountleadid")] + public override System.Guid Id + { + get + { + return base.Id; + } + set + { + this.AccountLeadId = value; + } + } + + /// + /// + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("leadid")] + public System.Nullable LeadId + { + get + { + return this.GetAttributeValue>("leadid"); + } + } + + /// + /// + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("versionnumber")] + public System.Nullable VersionNumber + { + get + { + return this.GetAttributeValue>("versionnumber"); + } + } + + /// + /// N:N accountleads_association + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("accountleads_association")] + public System.Collections.Generic.IEnumerable accountleads_association + { + get + { + return this.GetRelatedEntities("accountleads_association", null); + } + set + { + this.OnPropertyChanging("accountleads_association"); + this.SetRelatedEntities("accountleads_association", null, value); + this.OnPropertyChanged("accountleads_association"); + } + } +} + +/// +/// MIME attachment for an email activity. +/// +[System.Runtime.Serialization.DataContractAttribute()] +[Microsoft.Xrm.Sdk.Client.EntityLogicalNameAttribute("activitymimeattachment")] +[System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "6.0.0001.0059")] +public partial class ActivityMimeAttachment : Microsoft.Xrm.Sdk.Entity, System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged +{ + + /// + /// Default Constructor. + /// + public ActivityMimeAttachment() : + base(EntityLogicalName) + { + } + + public const string EntityLogicalName = "activitymimeattachment"; + + public const int EntityTypeCode = 1001; + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + public event System.ComponentModel.PropertyChangingEventHandler PropertyChanging; + + private void OnPropertyChanged(string propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + private void OnPropertyChanging(string propertyName) + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, new System.ComponentModel.PropertyChangingEventArgs(propertyName)); + } + } + + /// + /// Unique identifier of the activity with which the email attachment is associated. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("activityid")] + [System.ObsoleteAttribute()] + public Microsoft.Xrm.Sdk.EntityReference ActivityId + { + get + { + return this.GetAttributeValue("activityid"); + } + set + { + this.OnPropertyChanging("ActivityId"); + this.SetAttributeValue("activityid", value); + this.OnPropertyChanged("ActivityId"); + } + } + + /// + /// Unique identifier of the email attachment. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("activitymimeattachmentid")] + public System.Nullable ActivityMimeAttachmentId + { + get + { + return this.GetAttributeValue>("activitymimeattachmentid"); + } + set + { + this.OnPropertyChanging("ActivityMimeAttachmentId"); + this.SetAttributeValue("activitymimeattachmentid", value); + if (value.HasValue) + { + base.Id = value.Value; + } + else + { + base.Id = System.Guid.Empty; + } + this.OnPropertyChanged("ActivityMimeAttachmentId"); + } + } + + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("activitymimeattachmentid")] + public override System.Guid Id + { + get + { + return base.Id; + } + set + { + this.ActivityMimeAttachmentId = value; + } + } + + /// + /// For internal use only. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("activitymimeattachmentidunique")] + public System.Nullable ActivityMimeAttachmentIdUnique + { + get + { + return this.GetAttributeValue>("activitymimeattachmentidunique"); + } + set + { + this.OnPropertyChanging("ActivityMimeAttachmentIdUnique"); + this.SetAttributeValue("activitymimeattachmentidunique", value); + this.OnPropertyChanged("ActivityMimeAttachmentIdUnique"); + } + } + + /// + /// Unique identifier of the attachment with which this activitymimeattachment is associated. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("attachmentid")] + public Microsoft.Xrm.Sdk.EntityReference AttachmentId + { + get + { + return this.GetAttributeValue("attachmentid"); + } + set + { + this.OnPropertyChanging("AttachmentId"); + this.SetAttributeValue("attachmentid", value); + this.OnPropertyChanged("AttachmentId"); + } + } + + /// + /// Number of the email attachment. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("attachmentnumber")] + public System.Nullable AttachmentNumber + { + get + { + return this.GetAttributeValue>("attachmentnumber"); + } + set + { + this.OnPropertyChanging("AttachmentNumber"); + this.SetAttributeValue("attachmentnumber", value); + this.OnPropertyChanged("AttachmentNumber"); + } + } + + /// + /// Contents of the email attachment. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("body")] + public string Body + { + get + { + return this.GetAttributeValue("body"); + } + set + { + this.OnPropertyChanging("Body"); + this.SetAttributeValue("body", value); + this.OnPropertyChanged("Body"); + } + } + + /// + /// For internal use only. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("componentstate")] + public Microsoft.Xrm.Sdk.OptionSetValue ComponentState + { + get + { + return this.GetAttributeValue("componentstate"); + } + } + + /// + /// File name of the attachment. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("filename")] + public string FileName + { + get + { + return this.GetAttributeValue("filename"); + } + set + { + this.OnPropertyChanging("FileName"); + this.SetAttributeValue("filename", value); + this.OnPropertyChanged("FileName"); + } + } + + /// + /// File size of the email attachment. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("filesize")] + public System.Nullable FileSize + { + get + { + return this.GetAttributeValue>("filesize"); + } + } + + /// + /// Indicates whether the solution component is part of a managed solution. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("ismanaged")] + public System.Nullable IsManaged + { + get + { + return this.GetAttributeValue>("ismanaged"); + } + } + + /// + /// MIME type of the email attachment. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("mimetype")] + public string MimeType + { + get + { + return this.GetAttributeValue("mimetype"); + } + set + { + this.OnPropertyChanging("MimeType"); + this.SetAttributeValue("mimetype", value); + this.OnPropertyChanged("MimeType"); + } + } + + /// + /// Unique identifier of the record with which the attachment is associated + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("objectid")] + public Microsoft.Xrm.Sdk.EntityReference ObjectId + { + get + { + return this.GetAttributeValue("objectid"); + } + set + { + this.OnPropertyChanging("ObjectId"); + this.SetAttributeValue("objectid", value); + this.OnPropertyChanged("ObjectId"); + } + } + + /// + /// Object Type Code of the entity that is associated with the attachment. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("objecttypecode")] + public string ObjectTypeCode + { + get + { + return this.GetAttributeValue("objecttypecode"); + } + set + { + this.OnPropertyChanging("ObjectTypeCode"); + this.SetAttributeValue("objecttypecode", value); + this.OnPropertyChanged("ObjectTypeCode"); + } + } + + /// + /// For internal use only. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("overwritetime")] + public System.Nullable OverwriteTime + { + get + { + return this.GetAttributeValue>("overwritetime"); + } + } + + /// + /// Unique identifier of the user or team who owns the activity_mime_attachment. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("ownerid")] + public Microsoft.Xrm.Sdk.EntityReference OwnerId + { + get + { + return this.GetAttributeValue("ownerid"); + } + } + + /// + /// Unique identifier of the business unit that owns the activity mime attachment. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("owningbusinessunit")] + public Microsoft.Xrm.Sdk.EntityReference OwningBusinessUnit + { + get + { + return this.GetAttributeValue("owningbusinessunit"); + } + } + + /// + /// Unique identifier of the user who owns the activity mime attachment. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("owninguser")] + public Microsoft.Xrm.Sdk.EntityReference OwningUser + { + get + { + return this.GetAttributeValue("owninguser"); + } + } + + /// + /// Unique identifier of the associated solution. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("solutionid")] + public System.Nullable SolutionId + { + get + { + return this.GetAttributeValue>("solutionid"); + } + } + + /// + /// Descriptive subject for the email attachment. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("subject")] + public string Subject + { + get + { + return this.GetAttributeValue("subject"); + } + set + { + this.OnPropertyChanging("Subject"); + this.SetAttributeValue("subject", value); + this.OnPropertyChanged("Subject"); + } + } + + /// + /// Version number of the activity mime attachment. + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("versionnumber")] + public System.Nullable VersionNumber + { + get + { + return this.GetAttributeValue>("versionnumber"); + } + } + + /// + /// 1:N ActivityMimeAttachment_AsyncOperations + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("ActivityMimeAttachment_AsyncOperations")] + public System.Collections.Generic.IEnumerable ActivityMimeAttachment_AsyncOperations + { + get + { + return this.GetRelatedEntities("ActivityMimeAttachment_AsyncOperations", null); + } + set + { + this.OnPropertyChanging("ActivityMimeAttachment_AsyncOperations"); + this.SetRelatedEntities("ActivityMimeAttachment_AsyncOperations", null, value); + this.OnPropertyChanged("ActivityMimeAttachment_AsyncOperations"); + } + } + + /// + /// 1:N ActivityMimeAttachment_BulkDeleteFailures + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("ActivityMimeAttachment_BulkDeleteFailures")] + public System.Collections.Generic.IEnumerable ActivityMimeAttachment_BulkDeleteFailures + { + get + { + return this.GetRelatedEntities("ActivityMimeAttachment_BulkDeleteFailures", null); + } + set + { + this.OnPropertyChanging("ActivityMimeAttachment_BulkDeleteFailures"); + this.SetRelatedEntities("ActivityMimeAttachment_BulkDeleteFailures", null, value); + this.OnPropertyChanged("ActivityMimeAttachment_BulkDeleteFailures"); + } + } + + /// + /// 1:N userentityinstancedata_activitymimeattachment + /// + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("userentityinstancedata_activitymimeattachment")] + public System.Collections.Generic.IEnumerable userentityinstancedata_activitymimeattachment + { + get + { + return this.GetRelatedEntities("userentityinstancedata_activitymimeattachment", null); + } + set + { + this.OnPropertyChanging("userentityinstancedata_activitymimeattachment"); + this.SetRelatedEntities("userentityinstancedata_activitymimeattachment", null, value); + this.OnPropertyChanged("userentityinstancedata_activitymimeattachment"); + } + } + + /// + /// N:1 activity_pointer_activity_mime_attachment + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("objectid")] + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("activity_pointer_activity_mime_attachment")] + public ActivityPointer activity_pointer_activity_mime_attachment + { + get + { + return this.GetRelatedEntity("activity_pointer_activity_mime_attachment", null); + } + set + { + this.OnPropertyChanging("activity_pointer_activity_mime_attachment"); + this.SetRelatedEntity("activity_pointer_activity_mime_attachment", null, value); + this.OnPropertyChanged("activity_pointer_activity_mime_attachment"); + } + } + + /// + /// N:1 email_activity_mime_attachment + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("objectid")] + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("email_activity_mime_attachment")] + public Email email_activity_mime_attachment + { + get + { + return this.GetRelatedEntity("email_activity_mime_attachment", null); + } + set + { + this.OnPropertyChanging("email_activity_mime_attachment"); + this.SetRelatedEntity("email_activity_mime_attachment", null, value); + this.OnPropertyChanged("email_activity_mime_attachment"); + } + } + + /// + /// N:1 template_activity_mime_attachments + /// + [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("objectid")] + [Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("template_activity_mime_attachments")] + public Template template_activity_mime_attachments + { + get + { + return this.GetRelatedEntity