Merge
This commit is contained in:
commit
a515c9a68c
116 changed files with 198344 additions and 6475 deletions
|
@ -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];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue