Added: Added Lync to the Scheduled Enterprise HOsting report

ReAdded: ability to send summary email when create an user account or a mailbox
This commit is contained in:
robvde 2012-10-30 22:30:22 +04:00
parent 3053af2827
commit 90a746bc3c
23 changed files with 278 additions and 40 deletions

View file

@ -147,7 +147,15 @@
</tr>
</table>
<table>
<tr>
<td class="FormLabel150">
<asp:CheckBox ID="chkSendInstructions" runat="server" meta:resourcekey="chkSendInstructions" Text="Send Setup Instructions" Checked="true" />
</td>
<td><wsp:EmailControl id="sendInstructionEmail" runat="server" RequiredEnabled="true" ValidationGroup="CreateMailbox"></wsp:EmailControl></td>
</tr>
</table>
<div class="FormFooterClean">
<asp:Button id="btnCreate" runat="server" Text="Create Mailbox"

View file

@ -65,13 +65,24 @@ namespace WebsitePanel.Portal.ExchangeServer
return;
}
PackageInfo package = ES.Services.Packages.GetPackage(PanelSecurity.PackageId);
if (package != null)
string instructions = ES.Services.ExchangeServer.GetMailboxSetupInstructions(PanelRequest.ItemID, PanelRequest.AccountID, false, false, false);
if (!string.IsNullOrEmpty(instructions))
{
//UserInfo user = ES.Services.Users.GetUserById(package.UserId);
//if (user != null)
//sendInstructionEmail.Text = user.Email;
chkSendInstructions.Checked = chkSendInstructions.Visible = sendInstructionEmail.Visible = true;
PackageInfo package = ES.Services.Packages.GetPackage(PanelSecurity.PackageId);
if (package != null)
{
UserInfo user = ES.Services.Users.GetUserById(package.UserId);
if (user != null)
sendInstructionEmail.Text = user.Email;
}
}
else
{
chkSendInstructions.Checked = chkSendInstructions.Visible = sendInstructionEmail.Visible = false;
}
WebsitePanel.Providers.HostedSolution.ExchangeMailboxPlan[] plans = ES.Services.ExchangeServer.GetExchangeMailboxPlans(PanelRequest.ItemID);
@ -124,8 +135,8 @@ namespace WebsitePanel.Portal.ExchangeServer
name,
domain,
password.Password,
false,
"",
chkSendInstructions.Checked,
sendInstructionEmail.Text,
Convert.ToInt32(mailboxPlanSelector.MailboxPlanId),
subscriberNumber);

View file

@ -327,6 +327,24 @@ namespace WebsitePanel.Portal.ExchangeServer {
/// </remarks>
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.MailboxPlanSelector mailboxPlanSelector;
/// <summary>
/// chkSendInstructions control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox chkSendInstructions;
/// <summary>
/// sendInstructionEmail control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.UserControls.EmailControl sendInstructionEmail;
/// <summary>
/// btnCreate control.
/// </summary>

View file

@ -91,6 +91,15 @@
</tr>
</table>
<table>
<tr>
<td class="FormLabel150">
<asp:CheckBox ID="chkSendInstructions" runat="server" meta:resourcekey="chkSendInstructions" Text="Send Setup Instructions" Checked="true" />
</td>
<td><wsp:EmailControl id="sendInstructionEmail" runat="server" RequiredEnabled="true" ValidationGroup="CreateMailbox"></wsp:EmailControl></td>
</tr>
</table>
<div class="FormFooterClean">
<asp:Button id="btnCreate" runat="server" Text="Create Mailbox"

View file

@ -58,12 +58,21 @@ namespace WebsitePanel.Portal.HostedSolution
messageBox.ShowMessage(passwordPolicy, "CREATE_ORGANIZATION_USER", "HostedOrganization");
}
PackageInfo package = ES.Services.Packages.GetPackage(PanelSecurity.PackageId);
if (package != null)
string instructions = ES.Services.Organizations.GetOrganizationUserSummuryLetter(PanelRequest.ItemID, PanelRequest.AccountID, false, false, false);
if (!string.IsNullOrEmpty(instructions))
{
//UserInfo user = ES.Services.Users.GetUserById(package.UserId);
//if (user != null)
//sendInstructionEmail.Text = user.Email;
chkSendInstructions.Checked = chkSendInstructions.Visible = sendInstructionEmail.Visible = true;
PackageInfo package = ES.Services.Packages.GetPackage(PanelSecurity.PackageId);
if (package != null)
{
UserInfo user = ES.Services.Users.GetUserById(package.UserId);
if (user != null)
sendInstructionEmail.Text = user.Email;
}
}
else
{
chkSendInstructions.Checked = chkSendInstructions.Visible = sendInstructionEmail.Visible = false;
}
}
@ -96,8 +105,8 @@ namespace WebsitePanel.Portal.HostedSolution
email.DomainName.ToLower(),
password.Password,
txtSubscriberNumber.Text.Trim(),
false,
"");
chkSendInstructions.Checked,
sendInstructionEmail.Text);
if (accountId < 0)
{

View file

@ -219,6 +219,24 @@ namespace WebsitePanel.Portal.HostedSolution {
/// </remarks>
protected global::WebsitePanel.Portal.PasswordControl password;
/// <summary>
/// chkSendInstructions control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox chkSendInstructions;
/// <summary>
/// sendInstructionEmail control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.UserControls.EmailControl sendInstructionEmail;
/// <summary>
/// btnCreate control.
/// </summary>

View file

@ -112,10 +112,10 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="cbCRM.Text" xml:space="preserve">
<value>CRM Report</value>
@ -123,6 +123,9 @@
<data name="cbExchange.Text" xml:space="preserve">
<value>Exchange Report</value>
</data>
<data name="cbLync.Text" xml:space="preserve">
<value>Lync Report</value>
</data>
<data name="cbOrganization.Text" xml:space="preserve">
<value>Organization Report</value>
</data>

View file

@ -19,6 +19,11 @@
<asp:CheckBox runat="server" ID="cbSharePoint" meta:resourcekey="cbSharePoint" />
</td>
</tr>
<tr>
<td colspan="2">
<asp:CheckBox runat="server" ID="cbLync" meta:resourcekey="cbLync" />
</td>
</tr>
<tr>
<td colspan="2">
<asp:CheckBox runat="server" ID="cbCRM" meta:resourcekey="cbCRM" />

View file

@ -37,6 +37,7 @@ namespace WebsitePanel.Portal.ScheduleTaskControls
private static readonly string EXCHANGE_REPORT = "EXCHANGE_REPORT";
private static readonly string ORGANIZATION_REPORT = "ORGANIZATION_REPORT";
private static readonly string SHAREPOINT_REPORT = "SHAREPOINT_REPORT";
private static readonly string LYNC_REPORT = "LYNC_REPORT";
private static readonly string CRM_REPORT = "CRM_REPORT";
private static readonly string EMAIL = "EMAIL";
@ -51,6 +52,7 @@ namespace WebsitePanel.Portal.ScheduleTaskControls
base.SetParameters(parameters);
SetParameter(cbExchange, EXCHANGE_REPORT);
SetParameter(cbSharePoint, SHAREPOINT_REPORT);
SetParameter(cbLync, LYNC_REPORT);
SetParameter(cbCRM, CRM_REPORT);
SetParameter(cbOrganization, ORGANIZATION_REPORT);
SetParameter(txtMail, EMAIL);
@ -61,12 +63,13 @@ namespace WebsitePanel.Portal.ScheduleTaskControls
{
ScheduleTaskParameterInfo exchange = GetParameter(cbExchange, EXCHANGE_REPORT);
ScheduleTaskParameterInfo sharepoint = GetParameter(cbSharePoint, SHAREPOINT_REPORT);
ScheduleTaskParameterInfo lync = GetParameter(cbLync, LYNC_REPORT);
ScheduleTaskParameterInfo crm = GetParameter(cbCRM, CRM_REPORT);
ScheduleTaskParameterInfo organization = GetParameter(cbOrganization, ORGANIZATION_REPORT);
ScheduleTaskParameterInfo email = GetParameter(txtMail, EMAIL);
return new ScheduleTaskParameterInfo[5] { exchange, sharepoint, crm , organization, email};
return new ScheduleTaskParameterInfo[6] { exchange, sharepoint, lync, crm , organization, email};
}
}
}

View file

@ -1,10 +1,9 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.1433
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
@ -49,6 +48,15 @@ namespace WebsitePanel.Portal.ScheduleTaskControls {
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox cbSharePoint;
/// <summary>
/// cbLync control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox cbLync;
/// <summary>
/// cbCRM control.
/// </summary>