Merge
This commit is contained in:
commit
a515c9a68c
116 changed files with 198344 additions and 6475 deletions
|
@ -3204,4 +3204,64 @@ VALUES
|
|||
SET @FolderID = SCOPE_IDENTITY()
|
||||
|
||||
RETURN
|
||||
GO
|
||||
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
|
||||
|
||||
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -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;
|
||||
|
||||
}
|
||||
}
|
|
@ -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
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -117,6 +117,7 @@
|
|||
<Compile Include="Ecommerce\TriggerSystem\ITriggerHandler.cs" />
|
||||
<Compile Include="ExchangeServer\ExchangeEmailAddress.cs" />
|
||||
<Compile Include="HostedSolution\AdditionalGroup.cs" />
|
||||
<Compile Include="HostedSolution\CRMLycenseTypes.cs" />
|
||||
<Compile Include="HostedSolution\ESPermission.cs" />
|
||||
<Compile Include="Log\LogRecord.cs" />
|
||||
<Compile Include="Packages\HostingPlanContext.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.
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 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.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
//
|
||||
// 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;
|
||||
|
||||
/// <remarks/>
|
||||
public esCRM() {
|
||||
this.Url = "http://localhost:9002/esCRM.asmx";
|
||||
|
@ -106,9 +102,15 @@ namespace WebsitePanel.EnterpriseServer {
|
|||
/// <remarks/>
|
||||
public event GetCollationCompletedEventHandler GetCollationCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event GetCollationByServiceIdCompletedEventHandler GetCollationByServiceIdCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event GetCurrencyCompletedEventHandler GetCurrencyCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event GetCurrencyByServiceIdCompletedEventHandler GetCurrencyByServiceIdCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event DeleteCRMOrganizationCompletedEventHandler DeleteCRMOrganizationCompleted;
|
||||
|
||||
|
@ -148,9 +150,15 @@ namespace WebsitePanel.EnterpriseServer {
|
|||
/// <remarks/>
|
||||
public event GetMaxDBSizeCompletedEventHandler GetMaxDBSizeCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event GetInstalledLanguagePacksCompletedEventHandler GetInstalledLanguagePacksCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event GetInstalledLanguagePacksByServiceIdCompletedEventHandler GetInstalledLanguagePacksByServiceIdCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
[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]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
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);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
|
@ -181,12 +191,12 @@ namespace WebsitePanel.EnterpriseServer {
|
|||
}
|
||||
|
||||
/// <remarks/>
|
||||
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);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
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 {
|
|||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[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]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginGetCollationByServiceId(int serviceId, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("GetCollationByServiceId", new object[] {
|
||||
serviceId}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public StringArrayResultObject EndGetCollationByServiceId(System.IAsyncResult asyncResult) {
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((StringArrayResultObject)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void GetCollationByServiceIdAsync(int serviceId) {
|
||||
this.GetCollationByServiceIdAsync(serviceId, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[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 {
|
|||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[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]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginGetCurrencyByServiceId(int serviceId, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("GetCurrencyByServiceId", new object[] {
|
||||
serviceId}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public CurrencyArrayResultObject EndGetCurrencyByServiceId(System.IAsyncResult asyncResult) {
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((CurrencyArrayResultObject)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void GetCurrencyByServiceIdAsync(int serviceId) {
|
||||
this.GetCurrencyByServiceIdAsync(serviceId, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[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 {
|
|||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[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]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginGetInstalledLanguagePacks(int packageId, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("GetInstalledLanguagePacks", new object[] {
|
||||
packageId}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public int[] EndGetInstalledLanguagePacks(System.IAsyncResult asyncResult) {
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((int[])(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void GetInstalledLanguagePacksAsync(int packageId) {
|
||||
this.GetInstalledLanguagePacksAsync(packageId, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[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]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginGetInstalledLanguagePacksByServiceId(int serviceId, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("GetInstalledLanguagePacksByServiceId", new object[] {
|
||||
serviceId}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public int[] EndGetInstalledLanguagePacksByServiceId(System.IAsyncResult asyncResult) {
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((int[])(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void GetInstalledLanguagePacksByServiceIdAsync(int serviceId) {
|
||||
this.GetInstalledLanguagePacksByServiceIdAsync(serviceId, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public new void CancelAsync(object userState) {
|
||||
base.CancelAsync(userState);
|
||||
|
@ -967,6 +1143,32 @@ namespace WebsitePanel.EnterpriseServer {
|
|||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void GetCollationByServiceIdCompletedEventHandler(object sender, GetCollationByServiceIdCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[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;
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public StringArrayResultObject Result {
|
||||
get {
|
||||
this.RaiseExceptionIfNecessary();
|
||||
return ((StringArrayResultObject)(this.results[0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void GetCurrencyCompletedEventHandler(object sender, GetCurrencyCompletedEventArgs e);
|
||||
|
@ -993,6 +1195,32 @@ namespace WebsitePanel.EnterpriseServer {
|
|||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void GetCurrencyByServiceIdCompletedEventHandler(object sender, GetCurrencyByServiceIdCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[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;
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public CurrencyArrayResultObject Result {
|
||||
get {
|
||||
this.RaiseExceptionIfNecessary();
|
||||
return ((CurrencyArrayResultObject)(this.results[0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void DeleteCRMOrganizationCompletedEventHandler(object sender, DeleteCRMOrganizationCompletedEventArgs e);
|
||||
|
@ -1330,4 +1558,56 @@ namespace WebsitePanel.EnterpriseServer {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void GetInstalledLanguagePacksCompletedEventHandler(object sender, GetInstalledLanguagePacksCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[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;
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public int[] Result {
|
||||
get {
|
||||
this.RaiseExceptionIfNecessary();
|
||||
return ((int[])(this.results[0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void GetInstalledLanguagePacksByServiceIdCompletedEventHandler(object sender, GetInstalledLanguagePacksByServiceIdCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[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;
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public int[] Result {
|
||||
get {
|
||||
this.RaiseExceptionIfNecessary();
|
||||
return ((int[])(this.results[0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -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
|
||||
|
|
|
@ -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<ExchangeMailboxPlan> GetExchangeMailboxPlans(int itemId)
|
||||
public static List<ExchangeMailboxPlan> 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<UserInfo>(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<ExchangeOrganization>(DataProvider.GetExchangeOrganization(itemId));
|
||||
|
@ -2753,7 +2754,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
}
|
||||
}
|
||||
|
||||
private static void GetExchangeMailboxPlansByUser(int itemId, UserInfo user, ref List<ExchangeMailboxPlan> mailboxPlans)
|
||||
private static void GetExchangeMailboxPlansByUser(int itemId, UserInfo user, ref List<ExchangeMailboxPlan> mailboxPlans, bool archiving)
|
||||
{
|
||||
if ((user != null))
|
||||
{
|
||||
|
@ -2780,7 +2781,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
|
||||
if (OrgId != -1)
|
||||
{
|
||||
List<ExchangeMailboxPlan> Plans = ObjectUtils.CreateListFromDataReader<ExchangeMailboxPlan>(DataProvider.GetExchangeMailboxPlans(OrgId));
|
||||
List<ExchangeMailboxPlan> Plans = ObjectUtils.CreateListFromDataReader<ExchangeMailboxPlan>(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<ExchangeRetentionPolicyTag> GetExchangeRetentionPolicyTags(int itemId)
|
||||
{
|
||||
// place log record
|
||||
TaskManager.StartTask("EXCHANGE", "GET_EXCHANGE_RETENTIONPOLICYTAGS", itemId);
|
||||
|
||||
try
|
||||
{
|
||||
List<ExchangeRetentionPolicyTag> retentionPolicyTags = new List<ExchangeRetentionPolicyTag>();
|
||||
|
||||
UserInfo user = ObjectUtils.FillObjectFromDataReader<UserInfo>(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<ExchangeRetentionPolicyTag> retentionPolicyTags)
|
||||
{
|
||||
if ((user != null))
|
||||
{
|
||||
List<Organization> orgs = null;
|
||||
|
||||
if (user.UserId != 1)
|
||||
{
|
||||
List<PackageInfo> 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<ExchangeRetentionPolicyTag> RetentionPolicy = ObjectUtils.CreateListFromDataReader<ExchangeRetentionPolicyTag>(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<ExchangeRetentionPolicyTag>(
|
||||
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<ExchangeMailboxPlanRetentionPolicyTag> GetExchangeMailboxPlanRetentionPolicyTags(int policyId)
|
||||
{
|
||||
// place log record
|
||||
TaskManager.StartTask("EXCHANGE", "GET_EXCHANGE_RETENTIONPOLICYTAGS", policyId);
|
||||
|
||||
try
|
||||
{
|
||||
List<ExchangeMailboxPlanRetentionPolicyTag> tags =
|
||||
ObjectUtils.CreateListFromDataReader<ExchangeMailboxPlanRetentionPolicyTag>(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)
|
||||
|
|
|
@ -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<OrganizationResult>("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<StringArrayResultObject>("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<StringArrayResultObject>("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<CurrencyArrayResultObject>("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<CurrencyArrayResultObject>("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<CRMBusinessUnitsResult>("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<CrmRolesResult>("CRM", "SET_CRM_MAXDBSIZE");
|
||||
ResultObject res = StartTask<ResultObject>("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<CrmRolesResult>("CRM", "GET_CRM_DBSIZE");
|
||||
ResultObject res = StartTask<ResultObject>("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<CrmRolesResult>("CRM", "GET_CRM_MAXDBSIZE");
|
||||
ResultObject res = StartTask<ResultObject>("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<ResultObject>("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<ResultObject>("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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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<ExchangeMailboxPlan> GetExchangeMailboxPlans(int itemId)
|
||||
public List<ExchangeMailboxPlan> 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<ExchangeRetentionPolicyTag> 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<ExchangeMailboxPlanRetentionPolicyTag> 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]
|
||||
|
|
|
@ -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";
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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; }
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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; }
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
|
@ -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; }
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -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
|
||||
}
|
||||
}
|
|
@ -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
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -93,10 +93,14 @@
|
|||
<Compile Include="HostedSolution\BlackBerryStatsItem.cs" />
|
||||
<Compile Include="HostedSolution\BlackBerryUserDeleteState.cs" />
|
||||
<Compile Include="HostedSolution\ExchangeDisclaimer.cs" />
|
||||
<Compile Include="HostedSolution\ExchangeMailboxPlanRetentionPolicyTag.cs" />
|
||||
<Compile Include="HostedSolution\ExchangeOrganization.cs" />
|
||||
<Compile Include="HostedSolution\ExchangeAcceptedDomainType.cs" />
|
||||
<Compile Include="HostedSolution\ExchangeMailboxPlanType.cs" />
|
||||
<Compile Include="HostedSolution\ExchangeMailboxPlan.cs" />
|
||||
<Compile Include="HostedSolution\ExchangeRetentionPolicyTag.cs" />
|
||||
<Compile Include="HostedSolution\ExchangeRetentionPolicyTagAction.cs" />
|
||||
<Compile Include="HostedSolution\ExchangeRetentionPolicyTagType.cs" />
|
||||
<Compile Include="HostedSolution\ILyncServer.cs" />
|
||||
<Compile Include="HostedSolution\LyncConstants.cs" />
|
||||
<Compile Include="HostedSolution\LyncErrorCodes.cs" />
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -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<T>(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());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
|
@ -31,40 +31,44 @@
|
|||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="microsoft.crm.sdk.proxy">
|
||||
<HintPath>..\..\Lib\References\Microsoft\microsoft.crm.sdk.proxy.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Reference Include="microsoft.crm.sdk.proxy, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\Lib\References\Microsoft\CRM2011\microsoft.crm.sdk.proxy.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="microsoft.xrm.client">
|
||||
<HintPath>..\..\Lib\References\Microsoft\microsoft.xrm.client.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Reference Include="microsoft.xrm.client, Version=5.0.9689.1985, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\Lib\References\Microsoft\CRM2011\microsoft.xrm.client.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="microsoft.xrm.client.codegeneration">
|
||||
<HintPath>..\..\Lib\References\Microsoft\microsoft.xrm.client.codegeneration.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Reference Include="microsoft.xrm.client.codegeneration, Version=5.0.9689.1985, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\Lib\References\Microsoft\CRM2011\microsoft.xrm.client.codegeneration.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="microsoft.xrm.portal">
|
||||
<HintPath>..\..\Lib\References\Microsoft\microsoft.xrm.portal.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Reference Include="microsoft.xrm.portal, Version=5.0.9689.1985, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\Lib\References\Microsoft\CRM2011\microsoft.xrm.portal.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="microsoft.xrm.portal.files">
|
||||
<HintPath>..\..\Lib\References\Microsoft\microsoft.xrm.portal.files.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Reference Include="microsoft.xrm.portal.files, Version=5.0.9689.1985, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\Lib\References\Microsoft\CRM2011\microsoft.xrm.portal.files.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="microsoft.xrm.sdk">
|
||||
<HintPath>..\..\Lib\References\Microsoft\microsoft.xrm.sdk.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Reference Include="microsoft.xrm.sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\Lib\References\Microsoft\CRM2011\microsoft.xrm.sdk.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="microsoft.xrm.sdk.deployment">
|
||||
<HintPath>..\..\Lib\References\Microsoft\microsoft.xrm.sdk.deployment.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Reference Include="microsoft.xrm.sdk.deployment, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\Lib\References\Microsoft\CRM2011\microsoft.xrm.sdk.deployment.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="microsoft.xrm.sdk.workflow">
|
||||
<HintPath>..\..\Lib\References\Microsoft\microsoft.xrm.sdk.workflow.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Reference Include="microsoft.xrm.sdk.workflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\Lib\References\Microsoft\CRM2011\microsoft.xrm.sdk.workflow.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\Lib\System.Management.Automation.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.ServiceModel" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
|
@ -74,7 +78,9 @@
|
|||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="CRMBase.cs" />
|
||||
<Compile Include="CRMProvider2011.cs" />
|
||||
<Compile Include="HostedSolutionLog.cs" />
|
||||
<Compile Include="myorganizationcrmsdktypes.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
|
@ -84,11 +90,6 @@
|
|||
<Name>WebsitePanel.Providers.Base</Name>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\WebsitePanel.Providers.HostedSolution\WebsitePanel.Providers.HostedSolution.csproj">
|
||||
<Project>{A06DE5E4-4331-47E1-8F46-7B846146B559}</Project>
|
||||
<Name>WebsitePanel.Providers.HostedSolution</Name>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\WebsitePanel.Server.Utils\WebsitePanel.Server.Utils.csproj">
|
||||
<Project>{E91E52F3-9555-4D00-B577-2B1DBDD87CA7}</Project>
|
||||
<Name>WebsitePanel.Server.Utils</Name>
|
||||
|
|
|
@ -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,
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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,
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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,
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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,
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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,
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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,
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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,
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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,
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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,
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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,
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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,
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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,
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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,
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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,
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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,
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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,
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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,
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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,
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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,
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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,
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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,
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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,
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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,
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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,
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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,
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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,
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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,
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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,
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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,
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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,
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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,
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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,
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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,
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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,
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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,
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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,
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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,
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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,
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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,
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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,
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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,
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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,
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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,
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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,
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Person with access to the Microsoft CRM system and who owns objects in the Microsoft CRM database.
|
||||
/// </summary>
|
||||
|
@ -146928,7 +146928,6 @@ public partial class SystemUser : Microsoft.Xrm.Sdk.Entity, System.ComponentMode
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
@ -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,
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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,
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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,
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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,
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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,
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -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.");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -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<T>(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());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,36 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("WebsitePanel.Providers.HostedSolution.Crm2013")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("WebsitePanel.Providers.HostedSolution.Crm2013")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2013")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("111E4961-46B0-4323-9EEB-8FE1DD1D48F6")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
@ -0,0 +1,100 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{1EF935C9-6DB9-47A1-B261-CB56512DF980}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>WebsitePanel.Providers.HostedSolution.Crm2013</RootNamespace>
|
||||
<AssemblyName>WebsitePanel.Providers.HostedSolution.Crm2013</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\WebsitePanel.Server\bin\Crm2013\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\WebsitePanel.Server\bin\Crm2013\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.Crm.Sdk.Proxy">
|
||||
<HintPath>..\..\Lib\References\Microsoft\CRM2013\Microsoft.Crm.Sdk.Proxy.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Xrm.Client">
|
||||
<HintPath>..\..\Lib\References\Microsoft\CRM2013\Microsoft.Xrm.Client.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Xrm.Client.CodeGeneration">
|
||||
<HintPath>..\..\Lib\References\Microsoft\CRM2013\Microsoft.Xrm.Client.CodeGeneration.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Xrm.Portal">
|
||||
<HintPath>..\..\Lib\References\Microsoft\CRM2013\Microsoft.Xrm.Portal.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Xrm.Portal.Files">
|
||||
<HintPath>..\..\Lib\References\Microsoft\CRM2013\Microsoft.Xrm.Portal.Files.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Xrm.Sdk">
|
||||
<HintPath>..\..\Lib\References\Microsoft\CRM2013\Microsoft.Xrm.Sdk.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Xrm.Sdk.Deployment">
|
||||
<HintPath>..\..\Lib\References\Microsoft\CRM2013\Microsoft.Xrm.Sdk.Deployment.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Xrm.Sdk.Workflow">
|
||||
<HintPath>..\..\Lib\References\Microsoft\CRM2013\Microsoft.Xrm.Sdk.Workflow.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\Lib\System.Management.Automation.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.ServiceModel" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="CRMBase.cs" />
|
||||
<Compile Include="CRMProvider2013.cs" />
|
||||
<Compile Include="HostedSolutionLog.cs" />
|
||||
<Compile Include="MyOrganizationCrmSdkTypes.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\WebsitePanel.Providers.Base\WebsitePanel.Providers.Base.csproj">
|
||||
<Project>{684C932A-6C75-46AC-A327-F3689D89EB42}</Project>
|
||||
<Name>WebsitePanel.Providers.Base</Name>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\WebsitePanel.Server.Utils\WebsitePanel.Server.Utils.csproj">
|
||||
<Project>{E91E52F3-9555-4D00-B577-2B1DBDD87CA7}</Project>
|
||||
<Name>WebsitePanel.Server.Utils</Name>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
|
@ -328,7 +328,7 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
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)
|
||||
public 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, baseCurrencyCode, baseCurrencyName, baseCurrencySymbol, initialUserDomainName, initialUserFirstName, initialUserLastName, initialUserPrimaryEmail, organizationCollation);
|
||||
}
|
||||
|
@ -1573,6 +1573,11 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
ret.IsSuccess = false;
|
||||
return ret;
|
||||
}
|
||||
|
||||
public int[] GetInstalledLanguagePacks()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -68,6 +68,8 @@ namespace WebsitePanel.Providers.CRM {
|
|||
|
||||
private System.Threading.SendOrPostCallback GetCurrencyListOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback GetInstalledLanguagePacksOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback DeleteOrganizationOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback CreateCRMUserOperationCompleted;
|
||||
|
@ -96,7 +98,7 @@ namespace WebsitePanel.Providers.CRM {
|
|||
|
||||
/// <remarks/>
|
||||
public CRM() {
|
||||
this.Url = "http://localhost:9004/CRM.asmx";
|
||||
this.Url = "http://localhost:9003/CRM.asmx";
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
|
@ -108,6 +110,9 @@ namespace WebsitePanel.Providers.CRM {
|
|||
/// <remarks/>
|
||||
public event GetCurrencyListCompletedEventHandler GetCurrencyListCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event GetInstalledLanguagePacksCompletedEventHandler GetInstalledLanguagePacksCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event DeleteOrganizationCompletedEventHandler DeleteOrganizationCompleted;
|
||||
|
||||
|
@ -150,11 +155,12 @@ namespace WebsitePanel.Providers.CRM {
|
|||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CreateOrganization", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public OrganizationResult CreateOrganization(System.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) {
|
||||
public OrganizationResult CreateOrganization(System.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) {
|
||||
object[] results = this.Invoke("CreateOrganization", new object[] {
|
||||
organizationId,
|
||||
organizationUniqueName,
|
||||
organizationFriendlyName,
|
||||
baseLanguageCode,
|
||||
ou,
|
||||
baseCurrencyCode,
|
||||
baseCurrencyName,
|
||||
|
@ -169,11 +175,28 @@ namespace WebsitePanel.Providers.CRM {
|
|||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginCreateOrganization(System.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, System.AsyncCallback callback, object asyncState) {
|
||||
public System.IAsyncResult BeginCreateOrganization(
|
||||
System.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,
|
||||
System.AsyncCallback callback,
|
||||
object asyncState) {
|
||||
return this.BeginInvoke("CreateOrganization", new object[] {
|
||||
organizationId,
|
||||
organizationUniqueName,
|
||||
organizationFriendlyName,
|
||||
baseLanguageCode,
|
||||
ou,
|
||||
baseCurrencyCode,
|
||||
baseCurrencyName,
|
||||
|
@ -193,12 +216,12 @@ namespace WebsitePanel.Providers.CRM {
|
|||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void CreateOrganizationAsync(System.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) {
|
||||
this.CreateOrganizationAsync(organizationId, organizationUniqueName, organizationFriendlyName, ou, baseCurrencyCode, baseCurrencyName, baseCurrencySymbol, initialUserDomainName, initialUserFirstName, initialUserLastName, initialUserPrimaryEmail, organizationCollation, maxSize, null);
|
||||
public void CreateOrganizationAsync(System.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) {
|
||||
this.CreateOrganizationAsync(organizationId, organizationUniqueName, organizationFriendlyName, baseLanguageCode, ou, baseCurrencyCode, baseCurrencyName, baseCurrencySymbol, initialUserDomainName, initialUserFirstName, initialUserLastName, initialUserPrimaryEmail, organizationCollation, maxSize, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void CreateOrganizationAsync(System.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, object userState) {
|
||||
public void CreateOrganizationAsync(System.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, object userState) {
|
||||
if ((this.CreateOrganizationOperationCompleted == null)) {
|
||||
this.CreateOrganizationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateOrganizationOperationCompleted);
|
||||
}
|
||||
|
@ -206,6 +229,7 @@ namespace WebsitePanel.Providers.CRM {
|
|||
organizationId,
|
||||
organizationUniqueName,
|
||||
organizationFriendlyName,
|
||||
baseLanguageCode,
|
||||
ou,
|
||||
baseCurrencyCode,
|
||||
baseCurrencyName,
|
||||
|
@ -303,6 +327,45 @@ namespace WebsitePanel.Providers.CRM {
|
|||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetInstalledLanguagePacks", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public int[] GetInstalledLanguagePacks() {
|
||||
object[] results = this.Invoke("GetInstalledLanguagePacks", new object[0]);
|
||||
return ((int[])(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginGetInstalledLanguagePacks(System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("GetInstalledLanguagePacks", new object[0], callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public int[] EndGetInstalledLanguagePacks(System.IAsyncResult asyncResult) {
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((int[])(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void GetInstalledLanguagePacksAsync() {
|
||||
this.GetInstalledLanguagePacksAsync(null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void GetInstalledLanguagePacksAsync(object userState) {
|
||||
if ((this.GetInstalledLanguagePacksOperationCompleted == null)) {
|
||||
this.GetInstalledLanguagePacksOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetInstalledLanguagePacksOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("GetInstalledLanguagePacks", new object[0], 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));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/DeleteOrganization", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
|
@ -981,6 +1044,32 @@ namespace WebsitePanel.Providers.CRM {
|
|||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void GetInstalledLanguagePacksCompletedEventHandler(object sender, GetInstalledLanguagePacksCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[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;
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public int[] Result {
|
||||
get {
|
||||
this.RaiseExceptionIfNecessary();
|
||||
return ((int[])(this.results[0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void DeleteOrganizationCompletedEventHandler(object sender, DeleteOrganizationCompletedEventArgs e);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2012
|
||||
# Visual Studio 2010
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Caching Application Block", "Caching Application Block", "{C8E6F2E4-A5B8-486A-A56E-92D864524682}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
Bin\Microsoft.Practices.EnterpriseLibrary.Common.dll = Bin\Microsoft.Practices.EnterpriseLibrary.Common.dll
|
||||
|
@ -148,6 +148,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Providers.DNS.
|
|||
{E91E52F3-9555-4D00-B577-2B1DBDD87CA7} = {E91E52F3-9555-4D00-B577-2B1DBDD87CA7}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Providers.HostedSolution.Crm2013", "WebsitePanel.Providers.HostedSolution.Crm2013\WebsitePanel.Providers.HostedSolution.Crm2013.csproj", "{1EF935C9-6DB9-47A1-B261-CB56512DF980}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
@ -748,6 +750,16 @@ Global
|
|||
{FA0FB0BA-5A39-4F4E-8EC2-B806B58B74D4}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{FA0FB0BA-5A39-4F4E-8EC2-B806B58B74D4}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{FA0FB0BA-5A39-4F4E-8EC2-B806B58B74D4}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{1EF935C9-6DB9-47A1-B261-CB56512DF980}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{1EF935C9-6DB9-47A1-B261-CB56512DF980}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1EF935C9-6DB9-47A1-B261-CB56512DF980}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{1EF935C9-6DB9-47A1-B261-CB56512DF980}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{1EF935C9-6DB9-47A1-B261-CB56512DF980}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{1EF935C9-6DB9-47A1-B261-CB56512DF980}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1EF935C9-6DB9-47A1-B261-CB56512DF980}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{1EF935C9-6DB9-47A1-B261-CB56512DF980}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{1EF935C9-6DB9-47A1-B261-CB56512DF980}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{1EF935C9-6DB9-47A1-B261-CB56512DF980}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
|
@ -55,9 +55,9 @@ namespace WebsitePanel.Server
|
|||
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
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)
|
||||
public 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 CrmProvider.CreateOrganization(organizationId, organizationUniqueName, organizationFriendlyName, ou, baseCurrencyCode, baseCurrencyName, baseCurrencySymbol, initialUserDomainName, initialUserFirstName, initialUserLastName, initialUserPrimaryEmail, organizationCollation, maxSize);
|
||||
return CrmProvider.CreateOrganization(organizationId, organizationUniqueName, organizationFriendlyName, baseLanguageCode, ou, baseCurrencyCode, baseCurrencyName, baseCurrencySymbol, initialUserDomainName, initialUserFirstName, initialUserLastName, initialUserPrimaryEmail, organizationCollation, maxSize);
|
||||
}
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
|
@ -71,6 +71,13 @@ namespace WebsitePanel.Server
|
|||
{
|
||||
return CrmProvider.GetCurrencyList();
|
||||
}
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public int[] GetInstalledLanguagePacks()
|
||||
{
|
||||
return CrmProvider.GetInstalledLanguagePacks();
|
||||
}
|
||||
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public ResultObject DeleteOrganization(Guid orgId)
|
||||
|
|
|
@ -168,7 +168,7 @@
|
|||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<probing privatePath="bin/Crm2011;bin/Exchange2013;bin/Sharepoint2013;bin/Lync2013;bin/Lync2013HP;bin/Dns2012" />
|
||||
<probing privatePath="bin/Crm2011;bin/Crm2013;bin/Exchange2013;bin/Sharepoint2013;bin/Lync2013;bin/Lync2013HP;bin/Dns2012" />
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
|
@ -469,7 +469,8 @@
|
|||
<Control key="organization_home" src="WebsitePanel/ExchangeServer/OrganizationHome.ascx" title="OrganizationHome" type="View" />
|
||||
<Control key="organization_user_setup" src="WebsitePanel/ExchangeServer/OrganizationUserSetupInstructions.ascx" title="OrganizationUserSetupInstructions" type="View" />
|
||||
<Control key="mailboxes" src="WebsitePanel/ExchangeServer/ExchangeMailboxes.ascx" title="ExchangeMailboxes" type="View" />
|
||||
<Control key="create_mailbox" src="WebsitePanel/ExchangeServer/ExchangeCreateMailbox.ascx" title="ExchangeCreateMailbox" type="View" />
|
||||
<Control key="archivingmailboxes" src="WebsitePanel/ExchangeServer/ExchangeMailboxes.ascx" title="ExchangeArchivingMailboxes" type="View" />
|
||||
<Control key="create_mailbox" src="WebsitePanel/ExchangeServer/ExchangeCreateMailbox.ascx" title="ExchangeCreateMailbox" type="View" />
|
||||
<Control key="mailbox_settings" src="WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx" title="ExchangeMailboxGeneralSettings" type="View" />
|
||||
<Control key="mailbox_mobile" src="WebsitePanel/ExchangeServer/ExchangeMailboxMobile.ascx" title="ExchangeMailboxMobile" type="View" />
|
||||
<Control key="mailbox_mobile_details" src="WebsitePanel/ExchangeServer/ExchangeMailboxMobileDetails.ascx" title="ExchangeMailboxMobile" type="View" />
|
||||
|
@ -512,6 +513,8 @@
|
|||
<Control key="storage_limits" src="WebsitePanel/ExchangeServer/ExchangeStorageLimits.ascx" title="ExchangeStorageLimits" type="View" />
|
||||
<Control key="activesync_policy" src="WebsitePanel/ExchangeServer/ExchangeActiveSyncSettings.ascx" title="ExchangeActiveSyncSettings" type="View" />
|
||||
<Control key="mailboxplans" src="WebsitePanel/ExchangeServer/ExchangeMailboxPlans.ascx" title="ExchangeMailboxPlans" type="View" />
|
||||
<Control key="retentionpolicy" src="WebsitePanel/ExchangeServer/ExchangeMailboxPlans.ascx" title="ExchangeRetentionPolicy" type="View" />
|
||||
<Control key="retentionpolicytag" src="WebsitePanel/ExchangeServer/ExchangeRetentionPolicyTag.ascx" title="ExchangeRetentionPolicyTag" type="View" />
|
||||
<Control key="add_mailboxplan" src="WebsitePanel/ExchangeServer/ExchangeAddMailboxPlan.ascx" title="ExchangeAddMailboxPlan" type="View" />
|
||||
|
||||
<Control key="CRMOrganizationDetails" src="WebsitePanel/CRM/CRMOrganizationDetails.ascx" title="ExchangeActiveSyncSettings" type="View" />
|
||||
|
|
|
@ -5386,4 +5386,55 @@
|
|||
<data name="Quota.HostedCRM.ESSUsers" xml:space="preserve">
|
||||
<value>ESS licenses per organization</value>
|
||||
</data>
|
||||
<data name="ResourceGroup.Hosted CRM2013" xml:space="preserve">
|
||||
<value>Hosted CRM 2013</value>
|
||||
</data>
|
||||
<data name="HostedCRM.USER_QUOTA_HAS_BEEN_REACHED2013_0" xml:space="preserve">
|
||||
<value>CRM users quota (Professional license) has been reached.</value>
|
||||
</data>
|
||||
<data name="HostedCRM.USER_QUOTA_HAS_BEEN_REACHED2013_2" xml:space="preserve">
|
||||
<value>CRM users quota (Basic license) has been reached.</value>
|
||||
</data>
|
||||
<data name="HostedCRM.USER_QUOTA_HAS_BEEN_REACHED2013_5" xml:space="preserve">
|
||||
<value>CRM users quota (Essential license) has been reached.</value>
|
||||
</data>
|
||||
<data name="Quota.HostedCRM2013.BasicUsers" xml:space="preserve">
|
||||
<value>Basic licenses per organization</value>
|
||||
</data>
|
||||
<data name="Quota.HostedCRM2013.EssentialUsers" xml:space="preserve">
|
||||
<value>Essential licenses per organization</value>
|
||||
</data>
|
||||
<data name="Quota.HostedCRM2013.MaxDatabaseSize" xml:space="preserve">
|
||||
<value>Max Database Size, MB</value>
|
||||
</data>
|
||||
<data name="Quota.HostedCRM2013.Organization" xml:space="preserve">
|
||||
<value>CRM Organization</value>
|
||||
</data>
|
||||
<data name="Quota.HostedCRM2013.ProfessionalUsers" xml:space="preserve">
|
||||
<value>Professional licenses per organization</value>
|
||||
</data>
|
||||
<data name="HostedCRM.LicenseBasic" xml:space="preserve">
|
||||
<value>Basic</value>
|
||||
</data>
|
||||
<data name="HostedCRM.LicenseESS" xml:space="preserve">
|
||||
<value>ESS</value>
|
||||
</data>
|
||||
<data name="HostedCRM.LicenseEssential" xml:space="preserve">
|
||||
<value>Essential</value>
|
||||
</data>
|
||||
<data name="HostedCRM.LicenseFull" xml:space="preserve">
|
||||
<value>Full</value>
|
||||
</data>
|
||||
<data name="HostedCRM.LicenseLimited" xml:space="preserve">
|
||||
<value>Limited</value>
|
||||
</data>
|
||||
<data name="HostedCRM.LicenseProfessional" xml:space="preserve">
|
||||
<value>Professional</value>
|
||||
</data>
|
||||
<data name="Quota.Exchange2013.AllowArchiving" xml:space="preserve">
|
||||
<value>Allow Archiving</value>
|
||||
</data>
|
||||
<data name="Quota.Exchange2013.ArchivingStorage" xml:space="preserve">
|
||||
<value>Archiving storage, MB</value>
|
||||
</data>
|
||||
</root>
|
|
@ -118,7 +118,7 @@
|
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="btnAddMailboxPlan.Text" xml:space="preserve">
|
||||
<value>Add New Mailbox plan</value>
|
||||
<value>Add New</value>
|
||||
</data>
|
||||
<data name="btnSetDefaultMailboxPlan.Text" xml:space="preserve">
|
||||
<value>Set Default Mailbox plan</value>
|
||||
|
@ -226,7 +226,7 @@
|
|||
<value>Restamp mailboxes</value>
|
||||
</data>
|
||||
<data name="btnUpdateMailboxPlan.Text" xml:space="preserve">
|
||||
<value>Update Mailbox Plan</value>
|
||||
<value>Update</value>
|
||||
</data>
|
||||
<data name="chkEnableLitigationHold.Text" xml:space="preserve">
|
||||
<value>Enable Litigation Hold</value>
|
||||
|
|
|
@ -0,0 +1,138 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="gvPolicy.Header" xml:space="preserve">
|
||||
<value>Retention policy</value>
|
||||
</data>
|
||||
<data name="gvPolicyEdit.Header" xml:space="preserve">
|
||||
<value>Select</value>
|
||||
</data>
|
||||
<data name="gvPolicy.Empty" xml:space="preserve">
|
||||
<value>No Retention policy tags have been added yet. To add a new mailbox plan click "Add New" button.</value>
|
||||
</data>
|
||||
<data name="gvPolicySelect.Header" xml:space="preserve">
|
||||
<value>Select</value>
|
||||
</data>
|
||||
<data name="valRequirePolicy.ErrorMessage" xml:space="preserve">
|
||||
<value>Please enter correct retention policy tags</value>
|
||||
</data>
|
||||
<data name="valRequirePolicy.Text" xml:space="preserve">
|
||||
<value>*</value>
|
||||
</data>
|
||||
</root>
|
|
@ -53,6 +53,11 @@
|
|||
<td><asp:DropDownList runat="server" ID="ddlCollation" /></td>
|
||||
</tr>
|
||||
|
||||
<tr height="23px">
|
||||
<td class="FormLabel150"><asp:Label runat="server" ID="lblBaseLanguage" meta:resourcekey="lblBaseLanguage" Text="Base Language"/></td>
|
||||
<td><asp:DropDownList runat="server" ID="ddlBaseLanguage" /></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
<div class="FormFooterClean">
|
||||
<asp:Button runat="server" meta:resourcekey="btnCreate" ID="btnCreate" CssClass="Button2" OnClick="btnCreate_Click" />
|
||||
|
|
|
@ -28,14 +28,59 @@
|
|||
|
||||
using System;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Globalization;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using WebsitePanel.Providers.Common;
|
||||
using WebsitePanel.Providers.HostedSolution;
|
||||
using WebsitePanel.Providers.ResultObjects;
|
||||
using WebsitePanel.EnterpriseServer;
|
||||
|
||||
namespace WebsitePanel.Portal.CRM
|
||||
{
|
||||
public partial class CRMOrganizationDetails : WebsitePanelModuleBase
|
||||
{
|
||||
|
||||
private StringDictionary ConvertArrayToDictionary(string[] settings)
|
||||
{
|
||||
StringDictionary r = new StringDictionary();
|
||||
foreach (string setting in settings)
|
||||
{
|
||||
int idx = setting.IndexOf('=');
|
||||
r.Add(setting.Substring(0, idx), setting.Substring(idx + 1));
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
private StringDictionary serviceSettings = null;
|
||||
|
||||
private StringDictionary ServiceSettings
|
||||
{
|
||||
get
|
||||
{
|
||||
if (serviceSettings != null)
|
||||
return serviceSettings;
|
||||
|
||||
PackageInfo pi = PackagesHelper.GetCachedPackage(PanelSecurity.PackageId);
|
||||
ServiceInfo[] si = ES.Services.Servers.GetServicesByServerIdGroupName(pi.ServerId, ResourceGroups.HostedCRM2013);
|
||||
if (si.Length == 0) si = ES.Services.Servers.GetServicesByServerIdGroupName(pi.ServerId, ResourceGroups.HostedCRM);
|
||||
|
||||
if (si.Length > 0)
|
||||
{
|
||||
int serviceId = si[0].ServiceId;
|
||||
string[] settings = ES.Services.Servers.GetServiceSettings(serviceId);
|
||||
serviceSettings = ConvertArrayToDictionary(settings);
|
||||
}
|
||||
else
|
||||
serviceSettings = new StringDictionary();
|
||||
|
||||
return serviceSettings;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private StringArrayResultObject BindCollations()
|
||||
{
|
||||
StringArrayResultObject res = ES.Services.CRM.GetCollation(PanelSecurity.PackageId);
|
||||
|
@ -43,8 +88,10 @@ namespace WebsitePanel.Portal.CRM
|
|||
{
|
||||
ddlCollation.DataSource = res.Value;
|
||||
ddlCollation.DataBind();
|
||||
ddlCollation.SelectedValue = "Latin1_General_CI_AI";
|
||||
Utils.SelectListItem(ddlCollation, "Latin1_General_CI_AI"); // default
|
||||
Utils.SelectListItem(ddlCollation, ServiceSettings[Constants.Collation]);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -66,14 +113,34 @@ namespace WebsitePanel.Portal.CRM
|
|||
}));
|
||||
|
||||
ddlCurrency.Items.Add(item);
|
||||
|
||||
}
|
||||
|
||||
ddlCurrency.SelectedValue = "USD|US Dollar|$|United States";
|
||||
Utils.SelectListItem(ddlCurrency, "USD|US Dollar|$|United States"); // default
|
||||
Utils.SelectListItem(ddlCurrency, ServiceSettings[Constants.Currency]);
|
||||
}
|
||||
|
||||
return res;
|
||||
|
||||
}
|
||||
|
||||
private void BindBaseLanguage()
|
||||
{
|
||||
ddlBaseLanguage.Items.Clear();
|
||||
int[] langPacksId = ES.Services.CRM.GetInstalledLanguagePacks(PanelSecurity.PackageId);
|
||||
if (langPacksId != null)
|
||||
{
|
||||
foreach (int langId in langPacksId)
|
||||
{
|
||||
CultureInfo ci = CultureInfo.GetCultureInfo(langId);
|
||||
|
||||
ListItem item = new ListItem(ci.EnglishName, langId.ToString());
|
||||
ddlBaseLanguage.Items.Add(item);
|
||||
}
|
||||
|
||||
Utils.SelectListItem(ddlBaseLanguage, "1033"); // default
|
||||
Utils.SelectListItem(ddlBaseLanguage, ServiceSettings[Constants.BaseLanguage]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -82,6 +149,7 @@ namespace WebsitePanel.Portal.CRM
|
|||
btnCreate.Visible = false;
|
||||
ddlCollation.Enabled = false;
|
||||
ddlCurrency.Enabled = false;
|
||||
ddlBaseLanguage.Enabled = false;
|
||||
administrator.Visible = false;
|
||||
lblAdmin.Visible = true;
|
||||
lblAdmin.Text = admin;
|
||||
|
@ -89,7 +157,6 @@ namespace WebsitePanel.Portal.CRM
|
|||
hlOrganizationPage.Visible = true;
|
||||
hlOrganizationPage.NavigateUrl = org.CrmUrl;
|
||||
hlOrganizationPage.Text = org.CrmUrl;
|
||||
|
||||
}
|
||||
|
||||
private void ShowOrganizationDetails()
|
||||
|
@ -97,12 +164,12 @@ namespace WebsitePanel.Portal.CRM
|
|||
btnCreate.Visible = true;
|
||||
ddlCollation.Enabled = true;
|
||||
ddlCurrency.Enabled = true;
|
||||
ddlBaseLanguage.Enabled = true;
|
||||
administrator.Visible = true;
|
||||
lblAdmin.Visible = false;
|
||||
|
||||
btnDelete.Visible = false;
|
||||
hlOrganizationPage.Visible = false;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -125,22 +192,20 @@ namespace WebsitePanel.Portal.CRM
|
|||
return;
|
||||
}
|
||||
|
||||
BindBaseLanguage();
|
||||
|
||||
|
||||
|
||||
|
||||
Organization org = ES.Services.Organizations.GetOrganization(PanelRequest.ItemID);
|
||||
lblCrmOrgId.Text = org.OrganizationId;
|
||||
lblCrmOrgName.Text = org.Name;
|
||||
|
||||
|
||||
if (!string.IsNullOrEmpty(org.CrmCurrency))//CRM organization
|
||||
if (!string.IsNullOrEmpty(org.CrmCurrency)) //CRM organization
|
||||
{
|
||||
OrganizationUser admin =
|
||||
ES.Services.Organizations.GetUserGeneralSettings(org.Id, org.CrmAdministratorId);
|
||||
|
||||
ddlCurrency.SelectedValue = org.CrmCurrency;
|
||||
ddlCollation.SelectedValue = org.CrmCollation;
|
||||
|
||||
Utils.SelectListItem(ddlCurrency, org.CrmCurrency);
|
||||
Utils.SelectListItem(ddlCollation, org.CrmCollation);
|
||||
Utils.SelectListItem(ddlBaseLanguage, org.CrmLanguadgeCode);
|
||||
|
||||
ShowCrmOrganizationDetails(admin.DisplayName, org);
|
||||
}
|
||||
|
@ -172,13 +237,15 @@ namespace WebsitePanel.Portal.CRM
|
|||
return;
|
||||
}
|
||||
|
||||
int baseLanguage = 0;
|
||||
int.TryParse(ddlBaseLanguage.SelectedValue, out baseLanguage);
|
||||
|
||||
EnterpriseServer.esCRM CRM = ES.Services.CRM;
|
||||
|
||||
CRM.Timeout = 7200000; //# Set longer timeout
|
||||
|
||||
OrganizationResult res = CRM.CreateOrganization(org.Id, cuurrencyData[0], cuurrencyData[1], cuurrencyData[2], cuurrencyData[3],
|
||||
administrator.GetAccountId(), ddlCollation.SelectedValue);
|
||||
administrator.GetAccountId(), ddlCollation.SelectedValue, baseLanguage);
|
||||
|
||||
messageBox.ShowMessage(res, "CreateCrmOrganization", "HostedCRM");
|
||||
if (res.IsSuccess)
|
||||
|
|
|
@ -193,6 +193,24 @@ namespace WebsitePanel.Portal.CRM {
|
|||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.DropDownList ddlCollation;
|
||||
|
||||
/// <summary>
|
||||
/// lblBaseLanguage control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblBaseLanguage;
|
||||
|
||||
/// <summary>
|
||||
/// ddlBaseLanguage control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.DropDownList ddlBaseLanguage;
|
||||
|
||||
/// <summary>
|
||||
/// btnCreate control.
|
||||
/// </summary>
|
||||
|
|
|
@ -63,7 +63,11 @@ namespace WebsitePanel.Portal
|
|||
Organization org = ES.Services.Organizations.GetOrganization(PanelRequest.ItemID);
|
||||
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||
|
||||
int limitDBSize = 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;
|
||||
|
||||
int limitDBSize = cntx.Quotas[quotaName].QuotaAllocatedValue;
|
||||
//maxStorageSettingsValue.ParentQuotaValue = limitDBSize;
|
||||
maxStorageSettingsValue.ParentQuotaValue = -1;
|
||||
|
||||
|
@ -86,7 +90,12 @@ namespace WebsitePanel.Portal
|
|||
try
|
||||
{
|
||||
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.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;
|
||||
|
||||
long maxSize = maxStorageSettingsValue.QuotaValue;
|
||||
|
||||
|
|
|
@ -47,9 +47,6 @@
|
|||
<td class="FormLabel150"><asp:Localize runat="server" meta:resourcekey="locLicenseType" Text="License Type:" /></td>
|
||||
<td>
|
||||
<asp:DropDownList ID="ddlLicenseType" runat="server" CssClass="NormalTextBox" AutoPostBack="false">
|
||||
<asp:ListItem Value="0" meta:resourcekey="ddlLicenseTypeFull">Full</asp:ListItem>
|
||||
<asp:ListItem Value="2" meta:resourcekey="ddlLicenseTypeLimited">Limited</asp:ListItem>
|
||||
<asp:ListItem Value="22" meta:resourcekey="ddlLicenseTypeESS">ESS</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -32,6 +32,7 @@ using System.Web.UI.WebControls;
|
|||
using WebsitePanel.Providers.Common;
|
||||
using WebsitePanel.Providers.HostedSolution;
|
||||
using WebsitePanel.Providers.ResultObjects;
|
||||
using WebsitePanel.EnterpriseServer;
|
||||
|
||||
namespace WebsitePanel.Portal.CRM
|
||||
{
|
||||
|
@ -41,6 +42,27 @@ namespace WebsitePanel.Portal.CRM
|
|||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||
if (cntx.Groups.ContainsKey(ResourceGroups.HostedCRM2013))
|
||||
{
|
||||
ddlLicenseType.Items.Add(new System.Web.UI.WebControls.ListItem(
|
||||
GetSharedLocalizedString("HostedCRM.LicenseProfessional"), CRMUserLycenseTypes.PROFESSIONAL.ToString()));
|
||||
ddlLicenseType.Items.Add(new System.Web.UI.WebControls.ListItem(
|
||||
GetSharedLocalizedString("HostedCRM.LicenseBasic"), CRMUserLycenseTypes.BASIC.ToString()));
|
||||
ddlLicenseType.Items.Add(new System.Web.UI.WebControls.ListItem(
|
||||
GetSharedLocalizedString("HostedCRM.LicenseEssential"), CRMUserLycenseTypes.ESSENTIAL.ToString()));
|
||||
}
|
||||
else
|
||||
{
|
||||
ddlLicenseType.Items.Add(new System.Web.UI.WebControls.ListItem(
|
||||
GetSharedLocalizedString("HostedCRM.LicenseFull"), CRMUserLycenseTypes.FULL.ToString()));
|
||||
ddlLicenseType.Items.Add(new System.Web.UI.WebControls.ListItem(
|
||||
GetSharedLocalizedString("HostedCRM.LicenseLimited"), CRMUserLycenseTypes.LIMITED.ToString()));
|
||||
ddlLicenseType.Items.Add(new System.Web.UI.WebControls.ListItem(
|
||||
GetSharedLocalizedString("HostedCRM.LicenseESS"), CRMUserLycenseTypes.ESS.ToString()));
|
||||
}
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
OrganizationUser user =
|
||||
|
@ -61,17 +83,7 @@ namespace WebsitePanel.Portal.CRM
|
|||
|
||||
int cALType = userResult.Value.CALType + ((int)userResult.Value.ClientAccessMode) * 10;
|
||||
|
||||
switch (cALType)
|
||||
{
|
||||
case 0 :
|
||||
case 2 :
|
||||
case 22:
|
||||
ddlLicenseType.SelectedValue = cALType.ToString();
|
||||
break;
|
||||
default:
|
||||
ddlLicenseType.SelectedIndex = 0;
|
||||
break;
|
||||
}
|
||||
Utils.SelectListItem(ddlLicenseType, cALType);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -73,33 +73,65 @@
|
|||
</asp:ObjectDataSource>
|
||||
<br />
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td align="right" nowrap>
|
||||
<asp:Localize ID="locQuota" runat="server" meta:resourcekey="locQuota" Text="Full licenses :"></asp:Localize>
|
||||
</td>
|
||||
<td>
|
||||
<wsp:QuotaViewer ID="usersQuota" runat="server" QuotaTypeId="2" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right" nowrap>
|
||||
<asp:Localize ID="locLimitedQuota" runat="server" meta:resourcekey="locLimitedQuota" Text="Limited licenses :"></asp:Localize>
|
||||
</td>
|
||||
<td>
|
||||
<wsp:QuotaViewer ID="limitedusersQuota" runat="server" QuotaTypeId="2" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right" nowrap>
|
||||
<asp:Localize ID="locESSQuota" runat="server" meta:resourcekey="locESSQuota" Text="ESS licenses :"></asp:Localize>
|
||||
</td>
|
||||
<td>
|
||||
<wsp:QuotaViewer ID="essusersQuota" runat="server" QuotaTypeId="2" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
<asp:Panel ID="CRM2011Panel" runat="server">
|
||||
<table>
|
||||
<tr>
|
||||
<td align="right" nowrap>
|
||||
<asp:Localize ID="locQuota" runat="server" meta:resourcekey="locQuota" Text="Full licenses :"></asp:Localize>
|
||||
</td>
|
||||
<td>
|
||||
<wsp:QuotaViewer ID="usersQuota" runat="server" QuotaTypeId="2" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right" nowrap>
|
||||
<asp:Localize ID="locLimitedQuota" runat="server" meta:resourcekey="locLimitedQuota" Text="Limited licenses :"></asp:Localize>
|
||||
</td>
|
||||
<td>
|
||||
<wsp:QuotaViewer ID="limitedusersQuota" runat="server" QuotaTypeId="2" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right" nowrap>
|
||||
<asp:Localize ID="locESSQuota" runat="server" meta:resourcekey="locESSQuota" Text="ESS licenses :"></asp:Localize>
|
||||
</td>
|
||||
<td>
|
||||
<wsp:QuotaViewer ID="essusersQuota" runat="server" QuotaTypeId="2" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</asp:Panel>
|
||||
|
||||
<asp:Panel ID="CRM2013Panel" runat="server">
|
||||
<table>
|
||||
<tr>
|
||||
<td align="right" nowrap>
|
||||
<asp:Localize ID="Localize1" runat="server" meta:resourcekey="locQuota" Text="Professional licenses :"></asp:Localize>
|
||||
</td>
|
||||
<td>
|
||||
<wsp:QuotaViewer ID="professionalusersQuota" runat="server" QuotaTypeId="2" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right" nowrap>
|
||||
<asp:Localize ID="locBasicQuota" runat="server" meta:resourcekey="locBasicQuota" Text="Basic licenses :"></asp:Localize>
|
||||
</td>
|
||||
<td>
|
||||
<wsp:QuotaViewer ID="basicusersQuota" runat="server" QuotaTypeId="2" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right" nowrap>
|
||||
<asp:Localize ID="locEssentialQuota" runat="server" meta:resourcekey="locEssentialQuota" Text="Essential licenses :"></asp:Localize>
|
||||
</td>
|
||||
<td>
|
||||
<wsp:QuotaViewer ID="essentialusersQuota" runat="server" QuotaTypeId="2" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</asp:Panel>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -41,25 +41,42 @@ namespace WebsitePanel.Portal.CRM
|
|||
{
|
||||
messageBox.ShowErrorMessage("NOT_CRM_ORGANIZATION");
|
||||
btnCreateUser.Enabled = false;
|
||||
CRM2011Panel.Visible = false;
|
||||
CRM2013Panel.Visible = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
OrganizationStatistics stats = ES.Services.Organizations.GetOrganizationStatisticsByOrganization(PanelRequest.ItemID);
|
||||
OrganizationStatistics tenantStats = ES.Services.Organizations.GetOrganizationStatistics(PanelRequest.ItemID);
|
||||
int allocatedCrmUsers = stats.AllocatedCRMUsers;
|
||||
int usedUsers = stats.CreatedCRMUsers;
|
||||
|
||||
usersQuota.QuotaUsedValue = usedUsers;
|
||||
usersQuota.QuotaValue = allocatedCrmUsers;
|
||||
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||
if (cntx.Groups.ContainsKey(ResourceGroups.HostedCRM2013))
|
||||
{
|
||||
CRM2011Panel.Visible = false;
|
||||
CRM2013Panel.Visible = true;
|
||||
|
||||
limitedusersQuota.QuotaUsedValue = stats.CreatedLimitedCRMUsers;
|
||||
limitedusersQuota.QuotaValue = stats.AllocatedLimitedCRMUsers;
|
||||
professionalusersQuota.QuotaUsedValue = stats.CreatedProfessionalCRMUsers;
|
||||
professionalusersQuota.QuotaValue = stats.AllocatedProfessionalCRMUsers;
|
||||
|
||||
//if (stats.AllocatedCRMUsers != -1) usersQuota.QuotaAvailable = tenantStats.AllocatedCRMUsers - tenantStats.CreatedCRMUsers;
|
||||
//if (stats.AllocatedLimitedCRMUsers != -1) limitedusersQuota.QuotaAvailable = tenantStats.AllocatedLimitedCRMUsers - tenantStats.CreatedLimitedCRMUsers;
|
||||
basicusersQuota.QuotaUsedValue = stats.CreatedBasicCRMUsers;
|
||||
basicusersQuota.QuotaValue = stats.AllocatedBasicCRMUsers;
|
||||
|
||||
essusersQuota.QuotaUsedValue = stats.CreatedESSCRMUsers;
|
||||
essusersQuota.QuotaValue = stats.AllocatedESSCRMUsers;
|
||||
essentialusersQuota.QuotaUsedValue = stats.CreatedEssentialCRMUsers;
|
||||
essentialusersQuota.QuotaValue = stats.AllocatedEssentialCRMUsers;
|
||||
}
|
||||
else
|
||||
{
|
||||
CRM2011Panel.Visible = true;
|
||||
CRM2013Panel.Visible = false;
|
||||
|
||||
usersQuota.QuotaUsedValue = stats.CreatedCRMUsers;
|
||||
usersQuota.QuotaValue = stats.AllocatedCRMUsers;
|
||||
|
||||
limitedusersQuota.QuotaUsedValue = stats.CreatedLimitedCRMUsers;
|
||||
limitedusersQuota.QuotaValue = stats.AllocatedLimitedCRMUsers;
|
||||
|
||||
essusersQuota.QuotaUsedValue = stats.CreatedESSCRMUsers;
|
||||
essusersQuota.QuotaValue = stats.AllocatedESSCRMUsers;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -148,6 +148,15 @@ namespace WebsitePanel.Portal.CRM {
|
|||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.ObjectDataSource odsAccountsPaged;
|
||||
|
||||
/// <summary>
|
||||
/// CRM2011Panel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Panel CRM2011Panel;
|
||||
|
||||
/// <summary>
|
||||
/// locQuota control.
|
||||
/// </summary>
|
||||
|
@ -201,5 +210,68 @@ namespace WebsitePanel.Portal.CRM {
|
|||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.QuotaViewer essusersQuota;
|
||||
|
||||
/// <summary>
|
||||
/// CRM2013Panel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Panel CRM2013Panel;
|
||||
|
||||
/// <summary>
|
||||
/// Localize1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize Localize1;
|
||||
|
||||
/// <summary>
|
||||
/// professionalusersQuota control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.QuotaViewer professionalusersQuota;
|
||||
|
||||
/// <summary>
|
||||
/// locBasicQuota control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize locBasicQuota;
|
||||
|
||||
/// <summary>
|
||||
/// basicusersQuota control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.QuotaViewer basicusersQuota;
|
||||
|
||||
/// <summary>
|
||||
/// locEssentialQuota control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize locEssentialQuota;
|
||||
|
||||
/// <summary>
|
||||
/// essentialusersQuota control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.QuotaViewer essentialusersQuota;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,9 +37,6 @@
|
|||
<td class="FormLabel150"><asp:Localize runat="server" meta:resourcekey="locLicenseType" Text="License Type: *" /></td>
|
||||
<td>
|
||||
<asp:DropDownList ID="ddlLicenseType" runat="server" CssClass="NormalTextBox" AutoPostBack="false">
|
||||
<asp:ListItem Value="0" meta:resourcekey="ddlLicenseTypeFull">Full</asp:ListItem>
|
||||
<asp:ListItem Value="2" meta:resourcekey="ddlLicenseTypeLimited">Limited</asp:ListItem>
|
||||
<asp:ListItem Value="22" meta:resourcekey="ddlLicenseTypeESS">ESS</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
using System;
|
||||
using WebsitePanel.Providers.HostedSolution;
|
||||
using WebsitePanel.Providers.ResultObjects;
|
||||
using WebsitePanel.EnterpriseServer;
|
||||
|
||||
namespace WebsitePanel.Portal.CRM
|
||||
{
|
||||
|
@ -38,6 +39,28 @@ namespace WebsitePanel.Portal.CRM
|
|||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
|
||||
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||
if (cntx.Groups.ContainsKey(ResourceGroups.HostedCRM2013))
|
||||
{
|
||||
ddlLicenseType.Items.Add(new System.Web.UI.WebControls.ListItem(
|
||||
GetSharedLocalizedString("HostedCRM.LicenseProfessional"), CRMUserLycenseTypes.PROFESSIONAL.ToString()));
|
||||
ddlLicenseType.Items.Add(new System.Web.UI.WebControls.ListItem(
|
||||
GetSharedLocalizedString("HostedCRM.LicenseBasic"), CRMUserLycenseTypes.BASIC.ToString()));
|
||||
ddlLicenseType.Items.Add(new System.Web.UI.WebControls.ListItem(
|
||||
GetSharedLocalizedString("HostedCRM.LicenseEssential"), CRMUserLycenseTypes.ESSENTIAL.ToString()));
|
||||
}
|
||||
else
|
||||
{
|
||||
ddlLicenseType.Items.Add(new System.Web.UI.WebControls.ListItem(
|
||||
GetSharedLocalizedString("HostedCRM.LicenseFull"), CRMUserLycenseTypes.FULL.ToString()));
|
||||
ddlLicenseType.Items.Add(new System.Web.UI.WebControls.ListItem(
|
||||
GetSharedLocalizedString("HostedCRM.LicenseLimited"), CRMUserLycenseTypes.LIMITED.ToString()));
|
||||
ddlLicenseType.Items.Add(new System.Web.UI.WebControls.ListItem(
|
||||
GetSharedLocalizedString("HostedCRM.LicenseESS"), CRMUserLycenseTypes.ESS.ToString()));
|
||||
}
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
CRMBusinessUnitsResult res =
|
||||
|
|
|
@ -49,6 +49,19 @@ namespace WebsitePanel.Portal
|
|||
return result;
|
||||
}
|
||||
|
||||
public static bool GetBool(string key)
|
||||
{
|
||||
return GetBool(key, false);
|
||||
}
|
||||
|
||||
public static bool GetBool(string key, bool defaultValue)
|
||||
{
|
||||
bool result = defaultValue;
|
||||
try { result = bool.Parse(HttpContext.Current.Request[key]); }
|
||||
catch { /* do nothing */ }
|
||||
return result;
|
||||
}
|
||||
|
||||
public static int UserID
|
||||
{
|
||||
get { return GetInt("UserID"); }
|
||||
|
@ -195,5 +208,10 @@ namespace WebsitePanel.Portal
|
|||
{
|
||||
get { return HttpContext.Current.Request["FolderID"] ?? ""; }
|
||||
}
|
||||
|
||||
public static string Ctl
|
||||
{
|
||||
get { return HttpContext.Current.Request["ctl"] ?? ""; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -207,13 +207,16 @@ namespace WebsitePanel.Portal
|
|||
|
||||
public static void SelectListItem(ListControl ctrl, object value)
|
||||
{
|
||||
// unselect currently selected item
|
||||
if (ctrl.SelectedIndex != -1)
|
||||
ctrl.SelectedItem.Selected = false;
|
||||
|
||||
string val = (value != null) ? value.ToString() : "";
|
||||
ListItem item = ctrl.Items.FindByValue(val);
|
||||
if (item != null) item.Selected = true;
|
||||
if (item != null)
|
||||
{
|
||||
// unselect currently selected item
|
||||
if (ctrl.SelectedIndex != -1)
|
||||
ctrl.SelectedItem.Selected = false;
|
||||
|
||||
item.Selected = true;
|
||||
}
|
||||
}
|
||||
|
||||
public static void SaveListControlState(ListControl ctrl)
|
||||
|
|
|
@ -65,20 +65,20 @@ namespace WebsitePanel.Portal
|
|||
ExchangeAccountsPaged accounts;
|
||||
|
||||
public int GetExchangeAccountsPagedCount(int itemId, string accountTypes,
|
||||
string filterColumn, string filterValue)
|
||||
string filterColumn, string filterValue, bool archiving)
|
||||
{
|
||||
return accounts.RecordsCount;
|
||||
}
|
||||
|
||||
public ExchangeAccount[] GetExchangeAccountsPaged(int itemId, string accountTypes,
|
||||
string filterColumn, string filterValue,
|
||||
int maximumRows, int startRowIndex, string sortColumn)
|
||||
int maximumRows, int startRowIndex, string sortColumn, bool archiving)
|
||||
{
|
||||
if (!String.IsNullOrEmpty(filterValue))
|
||||
filterValue = filterValue + "%";
|
||||
|
||||
accounts = ES.Services.ExchangeServer.GetAccountsPaged(itemId,
|
||||
accountTypes, filterColumn, filterValue, sortColumn, startRowIndex, maximumRows);
|
||||
accounts = ES.Services.ExchangeServer.GetAccountsPaged(itemId,
|
||||
accountTypes, filterColumn, filterValue, sortColumn, startRowIndex, maximumRows, archiving);
|
||||
|
||||
return accounts.PageItems;
|
||||
}
|
||||
|
|
|
@ -216,4 +216,7 @@
|
|||
<data name="lblLitigationHoldUrl.Text" xml:space="preserve">
|
||||
<value>Litigation Hold Url:</value>
|
||||
</data>
|
||||
<data name="locTitleArchiving.Text" xml:space="preserve">
|
||||
<value>Add Retention policy</value>
|
||||
</data>
|
||||
</root>
|
|
@ -118,7 +118,7 @@
|
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="btnAddMailboxPlan.Text" xml:space="preserve">
|
||||
<value>Add New Mailbox plan</value>
|
||||
<value>Add New</value>
|
||||
</data>
|
||||
<data name="btnSave.Text" xml:space="preserve">
|
||||
<value>Stamp mailboxes</value>
|
||||
|
@ -162,4 +162,7 @@
|
|||
<data name="Text.PageName" xml:space="preserve">
|
||||
<value>Mailbox plans</value>
|
||||
</data>
|
||||
<data name="locTitleRetentionPolicy.Text" xml:space="preserve">
|
||||
<value>Retention Policy</value>
|
||||
</data>
|
||||
</root>
|
|
@ -174,4 +174,7 @@
|
|||
<data name="gvUsersLogin.Header" xml:space="preserve">
|
||||
<value>Login</value>
|
||||
</data>
|
||||
<data name="locTitleArchiving.Text" xml:space="preserve">
|
||||
<value>Archiving Mailboxes</value>
|
||||
</data>
|
||||
</root>
|
|
@ -0,0 +1,144 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="gvPolicy.Header" xml:space="preserve">
|
||||
<value>Retention policy</value>
|
||||
</data>
|
||||
<data name="gvPolicyEdit.Header" xml:space="preserve">
|
||||
<value>Select</value>
|
||||
</data>
|
||||
<data name="gvPolicy.Empty" xml:space="preserve">
|
||||
<value>No Retention policy tags have been added yet. To add a new mailbox plan click "Add New" button.</value>
|
||||
</data>
|
||||
<data name="gvPolicySelect.Header" xml:space="preserve">
|
||||
<value>Select</value>
|
||||
</data>
|
||||
<data name="valRequirePolicy.ErrorMessage" xml:space="preserve">
|
||||
<value>Please enter correct retention policy tags</value>
|
||||
</data>
|
||||
<data name="valRequirePolicy.Text" xml:space="preserve">
|
||||
<value>*</value>
|
||||
</data>
|
||||
<data name="locTitle.Text" xml:space="preserve">
|
||||
<value>Mailbox plans</value>
|
||||
</data>
|
||||
<data name="Text.PageName" xml:space="preserve">
|
||||
<value>Retention policy tags</value>
|
||||
</data>
|
||||
</root>
|
|
@ -6,6 +6,8 @@
|
|||
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
|
||||
<%@ Register Src="../UserControls/QuotaEditor.ascx" TagName="QuotaEditor" TagPrefix="uc1" %>
|
||||
|
||||
<%@ Import Namespace="WebsitePanel.Portal" %>
|
||||
|
||||
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
|
||||
|
||||
<div id="ExchangeContainer">
|
||||
|
@ -16,11 +18,13 @@
|
|||
<div class="Center">
|
||||
<div class="Title">
|
||||
<asp:Image ID="Image1" SkinID="ExchangeDomainNameAdd48" runat="server" />
|
||||
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Add Mailboxplan"></asp:Localize>
|
||||
<asp:Localize ID="locTitle" runat="server" Text="Add Mailboxplan"></asp:Localize>
|
||||
</div>
|
||||
<div class="FormBody">
|
||||
<wsp:SimpleMessageBox id="messageBox" runat="server" />
|
||||
|
||||
<asp:HiddenField runat="server" ID="hfArchivingPlan" />
|
||||
|
||||
<wsp:CollapsiblePanel id="secMailboxPlan" runat="server"
|
||||
TargetControlID="MailboxPlan" meta:resourcekey="secMailboxPlan" Text="Mailboxplan">
|
||||
</wsp:CollapsiblePanel>
|
||||
|
@ -70,6 +74,11 @@
|
|||
<asp:CheckBox ID="chkActiveSync" runat="server" meta:resourcekey="chkActiveSync" Text="ActiveSync"></asp:CheckBox>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:CheckBox ID="chkEnableArchiving" runat="server" meta:resourcekey="chkEnableArchiving" Text="Archiving"></asp:CheckBox>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
</asp:Panel>
|
||||
|
@ -159,7 +168,6 @@
|
|||
</table>
|
||||
</asp:Panel>
|
||||
|
||||
|
||||
<wsp:CollapsiblePanel id="secDeleteRetention" runat="server"
|
||||
TargetControlID="DeleteRetention" meta:resourcekey="secDeleteRetention" Text="Delete Item Retention">
|
||||
</wsp:CollapsiblePanel>
|
||||
|
@ -214,6 +222,39 @@
|
|||
</table>
|
||||
</asp:Panel>
|
||||
|
||||
<wsp:CollapsiblePanel id="secRetentionPolicyTags" runat="server"
|
||||
TargetControlID="RetentionPolicyTags" meta:resourcekey="secRetentionPolicyTags" Text="Retention policy tags">
|
||||
</wsp:CollapsiblePanel>
|
||||
<asp:Panel ID="RetentionPolicyTags" runat="server" Height="0" style="overflow:hidden;">
|
||||
<asp:UpdatePanel ID="GeneralUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
|
||||
<ContentTemplate>
|
||||
<asp:GridView id="gvPolicy" runat="server" EnableViewState="true" AutoGenerateColumns="false"
|
||||
Width="100%" EmptyDataText="" CssSelectorClass="NormalGridView" OnRowCommand="gvPolicy_RowCommand" >
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Tag">
|
||||
<ItemStyle Width="70%"></ItemStyle>
|
||||
<ItemTemplate>
|
||||
<asp:Label id="displayPolicy" runat="server" EnableViewState="true" ><%# PortalAntiXSS.Encode((string)Eval("TagName"))%></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:ImageButton id="imgDelPolicy" runat="server" Text="Delete" SkinID="ExchangeDelete"
|
||||
CommandName="DeleteItem" CommandArgument='<%# Eval("TagId") %>'
|
||||
meta:resourcekey="cmdDelete" OnClientClick="return confirm('Are you sure you want to delete selected policy tag?')" >
|
||||
</asp:ImageButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
|
||||
<asp:DropDownList ID="ddTags" runat ="server"></asp:DropDownList>
|
||||
<asp:Button ID="bntAddTag" runat="server" Text="Add tag" meta:resourcekey="bntAddTag" OnClick="bntAddTag_Click"/>
|
||||
<br />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Panel>
|
||||
|
||||
<br />
|
||||
<div class="FormFooterClean">
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2011, Outercurve Foundation.
|
||||
// Copyright (c) 2011-2014, Outercurve Foundation.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
|
@ -27,6 +27,13 @@
|
|||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.WebControls.WebParts;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using WebsitePanel.EnterpriseServer;
|
||||
using WebsitePanel.Providers.HostedSolution;
|
||||
using WebsitePanel.Providers.ResultObjects;
|
||||
|
@ -35,6 +42,20 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
{
|
||||
public partial class ExchangeAddMailboxPlan : WebsitePanelModuleBase
|
||||
{
|
||||
private bool RetentionPolicy
|
||||
{
|
||||
get
|
||||
{
|
||||
bool res = false;
|
||||
bool.TryParse(hfArchivingPlan.Value, out res);
|
||||
return res;
|
||||
}
|
||||
set
|
||||
{
|
||||
hfArchivingPlan.Value = value.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
|
@ -66,29 +87,19 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
txtLitigationHoldMsg.Text = plan.LitigationHoldMsg;
|
||||
txtLitigationHoldUrl.Text = plan.LitigationHoldUrl;
|
||||
|
||||
RetentionPolicy = plan.Archiving;
|
||||
|
||||
|
||||
/*
|
||||
txtMailboxPlan.Enabled = false;
|
||||
mailboxSize.Enabled = false;
|
||||
maxRecipients.Enabled = false;
|
||||
maxSendMessageSizeKB.Enabled = false;
|
||||
maxReceiveMessageSizeKB.Enabled = false;
|
||||
chkPOP3.Enabled = false;
|
||||
chkIMAP.Enabled = false;
|
||||
chkOWA.Enabled = false;
|
||||
chkMAPI.Enabled = false;
|
||||
chkActiveSync.Enabled = false;
|
||||
sizeIssueWarning.Enabled = false;
|
||||
sizeProhibitSend.Enabled = false;
|
||||
sizeProhibitSendReceive.Enabled = false;
|
||||
daysKeepDeletedItems.Enabled = false;
|
||||
chkHideFromAddressBook.Enabled = false;
|
||||
|
||||
btnAdd.Enabled = false;
|
||||
*/
|
||||
chkEnableArchiving.Checked = plan.EnableArchiving;
|
||||
|
||||
locTitle.Text = plan.MailboxPlan;
|
||||
|
||||
if (RetentionPolicy)
|
||||
{
|
||||
ExchangeMailboxPlanRetentionPolicyTag[] tags = ES.Services.ExchangeServer.GetExchangeMailboxPlanRetentionPolicyTags(plan.MailboxPlanId);
|
||||
gvPolicy.DataSource = tags;
|
||||
gvPolicy.DataBind();
|
||||
}
|
||||
|
||||
this.DisableControls = true;
|
||||
|
||||
}
|
||||
|
@ -156,15 +167,50 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
sizeProhibitSend.ValueKB = 100;
|
||||
sizeProhibitSendReceive.ValueKB = 100;
|
||||
recoverableItemsWarning.ValueKB = 95;
|
||||
|
||||
RetentionPolicy = PanelRequest.GetBool("archiving", false);
|
||||
}
|
||||
}
|
||||
else
|
||||
this.DisableControls = true;
|
||||
}
|
||||
|
||||
locTitle.Text = RetentionPolicy ? GetLocalizedString("locTitleArchiving.Text") : GetLocalizedString("locTitle.Text");
|
||||
|
||||
UpdateTags();
|
||||
|
||||
secMailboxFeatures.Visible = !RetentionPolicy;
|
||||
secMailboxGeneral.Visible = !RetentionPolicy;
|
||||
secRetentionPolicyTags.Visible = RetentionPolicy;
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected void UpdateTags()
|
||||
{
|
||||
if (RetentionPolicy)
|
||||
{
|
||||
ddTags.Items.Clear();
|
||||
|
||||
Providers.HostedSolution.ExchangeRetentionPolicyTag[] allTags = ES.Services.ExchangeServer.GetExchangeRetentionPolicyTags(PanelRequest.ItemID);
|
||||
|
||||
List<ExchangeMailboxPlanRetentionPolicyTag> selectedTags = ViewState["Tags"] as List<ExchangeMailboxPlanRetentionPolicyTag>;
|
||||
|
||||
foreach (Providers.HostedSolution.ExchangeRetentionPolicyTag tag in allTags)
|
||||
{
|
||||
if (selectedTags!=null)
|
||||
{
|
||||
if (selectedTags.Find(x => x.TagID == tag.TagID) != null)
|
||||
continue;
|
||||
}
|
||||
|
||||
ddTags.Items.Add(new System.Web.UI.WebControls.ListItem(tag.TagName, tag.TagID.ToString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
AddMailboxPlan();
|
||||
|
@ -201,20 +247,40 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
plan.RecoverableItemsWarningPct = recoverableItemsWarning.ValueKB;
|
||||
if ((plan.RecoverableItemsWarningPct == 0)) plan.RecoverableItemsWarningPct = 100;
|
||||
plan.LitigationHoldMsg = txtLitigationHoldMsg.Text.Trim();
|
||||
plan.LitigationHoldUrl = txtLitigationHoldUrl.Text.Trim();
|
||||
plan.LitigationHoldUrl = txtLitigationHoldUrl.Text.Trim();
|
||||
|
||||
plan.Archiving = RetentionPolicy;
|
||||
|
||||
int result = ES.Services.ExchangeServer.AddExchangeMailboxPlan(PanelRequest.ItemID,
|
||||
plan.EnableArchiving = chkEnableArchiving.Checked;
|
||||
|
||||
int planId = ES.Services.ExchangeServer.AddExchangeMailboxPlan(PanelRequest.ItemID,
|
||||
plan);
|
||||
|
||||
|
||||
if (result < 0)
|
||||
if (planId < 0)
|
||||
{
|
||||
messageBox.ShowResultMessage(result);
|
||||
messageBox.ShowResultMessage(planId);
|
||||
return;
|
||||
}
|
||||
|
||||
Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "mailboxplans",
|
||||
List<ExchangeMailboxPlanRetentionPolicyTag> tags = ViewState["Tags"] as List<ExchangeMailboxPlanRetentionPolicyTag>;
|
||||
|
||||
if (tags!=null)
|
||||
{
|
||||
foreach(ExchangeMailboxPlanRetentionPolicyTag tag in tags)
|
||||
{
|
||||
tag.MailboxPlanId = planId;
|
||||
int result = ES.Services.ExchangeServer.AddExchangeMailboxPlanRetentionPolicyTag(PanelRequest.ItemID, tag);
|
||||
if (result < 0)
|
||||
{
|
||||
messageBox.ShowResultMessage(result);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), RetentionPolicy ? "retentionpolicy" : "mailboxplans",
|
||||
"SpaceID=" + PanelSecurity.PackageId));
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
@ -222,5 +288,65 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
messageBox.ShowErrorMessage("EXCHANGE_ADD_MAILBOXPLAN", ex);
|
||||
}
|
||||
}
|
||||
|
||||
protected void bntAddTag_Click(object sender, EventArgs e)
|
||||
{
|
||||
int addTagId;
|
||||
if (!int.TryParse(ddTags.SelectedValue, out addTagId))
|
||||
return;
|
||||
|
||||
Providers.HostedSolution.ExchangeRetentionPolicyTag tag = ES.Services.ExchangeServer.GetExchangeRetentionPolicyTag(PanelRequest.ItemID, addTagId);
|
||||
if (tag == null) return;
|
||||
|
||||
List<ExchangeMailboxPlanRetentionPolicyTag> res = ViewState["Tags"] as List<ExchangeMailboxPlanRetentionPolicyTag>;
|
||||
if (res==null) res = new List<ExchangeMailboxPlanRetentionPolicyTag>();
|
||||
|
||||
ExchangeMailboxPlanRetentionPolicyTag add = new ExchangeMailboxPlanRetentionPolicyTag();
|
||||
add.MailboxPlanId = PanelRequest.GetInt("MailboxPlanId");
|
||||
add.TagID = tag.TagID;
|
||||
add.TagName = tag.TagName;
|
||||
|
||||
res.Add(add);
|
||||
|
||||
ViewState["Tags"] = res;
|
||||
|
||||
gvPolicy.DataSource = res;
|
||||
gvPolicy.DataBind();
|
||||
|
||||
UpdateTags();
|
||||
}
|
||||
|
||||
protected void gvPolicy_RowCommand(object sender, GridViewCommandEventArgs e)
|
||||
{
|
||||
|
||||
switch (e.CommandName)
|
||||
{
|
||||
case "DeleteItem":
|
||||
try
|
||||
{
|
||||
int tagId;
|
||||
if (!int.TryParse(e.CommandArgument.ToString(), out tagId))
|
||||
return;
|
||||
|
||||
List<ExchangeMailboxPlanRetentionPolicyTag> tags = ViewState["Tags"] as List<ExchangeMailboxPlanRetentionPolicyTag>;
|
||||
if (tags == null) return;
|
||||
|
||||
int i = tags.FindIndex(x => x.TagID == tagId);
|
||||
if (i >= 0) tags.RemoveAt(i);
|
||||
|
||||
ViewState["Tags"] = tags;
|
||||
gvPolicy.DataSource = tags;
|
||||
gvPolicy.DataBind();
|
||||
UpdateTags();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -76,6 +76,15 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
|
||||
|
||||
/// <summary>
|
||||
/// hfArchivingPlan control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.HiddenField hfArchivingPlan;
|
||||
|
||||
/// <summary>
|
||||
/// secMailboxPlan control.
|
||||
/// </summary>
|
||||
|
@ -175,6 +184,15 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox chkActiveSync;
|
||||
|
||||
/// <summary>
|
||||
/// chkEnableArchiving control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox chkEnableArchiving;
|
||||
|
||||
/// <summary>
|
||||
/// secMailboxGeneral control.
|
||||
/// </summary>
|
||||
|
@ -490,6 +508,60 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtLitigationHoldMsg;
|
||||
|
||||
/// <summary>
|
||||
/// secRetentionPolicyTags control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.CollapsiblePanel secRetentionPolicyTags;
|
||||
|
||||
/// <summary>
|
||||
/// RetentionPolicyTags control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Panel RetentionPolicyTags;
|
||||
|
||||
/// <summary>
|
||||
/// GeneralUpdatePanel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.UpdatePanel GeneralUpdatePanel;
|
||||
|
||||
/// <summary>
|
||||
/// gvPolicy control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.GridView gvPolicy;
|
||||
|
||||
/// <summary>
|
||||
/// ddTags control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.DropDownList ddTags;
|
||||
|
||||
/// <summary>
|
||||
/// bntAddTag control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button bntAddTag;
|
||||
|
||||
/// <summary>
|
||||
/// btnAdd control.
|
||||
/// </summary>
|
||||
|
|
|
@ -136,7 +136,15 @@
|
|||
<asp:Localize ID="locMailboxplanName" runat="server" meta:resourcekey="locMailboxplanName" Text="Mailboxplan Name: *"></asp:Localize>
|
||||
</td>
|
||||
<td>
|
||||
<wsp:MailboxPlanSelector ID="mailboxPlanSelector" runat="server" />
|
||||
<wsp:MailboxPlanSelector ID="mailboxPlanSelector" runat="server" Archiving="false" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="FormLabel150">
|
||||
<asp:Localize ID="locArchivingMailboxplanName" runat="server" meta:resourcekey="locArchivingMailboxplanName" Text="Archiving Mailboxplan Name: "></asp:Localize>
|
||||
</td>
|
||||
<td>
|
||||
<wsp:MailboxPlanSelector ID="archivingMailboxPlanSelector" runat="server" Archiving="true" AddNone="true" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -84,7 +84,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
|
||||
|
||||
|
||||
WebsitePanel.Providers.HostedSolution.ExchangeMailboxPlan[] plans = ES.Services.ExchangeServer.GetExchangeMailboxPlans(PanelRequest.ItemID);
|
||||
WebsitePanel.Providers.HostedSolution.ExchangeMailboxPlan[] plans = ES.Services.ExchangeServer.GetExchangeMailboxPlans(PanelRequest.ItemID, false);
|
||||
|
||||
if (plans.Length == 0)
|
||||
btnCreate.Enabled = false;
|
||||
|
@ -138,6 +138,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
chkSendInstructions.Checked,
|
||||
sendInstructionEmail.Text,
|
||||
Convert.ToInt32(mailboxPlanSelector.MailboxPlanId),
|
||||
Convert.ToInt32(archivingMailboxPlanSelector.MailboxPlanId),
|
||||
subscriberNumber);
|
||||
|
||||
|
||||
|
|
|
@ -337,6 +337,24 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.MailboxPlanSelector mailboxPlanSelector;
|
||||
|
||||
/// <summary>
|
||||
/// locArchivingMailboxplanName control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize locArchivingMailboxplanName;
|
||||
|
||||
/// <summary>
|
||||
/// archivingMailboxPlanSelector control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.MailboxPlanSelector archivingMailboxPlanSelector;
|
||||
|
||||
/// <summary>
|
||||
/// chkSendInstructions control.
|
||||
/// </summary>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<%@ Register Src="UserControls/MailboxPlanSelector.ascx" TagName="MailboxPlanSelector" TagPrefix="wsp" %>
|
||||
<%@ Register Src="../UserControls/QuotaViewer.ascx" TagName="QuotaViewer" TagPrefix="wsp" %>
|
||||
|
||||
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
|
||||
<%-- < wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/> --%>
|
||||
|
||||
<div id="ExchangeContainer">
|
||||
<div class="Module">
|
||||
|
@ -26,10 +26,11 @@
|
|||
<wsp:MailboxTabs id="tabs" runat="server" SelectedTab="mailbox_settings" />
|
||||
<wsp:SimpleMessageBox id="messageBox" runat="server" />
|
||||
|
||||
<wsp:CollapsiblePanel id="secGeneral" runat="server" TargetControlID="General" meta:resourcekey="secGeneral" Text="General"></wsp:CollapsiblePanel>
|
||||
<asp:Panel ID="General" runat="server" Height="0" style="overflow:hidden;">
|
||||
<asp:UpdatePanel ID="GeneralUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
|
||||
<ContentTemplate>
|
||||
<asp:UpdatePanel ID="GeneralUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
|
||||
<ContentTemplate>
|
||||
|
||||
<wsp:CollapsiblePanel id="secGeneral" runat="server" TargetControlID="General" meta:resourcekey="secGeneral" Text="General"></wsp:CollapsiblePanel>
|
||||
<asp:Panel ID="General" runat="server" Height="0" style="overflow:hidden;">
|
||||
<table>
|
||||
<tr>
|
||||
<td></td>
|
||||
|
@ -48,7 +49,7 @@
|
|||
<tr>
|
||||
<td class="FormLabel150"><asp:Localize ID="Localize2" runat="server" meta:resourcekey="locMailboxplanName" Text="Mailbox plan: *"></asp:Localize></td>
|
||||
<td>
|
||||
<wsp:MailboxPlanSelector ID="mailboxPlanSelector" runat="server" />
|
||||
<wsp:MailboxPlanSelector ID="mailboxPlanSelector" runat="server" OnChanged="mailboxPlanSelector_Changed" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -65,9 +66,28 @@
|
|||
</tr>
|
||||
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Panel>
|
||||
</asp:Panel>
|
||||
|
||||
<wsp:CollapsiblePanel id="secArchiving" runat="server" TargetControlID="Archiving" meta:resourcekey="secArchiving" Text="Archiving"></wsp:CollapsiblePanel>
|
||||
<asp:Panel ID="Archiving" runat="server" Height="0" style="overflow:hidden;">
|
||||
<table>
|
||||
<tr>
|
||||
<td class="FormLabel150"></td>
|
||||
<td>
|
||||
<asp:CheckBox ID="chkArchiving" runat="server" meta:resourcekey ="chkArchiving" Text ="Enable Archiving" AutoPostBack="true" OnCheckedChanged="chkArchiving_CheckedChanged"></asp:CheckBox>
|
||||
</td>
|
||||
</tr>
|
||||
<tr runat="server" id="mailboxArchivePlan">
|
||||
<td class="FormLabel150"><asp:Localize ID="locRetentionPolicyName" runat="server" meta:resourcekey="locRetentionPolicyName" Text="Retention policy: "></asp:Localize></td>
|
||||
<td>
|
||||
<wsp:MailboxPlanSelector ID="mailboxRetentionPolicySelector" runat="server" Archiving="true" AddNone="true"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</asp:Panel>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<wsp:CollapsiblePanel id="secLitigationHoldSettings" runat="server" TargetControlID="LitigationHoldSettings" meta:resourcekey="secLitigationHoldSettings" Text="Litigation Hold"></wsp:CollapsiblePanel>
|
||||
<asp:Panel ID="LitigationHoldSettings" runat="server" Height="0" style="overflow:hidden;">
|
||||
|
|
|
@ -34,13 +34,25 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
{
|
||||
public partial class ExchangeMailboxGeneralSettings : WebsitePanelModuleBase
|
||||
{
|
||||
|
||||
private PackageContext cntx = null;
|
||||
private PackageContext Cntx
|
||||
{
|
||||
get
|
||||
{
|
||||
if (cntx == null)
|
||||
cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||
|
||||
return cntx;
|
||||
}
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||
|
||||
if (Utils.CheckQouta(Quotas.EXCHANGE2007_DISCLAIMERSALLOWED, cntx))
|
||||
if (Utils.CheckQouta(Quotas.EXCHANGE2007_DISCLAIMERSALLOWED, Cntx))
|
||||
{
|
||||
ddDisclaimer.Items.Add(new System.Web.UI.WebControls.ListItem("None", "-1"));
|
||||
ExchangeDisclaimer[] disclaimers = ES.Services.ExchangeServer.GetExchangeDisclaimers(PanelRequest.ItemID);
|
||||
|
@ -55,30 +67,25 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
|
||||
BindSettings();
|
||||
|
||||
SetArchivingVisible();
|
||||
|
||||
UserInfo user = UsersHelper.GetUser(PanelSecurity.EffectiveUserId);
|
||||
|
||||
if (user != null)
|
||||
{
|
||||
|
||||
if ((user.Role == UserRole.User) & (Utils.CheckQouta(Quotas.EXCHANGE2007_ISCONSUMER, cntx)))
|
||||
if ((user.Role == UserRole.User) & (Utils.CheckQouta(Quotas.EXCHANGE2007_ISCONSUMER, Cntx)))
|
||||
{
|
||||
chkHideAddressBook.Visible = false;
|
||||
chkDisable.Visible = false;
|
||||
}
|
||||
|
||||
secLitigationHoldSettings.Visible = (Utils.CheckQouta(Quotas.EXCHANGE2007_ALLOWLITIGATIONHOLD, cntx));
|
||||
secLitigationHoldSettings.Visible = (Utils.CheckQouta(Quotas.EXCHANGE2007_ALLOWLITIGATIONHOLD, Cntx));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private bool CheckQouta(string key, PackageContext cntx)
|
||||
{
|
||||
return cntx.Quotas.ContainsKey(key) &&
|
||||
((cntx.Quotas[key].QuotaAllocatedValue == 1 && cntx.Quotas[key].QuotaTypeId == 1) ||
|
||||
(cntx.Quotas[key].QuotaTypeId != 1 && (cntx.Quotas[key].QuotaAllocatedValue > 0 || cntx.Quotas[key].QuotaAllocatedValue == -1)));
|
||||
}
|
||||
|
||||
private void BindSettings()
|
||||
{
|
||||
try
|
||||
|
@ -114,6 +121,17 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
mailboxPlanSelector.MailboxPlanId = account.MailboxPlanId.ToString();
|
||||
}
|
||||
|
||||
if (account.ArchivingMailboxPlanId<1)
|
||||
{
|
||||
mailboxRetentionPolicySelector.MailboxPlanId = "-1";
|
||||
chkArchiving.Checked = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
mailboxRetentionPolicySelector.MailboxPlanId = account.ArchivingMailboxPlanId.ToString();
|
||||
chkArchiving.Checked = true;
|
||||
}
|
||||
|
||||
mailboxSize.QuotaUsedValue = Convert.ToInt32(stats.TotalSize / 1024 / 1024);
|
||||
mailboxSize.QuotaValue = (stats.MaxSize == -1) ? -1 : (int)Math.Round((double)(stats.MaxSize / 1024 / 1024));
|
||||
|
||||
|
@ -124,8 +142,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
litigationHoldSpace.QuotaUsedValue = Convert.ToInt32(stats.LitigationHoldTotalSize / 1024 / 1024);
|
||||
litigationHoldSpace.QuotaValue = (stats.LitigationHoldMaxSize == -1) ? -1 : (int)Math.Round((double)(stats.LitigationHoldMaxSize / 1024 / 1024));
|
||||
|
||||
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||
if (Utils.CheckQouta(Quotas.EXCHANGE2007_DISCLAIMERSALLOWED, cntx))
|
||||
if (Utils.CheckQouta(Quotas.EXCHANGE2007_DISCLAIMERSALLOWED, Cntx))
|
||||
{
|
||||
int disclaimerId = ES.Services.ExchangeServer.GetExchangeAccountDisclaimerId(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
ddDisclaimer.SelectedValue = disclaimerId.ToString();
|
||||
|
@ -163,7 +180,14 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
}
|
||||
else
|
||||
{
|
||||
result = ES.Services.ExchangeServer.SetExchangeMailboxPlan(PanelRequest.ItemID, PanelRequest.AccountID, Convert.ToInt32(mailboxPlanSelector.MailboxPlanId));
|
||||
int planId = Convert.ToInt32(mailboxPlanSelector.MailboxPlanId);
|
||||
int policyId = -1;
|
||||
if (chkArchiving.Checked)
|
||||
policyId = Convert.ToInt32(mailboxRetentionPolicySelector.MailboxPlanId);
|
||||
|
||||
result = ES.Services.ExchangeServer.SetExchangeMailboxPlan(PanelRequest.ItemID, PanelRequest.AccountID, planId,
|
||||
policyId);
|
||||
|
||||
if (result < 0)
|
||||
{
|
||||
messageBox.ShowResultMessage(result);
|
||||
|
@ -171,8 +195,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
}
|
||||
}
|
||||
|
||||
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||
if (Utils.CheckQouta(Quotas.EXCHANGE2007_DISCLAIMERSALLOWED, cntx))
|
||||
if (Utils.CheckQouta(Quotas.EXCHANGE2007_DISCLAIMERSALLOWED, Cntx))
|
||||
{
|
||||
int disclaimerId;
|
||||
if (int.TryParse(ddDisclaimer.SelectedValue, out disclaimerId))
|
||||
|
@ -241,5 +264,35 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
return result;
|
||||
}
|
||||
|
||||
protected void chkArchiving_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
SetArchivingVisible();
|
||||
}
|
||||
|
||||
private void SetArchivingVisible()
|
||||
{
|
||||
int id;
|
||||
if (!int.TryParse(mailboxPlanSelector.MailboxPlanId, out id))
|
||||
return;
|
||||
|
||||
bool archiving = false;
|
||||
|
||||
ExchangeMailboxPlan policy = ES.Services.ExchangeServer.GetExchangeMailboxPlan(PanelRequest.ItemID, id);
|
||||
|
||||
if (policy != null)
|
||||
archiving = policy.EnableArchiving & Utils.CheckQouta(Quotas.EXCHANGE2013_ALLOWARCHIVING, Cntx);
|
||||
|
||||
if (!archiving)
|
||||
chkArchiving.Checked = false;
|
||||
|
||||
secArchiving.Visible = archiving;
|
||||
mailboxArchivePlan.Visible = chkArchiving.Checked;
|
||||
}
|
||||
|
||||
protected void mailboxPlanSelector_Changed(object sender, EventArgs e)
|
||||
{
|
||||
SetArchivingVisible();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -48,6 +48,22 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks;
|
||||
/// breadcrumb control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Breadcrumb breadcrumb;
|
||||
|
||||
/// <summary>
|
||||
/// menu control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Menu menu;
|
||||
|
||||
/// <summary>
|
||||
/// Image1 control.
|
||||
|
@ -94,6 +110,15 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
|
||||
|
||||
/// <summary>
|
||||
/// GeneralUpdatePanel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.UpdatePanel GeneralUpdatePanel;
|
||||
|
||||
/// <summary>
|
||||
/// secGeneral control.
|
||||
/// </summary>
|
||||
|
@ -112,15 +137,6 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Panel General;
|
||||
|
||||
/// <summary>
|
||||
/// GeneralUpdatePanel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.UpdatePanel GeneralUpdatePanel;
|
||||
|
||||
/// <summary>
|
||||
/// chkHideAddressBook control.
|
||||
/// </summary>
|
||||
|
@ -193,6 +209,60 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.QuotaViewer mailboxSize;
|
||||
|
||||
/// <summary>
|
||||
/// secArchiving control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.CollapsiblePanel secArchiving;
|
||||
|
||||
/// <summary>
|
||||
/// Archiving control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Panel Archiving;
|
||||
|
||||
/// <summary>
|
||||
/// chkArchiving control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox chkArchiving;
|
||||
|
||||
/// <summary>
|
||||
/// mailboxArchivePlan control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlTableRow mailboxArchivePlan;
|
||||
|
||||
/// <summary>
|
||||
/// locRetentionPolicyName control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize locRetentionPolicyName;
|
||||
|
||||
/// <summary>
|
||||
/// mailboxRetentionPolicySelector control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.MailboxPlanSelector mailboxRetentionPolicySelector;
|
||||
|
||||
/// <summary>
|
||||
/// secLitigationHoldSettings control.
|
||||
/// </summary>
|
||||
|
|
|
@ -15,14 +15,14 @@
|
|||
<div class="Center">
|
||||
<div class="Title">
|
||||
<asp:Image ID="Image1" SkinID="ExchangeDomainName48" runat="server" />
|
||||
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Domain Names"></asp:Localize>
|
||||
<asp:Localize ID="locTitle" runat="server"></asp:Localize>
|
||||
</div>
|
||||
<div class="FormBody">
|
||||
<wsp:SimpleMessageBox id="messageBox" runat="server" />
|
||||
|
||||
<div class="FormButtonsBarClean">
|
||||
<asp:Button ID="btnAddMailboxPlan" runat="server" meta:resourcekey="btnAddMailboxPlan"
|
||||
Text="Add New Mailboxplan" CssClass="Button1" OnClick="btnAddMailboxPlan_Click" />
|
||||
Text="Add New" CssClass="Button1" OnClick="btnAddMailboxPlan_Click" />
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="gvMailboxPlans" runat="server" AutoGenerateColumns="False" EnableViewState="true"
|
||||
|
|
|
@ -35,8 +35,21 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
{
|
||||
public partial class ExchangeMailboxPlans : WebsitePanelModuleBase
|
||||
{
|
||||
private bool RetentionPolicy
|
||||
{
|
||||
get
|
||||
{
|
||||
return PanelRequest.Ctl.ToLower().Contains("retentionpolicy");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
locTitle.Text = RetentionPolicy ? GetLocalizedString("locTitleRetentionPolicy.Text") : GetLocalizedString("locTitle.Text");
|
||||
gvMailboxPlans.Columns[2].Visible = !RetentionPolicy;
|
||||
btnSetDefaultMailboxPlan.Visible = !RetentionPolicy;
|
||||
|
||||
if (!IsPostBack)
|
||||
{
|
||||
// bind mailboxplans
|
||||
|
@ -71,7 +84,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
|
||||
private void BindMailboxPlans()
|
||||
{
|
||||
ExchangeMailboxPlan[] list = ES.Services.ExchangeServer.GetExchangeMailboxPlans(PanelRequest.ItemID);
|
||||
ExchangeMailboxPlan[] list = ES.Services.ExchangeServer.GetExchangeMailboxPlans(PanelRequest.ItemID, RetentionPolicy);
|
||||
|
||||
gvMailboxPlans.DataSource = list;
|
||||
gvMailboxPlans.DataBind();
|
||||
|
@ -94,7 +107,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
{
|
||||
btnSetDefaultMailboxPlan.Enabled = true;
|
||||
Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "add_mailboxplan",
|
||||
"SpaceID=" + PanelSecurity.PackageId));
|
||||
"SpaceID=" + PanelSecurity.PackageId, "archiving="+RetentionPolicy));
|
||||
}
|
||||
|
||||
protected void gvMailboxPlan_RowCommand(object sender, GridViewCommandEventArgs e)
|
||||
|
@ -177,7 +190,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
foreach (ExchangeAccount a in Accounts)
|
||||
{
|
||||
txtStatus.Text = "Completed";
|
||||
int result = ES.Services.ExchangeServer.SetExchangeMailboxPlan(PanelRequest.ItemID, a.AccountId, Convert.ToInt32(mailboxPlanSelectorTarget.MailboxPlanId));
|
||||
int result = ES.Services.ExchangeServer.SetExchangeMailboxPlan(PanelRequest.ItemID, a.AccountId, Convert.ToInt32(mailboxPlanSelectorTarget.MailboxPlanId), a.ArchivingMailboxPlanId);
|
||||
if (result < 0)
|
||||
{
|
||||
BindMailboxPlans();
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<div class="Center">
|
||||
<div class="Title">
|
||||
<asp:Image ID="Image1" SkinID="ExchangeMailbox48" runat="server" />
|
||||
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Mailboxes"></asp:Localize>
|
||||
<asp:Localize ID="locTitle" runat="server" Text="Mailboxes"></asp:Localize>
|
||||
</div>
|
||||
<div class="FormBody">
|
||||
<wsp:SimpleMessageBox id="messageBox" runat="server" />
|
||||
|
@ -88,12 +88,14 @@
|
|||
SelectMethod="GetExchangeAccountsPaged"
|
||||
SortParameterName="sortColumn"
|
||||
TypeName="WebsitePanel.Portal.ExchangeHelper"
|
||||
OnSelecting="odsAccountsPaged_Selecting"
|
||||
OnSelected="odsAccountsPaged_Selected">
|
||||
<SelectParameters>
|
||||
<asp:QueryStringParameter Name="itemId" QueryStringField="ItemID" DefaultValue="0" />
|
||||
<asp:Parameter Name="accountTypes" DefaultValue="1,5,6" />
|
||||
<asp:ControlParameter Name="filterColumn" ControlID="ddlSearchColumn" PropertyName="SelectedValue" />
|
||||
<asp:ControlParameter Name="filterValue" ControlID="txtSearchValue" PropertyName="Text" />
|
||||
<asp:Parameter Name="archiving" Type="Boolean" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
<br />
|
||||
|
|
|
@ -35,8 +35,20 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
{
|
||||
public partial class ExchangeMailboxes : WebsitePanelModuleBase
|
||||
{
|
||||
private bool ArchivingBoxes
|
||||
{
|
||||
get
|
||||
{
|
||||
return PanelRequest.Ctl.ToLower().Contains("archiving");
|
||||
}
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
locTitle.Text = ArchivingBoxes ? GetLocalizedString("locTitleArchiving.Text") : GetLocalizedString("locTitle.Text");
|
||||
|
||||
btnCreateMailbox.Visible = !ArchivingBoxes;
|
||||
|
||||
if (!IsPostBack)
|
||||
{
|
||||
BindStats();
|
||||
|
@ -149,5 +161,10 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
"ItemID=" + PanelRequest.ItemID,
|
||||
"Context=User");
|
||||
}
|
||||
|
||||
protected void odsAccountsPaged_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
|
||||
{
|
||||
e.InputParameters["archiving"] = ArchivingBoxes;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,141 @@
|
|||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ExchangeRetentionPolicyTag.ascx.cs" Inherits="WebsitePanel.Portal.ExchangeServer.ExchangeRetentionPolicyTag" %>
|
||||
<%@ Register Src="UserControls/SizeBox.ascx" TagName="SizeBox" TagPrefix="wsp" %><%@ Register Src="UserControls/DaysBox.ascx" TagName="DaysBox" TagPrefix="wsp" %>
|
||||
<%@ Register Src="../UserControls/CollapsiblePanel.ascx" TagName="CollapsiblePanel" TagPrefix="wsp" %>
|
||||
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
|
||||
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
|
||||
<%@ Register Src="../UserControls/QuotaEditor.ascx" TagName="QuotaEditor" TagPrefix="uc1" %>
|
||||
<%@ Register Src="UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %>
|
||||
<%@ Register Src="UserControls/Breadcrumb.ascx" TagName="Breadcrumb" TagPrefix="wsp" %>
|
||||
|
||||
<%@ Import Namespace="WebsitePanel.Portal" %>
|
||||
|
||||
<div id="ExchangeContainer">
|
||||
<div class="Module">
|
||||
<div class="Header">
|
||||
<wsp:breadcrumb id="breadcrumb" runat="server" PageName="Text.PageName" />
|
||||
</div>
|
||||
<div class="Left">
|
||||
<wsp:menu id="menu" runat="server" SelectedItem="domains" />
|
||||
</div>
|
||||
<div class="Content">
|
||||
<div class="Center">
|
||||
<div class="Title">
|
||||
<asp:Image ID="Image1" SkinID="ExchangeDomainName48" runat="server" />
|
||||
<asp:Localize ID="locTitle" runat="server"></asp:Localize>
|
||||
</div>
|
||||
<div class="FormBody">
|
||||
<wsp:SimpleMessageBox id="messageBox" runat="server" />
|
||||
|
||||
|
||||
<asp:GridView id="gvPolicy" runat="server" EnableViewState="true" AutoGenerateColumns="false"
|
||||
Width="100%" EmptyDataText="gvPolicy" CssSelectorClass="NormalGridView" OnRowCommand="gvPolicy_RowCommand" >
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Image ID="imgType" runat="server" Width="16px" Height="16px" ImageUrl='<%# GetTagType((int)Eval("ItemID")) %>' ImageAlign="AbsMiddle" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Tag">
|
||||
<ItemStyle Width="70%"></ItemStyle>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="linkcmdEdit" runat="server" CommandName="EditItem" AlternateText="Edit record" CommandArgument='<%# Eval("TagId") %>' Enabled='<%# ((int)Eval("ItemID") == PanelRequest.ItemID) %>' >
|
||||
<asp:Label id="lnkDisplayPolicy" runat="server" EnableViewState="true" ><%# PortalAntiXSS.Encode((string)Eval("TagName"))%></asp:Label>
|
||||
</asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:ImageButton ID="cmdEdit" runat="server" SkinID="EditSmall" CommandName="EditItem" CommandArgument='<%# Eval("TagId") %>' Visible='<%# ((int)Eval("ItemID") == PanelRequest.ItemID) %>' ></asp:ImageButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:ImageButton id="imgDelPolicy" runat="server" Text="Delete" SkinID="ExchangeDelete"
|
||||
CommandName="DeleteItem" CommandArgument='<%# Eval("TagId") %>'
|
||||
meta:resourcekey="cmdDelete" OnClientClick="return confirm('Are you sure you want to delete selected policy tag?')"
|
||||
Visible='<%# ((int)Eval("ItemID") == PanelRequest.ItemID) %>' >
|
||||
</asp:ImageButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<wsp:CollapsiblePanel id="secPolicy" runat="server"
|
||||
TargetControlID="Policy" meta:resourcekey="secPolicy" Text="Policy">
|
||||
</wsp:CollapsiblePanel>
|
||||
<asp:Panel ID="Policy" runat="server" Height="0" style="overflow:hidden;">
|
||||
<table>
|
||||
<tr>
|
||||
<td class="FormLabel200" align="right">
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="txtPolicy" runat="server" CssClass="TextBox200"
|
||||
ontextchanged="txtPolicy_TextChanged" ></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="valRequirePolicy" runat="server" meta:resourcekey="valRequirePolicy" ControlToValidate="txtPolicy"
|
||||
ErrorMessage="Enter policy tag name" ValidationGroup="CreatePolicy" Display="Dynamic" Text="*" SetFocusOnError="True"></asp:RequiredFieldValidator>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
</asp:Panel>
|
||||
|
||||
<wsp:CollapsiblePanel id="secPolicyFeatures" runat="server"
|
||||
TargetControlID="PolicyFeatures" meta:resourcekey="secPolicyFeatures" Text="Policy Tag Features">
|
||||
</wsp:CollapsiblePanel>
|
||||
<asp:Panel ID="PolicyFeatures" runat="server" Height="0" style="overflow:hidden;">
|
||||
<table>
|
||||
<tr>
|
||||
<td class="FormLabel200" align="right"><asp:Localize ID="locType" runat="server" meta:resourcekey="locType" Text="Type :"></asp:Localize></td>
|
||||
<td>
|
||||
<asp:DropDownList ID="ddTagType" runat="server"></asp:DropDownList>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="FormLabel200" align="right"><asp:Localize ID="locAgeLimitForRetention" runat="server" meta:resourcekey="locAgeLimitForRetention" Text="Age limit ror retention :"></asp:Localize></td>
|
||||
<td>
|
||||
<div class="Right">
|
||||
<uc1:QuotaEditor id="ageLimitForRetention" runat="server"
|
||||
QuotaTypeID="2"
|
||||
QuotaValue="0"
|
||||
ParentQuotaValue="-1"></uc1:QuotaEditor>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="FormLabel200" align="right"><asp:Localize ID="locRetentionAction" runat="server" meta:resourcekey="locRetentionAction" Text="Retention action :"></asp:Localize></td>
|
||||
<td>
|
||||
<asp:DropDownList ID="ddRetentionAction" runat="server"></asp:DropDownList>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
</asp:Panel>
|
||||
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="FormButtonsBarClean">
|
||||
<asp:Button ID="btnAddPolicy" runat="server" meta:resourcekey="btnAddPolicy"
|
||||
Text="Add New" CssClass="Button1" OnClick="btnAddPolicy_Click" />
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="FormButtonsBarClean">
|
||||
<asp:Button ID="btnUpdatePolicy" runat="server" meta:resourcekey="btnUpdatePolicy"
|
||||
Text="Update" CssClass="Button1" OnClick="btnUpdatePolicy_Click" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
|
||||
<asp:TextBox ID="txtStatus" runat="server" CssClass="TextBox400" MaxLength="128" ReadOnly="true"></asp:TextBox>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,238 @@
|
|||
// 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.IO;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Collections;
|
||||
using System.Xml;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.WebControls.WebParts;
|
||||
using System.Web.UI.HtmlControls;
|
||||
|
||||
using WebsitePanel.EnterpriseServer;
|
||||
using WebsitePanel.Providers.HostedSolution;
|
||||
|
||||
namespace WebsitePanel.Portal.ExchangeServer
|
||||
{
|
||||
public partial class ExchangeRetentionPolicyTag : WebsitePanelModuleBase
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
BindRetentionPolicy();
|
||||
|
||||
string[] types = Enum.GetNames(typeof(ExchangeRetentionPolicyTagType));
|
||||
|
||||
ddTagType.Items.Clear();
|
||||
for (int i = 0; i < types.Length; i++)
|
||||
ddTagType.Items.Add(new ListItem(types[i], i.ToString()));
|
||||
|
||||
string[] action = Enum.GetNames(typeof(ExchangeRetentionPolicyTagAction));
|
||||
|
||||
ddRetentionAction.Items.Clear();
|
||||
for (int i = 0; i < action.Length; i++)
|
||||
ddRetentionAction.Items.Add(new ListItem(action[i], i.ToString()));
|
||||
}
|
||||
|
||||
txtStatus.Visible = false;
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void BindRetentionPolicy()
|
||||
{
|
||||
WebsitePanel.Providers.HostedSolution.ExchangeRetentionPolicyTag[] list = ES.Services.ExchangeServer.GetExchangeRetentionPolicyTags(PanelRequest.ItemID);
|
||||
|
||||
gvPolicy.DataSource = list;
|
||||
gvPolicy.DataBind();
|
||||
|
||||
btnUpdatePolicy.Enabled = (string.IsNullOrEmpty(txtPolicy.Text)) ? false : true;
|
||||
}
|
||||
|
||||
|
||||
public void btnAddPolicy_Click(object sender, EventArgs e)
|
||||
{
|
||||
Page.Validate("CreatePolicy");
|
||||
|
||||
if (!Page.IsValid)
|
||||
return;
|
||||
|
||||
WebsitePanel.Providers.HostedSolution.ExchangeRetentionPolicyTag tag = new Providers.HostedSolution.ExchangeRetentionPolicyTag();
|
||||
tag.TagName = txtPolicy.Text;
|
||||
tag.TagType = Convert.ToInt32(ddTagType.SelectedValue);
|
||||
tag.AgeLimitForRetention = ageLimitForRetention.QuotaValue;
|
||||
tag.RetentionAction = Convert.ToInt32(ddRetentionAction.SelectedValue);
|
||||
|
||||
int result = ES.Services.ExchangeServer.AddExchangeRetentionPolicyTag(PanelRequest.ItemID, tag);
|
||||
|
||||
if (result < 0)
|
||||
{
|
||||
ShowResultMessage(result);
|
||||
return;
|
||||
}
|
||||
|
||||
BindRetentionPolicy();
|
||||
}
|
||||
|
||||
protected void gvPolicy_RowCommand(object sender, GridViewCommandEventArgs e)
|
||||
{
|
||||
int mailboxPlanId = Utils.ParseInt(e.CommandArgument.ToString(), 0);
|
||||
Providers.HostedSolution.ExchangeRetentionPolicyTag tag;
|
||||
|
||||
switch (e.CommandName)
|
||||
{
|
||||
case "DeleteItem":
|
||||
try
|
||||
{
|
||||
tag = ES.Services.ExchangeServer.GetExchangeRetentionPolicyTag(PanelRequest.ItemID, mailboxPlanId);
|
||||
|
||||
if (tag.ItemID != PanelRequest.ItemID)
|
||||
{
|
||||
ShowErrorMessage("EXCHANGE_UNABLE_USE_SYSTEMPLAN");
|
||||
BindRetentionPolicy();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
int result = ES.Services.ExchangeServer.DeleteExchangeRetentionPolicyTag(PanelRequest.ItemID, mailboxPlanId);
|
||||
if (result < 0)
|
||||
{
|
||||
ShowResultMessage(result);
|
||||
return;
|
||||
}
|
||||
|
||||
ViewState["PolicyID"] = null;
|
||||
|
||||
txtPolicy.Text = string.Empty;
|
||||
ageLimitForRetention.QuotaValue = 0;
|
||||
|
||||
btnUpdatePolicy.Enabled = (string.IsNullOrEmpty(txtPolicy.Text)) ? false : true;
|
||||
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
ShowErrorMessage("EXCHANGE_DELETE_MAILBOXPLAN");
|
||||
}
|
||||
|
||||
BindRetentionPolicy();
|
||||
break;
|
||||
|
||||
case "EditItem":
|
||||
ViewState["PolicyID"] = mailboxPlanId;
|
||||
|
||||
tag = ES.Services.ExchangeServer.GetExchangeRetentionPolicyTag(PanelRequest.ItemID, mailboxPlanId);
|
||||
|
||||
txtPolicy.Text = tag.TagName;
|
||||
Utils.SelectListItem(ddTagType, tag.TagType);
|
||||
ageLimitForRetention.QuotaValue = tag.AgeLimitForRetention;
|
||||
Utils.SelectListItem(ddRetentionAction, tag.RetentionAction);
|
||||
|
||||
btnUpdatePolicy.Enabled = (string.IsNullOrEmpty(txtPolicy.Text)) ? false : true;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void SaveSettings(UserSettings settings)
|
||||
{
|
||||
settings["PolicyID"] = "";
|
||||
}
|
||||
|
||||
|
||||
protected void btnUpdatePolicy_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
if (ViewState["PolicyID"] == null)
|
||||
return;
|
||||
|
||||
int mailboxPlanId = (int)ViewState["PolicyID"];
|
||||
Providers.HostedSolution.ExchangeRetentionPolicyTag tag;
|
||||
|
||||
tag = ES.Services.ExchangeServer.GetExchangeRetentionPolicyTag(PanelRequest.ItemID, mailboxPlanId);
|
||||
|
||||
if (tag.ItemID != PanelRequest.ItemID)
|
||||
{
|
||||
ShowErrorMessage("EXCHANGE_UNABLE_USE_SYSTEMPLAN");
|
||||
BindRetentionPolicy();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
tag.TagName = txtPolicy.Text;
|
||||
tag.TagType = Convert.ToInt32(ddTagType.SelectedValue);
|
||||
tag.AgeLimitForRetention = ageLimitForRetention.QuotaValue;
|
||||
tag.RetentionAction = Convert.ToInt32(ddRetentionAction.SelectedValue);
|
||||
|
||||
int result = ES.Services.ExchangeServer.UpdateExchangeRetentionPolicyTag(PanelRequest.ItemID, tag);
|
||||
|
||||
if (result < 0)
|
||||
{
|
||||
ShowErrorMessage("EXCHANGE_UPDATEPLANS");
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowSuccessMessage("EXCHANGE_UPDATEPLANS");
|
||||
}
|
||||
|
||||
BindRetentionPolicy();
|
||||
}
|
||||
|
||||
|
||||
protected void txtPolicy_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
btnUpdatePolicy.Enabled = (string.IsNullOrEmpty(txtPolicy.Text)) ? false : true;
|
||||
}
|
||||
|
||||
public string GetTagType(int ItemID)
|
||||
{
|
||||
string imgName = string.Empty;
|
||||
|
||||
if (ItemID == PanelRequest.ItemID)
|
||||
imgName = "admin_16.png";
|
||||
else
|
||||
imgName = "company24.png";
|
||||
|
||||
return GetThemedImage("Exchange/" + imgName);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,204 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebsitePanel.Portal.ExchangeServer {
|
||||
|
||||
|
||||
public partial class ExchangeRetentionPolicyTag {
|
||||
|
||||
/// <summary>
|
||||
/// breadcrumb control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Breadcrumb breadcrumb;
|
||||
|
||||
/// <summary>
|
||||
/// menu control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Menu menu;
|
||||
|
||||
/// <summary>
|
||||
/// Image1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Image Image1;
|
||||
|
||||
/// <summary>
|
||||
/// locTitle control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize locTitle;
|
||||
|
||||
/// <summary>
|
||||
/// messageBox control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
|
||||
|
||||
/// <summary>
|
||||
/// gvPolicy control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.GridView gvPolicy;
|
||||
|
||||
/// <summary>
|
||||
/// secPolicy control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.CollapsiblePanel secPolicy;
|
||||
|
||||
/// <summary>
|
||||
/// Policy control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Panel Policy;
|
||||
|
||||
/// <summary>
|
||||
/// txtPolicy control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtPolicy;
|
||||
|
||||
/// <summary>
|
||||
/// valRequirePolicy control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.RequiredFieldValidator valRequirePolicy;
|
||||
|
||||
/// <summary>
|
||||
/// secPolicyFeatures control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.CollapsiblePanel secPolicyFeatures;
|
||||
|
||||
/// <summary>
|
||||
/// PolicyFeatures control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Panel PolicyFeatures;
|
||||
|
||||
/// <summary>
|
||||
/// locType control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize locType;
|
||||
|
||||
/// <summary>
|
||||
/// ddTagType control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.DropDownList ddTagType;
|
||||
|
||||
/// <summary>
|
||||
/// locAgeLimitForRetention control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize locAgeLimitForRetention;
|
||||
|
||||
/// <summary>
|
||||
/// ageLimitForRetention control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.QuotaEditor ageLimitForRetention;
|
||||
|
||||
/// <summary>
|
||||
/// locRetentionAction control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize locRetentionAction;
|
||||
|
||||
/// <summary>
|
||||
/// ddRetentionAction control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.DropDownList ddRetentionAction;
|
||||
|
||||
/// <summary>
|
||||
/// btnAddPolicy control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button btnAddPolicy;
|
||||
|
||||
/// <summary>
|
||||
/// btnUpdatePolicy control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button btnUpdatePolicy;
|
||||
|
||||
/// <summary>
|
||||
/// txtStatus control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtStatus;
|
||||
}
|
||||
}
|
|
@ -234,6 +234,48 @@
|
|||
</tr>
|
||||
</asp:Panel>
|
||||
|
||||
<asp:Panel runat="server" ID="crm2013StatsPanel">
|
||||
<tr >
|
||||
<td class="OrgStatsGroup" width="100%" colspan="2">
|
||||
<asp:Localize ID="locCRM2013" runat="server" meta:resourcekey="locCRM2013"
|
||||
Text="CRM 2013"></asp:Localize>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="OrgStatsRow">
|
||||
<td align="right" nowrap>
|
||||
<asp:HyperLink ID="lnkProfessionalCRMUsers" runat="server" meta:resourcekey="lnkProfessionalCRMUsers" Text="Professional licenses :"></asp:HyperLink>
|
||||
</td>
|
||||
<td>
|
||||
<wsp:QuotaViewer ID="crmProfessionalUsersStats" QuotaTypeId="2" runat="server" DisplayGauge="true" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="OrgStatsRow">
|
||||
<td align="right" nowrap>
|
||||
<asp:HyperLink ID="lnkBasicCRMUsers" runat="server" meta:resourcekey="lnkBasicCRMUsers" Text="Basic licenses :"></asp:HyperLink>
|
||||
</td>
|
||||
<td>
|
||||
<wsp:QuotaViewer ID="crmBasicUsersStats" QuotaTypeId="2" runat="server" DisplayGauge="true" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="OrgStatsRow">
|
||||
<td align="right" nowrap>
|
||||
<asp:HyperLink ID="lnkEssentialCRMUsers" runat="server" meta:resourcekey="lnkEssentialCRMUsers" Text="Essential licenses :"></asp:HyperLink>
|
||||
</td>
|
||||
<td>
|
||||
<wsp:QuotaViewer ID="crmEssentialUsersStats" QuotaTypeId="2" runat="server" DisplayGauge="true" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="OrgStatsRow">
|
||||
<td align="right" nowrap>
|
||||
<asp:HyperLink ID="lnkCRM2013DBSize" runat="server" meta:resourcekey="lnkCRMDBSize" Text="Storage size (MB):"></asp:HyperLink>
|
||||
</td>
|
||||
<td>
|
||||
<wsp:QuotaViewer ID="crm2013DBSize" runat="server" QuotaTypeId="2" DisplayGauge="true" />
|
||||
</td>
|
||||
</tr>
|
||||
</asp:Panel>
|
||||
|
||||
|
||||
<asp:Panel runat="server" ID="enterpriseStorageStatsPanel">
|
||||
<tr>
|
||||
<td class="OrgStatsGroup" width="100%" colspan="2">
|
||||
|
|
|
@ -221,11 +221,26 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
|
||||
if (org.CrmOrganizationId != Guid.Empty)
|
||||
{
|
||||
crmStatsPanel.Visible = true;
|
||||
BindCRMStats(orgStats, tenantStats);
|
||||
|
||||
if (cntx.Groups.ContainsKey(ResourceGroups.HostedCRM2013))
|
||||
{
|
||||
crm2013StatsPanel.Visible = true;
|
||||
crmStatsPanel.Visible = false;
|
||||
BindCRM2013Stats(orgStats, tenantStats);
|
||||
}
|
||||
else if (cntx.Groups.ContainsKey(ResourceGroups.HostedCRM))
|
||||
{
|
||||
crmStatsPanel.Visible = true;
|
||||
crm2013StatsPanel.Visible = false;
|
||||
BindCRMStats(orgStats, tenantStats);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
crmStatsPanel.Visible = false;
|
||||
crm2013StatsPanel.Visible = false;
|
||||
}
|
||||
|
||||
|
||||
if (cntx.Groups.ContainsKey(ResourceGroups.EnterpriseStorage))
|
||||
|
@ -263,6 +278,30 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
crmDBSize.QuotaValue = Convert.ToInt32(stats.AllocatedCRMDiskSpace>0 ? stats.AllocatedCRMDiskSpace/(1024*1024) : -1);
|
||||
}
|
||||
|
||||
private void BindCRM2013Stats(OrganizationStatistics stats, OrganizationStatistics tenantStats)
|
||||
{
|
||||
lnkProfessionalCRMUsers.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "crmusers",
|
||||
"SpaceID=" + PanelSecurity.PackageId);
|
||||
|
||||
lnkBasicCRMUsers.NavigateUrl = lnkCRMUsers.NavigateUrl;
|
||||
lnkEssentialCRMUsers.NavigateUrl = lnkCRMUsers.NavigateUrl;
|
||||
|
||||
lnkCRM2013DBSize.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "crm_storage_settings",
|
||||
"SpaceID=" + PanelSecurity.PackageId);
|
||||
|
||||
crmProfessionalUsersStats.QuotaUsedValue = stats.CreatedProfessionalCRMUsers;
|
||||
crmProfessionalUsersStats.QuotaValue = stats.AllocatedProfessionalCRMUsers;
|
||||
|
||||
crmBasicUsersStats.QuotaUsedValue = stats.CreatedBasicCRMUsers;
|
||||
crmBasicUsersStats.QuotaValue = stats.AllocatedBasicCRMUsers;
|
||||
|
||||
crmEssentialUsersStats.QuotaUsedValue = stats.CreatedEssentialCRMUsers;
|
||||
crmEssentialUsersStats.QuotaValue = stats.AllocatedEssentialCRMUsers;
|
||||
|
||||
crm2013DBSize.QuotaUsedValue = Convert.ToInt32(stats.UsedCRMDiskSpace > 0 ? stats.UsedCRMDiskSpace / (1024 * 1024) : -1);
|
||||
crm2013DBSize.QuotaValue = Convert.ToInt32(stats.AllocatedCRMDiskSpace > 0 ? stats.AllocatedCRMDiskSpace / (1024 * 1024) : -1);
|
||||
}
|
||||
|
||||
private void BindOCSStats(OrganizationStatistics stats, OrganizationStatistics tenantStats)
|
||||
{
|
||||
ocsUsersStats.QuotaValue = stats.AllocatedOCSUsers;
|
||||
|
|
|
@ -571,6 +571,96 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.QuotaViewer crmDBSize;
|
||||
|
||||
/// <summary>
|
||||
/// crm2013StatsPanel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Panel crm2013StatsPanel;
|
||||
|
||||
/// <summary>
|
||||
/// locCRM2013 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize locCRM2013;
|
||||
|
||||
/// <summary>
|
||||
/// lnkProfessionalCRMUsers control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.HyperLink lnkProfessionalCRMUsers;
|
||||
|
||||
/// <summary>
|
||||
/// crmProfessionalUsersStats control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.QuotaViewer crmProfessionalUsersStats;
|
||||
|
||||
/// <summary>
|
||||
/// lnkBasicCRMUsers control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.HyperLink lnkBasicCRMUsers;
|
||||
|
||||
/// <summary>
|
||||
/// crmBasicUsersStats control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.QuotaViewer crmBasicUsersStats;
|
||||
|
||||
/// <summary>
|
||||
/// lnkEssentialCRMUsers control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.HyperLink lnkEssentialCRMUsers;
|
||||
|
||||
/// <summary>
|
||||
/// crmEssentialUsersStats control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.QuotaViewer crmEssentialUsersStats;
|
||||
|
||||
/// <summary>
|
||||
/// lnkCRM2013DBSize control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.HyperLink lnkCRM2013DBSize;
|
||||
|
||||
/// <summary>
|
||||
/// crm2013DBSize control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.QuotaViewer crm2013DBSize;
|
||||
|
||||
/// <summary>
|
||||
/// enterpriseStorageStatsPanel control.
|
||||
/// </summary>
|
||||
|
|
|
@ -213,4 +213,16 @@
|
|||
<data name="Text.LyncPhoneNumbers" xml:space="preserve">
|
||||
<value>Phone Numbers</value>
|
||||
</data>
|
||||
<data name="Text.CRMGroup2013" xml:space="preserve">
|
||||
<value>CRM 2013</value>
|
||||
</data>
|
||||
<data name="Text.ArchivingMailboxes" xml:space="preserve">
|
||||
<value>Archiving Mailboxes</value>
|
||||
</data>
|
||||
<data name="Text.RetentionPolicy" xml:space="preserve">
|
||||
<value>Retention Policy</value>
|
||||
</data>
|
||||
<data name="Text.RetentionPolicyTag" xml:space="preserve">
|
||||
<value>Retention Policy Tag</value>
|
||||
</data>
|
||||
</root>
|
|
@ -1,2 +1,2 @@
|
|||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MailboxPlanSelector.ascx.cs" Inherits="WebsitePanel.Portal.ExchangeServer.UserControls.MailboxPlanSelector" %>
|
||||
<asp:DropDownList ID="ddlMailboxPlan" runat="server" CssClass="NormalTextBox"></asp:DropDownList>
|
||||
<asp:DropDownList ID="ddlMailboxPlan" runat="server" CssClass="NormalTextBox" OnSelectedIndexChanged="ddlMailboxPlan_SelectedIndexChanged"></asp:DropDownList>
|
|
@ -33,25 +33,33 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
{
|
||||
public partial class MailboxPlanSelector : WebsitePanelControlBase
|
||||
{
|
||||
private void UpdateMailboxPlanSelected()
|
||||
{
|
||||
foreach (ListItem li in ddlMailboxPlan.Items)
|
||||
{
|
||||
if (li.Value == mailboxPlanToSelect)
|
||||
{
|
||||
ddlMailboxPlan.ClearSelection();
|
||||
li.Selected = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private string mailboxPlanToSelect;
|
||||
}
|
||||
|
||||
private string mailboxPlanToSelect = null;
|
||||
|
||||
public string MailboxPlanId
|
||||
{
|
||||
|
||||
get { return ddlMailboxPlan.SelectedItem.Value; }
|
||||
set
|
||||
{
|
||||
mailboxPlanToSelect = value;
|
||||
foreach (ListItem li in ddlMailboxPlan.Items)
|
||||
{
|
||||
if (li.Value == value)
|
||||
{
|
||||
ddlMailboxPlan.ClearSelection();
|
||||
li.Selected = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
get {
|
||||
if (ddlMailboxPlan.SelectedItem != null)
|
||||
return ddlMailboxPlan.SelectedItem.Value;
|
||||
return mailboxPlanToSelect;
|
||||
}
|
||||
set
|
||||
{
|
||||
mailboxPlanToSelect = value;
|
||||
UpdateMailboxPlanSelected();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -70,6 +78,13 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
}
|
||||
}
|
||||
|
||||
private bool archiving = false;
|
||||
public bool Archiving
|
||||
{
|
||||
get { return archiving; }
|
||||
set { archiving = value; }
|
||||
}
|
||||
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
@ -79,9 +94,24 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
}
|
||||
}
|
||||
|
||||
protected void Page_PreRender(object sender, EventArgs e)
|
||||
{
|
||||
ddlMailboxPlan.AutoPostBack = (Changed!=null);
|
||||
}
|
||||
|
||||
private void BindMailboxPlans()
|
||||
{
|
||||
WebsitePanel.Providers.HostedSolution.ExchangeMailboxPlan[] plans = ES.Services.ExchangeServer.GetExchangeMailboxPlans(PanelRequest.ItemID);
|
||||
|
||||
WebsitePanel.Providers.HostedSolution.ExchangeMailboxPlan[] plans = ES.Services.ExchangeServer.GetExchangeMailboxPlans(PanelRequest.ItemID, Archiving);
|
||||
|
||||
if (AddNone)
|
||||
{
|
||||
ListItem li = new ListItem();
|
||||
li.Text = "None";
|
||||
li.Value = "-1";
|
||||
li.Selected = false;
|
||||
ddlMailboxPlan.Items.Add(li);
|
||||
}
|
||||
|
||||
foreach (WebsitePanel.Providers.HostedSolution.ExchangeMailboxPlan plan in plans)
|
||||
{
|
||||
|
@ -92,29 +122,17 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
ddlMailboxPlan.Items.Add(li);
|
||||
}
|
||||
|
||||
if (AddNone)
|
||||
UpdateMailboxPlanSelected();
|
||||
|
||||
}
|
||||
|
||||
public event EventHandler Changed = null;
|
||||
protected void ddlMailboxPlan_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Changed != null)
|
||||
{
|
||||
ListItem li = new ListItem();
|
||||
li.Text = "[None]";
|
||||
li.Value = "-1";
|
||||
li.Selected = false;
|
||||
ddlMailboxPlan.Items.Add(li);
|
||||
Changed(this, e);
|
||||
}
|
||||
|
||||
|
||||
if (!string.IsNullOrEmpty(mailboxPlanToSelect))
|
||||
{
|
||||
foreach (ListItem li in ddlMailboxPlan.Items)
|
||||
{
|
||||
if (li.Value == mailboxPlanToSelect)
|
||||
{
|
||||
ddlMailboxPlan.ClearSelection();
|
||||
li.Selected = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -120,6 +120,9 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
if (Utils.CheckQouta(Quotas.EXCHANGE2007_MAILBOXES, cntx))
|
||||
exchangeGroup.MenuItems.Add(CreateMenuItem("Mailboxes", "mailboxes"));
|
||||
|
||||
if (Utils.CheckQouta(Quotas.EXCHANGE2013_ALLOWARCHIVING, cntx))
|
||||
exchangeGroup.MenuItems.Add(CreateMenuItem("ArchivingMailboxes", "archivingmailboxes"));
|
||||
|
||||
if (Utils.CheckQouta(Quotas.EXCHANGE2007_CONTACTS, cntx))
|
||||
exchangeGroup.MenuItems.Add(CreateMenuItem("Contacts", "contacts"));
|
||||
|
||||
|
@ -137,6 +140,14 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
if (Utils.CheckQouta(Quotas.EXCHANGE2007_MAILBOXES, cntx))
|
||||
exchangeGroup.MenuItems.Add(CreateMenuItem("MailboxPlans", "mailboxplans"));
|
||||
|
||||
if (!hideItems)
|
||||
if (Utils.CheckQouta(Quotas.EXCHANGE2013_ALLOWARCHIVING, cntx))
|
||||
exchangeGroup.MenuItems.Add(CreateMenuItem("RetentionPolicy", "retentionpolicy"));
|
||||
|
||||
if (!hideItems)
|
||||
if (Utils.CheckQouta(Quotas.EXCHANGE2013_ALLOWARCHIVING, cntx))
|
||||
exchangeGroup.MenuItems.Add(CreateMenuItem("RetentionPolicyTag", "retentionpolicytag"));
|
||||
|
||||
if (!hideItems)
|
||||
if (Utils.CheckQouta(Quotas.EXCHANGE2007_MAILBOXES, cntx))
|
||||
exchangeGroup.MenuItems.Add(CreateMenuItem("ExchangeDomainNames", "domains"));
|
||||
|
@ -200,6 +211,19 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
|
||||
}
|
||||
|
||||
private void PrepareCRMMenu2013(PackageContext cntx, List<MenuGroup> groups, string imagePath)
|
||||
{
|
||||
MenuGroup crmGroup = new MenuGroup(GetLocalizedString("Text.CRMGroup2013"), imagePath + "crm_16.png");
|
||||
|
||||
crmGroup.MenuItems.Add(CreateMenuItem("CRMOrganization", "CRMOrganizationDetails"));
|
||||
crmGroup.MenuItems.Add(CreateMenuItem("CRMUsers", "CRMUsers"));
|
||||
crmGroup.MenuItems.Add(CreateMenuItem("StorageLimits", "crm_storage_settings"));
|
||||
|
||||
if (crmGroup.MenuItems.Count > 0)
|
||||
groups.Add(crmGroup);
|
||||
|
||||
}
|
||||
|
||||
private void PrepareBlackBerryMenu(PackageContext cntx, List<MenuGroup> groups, string imagePath)
|
||||
{
|
||||
MenuGroup bbGroup = new MenuGroup(GetLocalizedString("Text.BlackBerryGroup"), imagePath + "blackberry16.png");
|
||||
|
@ -292,7 +316,9 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
}
|
||||
|
||||
//CRM Menu
|
||||
if (cntx.Groups.ContainsKey(ResourceGroups.HostedCRM))
|
||||
if (cntx.Groups.ContainsKey(ResourceGroups.HostedCRM2013))
|
||||
PrepareCRMMenu2013(cntx, groups, imagePath);
|
||||
else if (cntx.Groups.ContainsKey(ResourceGroups.HostedCRM))
|
||||
PrepareCRMMenu(cntx, groups, imagePath);
|
||||
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue