Merge
This commit is contained in:
commit
535b3c7cd1
7 changed files with 87 additions and 61 deletions
|
@ -767,7 +767,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
// load account
|
||||
ExchangeAccount account = GetAccount(itemId, accountId);
|
||||
|
||||
return exchange.GetMailboxStatistics(account.AccountName);
|
||||
return exchange.GetMailboxStatistics(account.UserPrincipalName);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
@ -1241,6 +1241,9 @@ namespace WebsitePanel.EnterpriseServer
|
|||
string CounterStr = "00000";
|
||||
int counter = 0;
|
||||
bool bFound = false;
|
||||
|
||||
if (!AccountExists(accountName)) return accountName;
|
||||
|
||||
do
|
||||
{
|
||||
accountName = genSamLogin(name, CounterStr);
|
||||
|
@ -1819,7 +1822,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
// delete mailbox
|
||||
int serviceExchangeId = GetExchangeServiceID(org.PackageId);
|
||||
ExchangeServer exchange = GetExchangeServer(serviceExchangeId, org.ServiceId);
|
||||
exchange.DisableMailbox(account.AccountName);
|
||||
exchange.DisableMailbox(account.UserPrincipalName);
|
||||
|
||||
account.AccountType = ExchangeAccountType.User;
|
||||
account.MailEnabledPublicFolder = false;
|
||||
|
@ -1869,7 +1872,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
// delete mailbox
|
||||
int serviceExchangeId = GetExchangeServiceID(org.PackageId);
|
||||
ExchangeServer exchange = GetExchangeServer(serviceExchangeId, org.ServiceId);
|
||||
exchange.DeleteMailbox(account.AccountName);
|
||||
exchange.DeleteMailbox(account.UserPrincipalName);
|
||||
|
||||
|
||||
|
||||
|
@ -1944,7 +1947,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
|
||||
int exchangeServiceId = GetExchangeServiceID(org.PackageId);
|
||||
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
||||
return exchange.GetMailboxGeneralSettings(account.AccountName);
|
||||
return exchange.GetMailboxGeneralSettings(account.UserPrincipalName);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
@ -1991,7 +1994,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
hideAddressBook = true;
|
||||
|
||||
exchange.SetMailboxGeneralSettings(
|
||||
account.AccountName,
|
||||
account.UserPrincipalName,
|
||||
hideAddressBook,
|
||||
disabled);
|
||||
|
||||
|
@ -2063,7 +2066,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
||||
|
||||
exchange.SetMailboxEmailAddresses(
|
||||
account.AccountName,
|
||||
account.UserPrincipalName,
|
||||
GetAccountSimpleEmailAddresses(itemId, accountId));
|
||||
|
||||
return 0;
|
||||
|
@ -2119,7 +2122,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
||||
|
||||
exchange.SetMailboxPrimaryEmailAddress(
|
||||
account.AccountName,
|
||||
account.UserPrincipalName,
|
||||
emailAddress);
|
||||
|
||||
if (DataProvider.CheckOCSUserExists(account.AccountId))
|
||||
|
@ -2187,7 +2190,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
||||
|
||||
exchange.SetMailboxEmailAddresses(
|
||||
account.AccountName,
|
||||
account.UserPrincipalName,
|
||||
GetAccountSimpleEmailAddresses(itemId, accountId));
|
||||
|
||||
return 0;
|
||||
|
@ -2228,7 +2231,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
// get mailbox settings
|
||||
int exchangeServiceId = GetExchangeServiceID(org.PackageId);
|
||||
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
||||
ExchangeMailbox mailbox = exchange.GetMailboxMailFlowSettings(account.AccountName);
|
||||
ExchangeMailbox mailbox = exchange.GetMailboxMailFlowSettings(account.UserPrincipalName);
|
||||
mailbox.DisplayName = account.DisplayName;
|
||||
return mailbox;
|
||||
}
|
||||
|
@ -2273,7 +2276,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
int exchangeServiceId = GetExchangeServiceID(org.PackageId);
|
||||
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
||||
|
||||
exchange.SetMailboxMailFlowSettings(account.AccountName,
|
||||
exchange.SetMailboxMailFlowSettings(account.UserPrincipalName,
|
||||
enableForwarding,
|
||||
forwardingAccountName,
|
||||
forwardToBoth,
|
||||
|
@ -2321,7 +2324,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
// get mailbox settings
|
||||
int exchangeServiceId = GetExchangeServiceID(org.PackageId);
|
||||
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
||||
ExchangeMailbox mailbox = exchange.GetMailboxAdvancedSettings(account.AccountName);
|
||||
ExchangeMailbox mailbox = exchange.GetMailboxAdvancedSettings(account.UserPrincipalName);
|
||||
mailbox.DisplayName = account.DisplayName;
|
||||
return mailbox;
|
||||
}
|
||||
|
@ -2529,7 +2532,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
// get mailbox settings
|
||||
int exchangeServiceId = GetExchangeServiceID(org.PackageId);
|
||||
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
||||
ExchangeMailbox mailbox = exchange.GetMailboxPermissions(org.OrganizationId, account.AccountName);
|
||||
ExchangeMailbox mailbox = exchange.GetMailboxPermissions(org.OrganizationId, account.UserPrincipalName);
|
||||
mailbox.DisplayName = account.DisplayName;
|
||||
return mailbox;
|
||||
}
|
||||
|
@ -2571,7 +2574,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
int exchangeServiceId = GetExchangeServiceID(org.PackageId);
|
||||
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
||||
|
||||
exchange.SetMailboxPermissions(org.OrganizationId, account.AccountName, sendAsaccounts, fullAccessAcounts);
|
||||
exchange.SetMailboxPermissions(org.OrganizationId, account.UserPrincipalName, sendAsaccounts, fullAccessAcounts);
|
||||
|
||||
|
||||
return 0;
|
||||
|
@ -2656,7 +2659,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
|
||||
exchange.SetMailboxAdvancedSettings(
|
||||
org.OrganizationId,
|
||||
account.AccountName,
|
||||
account.UserPrincipalName,
|
||||
plan.EnablePOP,
|
||||
plan.EnableIMAP,
|
||||
plan.EnableOWA,
|
||||
|
@ -4763,7 +4766,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
int exchangeServiceId = GetExchangeServiceID(org.PackageId);
|
||||
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
||||
|
||||
return exchange.GetMobileDevices(account.AccountName);
|
||||
return exchange.GetMobileDevices(account.UserPrincipalName);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
@ -249,7 +249,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
|
||||
OrganizationResult serverRes =
|
||||
crm.CreateOrganization(orgId, org.OrganizationId, org.Name, baseCurrencyCode, baseCurrencyName,
|
||||
baseCurrencySymbol, user.AccountName, user.FirstName, user.LastName, user.PrimaryEmailAddress,
|
||||
baseCurrencySymbol, user.SamAccountName, user.FirstName, user.LastName, user.PrimaryEmailAddress,
|
||||
collation);
|
||||
|
||||
if (!serverRes.IsSuccess)
|
||||
|
|
|
@ -1336,11 +1336,11 @@ namespace WebsitePanel.EnterpriseServer
|
|||
|
||||
if (orgProxy.CreateUser(org.OrganizationId, sAMAccountName, displayName, upn, password, enabled) == 0)
|
||||
{
|
||||
OrganizationUser retUser = orgProxy.GetUserGeneralSettings(upn, org.OrganizationId);
|
||||
accountName = sAMAccountName;
|
||||
OrganizationUser retUser = orgProxy.GetUserGeneralSettings(sAMAccountName, org.OrganizationId);
|
||||
TaskManager.Write("sAMAccountName :" + retUser.DomainUserName);
|
||||
|
||||
userId = AddOrganizationUser(itemId, upn, displayName, email, retUser.DomainUserName, password, subscriberNumber);
|
||||
accountName = upn;
|
||||
userId = AddOrganizationUser(itemId, sAMAccountName, displayName, email, retUser.DomainUserName, password, subscriberNumber);
|
||||
|
||||
// register email address
|
||||
AddAccountEmailAddress(userId, email);
|
||||
|
@ -1432,7 +1432,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
|
||||
TaskManager.Write("sAMAccountName :" + retUser.DomainUserName);
|
||||
|
||||
userId = AddOrganizationUser(itemId, accountName, displayName, email, retUser.DomainUserName, password, subscriberNumber);
|
||||
userId = AddOrganizationUser(itemId, retUser.SamAccountName, displayName, email, retUser.DomainUserName, password, subscriberNumber);
|
||||
|
||||
AddAccountEmailAddress(userId, email);
|
||||
|
||||
|
@ -1461,6 +1461,9 @@ namespace WebsitePanel.EnterpriseServer
|
|||
string CounterStr = "00000";
|
||||
int counter = 0;
|
||||
bool bFound = false;
|
||||
|
||||
if (!AccountExists(accountName)) return accountName;
|
||||
|
||||
do
|
||||
{
|
||||
accountName = genSamLogin(name, CounterStr);
|
||||
|
|
|
@ -444,12 +444,12 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
|||
try
|
||||
{
|
||||
|
||||
stats = exchange.GetMailboxStatistics(mailbox.AccountName);
|
||||
stats = exchange.GetMailboxStatistics(mailbox.UserPrincipalName);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
TaskManager.WriteError(ex, "Could not get mailbox statistics. AccountName: {0}",
|
||||
mailbox.AccountName);
|
||||
mailbox.UserPrincipalName);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -371,7 +371,7 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
userPath = GetUserPath(organizationId, loginName);
|
||||
if (!ActiveDirectoryUtils.AdObjectExists(userPath))
|
||||
{
|
||||
userPath = ActiveDirectoryUtils.CreateUser(path, upn, loginName, displayName, password, enabled);
|
||||
userPath = ActiveDirectoryUtils.CreateUser(path, null, loginName, displayName, password, enabled);
|
||||
DirectoryEntry entry = new DirectoryEntry(userPath);
|
||||
ActiveDirectoryUtils.SetADObjectProperty(entry, ADAttributes.UserPrincipalName, upn);
|
||||
entry.CommitChanges();
|
||||
|
|
|
@ -78,8 +78,17 @@
|
|||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td class="FormLabel150"><asp:Localize ID="locNotes" runat="server" meta:resourcekey="locNotes" Text="Notes:"></asp:Localize></td>
|
||||
<td>
|
||||
<asp:TextBox ID="txtNotes" runat="server" CssClass="TextBox200" Rows="4" TextMode="MultiLine"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<wsp:CollapsiblePanel id="secCompanyInfo" runat="server"
|
||||
<wsp:CollapsiblePanel id="secCompanyInfo" runat="server" IsCollapsed="true"
|
||||
TargetControlID="CompanyInfo" meta:resourcekey="secCompanyInfo" Text="Company Information">
|
||||
</wsp:CollapsiblePanel>
|
||||
<asp:Panel ID="CompanyInfo" runat="server" Height="0" style="overflow:hidden;">
|
||||
|
@ -121,7 +130,7 @@
|
|||
</asp:Panel>
|
||||
|
||||
|
||||
<wsp:CollapsiblePanel id="secContactInfo" runat="server"
|
||||
<wsp:CollapsiblePanel id="secContactInfo" runat="server" IsCollapsed="true"
|
||||
TargetControlID="ContactInfo" meta:resourcekey="secContactInfo" Text="Contact Information">
|
||||
</wsp:CollapsiblePanel>
|
||||
<asp:Panel ID="ContactInfo" runat="server" Height="0" style="overflow:hidden;">
|
||||
|
@ -165,7 +174,7 @@
|
|||
</table>
|
||||
</asp:Panel>
|
||||
|
||||
<wsp:CollapsiblePanel id="secAddressInfo" runat="server"
|
||||
<wsp:CollapsiblePanel id="secAddressInfo" runat="server" IsCollapsed="true"
|
||||
TargetControlID="AddressInfo" meta:resourcekey="secAddressInfo" Text="Address">
|
||||
</wsp:CollapsiblePanel>
|
||||
<asp:Panel ID="AddressInfo" runat="server" Height="0" style="overflow:hidden;">
|
||||
|
@ -204,14 +213,6 @@
|
|||
</table>
|
||||
</asp:Panel>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td class="FormLabel150"><asp:Localize ID="locNotes" runat="server" meta:resourcekey="locNotes" Text="Notes:"></asp:Localize></td>
|
||||
<td>
|
||||
<asp:TextBox ID="txtNotes" runat="server" CssClass="TextBox200" Rows="4" TextMode="MultiLine"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="FormFooterClean">
|
||||
<asp:Button id="btnSave" runat="server" Text="Save Changes" CssClass="Button1" meta:resourcekey="btnSave" ValidationGroup="EditContact" OnClick="btnSave_Click"></asp:Button>
|
||||
|
|
|
@ -1,3 +1,31 @@
|
|||
// 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.
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
|
@ -228,6 +256,24 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtLastName;
|
||||
|
||||
/// <summary>
|
||||
/// locNotes 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 locNotes;
|
||||
|
||||
/// <summary>
|
||||
/// txtNotes 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 txtNotes;
|
||||
|
||||
/// <summary>
|
||||
/// secCompanyInfo control.
|
||||
/// </summary>
|
||||
|
@ -570,24 +616,6 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.CountrySelector country;
|
||||
|
||||
/// <summary>
|
||||
/// locNotes 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 locNotes;
|
||||
|
||||
/// <summary>
|
||||
/// txtNotes 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 txtNotes;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave control.
|
||||
/// </summary>
|
||||
|
@ -605,14 +633,5 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.ValidationSummary ValidationSummary1;
|
||||
|
||||
/// <summary>
|
||||
/// FormComments 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 FormComments;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue