Significant amount of changes to hosted organizations and exchange:
Exchange 2010 SP2 provisioning separated through a new provider Exchange 2010 SP2 now compliant with product group guidelines Support for Database Availability Group Fixed Distribution List view scope to only tenant Consumer support (individual mailboxes as hotmail) added Mailbox configuration moved to mailbox plans concept CN creation is now based on UPN sAMAccountName generation revised and decoupled from tenant name 2007 (ACL Based), 2010 (ACL Bases), 2010 SP2 (ABP) supported Automated Hosted Organization provisioning added to create hosting space Enterprise Server webservice extended with ImportMethod Mobile tab fixed Added more information to users listview
This commit is contained in:
parent
2f8a580846
commit
50f2c43315
194 changed files with 12994 additions and 9755 deletions
|
@ -2065,33 +2065,36 @@ namespace WebsitePanel.EnterpriseServer
|
|||
#endregion
|
||||
|
||||
#region Exchange Server
|
||||
|
||||
|
||||
public static int AddExchangeAccount(int itemId, int accountType, string accountName,
|
||||
|
||||
public static int AddExchangeAccount(int itemId, int accountType, string accountName,
|
||||
string displayName, string primaryEmailAddress, bool mailEnabledPublicFolder,
|
||||
string mailboxManagerActions, string samAccountName, string accountPassword)
|
||||
{
|
||||
SqlParameter outParam = new SqlParameter("@AccountID", SqlDbType.Int);
|
||||
outParam.Direction = ParameterDirection.Output;
|
||||
string mailboxManagerActions, string samAccountName, string accountPassword, int mailboxPlanId, string subscriberNumber)
|
||||
{
|
||||
SqlParameter outParam = new SqlParameter("@AccountID", SqlDbType.Int);
|
||||
outParam.Direction = ParameterDirection.Output;
|
||||
|
||||
SqlHelper.ExecuteNonQuery(
|
||||
ConnectionString,
|
||||
CommandType.StoredProcedure,
|
||||
"AddExchangeAccount",
|
||||
outParam,
|
||||
new SqlParameter("@ItemID", itemId),
|
||||
new SqlParameter("@AccountType", accountType),
|
||||
new SqlParameter("@AccountName", accountName),
|
||||
new SqlParameter("@DisplayName", displayName),
|
||||
new SqlParameter("@PrimaryEmailAddress", primaryEmailAddress),
|
||||
new SqlParameter("@MailEnabledPublicFolder", mailEnabledPublicFolder),
|
||||
SqlHelper.ExecuteNonQuery(
|
||||
ConnectionString,
|
||||
CommandType.StoredProcedure,
|
||||
"AddExchangeAccount",
|
||||
outParam,
|
||||
new SqlParameter("@ItemID", itemId),
|
||||
new SqlParameter("@AccountType", accountType),
|
||||
new SqlParameter("@AccountName", accountName),
|
||||
new SqlParameter("@DisplayName", displayName),
|
||||
new SqlParameter("@PrimaryEmailAddress", primaryEmailAddress),
|
||||
new SqlParameter("@MailEnabledPublicFolder", mailEnabledPublicFolder),
|
||||
new SqlParameter("@MailboxManagerActions", mailboxManagerActions),
|
||||
new SqlParameter("@SamAccountName", samAccountName),
|
||||
new SqlParameter("@AccountPassword", accountPassword)
|
||||
);
|
||||
new SqlParameter("@AccountPassword", accountPassword),
|
||||
new SqlParameter("@MailboxPlanId", (mailboxPlanId == 0) ? (object)DBNull.Value : (object)mailboxPlanId),
|
||||
new SqlParameter("@SubscriberNumber", (string.IsNullOrEmpty(subscriberNumber) ? (object)DBNull.Value : (object)subscriberNumber))
|
||||
);
|
||||
|
||||
return Convert.ToInt32(outParam.Value);
|
||||
}
|
||||
|
||||
return Convert.ToInt32(outParam.Value);
|
||||
}
|
||||
|
||||
public static void AddExchangeAccountEmailAddress(int accountId, string emailAddress)
|
||||
{
|
||||
|
@ -2159,6 +2162,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
);
|
||||
}
|
||||
|
||||
|
||||
public static void DeleteExchangeAccountEmailAddress(int accountId, string emailAddress)
|
||||
{
|
||||
SqlHelper.ExecuteNonQuery(
|
||||
|
@ -2255,26 +2259,27 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return Convert.ToBoolean(outParam.Value);
|
||||
}
|
||||
|
||||
public static void UpdateExchangeAccount(int accountId, string accountName, ExchangeAccountType accountType,
|
||||
public static void UpdateExchangeAccount(int accountId, string accountName, ExchangeAccountType accountType,
|
||||
string displayName, string primaryEmailAddress, bool mailEnabledPublicFolder,
|
||||
string mailboxManagerActions, string samAccountName, string accountPassword)
|
||||
{
|
||||
SqlHelper.ExecuteNonQuery(
|
||||
ConnectionString,
|
||||
CommandType.StoredProcedure,
|
||||
"UpdateExchangeAccount",
|
||||
new SqlParameter("@AccountID", accountId),
|
||||
new SqlParameter("@AccountName", accountName),
|
||||
new SqlParameter("@DisplayName", displayName),
|
||||
string mailboxManagerActions, string samAccountName, string accountPassword, int mailboxPlanId, string subscriberNumber)
|
||||
{
|
||||
SqlHelper.ExecuteNonQuery(
|
||||
ConnectionString,
|
||||
CommandType.StoredProcedure,
|
||||
"UpdateExchangeAccount",
|
||||
new SqlParameter("@AccountID", accountId),
|
||||
new SqlParameter("@AccountName", accountName),
|
||||
new SqlParameter("@DisplayName", displayName),
|
||||
new SqlParameter("@AccountType", (int)accountType),
|
||||
new SqlParameter("@PrimaryEmailAddress", primaryEmailAddress),
|
||||
new SqlParameter("@MailEnabledPublicFolder", mailEnabledPublicFolder),
|
||||
new SqlParameter("@PrimaryEmailAddress", primaryEmailAddress),
|
||||
new SqlParameter("@MailEnabledPublicFolder", mailEnabledPublicFolder),
|
||||
new SqlParameter("@MailboxManagerActions", mailboxManagerActions),
|
||||
new SqlParameter("@Password", string.IsNullOrEmpty(accountPassword) ? (object)DBNull.Value : (object)accountPassword),
|
||||
new SqlParameter("@SamAccountName", samAccountName)
|
||||
|
||||
);
|
||||
}
|
||||
new SqlParameter("@SamAccountName", samAccountName),
|
||||
new SqlParameter("@MailboxPlanId", (mailboxPlanId == 0) ? (object)DBNull.Value : (object)mailboxPlanId),
|
||||
new SqlParameter("@SubscriberNumber", (string.IsNullOrEmpty(subscriberNumber) ? (object)DBNull.Value : (object)subscriberNumber))
|
||||
);
|
||||
}
|
||||
|
||||
public static IDataReader GetExchangeAccount(int itemId, int accountId)
|
||||
{
|
||||
|
@ -2287,6 +2292,17 @@ namespace WebsitePanel.EnterpriseServer
|
|||
);
|
||||
}
|
||||
|
||||
public static IDataReader GetExchangeAccountByAccountName(int itemId, string accountName)
|
||||
{
|
||||
return SqlHelper.ExecuteReader(
|
||||
ConnectionString,
|
||||
CommandType.StoredProcedure,
|
||||
"GetExchangeAccountByAccountName",
|
||||
new SqlParameter("@ItemID", itemId),
|
||||
new SqlParameter("@AccountName", accountName)
|
||||
);
|
||||
}
|
||||
|
||||
public static IDataReader GetExchangeAccountEmailAddresses(int accountId)
|
||||
{
|
||||
return SqlHelper.ExecuteReader(
|
||||
|
@ -2398,6 +2414,97 @@ namespace WebsitePanel.EnterpriseServer
|
|||
|
||||
#endregion
|
||||
|
||||
#region Exchange Mailbox Plans
|
||||
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)
|
||||
{
|
||||
SqlParameter outParam = new SqlParameter("@MailboxPlanId", SqlDbType.Int);
|
||||
outParam.Direction = ParameterDirection.Output;
|
||||
|
||||
SqlHelper.ExecuteNonQuery(
|
||||
ConnectionString,
|
||||
CommandType.StoredProcedure,
|
||||
"AddExchangeMailboxPlan",
|
||||
outParam,
|
||||
new SqlParameter("@ItemID", itemID),
|
||||
new SqlParameter("@MailboxPlan", mailboxPlan),
|
||||
new SqlParameter("@EnableActiveSync", enableActiveSync),
|
||||
new SqlParameter("@EnableIMAP", enableIMAP),
|
||||
new SqlParameter("@EnableMAPI", enableMAPI),
|
||||
new SqlParameter("@EnableOWA", enableOWA),
|
||||
new SqlParameter("@EnablePOP", enablePOP),
|
||||
new SqlParameter("@IsDefault", isDefault),
|
||||
new SqlParameter("@IssueWarningPct", issueWarningPct),
|
||||
new SqlParameter("@KeepDeletedItemsDays", keepDeletedItemsDays),
|
||||
new SqlParameter("@MailboxSizeMB", mailboxSizeMB),
|
||||
new SqlParameter("@MaxReceiveMessageSizeKB", maxReceiveMessageSizeKB),
|
||||
new SqlParameter("@MaxRecipients", maxRecipients),
|
||||
new SqlParameter("@MaxSendMessageSizeKB", maxSendMessageSizeKB),
|
||||
new SqlParameter("@ProhibitSendPct", prohibitSendPct),
|
||||
new SqlParameter("@ProhibitSendReceivePct", prohibitSendReceivePct),
|
||||
new SqlParameter("@HideFromAddressBook", hideFromAddressBook)
|
||||
);
|
||||
|
||||
return Convert.ToInt32(outParam.Value);
|
||||
}
|
||||
|
||||
|
||||
public static void DeleteExchangeMailboxPlan(int mailboxPlanId)
|
||||
{
|
||||
SqlHelper.ExecuteNonQuery(
|
||||
ConnectionString,
|
||||
CommandType.StoredProcedure,
|
||||
"DeleteExchangeMailboxPlan",
|
||||
new SqlParameter("@MailboxPlanId", mailboxPlanId)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
public static IDataReader GetExchangeMailboxPlan(int mailboxPlanId)
|
||||
{
|
||||
return SqlHelper.ExecuteReader(
|
||||
ConnectionString,
|
||||
CommandType.StoredProcedure,
|
||||
"GetExchangeMailboxPlan",
|
||||
new SqlParameter("@MailboxPlanId", mailboxPlanId)
|
||||
);
|
||||
}
|
||||
|
||||
public static IDataReader GetExchangeMailboxPlans(int itemId)
|
||||
{
|
||||
return SqlHelper.ExecuteReader(
|
||||
ConnectionString,
|
||||
CommandType.StoredProcedure,
|
||||
"GetExchangeMailboxPlans",
|
||||
new SqlParameter("@ItemID", itemId)
|
||||
);
|
||||
}
|
||||
|
||||
public static void SetOrganizationDefaultExchangeMailboxPlan(int itemId, int mailboxPlanId)
|
||||
{
|
||||
SqlHelper.ExecuteNonQuery(
|
||||
ConnectionString,
|
||||
CommandType.StoredProcedure,
|
||||
"SetOrganizationDefaultExchangeMailboxPlan",
|
||||
new SqlParameter("@ItemID", itemId),
|
||||
new SqlParameter("@MailboxPlanId", mailboxPlanId)
|
||||
);
|
||||
}
|
||||
|
||||
public static void SetExchangeAccountMailboxPlan(int accountId, int mailboxPlanId)
|
||||
{
|
||||
SqlHelper.ExecuteNonQuery(
|
||||
ConnectionString,
|
||||
CommandType.StoredProcedure,
|
||||
"SetExchangeAccountMailboxplan",
|
||||
new SqlParameter("@AccountID", accountId),
|
||||
new SqlParameter("@MailboxPlanId", (mailboxPlanId == 0) ? (object)DBNull.Value : (object)mailboxPlanId)
|
||||
);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Organizations
|
||||
|
||||
public static void DeleteOrganizationUser(int itemId)
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -633,7 +633,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
}
|
||||
|
||||
|
||||
private static Organizations GetOrganizationProxy(int serviceId)
|
||||
public static Organizations GetOrganizationProxy(int serviceId)
|
||||
{
|
||||
Organizations ws = new Organizations();
|
||||
ServiceProviderProxy.Init(ws, serviceId);
|
||||
|
@ -710,9 +710,6 @@ namespace WebsitePanel.EnterpriseServer
|
|||
org.Id = 1;
|
||||
org.OrganizationId = "fabrikam";
|
||||
org.Name = "Fabrikam Inc";
|
||||
org.IssueWarningKB = 150000;
|
||||
org.ProhibitSendKB = 170000;
|
||||
org.ProhibitSendReceiveKB = 190000;
|
||||
org.KeepDeletedItemsDays = 14;
|
||||
org.GlobalAddressList = "FabrikamGAL";
|
||||
return org;
|
||||
|
@ -980,8 +977,17 @@ namespace WebsitePanel.EnterpriseServer
|
|||
OrganizationUsersPaged result = new OrganizationUsersPaged();
|
||||
result.RecordsCount = (int)ds.Tables[0].Rows[0][0];
|
||||
|
||||
List<OrganizationUser> Tmpaccounts = new List<OrganizationUser>();
|
||||
ObjectUtils.FillCollectionFromDataView(Tmpaccounts, ds.Tables[1].DefaultView);
|
||||
result.PageUsers = Tmpaccounts.ToArray();
|
||||
|
||||
List<OrganizationUser> accounts = new List<OrganizationUser>();
|
||||
ObjectUtils.FillCollectionFromDataView(accounts, ds.Tables[1].DefaultView);
|
||||
|
||||
foreach (OrganizationUser user in Tmpaccounts.ToArray())
|
||||
{
|
||||
accounts.Add(GetUserGeneralSettings(itemId, user.AccountId));
|
||||
}
|
||||
|
||||
result.PageUsers = accounts.ToArray();
|
||||
return result;
|
||||
}
|
||||
|
@ -993,22 +999,23 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return DataProvider.ExchangeAccountEmailAddressExists(emailAddress);
|
||||
}
|
||||
|
||||
|
||||
private static int AddOrganizationUser(int itemId, string accountName, string displayName, string email, string accountPassword)
|
||||
{
|
||||
|
||||
private static int AddOrganizationUser(int itemId, string accountName, string displayName, string email, string sAMAccountName, string accountPassword, string subscriberNumber)
|
||||
{
|
||||
return DataProvider.AddExchangeAccount(itemId, (int)ExchangeAccountType.User, accountName, displayName, email, false, string.Empty,
|
||||
string.Empty, CryptoUtils.Encrypt(accountPassword));
|
||||
|
||||
}
|
||||
sAMAccountName, CryptoUtils.Encrypt(accountPassword), 0, subscriberNumber.Trim());
|
||||
|
||||
}
|
||||
|
||||
public static string GetAccountName(string loginName)
|
||||
{
|
||||
string []parts = loginName.Split('@');
|
||||
return parts != null && parts.Length > 1 ? parts[0] : loginName;
|
||||
//string []parts = loginName.Split('@');
|
||||
//return parts != null && parts.Length > 1 ? parts[0] : loginName;
|
||||
return loginName;
|
||||
|
||||
}
|
||||
|
||||
public static int CreateUser(int itemId, string displayName, string name, string domain, string password, bool enabled, bool sendNotification, string to, out string accountName)
|
||||
public static int CreateUser(int itemId, string displayName, string name, string domain, string password, string subscriberNumber, bool enabled, bool sendNotification, string to, out string accountName)
|
||||
{
|
||||
if (string.IsNullOrEmpty(displayName))
|
||||
throw new ArgumentNullException("displayName");
|
||||
|
@ -1023,55 +1030,171 @@ namespace WebsitePanel.EnterpriseServer
|
|||
throw new ArgumentNullException("password");
|
||||
|
||||
accountName = string.Empty;
|
||||
|
||||
|
||||
// check account
|
||||
int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive);
|
||||
if (accountCheck < 0) return accountCheck;
|
||||
|
||||
|
||||
|
||||
// place log record
|
||||
TaskManager.StartTask("ORGANIZATION", "CREATE_USER");
|
||||
TaskManager.ItemId = itemId;
|
||||
TaskManager.Write("Organization ID :" + itemId);
|
||||
TaskManager.Write("name :" + name);
|
||||
TaskManager.Write("domain :" + domain);
|
||||
TaskManager.Write("subscriberNumber :" + subscriberNumber);
|
||||
|
||||
// e-mail
|
||||
string email = name + "@" + domain;
|
||||
int userId = -1;
|
||||
|
||||
if (EmailAddressExists(email))
|
||||
return BusinessErrorCodes.ERROR_EXCHANGE_EMAIL_EXISTS;
|
||||
|
||||
// load organization
|
||||
Organization org = GetOrganization(itemId);
|
||||
if (org == null)
|
||||
return -1;
|
||||
|
||||
// check package
|
||||
int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive);
|
||||
if (packageCheck < 0) return packageCheck;
|
||||
|
||||
int errorCode;
|
||||
if (!CheckUserQuota(org.Id, out errorCode))
|
||||
return errorCode;
|
||||
|
||||
|
||||
Organizations orgProxy = GetOrganizationProxy(org.ServiceId);
|
||||
|
||||
string upn = string.Format("{0}@{1}", name, domain);
|
||||
accountName = BuildAccountName(org.OrganizationId, name);
|
||||
orgProxy.CreateUser(org.OrganizationId, accountName, displayName, upn, password, enabled);
|
||||
|
||||
int userId = AddOrganizationUser(itemId, accountName, displayName, email, password);
|
||||
|
||||
// register email address
|
||||
AddAccountEmailAddress(userId, email);
|
||||
|
||||
if (sendNotification)
|
||||
try
|
||||
{
|
||||
SendSummaryLetter(org.Id, userId, true, to, "");
|
||||
displayName = displayName.Trim();
|
||||
name = name.Trim();
|
||||
domain = domain.Trim();
|
||||
|
||||
// e-mail
|
||||
string email = name + "@" + domain;
|
||||
|
||||
if (EmailAddressExists(email))
|
||||
return BusinessErrorCodes.ERROR_EXCHANGE_EMAIL_EXISTS;
|
||||
|
||||
// load organization
|
||||
Organization org = GetOrganization(itemId);
|
||||
if (org == null)
|
||||
return -1;
|
||||
|
||||
// check package
|
||||
int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive);
|
||||
if (packageCheck < 0) return packageCheck;
|
||||
|
||||
int errorCode;
|
||||
if (!CheckUserQuota(org.Id, out errorCode))
|
||||
return errorCode;
|
||||
|
||||
|
||||
Organizations orgProxy = GetOrganizationProxy(org.ServiceId);
|
||||
|
||||
string upn = string.Format("{0}@{1}", name, domain);
|
||||
string sAMAccountName = BuildAccountName(org.OrganizationId, name);
|
||||
|
||||
TaskManager.Write("accountName :" + sAMAccountName);
|
||||
TaskManager.Write("upn :" + upn);
|
||||
|
||||
if (orgProxy.CreateUser(org.OrganizationId, sAMAccountName, displayName, upn, password, enabled) == 0)
|
||||
{
|
||||
OrganizationUser retUser = orgProxy.GetUserGeneralSettings(upn, org.OrganizationId);
|
||||
TaskManager.Write("sAMAccountName :" + retUser.DomainUserName);
|
||||
|
||||
userId = AddOrganizationUser(itemId, upn, displayName, email, retUser.DomainUserName, password, subscriberNumber);
|
||||
accountName = upn;
|
||||
|
||||
// register email address
|
||||
AddAccountEmailAddress(userId, email);
|
||||
|
||||
if (sendNotification)
|
||||
{
|
||||
SendSummaryLetter(org.Id, userId, true, to, "");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
TaskManager.WriteError("Failed to create user");
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
TaskManager.WriteError(ex);
|
||||
}
|
||||
finally
|
||||
{
|
||||
TaskManager.CompleteTask();
|
||||
}
|
||||
|
||||
return userId;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static int ImportUser(int itemId, string accountName, string displayName, string name, string domain, string password, string subscriberNumber)
|
||||
{
|
||||
if (string.IsNullOrEmpty(accountName))
|
||||
throw new ArgumentNullException("accountName");
|
||||
|
||||
if (string.IsNullOrEmpty(displayName))
|
||||
throw new ArgumentNullException("displayName");
|
||||
|
||||
if (string.IsNullOrEmpty(name))
|
||||
throw new ArgumentNullException("name");
|
||||
|
||||
if (string.IsNullOrEmpty(domain))
|
||||
throw new ArgumentNullException("domain");
|
||||
|
||||
if (string.IsNullOrEmpty(password))
|
||||
throw new ArgumentNullException("password");
|
||||
|
||||
|
||||
// place log record
|
||||
TaskManager.StartTask("ORGANIZATION", "IMPORT_USER");
|
||||
TaskManager.ItemId = itemId;
|
||||
TaskManager.Write("Organization ID :" + itemId);
|
||||
TaskManager.Write("account :" + accountName);
|
||||
TaskManager.Write("name :" + name);
|
||||
TaskManager.Write("domain :" + domain);
|
||||
|
||||
int userId = -1;
|
||||
|
||||
try
|
||||
{
|
||||
accountName = accountName.Trim();
|
||||
displayName = displayName.Trim();
|
||||
name = name.Trim();
|
||||
domain = domain.Trim();
|
||||
|
||||
// e-mail
|
||||
string email = name + "@" + domain;
|
||||
|
||||
if (EmailAddressExists(email))
|
||||
return BusinessErrorCodes.ERROR_EXCHANGE_EMAIL_EXISTS;
|
||||
|
||||
// load organization
|
||||
Organization org = GetOrganization(itemId);
|
||||
if (org == null)
|
||||
return -1;
|
||||
|
||||
// check package
|
||||
int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive);
|
||||
if (packageCheck < 0) return packageCheck;
|
||||
|
||||
int errorCode;
|
||||
if (!CheckUserQuota(org.Id, out errorCode))
|
||||
return errorCode;
|
||||
|
||||
Organizations orgProxy = GetOrganizationProxy(org.ServiceId);
|
||||
|
||||
string upn = string.Format("{0}@{1}", name, domain);
|
||||
TaskManager.Write("upn :" + upn);
|
||||
|
||||
OrganizationUser retUser = orgProxy.GetUserGeneralSettings(accountName, org.OrganizationId);
|
||||
|
||||
TaskManager.Write("sAMAccountName :" + retUser.DomainUserName);
|
||||
|
||||
userId = AddOrganizationUser(itemId, accountName, displayName, email, retUser.DomainUserName, password, subscriberNumber);
|
||||
|
||||
AddAccountEmailAddress(userId, email);
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
TaskManager.WriteError(ex);
|
||||
}
|
||||
finally
|
||||
{
|
||||
TaskManager.CompleteTask();
|
||||
}
|
||||
|
||||
return userId;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private static void AddAccountEmailAddress(int accountId, string emailAddress)
|
||||
{
|
||||
|
@ -1080,28 +1203,40 @@ namespace WebsitePanel.EnterpriseServer
|
|||
|
||||
private static string BuildAccountName(string orgId, string name)
|
||||
{
|
||||
int maxLen = 19 - orgId.Length;
|
||||
|
||||
// try to choose name
|
||||
int i = 0;
|
||||
while (true)
|
||||
string accountName = name = name.Replace(" ", "");
|
||||
string CounterStr = "00000";
|
||||
int counter = 0;
|
||||
bool bFound = false;
|
||||
do
|
||||
{
|
||||
string num = i > 0 ? i.ToString() : "";
|
||||
int len = maxLen - num.Length;
|
||||
accountName = genSamLogin(name, CounterStr);
|
||||
|
||||
if (name.Length > len)
|
||||
name = name.Substring(0, len);
|
||||
if (!AccountExists(accountName)) bFound = true;
|
||||
|
||||
string accountName = name + num + "_" + orgId;
|
||||
|
||||
// check if already exists
|
||||
if (!AccountExists(accountName))
|
||||
return accountName;
|
||||
|
||||
i++;
|
||||
CounterStr = counter.ToString("d5");
|
||||
counter++;
|
||||
}
|
||||
while (!bFound);
|
||||
|
||||
return accountName;
|
||||
}
|
||||
|
||||
private static string genSamLogin(string login, string strCounter)
|
||||
{
|
||||
int maxLogin = 20;
|
||||
int fullLen = login.Length + strCounter.Length;
|
||||
if (fullLen <= maxLogin)
|
||||
return login + strCounter;
|
||||
else
|
||||
{
|
||||
if (login.Length - (fullLen - maxLogin) > 0)
|
||||
return login.Substring(0, login.Length - (fullLen - maxLogin)) + strCounter;
|
||||
else return strCounter; // ????
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
private static bool AccountExists(string accountName)
|
||||
{
|
||||
return DataProvider.ExchangeAccountExists(accountName);
|
||||
|
@ -1180,6 +1315,18 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return account;
|
||||
}
|
||||
|
||||
public static OrganizationUser GetAccountByAccountName(int itemId, string AccountName)
|
||||
{
|
||||
OrganizationUser account = ObjectUtils.FillObjectFromDataReader<OrganizationUser>(
|
||||
DataProvider.GetExchangeAccountByAccountName(itemId, AccountName));
|
||||
|
||||
if (account == null)
|
||||
return null;
|
||||
|
||||
return account;
|
||||
}
|
||||
|
||||
|
||||
private static void DeleteUserFromMetabase(int itemId, int accountId)
|
||||
{
|
||||
// try to get organization
|
||||
|
@ -1217,11 +1364,16 @@ namespace WebsitePanel.EnterpriseServer
|
|||
string accountName = GetAccountName(account.AccountName);
|
||||
|
||||
|
||||
OrganizationUser retUser = orgProxy.GeUserGeneralSettings(accountName, org.OrganizationId);
|
||||
OrganizationUser retUser = orgProxy.GetUserGeneralSettings(accountName, org.OrganizationId);
|
||||
retUser.AccountId = accountId;
|
||||
retUser.AccountName = account.AccountName;
|
||||
retUser.PrimaryEmailAddress = account.PrimaryEmailAddress;
|
||||
retUser.AccountType = account.AccountType;
|
||||
retUser.CrmUserId = CRMController.GetCrmUserId(accountId);
|
||||
retUser.IsOCSUser = DataProvider.CheckOCSUserExists(accountId);
|
||||
//retUser.IsLyncUser = DataProvider.CheckLyncUserExists(accountId);
|
||||
retUser.IsBlackBerryUser = BlackBerryController.CheckBlackBerryUserExists(accountId);
|
||||
retUser.SubscriberNumber = account.SubscriberNumber;
|
||||
|
||||
return retUser;
|
||||
}
|
||||
|
@ -1240,7 +1392,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
string lastName, string address, string city, string state, string zip, string country,
|
||||
string jobTitle, string company, string department, string office, string managerAccountName,
|
||||
string businessPhone, string fax, string homePhone, string mobilePhone, string pager,
|
||||
string webPage, string notes, string externalEmail)
|
||||
string webPage, string notes, string externalEmail, string subscriberNumber)
|
||||
{
|
||||
|
||||
// check account
|
||||
|
@ -1253,6 +1405,10 @@ namespace WebsitePanel.EnterpriseServer
|
|||
|
||||
try
|
||||
{
|
||||
displayName = displayName.Trim();
|
||||
firstName = firstName.Trim();
|
||||
lastName = lastName.Trim();
|
||||
|
||||
// load organization
|
||||
Organization org = GetOrganization(itemId);
|
||||
if (org == null)
|
||||
|
@ -1303,6 +1459,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
|
||||
// update account
|
||||
account.DisplayName = displayName;
|
||||
account.SubscriberNumber = subscriberNumber;
|
||||
|
||||
//account.
|
||||
if (!String.IsNullOrEmpty(password))
|
||||
|
@ -1329,7 +1486,8 @@ 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.MailboxManagerActions.ToString(), account.SamAccountName, account.AccountPassword, account.MailboxPlanId,
|
||||
(string.IsNullOrEmpty(account.SubscriberNumber) ? null : account.SubscriberNumber.Trim()));
|
||||
}
|
||||
|
||||
|
||||
|
@ -1377,11 +1535,58 @@ namespace WebsitePanel.EnterpriseServer
|
|||
}
|
||||
#endregion
|
||||
|
||||
return ObjectUtils.CreateListFromDataReader<OrganizationUser>(
|
||||
DataProvider.SearchOrganizationAccounts(SecurityContext.User.UserId, itemId,
|
||||
filterColumn, filterValue, sortColumn, includeMailboxes));
|
||||
List<OrganizationUser> Tmpaccounts = ObjectUtils.CreateListFromDataReader<OrganizationUser>(
|
||||
DataProvider.SearchOrganizationAccounts(SecurityContext.User.UserId, itemId,
|
||||
filterColumn, filterValue, sortColumn, includeMailboxes));
|
||||
|
||||
List<OrganizationUser> Accounts = new List<OrganizationUser>();
|
||||
|
||||
foreach (OrganizationUser user in Tmpaccounts.ToArray())
|
||||
{
|
||||
Accounts.Add(GetUserGeneralSettings(itemId, user.AccountId));
|
||||
}
|
||||
|
||||
return Accounts;
|
||||
}
|
||||
|
||||
public static int GetAccountIdByUserPrincipalName(int itemId, string userPrincipalName)
|
||||
{
|
||||
// place log record
|
||||
TaskManager.StartTask("ORGANIZATION", "GET_ACCOUNT_BYUPN");
|
||||
TaskManager.ItemId = itemId;
|
||||
|
||||
int accounId = -1;
|
||||
|
||||
try
|
||||
{
|
||||
// load organization
|
||||
Organization org = GetOrganization(itemId);
|
||||
if (org == null)
|
||||
return 0;
|
||||
|
||||
// get samaccountName
|
||||
//Organizations orgProxy = GetOrganizationProxy(org.ServiceId);
|
||||
//string accountName = orgProxy.GetSamAccountNameByUserPrincipalName(org.OrganizationId, userPrincipalName);
|
||||
|
||||
// load account
|
||||
OrganizationUser account = GetAccountByAccountName(itemId, userPrincipalName);
|
||||
|
||||
if (account != null)
|
||||
accounId = account.AccountId;
|
||||
|
||||
return accounId;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw TaskManager.WriteError(ex);
|
||||
}
|
||||
finally
|
||||
{
|
||||
TaskManager.CompleteTask();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
public static List<OrganizationDomainName> GetOrganizationDomains(int itemId)
|
||||
|
|
|
@ -46,80 +46,81 @@ namespace WebsitePanel.EnterpriseServer
|
|||
[ToolboxItem(false)]
|
||||
public class esExchangeServer : WebService
|
||||
{
|
||||
#region Organizations
|
||||
[WebMethod]
|
||||
public DataSet GetRawExchangeOrganizationsPaged(int packageId, bool recursive,
|
||||
string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows)
|
||||
{
|
||||
return ExchangeServerController.GetRawExchangeOrganizationsPaged(packageId, recursive,
|
||||
filterColumn, filterValue, sortColumn, startRow, maximumRows);
|
||||
}
|
||||
#region Organizations
|
||||
[WebMethod]
|
||||
public DataSet GetRawExchangeOrganizationsPaged(int packageId, bool recursive,
|
||||
string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows)
|
||||
{
|
||||
return ExchangeServerController.GetRawExchangeOrganizationsPaged(packageId, recursive,
|
||||
filterColumn, filterValue, sortColumn, startRow, maximumRows);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public OrganizationsPaged GetExchangeOrganizationsPaged(int packageId, bool recursive,
|
||||
string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows)
|
||||
{
|
||||
return ExchangeServerController.GetExchangeOrganizationsPaged(packageId, recursive,
|
||||
filterColumn, filterValue, sortColumn, startRow, maximumRows);
|
||||
}
|
||||
[WebMethod]
|
||||
public OrganizationsPaged GetExchangeOrganizationsPaged(int packageId, bool recursive,
|
||||
string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows)
|
||||
{
|
||||
return ExchangeServerController.GetExchangeOrganizationsPaged(packageId, recursive,
|
||||
filterColumn, filterValue, sortColumn, startRow, maximumRows);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public List<Organization> GetExchangeOrganizations(int packageId, bool recursive)
|
||||
{
|
||||
return ExchangeServerController.GetExchangeOrganizations(packageId, recursive);
|
||||
}
|
||||
[WebMethod]
|
||||
public List<Organization> GetExchangeOrganizations(int packageId, bool recursive)
|
||||
{
|
||||
return ExchangeServerController.GetExchangeOrganizations(packageId, recursive);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public Organization GetOrganization(int itemId)
|
||||
{
|
||||
return ExchangeServerController.GetOrganization(itemId);
|
||||
}
|
||||
[WebMethod]
|
||||
public Organization GetOrganization(int itemId)
|
||||
{
|
||||
return ExchangeServerController.GetOrganization(itemId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public OrganizationStatistics GetOrganizationStatistics(int itemId)
|
||||
{
|
||||
return ExchangeServerController.GetOrganizationStatistics(itemId);
|
||||
}
|
||||
[WebMethod]
|
||||
public OrganizationStatistics GetOrganizationStatistics(int itemId)
|
||||
{
|
||||
return ExchangeServerController.GetOrganizationStatistics(itemId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
[WebMethod]
|
||||
public int DeleteOrganization(int itemId)
|
||||
{
|
||||
return ExchangeServerController.DeleteOrganization(itemId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public Organization GetOrganizationStorageLimits(int itemId)
|
||||
{
|
||||
return ExchangeServerController.GetOrganizationStorageLimits(itemId);
|
||||
}
|
||||
[WebMethod]
|
||||
public int DeleteOrganization(int itemId)
|
||||
{
|
||||
return ExchangeServerController.DeleteOrganization(itemId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public int SetOrganizationStorageLimits(int itemId, int issueWarningKB, int prohibitSendKB,
|
||||
int prohibitSendReceiveKB, int keepDeletedItemsDays, bool applyToMailboxes)
|
||||
{
|
||||
return ExchangeServerController.SetOrganizationStorageLimits(itemId, issueWarningKB, prohibitSendKB,
|
||||
prohibitSendReceiveKB, keepDeletedItemsDays, applyToMailboxes);
|
||||
}
|
||||
[WebMethod]
|
||||
public Organization GetOrganizationStorageLimits(int itemId)
|
||||
{
|
||||
return ExchangeServerController.GetOrganizationStorageLimits(itemId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public ExchangeItemStatistics[] GetMailboxesStatistics(int itemId)
|
||||
{
|
||||
return ExchangeServerController.GetMailboxesStatistics(itemId);
|
||||
}
|
||||
[WebMethod]
|
||||
public int SetOrganizationStorageLimits(int itemId, int issueWarningKB, int prohibitSendKB,
|
||||
int prohibitSendReceiveKB, int keepDeletedItemsDays, bool applyToMailboxes)
|
||||
{
|
||||
return ExchangeServerController.SetOrganizationStorageLimits(itemId, issueWarningKB, prohibitSendKB,
|
||||
prohibitSendReceiveKB, keepDeletedItemsDays, applyToMailboxes);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public ExchangeItemStatistics[] GetPublicFoldersStatistics(int itemId)
|
||||
{
|
||||
return ExchangeServerController.GetPublicFoldersStatistics(itemId);
|
||||
}
|
||||
[WebMethod]
|
||||
public ExchangeItemStatistics[] GetMailboxesStatistics(int itemId)
|
||||
{
|
||||
return ExchangeServerController.GetMailboxesStatistics(itemId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public int CalculateOrganizationDiskspace(int itemId)
|
||||
{
|
||||
return ExchangeServerController.CalculateOrganizationDiskspace(itemId);
|
||||
}
|
||||
[WebMethod]
|
||||
public ExchangeMailboxStatistics GetMailboxStatistics(int itemId, int accountId)
|
||||
{
|
||||
return ExchangeServerController.GetMailboxStatistics(itemId, accountId);
|
||||
}
|
||||
|
||||
|
||||
[WebMethod]
|
||||
public int CalculateOrganizationDiskspace(int itemId)
|
||||
{
|
||||
return ExchangeServerController.CalculateOrganizationDiskspace(itemId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public ExchangeActiveSyncPolicy GetActiveSyncPolicy(int itemId)
|
||||
|
@ -139,14 +140,14 @@ namespace WebsitePanel.EnterpriseServer
|
|||
passwordRecoveryEnabled, deviceEncryptionEnabled, allowSimplePassword, maxPasswordFailedAttempts,
|
||||
minPasswordLength, inactivityLockMin, passwordExpirationDays, passwordHistory, refreshInteval);
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region Domains
|
||||
[WebMethod]
|
||||
#region Domains
|
||||
[WebMethod]
|
||||
public int AddAuthoritativeDomain(int itemId, int domainId)
|
||||
{
|
||||
{
|
||||
return ExchangeServerController.AddAuthoritativeDomain(itemId, domainId);
|
||||
}
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public int DeleteAuthoritativeDomain(int itemId, int domainId)
|
||||
|
@ -155,42 +156,42 @@ namespace WebsitePanel.EnterpriseServer
|
|||
}
|
||||
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region Accounts
|
||||
[WebMethod]
|
||||
public ExchangeAccountsPaged GetAccountsPaged(int itemId, string accountTypes,
|
||||
string filterColumn, string filterValue, string sortColumn,
|
||||
int startRow, int maximumRows)
|
||||
{
|
||||
#region Accounts
|
||||
[WebMethod]
|
||||
public ExchangeAccountsPaged GetAccountsPaged(int itemId, string accountTypes,
|
||||
string filterColumn, string filterValue, string sortColumn,
|
||||
int startRow, int maximumRows)
|
||||
{
|
||||
return ExchangeServerController.GetAccountsPaged(itemId, accountTypes,
|
||||
filterColumn, filterValue, sortColumn,
|
||||
startRow, maximumRows);
|
||||
}
|
||||
filterColumn, filterValue, sortColumn,
|
||||
startRow, maximumRows);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public List<ExchangeAccount> GetAccounts(int itemId, ExchangeAccountType accountType)
|
||||
{
|
||||
return ExchangeServerController.GetAccounts(itemId, accountType);
|
||||
}
|
||||
[WebMethod]
|
||||
public List<ExchangeAccount> GetAccounts(int itemId, ExchangeAccountType accountType)
|
||||
{
|
||||
return ExchangeServerController.GetAccounts(itemId, accountType);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public List<ExchangeAccount> SearchAccounts(int itemId,
|
||||
bool includeMailboxes, bool includeContacts, bool includeDistributionLists,
|
||||
[WebMethod]
|
||||
public List<ExchangeAccount> SearchAccounts(int itemId,
|
||||
bool includeMailboxes, bool includeContacts, bool includeDistributionLists,
|
||||
bool includeRooms, bool includeEquipment,
|
||||
string filterColumn, string filterValue, string sortColumn)
|
||||
{
|
||||
return ExchangeServerController.SearchAccounts(itemId,
|
||||
includeMailboxes, includeContacts, includeDistributionLists,
|
||||
string filterColumn, string filterValue, string sortColumn)
|
||||
{
|
||||
return ExchangeServerController.SearchAccounts(itemId,
|
||||
includeMailboxes, includeContacts, includeDistributionLists,
|
||||
includeRooms, includeEquipment,
|
||||
filterColumn, filterValue, sortColumn);
|
||||
}
|
||||
filterColumn, filterValue, sortColumn);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public ExchangeAccount GetAccount(int itemId, int accountId)
|
||||
{
|
||||
return ExchangeServerController.GetAccount(itemId, accountId);
|
||||
}
|
||||
[WebMethod]
|
||||
public ExchangeAccount GetAccount(int itemId, int accountId)
|
||||
{
|
||||
return ExchangeServerController.GetAccount(itemId, accountId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public ExchangeAccount SearchAccount(ExchangeAccountType accountType, string primaryEmailAddress)
|
||||
|
@ -204,21 +205,21 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return ExchangeServerController.CheckAccountCredentials(itemId, email, password);
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#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)
|
||||
{
|
||||
return ExchangeServerController.CreateMailbox(itemId, accountId, accountType, accountName, displayName, name, domain, password, sendSetupInstructions, setupInstructionMailAddress);
|
||||
}
|
||||
#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)
|
||||
{
|
||||
return ExchangeServerController.CreateMailbox(itemId, accountId, accountType, accountName, displayName, name, domain, password, sendSetupInstructions, setupInstructionMailAddress, mailboxPlanId, subscriberNumber);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public int DeleteMailbox(int itemId, int accountId)
|
||||
{
|
||||
return ExchangeServerController.DeleteMailbox(itemId, accountId);
|
||||
}
|
||||
[WebMethod]
|
||||
public int DeleteMailbox(int itemId, int accountId)
|
||||
{
|
||||
return ExchangeServerController.DeleteMailbox(itemId, accountId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public int DisableMailbox(int itemId, int accountId)
|
||||
|
@ -227,87 +228,66 @@ namespace WebsitePanel.EnterpriseServer
|
|||
}
|
||||
|
||||
|
||||
[WebMethod]
|
||||
public ExchangeMailbox GetMailboxGeneralSettings(int itemId, int accountId)
|
||||
{
|
||||
return ExchangeServerController.GetMailboxGeneralSettings(itemId, accountId);
|
||||
}
|
||||
[WebMethod]
|
||||
public ExchangeMailbox GetMailboxGeneralSettings(int itemId, int accountId)
|
||||
{
|
||||
return ExchangeServerController.GetMailboxGeneralSettings(itemId, accountId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public int SetMailboxGeneralSettings(int itemId, int accountId, string displayName,
|
||||
string password, bool hideAddressBook, bool disabled, string firstName, string initials,
|
||||
string lastName, string address, string city, string state, string zip, string country,
|
||||
string jobTitle, string company, string department, string office, string managerAccountName,
|
||||
string businessPhone, string fax, string homePhone, string mobilePhone, string pager,
|
||||
string webPage, string notes)
|
||||
{
|
||||
return ExchangeServerController.SetMailboxGeneralSettings(itemId, accountId, displayName,
|
||||
password, hideAddressBook, disabled, firstName, initials,
|
||||
lastName, address, city, state, zip, country,
|
||||
jobTitle, company, department, office, managerAccountName,
|
||||
businessPhone, fax, homePhone, mobilePhone, pager,
|
||||
webPage, notes);
|
||||
}
|
||||
[WebMethod]
|
||||
public int SetMailboxGeneralSettings(int itemId, int accountId, bool hideAddressBook, bool disabled)
|
||||
{
|
||||
return ExchangeServerController.SetMailboxGeneralSettings(itemId, accountId, hideAddressBook, disabled);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public ExchangeEmailAddress[] GetMailboxEmailAddresses(int itemId, int accountId)
|
||||
{
|
||||
return ExchangeServerController.GetMailboxEmailAddresses(itemId, accountId);
|
||||
}
|
||||
[WebMethod]
|
||||
public ExchangeEmailAddress[] GetMailboxEmailAddresses(int itemId, int accountId)
|
||||
{
|
||||
return ExchangeServerController.GetMailboxEmailAddresses(itemId, accountId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public int AddMailboxEmailAddress(int itemId, int accountId, string emailAddress)
|
||||
{
|
||||
return ExchangeServerController.AddMailboxEmailAddress(itemId, accountId, emailAddress);
|
||||
}
|
||||
[WebMethod]
|
||||
public int AddMailboxEmailAddress(int itemId, int accountId, string emailAddress)
|
||||
{
|
||||
return ExchangeServerController.AddMailboxEmailAddress(itemId, accountId, emailAddress);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public int SetMailboxPrimaryEmailAddress(int itemId, int accountId, string emailAddress)
|
||||
{
|
||||
return ExchangeServerController.SetMailboxPrimaryEmailAddress(itemId, accountId, emailAddress);
|
||||
}
|
||||
[WebMethod]
|
||||
public int SetMailboxPrimaryEmailAddress(int itemId, int accountId, string emailAddress)
|
||||
{
|
||||
return ExchangeServerController.SetMailboxPrimaryEmailAddress(itemId, accountId, emailAddress);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public int DeleteMailboxEmailAddresses(int itemId, int accountId, string[] emailAddresses)
|
||||
{
|
||||
return ExchangeServerController.DeleteMailboxEmailAddresses(itemId, accountId, emailAddresses);
|
||||
}
|
||||
[WebMethod]
|
||||
public int DeleteMailboxEmailAddresses(int itemId, int accountId, string[] emailAddresses)
|
||||
{
|
||||
return ExchangeServerController.DeleteMailboxEmailAddresses(itemId, accountId, emailAddresses);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public ExchangeMailbox GetMailboxMailFlowSettings(int itemId, int accountId)
|
||||
{
|
||||
return ExchangeServerController.GetMailboxMailFlowSettings(itemId, accountId);
|
||||
}
|
||||
[WebMethod]
|
||||
public ExchangeMailbox GetMailboxMailFlowSettings(int itemId, int accountId)
|
||||
{
|
||||
return ExchangeServerController.GetMailboxMailFlowSettings(itemId, accountId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public int SetMailboxMailFlowSettings(int itemId, int accountId,
|
||||
bool enableForwarding, string forwardingAccountName, bool forwardToBoth,
|
||||
string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts,
|
||||
int maxRecipients, int maxSendMessageSizeKB, int maxReceiveMessageSizeKB,
|
||||
[WebMethod]
|
||||
public int SetMailboxMailFlowSettings(int itemId, int accountId,
|
||||
bool enableForwarding, string forwardingAccountName, bool forwardToBoth,
|
||||
string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts,
|
||||
bool requireSenderAuthentication)
|
||||
{
|
||||
return ExchangeServerController.SetMailboxMailFlowSettings(itemId, accountId,
|
||||
enableForwarding, forwardingAccountName, forwardToBoth,
|
||||
sendOnBehalfAccounts, acceptAccounts, rejectAccounts,
|
||||
maxRecipients, maxSendMessageSizeKB, maxReceiveMessageSizeKB,
|
||||
requireSenderAuthentication);
|
||||
}
|
||||
{
|
||||
return ExchangeServerController.SetMailboxMailFlowSettings(itemId, accountId,
|
||||
enableForwarding, forwardingAccountName, forwardToBoth,
|
||||
sendOnBehalfAccounts, acceptAccounts, rejectAccounts,
|
||||
requireSenderAuthentication);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public ExchangeMailbox GetMailboxAdvancedSettings(int itemId, int accountId)
|
||||
{
|
||||
return ExchangeServerController.GetMailboxAdvancedSettings(itemId, accountId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public int SetMailboxAdvancedSettings(int itemId, int accountId, bool enablePOP,
|
||||
bool enableIMAP, bool enableOWA, bool enableMAPI, bool enableActiveSync,
|
||||
int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays)
|
||||
{
|
||||
return ExchangeServerController.SetMailboxAdvancedSettings(itemId, accountId, enablePOP,
|
||||
enableIMAP, enableOWA, enableMAPI, enableActiveSync,
|
||||
issueWarningKB, prohibitSendKB, prohibitSendReceiveKB, keepDeletedItemsDays);
|
||||
}
|
||||
[WebMethod]
|
||||
public int SetExchangeMailboxPlan(int itemId, int accountId, int mailboxPlanId)
|
||||
{
|
||||
return ExchangeServerController.SetExchangeMailboxPlan(itemId, accountId, mailboxPlanId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public string GetMailboxSetupInstructions(int itemId, int accountId, bool pmm, bool emailMode, bool signup)
|
||||
|
@ -327,137 +307,137 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return ExchangeServerController.SetMailboxManagerSettings(itemId, accountId, pmmAllowed, action);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
[WebMethod]
|
||||
public ExchangeMailbox GetMailboxPermissions(int itemId, int accountId)
|
||||
{
|
||||
return ExchangeServerController.GetMailboxPermissions(itemId, accountId);
|
||||
return ExchangeServerController.GetMailboxPermissions(itemId, accountId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public int SetMailboxPermissions(int itemId, int accountId, string[] sendAsaccounts, string[] fullAccessAcounts)
|
||||
{
|
||||
return ExchangeServerController.SetMailboxPermissions(itemId, accountId, sendAsaccounts, fullAccessAcounts);
|
||||
return ExchangeServerController.SetMailboxPermissions(itemId, accountId, sendAsaccounts, fullAccessAcounts);
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region Contacts
|
||||
[WebMethod]
|
||||
public int CreateContact(int itemId, string displayName, string email)
|
||||
{
|
||||
return ExchangeServerController.CreateContact(itemId, displayName, email);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public int DeleteContact(int itemId, int accountId)
|
||||
{
|
||||
return ExchangeServerController.DeleteContact(itemId, accountId);
|
||||
}
|
||||
#endregion
|
||||
|
||||
[WebMethod]
|
||||
public ExchangeContact GetContactGeneralSettings(int itemId, int accountId)
|
||||
{
|
||||
return ExchangeServerController.GetContactGeneralSettings(itemId, accountId);
|
||||
}
|
||||
#region Contacts
|
||||
[WebMethod]
|
||||
public int CreateContact(int itemId, string displayName, string email)
|
||||
{
|
||||
return ExchangeServerController.CreateContact(itemId, displayName, email);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public int SetContactGeneralSettings(int itemId, int accountId, string displayName, string emailAddress,
|
||||
bool hideAddressBook, string firstName, string initials,
|
||||
string lastName, string address, string city, string state, string zip, string country,
|
||||
string jobTitle, string company, string department, string office, string managerAccountName,
|
||||
string businessPhone, string fax, string homePhone, string mobilePhone, string pager,
|
||||
[WebMethod]
|
||||
public int DeleteContact(int itemId, int accountId)
|
||||
{
|
||||
return ExchangeServerController.DeleteContact(itemId, accountId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public ExchangeContact GetContactGeneralSettings(int itemId, int accountId)
|
||||
{
|
||||
return ExchangeServerController.GetContactGeneralSettings(itemId, accountId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public int SetContactGeneralSettings(int itemId, int accountId, string displayName, string emailAddress,
|
||||
bool hideAddressBook, string firstName, string initials,
|
||||
string lastName, string address, string city, string state, string zip, string country,
|
||||
string jobTitle, string company, string department, string office, string managerAccountName,
|
||||
string businessPhone, string fax, string homePhone, string mobilePhone, string pager,
|
||||
string webPage, string notes, int useMapiRichTextFormat)
|
||||
{
|
||||
return ExchangeServerController.SetContactGeneralSettings(itemId, accountId, displayName, emailAddress,
|
||||
hideAddressBook, firstName, initials,
|
||||
lastName, address, city, state, zip, country,
|
||||
jobTitle, company, department, office, managerAccountName,
|
||||
businessPhone, fax, homePhone, mobilePhone, pager,
|
||||
webPage, notes, useMapiRichTextFormat);
|
||||
}
|
||||
{
|
||||
return ExchangeServerController.SetContactGeneralSettings(itemId, accountId, displayName, emailAddress,
|
||||
hideAddressBook, firstName, initials,
|
||||
lastName, address, city, state, zip, country,
|
||||
jobTitle, company, department, office, managerAccountName,
|
||||
businessPhone, fax, homePhone, mobilePhone, pager,
|
||||
webPage, notes, useMapiRichTextFormat);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public ExchangeContact GetContactMailFlowSettings(int itemId, int accountId)
|
||||
{
|
||||
return ExchangeServerController.GetContactMailFlowSettings(itemId, accountId);
|
||||
}
|
||||
[WebMethod]
|
||||
public ExchangeContact GetContactMailFlowSettings(int itemId, int accountId)
|
||||
{
|
||||
return ExchangeServerController.GetContactMailFlowSettings(itemId, accountId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public int SetContactMailFlowSettings(int itemId, int accountId,
|
||||
string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication)
|
||||
{
|
||||
return ExchangeServerController.SetContactMailFlowSettings(itemId, accountId,
|
||||
acceptAccounts, rejectAccounts, requireSenderAuthentication);
|
||||
}
|
||||
#endregion
|
||||
[WebMethod]
|
||||
public int SetContactMailFlowSettings(int itemId, int accountId,
|
||||
string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication)
|
||||
{
|
||||
return ExchangeServerController.SetContactMailFlowSettings(itemId, accountId,
|
||||
acceptAccounts, rejectAccounts, requireSenderAuthentication);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Distribution Lists
|
||||
[WebMethod]
|
||||
public int CreateDistributionList(int itemId, string displayName, string name, string domain, int managerId)
|
||||
{
|
||||
return ExchangeServerController.CreateDistributionList(itemId, displayName, name, domain, managerId);
|
||||
}
|
||||
#region Distribution Lists
|
||||
[WebMethod]
|
||||
public int CreateDistributionList(int itemId, string displayName, string name, string domain, int managerId)
|
||||
{
|
||||
return ExchangeServerController.CreateDistributionList(itemId, displayName, name, domain, managerId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public int DeleteDistributionList(int itemId, int accountId)
|
||||
{
|
||||
return ExchangeServerController.DeleteDistributionList(itemId, accountId);
|
||||
}
|
||||
[WebMethod]
|
||||
public int DeleteDistributionList(int itemId, int accountId)
|
||||
{
|
||||
return ExchangeServerController.DeleteDistributionList(itemId, accountId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public ExchangeDistributionList GetDistributionListGeneralSettings(int itemId, int accountId)
|
||||
{
|
||||
return ExchangeServerController.GetDistributionListGeneralSettings(itemId, accountId);
|
||||
}
|
||||
[WebMethod]
|
||||
public ExchangeDistributionList GetDistributionListGeneralSettings(int itemId, int accountId)
|
||||
{
|
||||
return ExchangeServerController.GetDistributionListGeneralSettings(itemId, accountId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public int SetDistributionListGeneralSettings(int itemId, int accountId, string displayName,
|
||||
bool hideAddressBook, string managerAccount, string[] memberAccounts,
|
||||
string notes)
|
||||
{
|
||||
return ExchangeServerController.SetDistributionListGeneralSettings(itemId, accountId, displayName,
|
||||
hideAddressBook, managerAccount, memberAccounts,
|
||||
notes);
|
||||
}
|
||||
[WebMethod]
|
||||
public int SetDistributionListGeneralSettings(int itemId, int accountId, string displayName,
|
||||
bool hideAddressBook, string managerAccount, string[] memberAccounts,
|
||||
string notes)
|
||||
{
|
||||
return ExchangeServerController.SetDistributionListGeneralSettings(itemId, accountId, displayName,
|
||||
hideAddressBook, managerAccount, memberAccounts,
|
||||
notes);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public ExchangeDistributionList GetDistributionListMailFlowSettings(int itemId, int accountId)
|
||||
{
|
||||
return ExchangeServerController.GetDistributionListMailFlowSettings(itemId, accountId);
|
||||
}
|
||||
[WebMethod]
|
||||
public ExchangeDistributionList GetDistributionListMailFlowSettings(int itemId, int accountId)
|
||||
{
|
||||
return ExchangeServerController.GetDistributionListMailFlowSettings(itemId, accountId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public int SetDistributionListMailFlowSettings(int itemId, int accountId,
|
||||
string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication)
|
||||
{
|
||||
return ExchangeServerController.SetDistributionListMailFlowSettings(itemId, accountId,
|
||||
acceptAccounts, rejectAccounts, requireSenderAuthentication);
|
||||
}
|
||||
[WebMethod]
|
||||
public int SetDistributionListMailFlowSettings(int itemId, int accountId,
|
||||
string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication)
|
||||
{
|
||||
return ExchangeServerController.SetDistributionListMailFlowSettings(itemId, accountId,
|
||||
acceptAccounts, rejectAccounts, requireSenderAuthentication);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public ExchangeEmailAddress[] GetDistributionListEmailAddresses(int itemId, int accountId)
|
||||
{
|
||||
return ExchangeServerController.GetDistributionListEmailAddresses(itemId, accountId);
|
||||
}
|
||||
[WebMethod]
|
||||
public ExchangeEmailAddress[] GetDistributionListEmailAddresses(int itemId, int accountId)
|
||||
{
|
||||
return ExchangeServerController.GetDistributionListEmailAddresses(itemId, accountId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public int AddDistributionListEmailAddress(int itemId, int accountId, string emailAddress)
|
||||
{
|
||||
return ExchangeServerController.AddDistributionListEmailAddress(itemId, accountId, emailAddress);
|
||||
}
|
||||
[WebMethod]
|
||||
public int AddDistributionListEmailAddress(int itemId, int accountId, string emailAddress)
|
||||
{
|
||||
return ExchangeServerController.AddDistributionListEmailAddress(itemId, accountId, emailAddress);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public int SetDistributionListPrimaryEmailAddress(int itemId, int accountId, string emailAddress)
|
||||
{
|
||||
return ExchangeServerController.SetDistributionListPrimaryEmailAddress(itemId, accountId, emailAddress);
|
||||
}
|
||||
[WebMethod]
|
||||
public int SetDistributionListPrimaryEmailAddress(int itemId, int accountId, string emailAddress)
|
||||
{
|
||||
return ExchangeServerController.SetDistributionListPrimaryEmailAddress(itemId, accountId, emailAddress);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public int DeleteDistributionListEmailAddresses(int itemId, int accountId, string[] emailAddresses)
|
||||
{
|
||||
return ExchangeServerController.DeleteDistributionListEmailAddresses(itemId, accountId, emailAddresses);
|
||||
}
|
||||
[WebMethod]
|
||||
public int DeleteDistributionListEmailAddresses(int itemId, int accountId, string[] emailAddresses)
|
||||
{
|
||||
return ExchangeServerController.DeleteDistributionListEmailAddresses(itemId, accountId, emailAddresses);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public ResultObject SetDistributionListPermissions(int itemId, int accountId, string[] sendAsAccounts, string[] sendOnBehalfAccounts)
|
||||
|
@ -470,9 +450,77 @@ namespace WebsitePanel.EnterpriseServer
|
|||
{
|
||||
return ExchangeServerController.GetDistributionListPermissions(itemId, accountId);
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region MobileDevice
|
||||
|
||||
[WebMethod]
|
||||
public ExchangeMobileDevice[] GetMobileDevices(int itemId, int accountId)
|
||||
{
|
||||
return ExchangeServerController.GetMobileDevices(itemId, accountId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public ExchangeMobileDevice GetMobileDevice(int itemId, string deviceId)
|
||||
{
|
||||
return ExchangeServerController.GetMobileDevice(itemId, deviceId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public void WipeDataFromDevice(int itemId, string deviceId)
|
||||
{
|
||||
ExchangeServerController.WipeDataFromDevice(itemId, deviceId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public void CancelRemoteWipeRequest(int itemId, string deviceId)
|
||||
{
|
||||
ExchangeServerController.CancelRemoteWipeRequest(itemId, deviceId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public void RemoveDevice(int itemId, string deviceId)
|
||||
{
|
||||
ExchangeServerController.RemoveDevice(itemId, deviceId);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region MailboxPlans
|
||||
[WebMethod]
|
||||
public List<ExchangeMailboxPlan> GetExchangeMailboxPlans(int itemId)
|
||||
{
|
||||
return ExchangeServerController.GetExchangeMailboxPlans(itemId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public ExchangeMailboxPlan GetExchangeMailboxPlan(int itemId, int mailboxPlanId)
|
||||
{
|
||||
return ExchangeServerController.GetExchangeMailboxPlan(itemId, mailboxPlanId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public int AddExchangeMailboxPlan(int itemId, ExchangeMailboxPlan mailboxPlan)
|
||||
{
|
||||
return ExchangeServerController.AddExchangeMailboxPlan(itemId, mailboxPlan);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public int DeleteExchangeMailboxPlan(int itemId, int mailboxPlanId)
|
||||
{
|
||||
return ExchangeServerController.DeleteExchangeMailboxPlan(itemId, mailboxPlanId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public void SetOrganizationDefaultExchangeMailboxPlan(int itemId, int mailboxPlanId)
|
||||
{
|
||||
ExchangeServerController.SetOrganizationDefaultExchangeMailboxPlan(itemId, mailboxPlanId);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Public Folders
|
||||
[WebMethod]
|
||||
public int CreatePublicFolder(int itemId, string parentFolder, string folderName,
|
||||
|
@ -560,39 +608,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
}
|
||||
#endregion
|
||||
|
||||
#region MobileDevice
|
||||
|
||||
[WebMethod]
|
||||
public ExchangeMobileDevice[] GetMobileDevices(int itemId, int accountId)
|
||||
{
|
||||
return ExchangeServerController.GetMobileDevices(itemId, accountId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public ExchangeMobileDevice GetMobileDevice(int itemId, string deviceId)
|
||||
{
|
||||
return ExchangeServerController.GetMobileDevice(itemId, deviceId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public void WipeDataFromDevice(int itemId, string deviceId)
|
||||
{
|
||||
ExchangeServerController.WipeDataFromDevice(itemId, deviceId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public void CancelRemoteWipeRequest(int itemId, string deviceId)
|
||||
{
|
||||
ExchangeServerController.CancelRemoteWipeRequest(itemId, deviceId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public void RemoveDevice(int itemId, string deviceId)
|
||||
{
|
||||
ExchangeServerController.RemoveDevice(itemId, deviceId);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2012, Outercurve Foundation.
|
||||
// Copyright (c) 2011, Outercurve Foundation.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
|
@ -46,10 +46,10 @@ namespace WebsitePanel.EnterpriseServer
|
|||
#region Organizations
|
||||
|
||||
[WebMethod]
|
||||
public int CreateOrganization(int packageId, string organizationID, string organizationName)
|
||||
public int CreateOrganization(int packageId, string organizationID, string organizationName)
|
||||
{
|
||||
return OrganizationController.CreateOrganization(packageId, organizationID, organizationName);
|
||||
|
||||
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
|
@ -60,7 +60,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
filterColumn, filterValue, sortColumn, startRow, maximumRows);
|
||||
}
|
||||
|
||||
|
||||
|
||||
[WebMethod]
|
||||
public List<Organization> GetOrganizations(int packageId, bool recursive)
|
||||
{
|
||||
|
@ -72,13 +72,13 @@ namespace WebsitePanel.EnterpriseServer
|
|||
{
|
||||
return OrganizationController.GetOrganizationUserSummuryLetter(itemId, accountId, pmm, emailMode, signup);
|
||||
}
|
||||
|
||||
|
||||
[WebMethod]
|
||||
public int SendOrganizationUserSummuryLetter(int itemId, int accountId, bool signup, string to, string cc)
|
||||
{
|
||||
return OrganizationController.SendSummaryLetter(itemId, accountId, signup, to, cc);
|
||||
}
|
||||
|
||||
|
||||
[WebMethod]
|
||||
public int DeleteOrganization(int itemId)
|
||||
{
|
||||
|
@ -97,6 +97,13 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return OrganizationController.GetOrganization(itemId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public int GetAccountIdByUserPrincipalName(int itemId, string userPrincipalName)
|
||||
{
|
||||
return OrganizationController.GetAccountIdByUserPrincipalName(itemId, userPrincipalName);
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
@ -107,13 +114,13 @@ namespace WebsitePanel.EnterpriseServer
|
|||
{
|
||||
return OrganizationController.AddOrganizationDomain(itemId, domainName);
|
||||
}
|
||||
|
||||
|
||||
[WebMethod]
|
||||
public List<OrganizationDomainName> GetOrganizationDomains(int itemId)
|
||||
{
|
||||
return OrganizationController.GetOrganizationDomains(itemId);
|
||||
}
|
||||
|
||||
|
||||
[WebMethod]
|
||||
public int DeleteOrganizationDomain(int itemId, int domainId)
|
||||
{
|
||||
|
@ -132,15 +139,22 @@ namespace WebsitePanel.EnterpriseServer
|
|||
#region Users
|
||||
|
||||
[WebMethod]
|
||||
public int CreateUser(int itemId, string displayName, string name, string domain, string password, bool sendNotification, string to)
|
||||
public int CreateUser(int itemId, string displayName, string name, string domain, string password, string subscriberNumber, bool sendNotification, string to)
|
||||
{
|
||||
string accountName;
|
||||
return OrganizationController.CreateUser(itemId, displayName, name, domain, password, true, sendNotification, to, out accountName);
|
||||
return OrganizationController.CreateUser(itemId, displayName, name, domain, password, subscriberNumber, true, sendNotification, to, out accountName);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public int ImportUser(int itemId, string accountName, string displayName, string name, string domain, string password, string subscriberNumber)
|
||||
{
|
||||
return OrganizationController.ImportUser(itemId, accountName, displayName, name, domain, password, subscriberNumber);
|
||||
}
|
||||
|
||||
|
||||
[WebMethod]
|
||||
public OrganizationUsersPaged GetOrganizationUsersPaged(int itemId, string filterColumn, string filterValue, string sortColumn,
|
||||
int startRow, int maximumRows)
|
||||
int startRow, int maximumRows)
|
||||
{
|
||||
return OrganizationController.GetOrganizationUsersPaged(itemId, filterColumn, filterValue, sortColumn, startRow, maximumRows);
|
||||
}
|
||||
|
@ -157,30 +171,30 @@ namespace WebsitePanel.EnterpriseServer
|
|||
string lastName, string address, string city, string state, string zip, string country,
|
||||
string jobTitle, string company, string department, string office, string managerAccountName,
|
||||
string businessPhone, string fax, string homePhone, string mobilePhone, string pager,
|
||||
string webPage, string notes, string externalEmail)
|
||||
string webPage, string notes, string externalEmail, string subscriberNumber)
|
||||
{
|
||||
return OrganizationController.SetUserGeneralSettings(itemId, accountId, displayName,
|
||||
password, hideAddressBook, disabled, locked, firstName, initials,
|
||||
lastName, address, city, state, zip, country,
|
||||
jobTitle, company, department, office, managerAccountName,
|
||||
businessPhone, fax, homePhone, mobilePhone, pager,
|
||||
webPage, notes, externalEmail);
|
||||
webPage, notes, externalEmail, subscriberNumber);
|
||||
}
|
||||
|
||||
|
||||
[WebMethod]
|
||||
public List<OrganizationUser> SearchAccounts(int itemId,
|
||||
public List<OrganizationUser> SearchAccounts(int itemId,
|
||||
string filterColumn, string filterValue, string sortColumn, bool includeMailboxes)
|
||||
{
|
||||
return OrganizationController.SearchAccounts(itemId,
|
||||
filterColumn, filterValue, sortColumn, includeMailboxes);
|
||||
}
|
||||
|
||||
|
||||
|
||||
[WebMethod]
|
||||
public int DeleteUser(int itemId, int accountId)
|
||||
{
|
||||
return OrganizationController.DeleteUser(itemId, accountId);
|
||||
return OrganizationController.DeleteUser(itemId, accountId);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue