wsp-10302 Enable/disable multiple accounts at once
This commit is contained in:
parent
be944131f9
commit
c4734e105f
13 changed files with 251 additions and 57 deletions
|
@ -3136,6 +3136,15 @@
|
||||||
<data name="Success.ORGANIZATION_UPDATE_USER_SETTINGS" xml:space="preserve">
|
<data name="Success.ORGANIZATION_UPDATE_USER_SETTINGS" xml:space="preserve">
|
||||||
<value>User general settings have been successfully updated.</value>
|
<value>User general settings have been successfully updated.</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Success.ORGANIZATION_USERS_ACTIONS" xml:space="preserve">
|
||||||
|
<value>Action has been successfully performed.</value>
|
||||||
|
</data>
|
||||||
|
<data name="Error.ORGANIZATION_USERS_ACTIONS" xml:space="preserve">
|
||||||
|
<value>Failed to perform action.</value>
|
||||||
|
</data>
|
||||||
|
<data name="Warning.ORGANIZATION_USERS_ACTIONS" xml:space="preserve">
|
||||||
|
<value>Please select the users for which you want to perform actions.</value>
|
||||||
|
</data>
|
||||||
<data name="Success.ORGANIZATION_SET_USER_PASSWORD" xml:space="preserve">
|
<data name="Success.ORGANIZATION_SET_USER_PASSWORD" xml:space="preserve">
|
||||||
<value>User password has been successfully updated.</value>
|
<value>User password has been successfully updated.</value>
|
||||||
</data>
|
</data>
|
||||||
|
|
|
@ -93,6 +93,7 @@ select:disabled {border:1px solid #ccc; background:#f5f5f5; color:#ccc; cursor:n
|
||||||
textarea {font-family:inherit; font-size:inherit; color:inherit; background:#fff; border: 1px solid #ccc; padding:3px 0 3px 3px; margin:0; resize:none;}
|
textarea {font-family:inherit; font-size:inherit; color:inherit; background:#fff; border: 1px solid #ccc; padding:3px 0 3px 3px; margin:0; resize:none;}
|
||||||
/* checkbox */
|
/* checkbox */
|
||||||
input[type=checkbox], input[type=radio] {margin:8px 4px 8px; vertical-align:-1px;}
|
input[type=checkbox], input[type=radio] {margin:8px 4px 8px; vertical-align:-1px;}
|
||||||
|
.HeaderCheckbox {margin-left:5px;}
|
||||||
input[type=image] {margin-right:4px;}
|
input[type=image] {margin-right:4px;}
|
||||||
.LoginLabel {display:block; line-height:34px; width:auto !important; padding-right:8px;}
|
.LoginLabel {display:block; line-height:34px; width:auto !important; padding-right:8px;}
|
||||||
.LoginContainer .SubHead {padding-right:8px; color:#333;}
|
.LoginContainer .SubHead {padding-right:8px; color:#333;}
|
||||||
|
@ -180,6 +181,9 @@ h2.ProductTitle.Huge {margin:0;}
|
||||||
.FormButtonsBarClean {clear: both; padding-bottom: 4px;}
|
.FormButtonsBarClean {clear: both; padding-bottom: 4px;}
|
||||||
.FormButtonsBarCleanLeft {float: left;}
|
.FormButtonsBarCleanLeft {float: left;}
|
||||||
.FormButtonsBarCleanRight {text-align: right;}
|
.FormButtonsBarCleanRight {text-align: right;}
|
||||||
|
.FormButtonsBarCleanMiddle {float: right;}
|
||||||
|
.FormButtonsBarCleanSeparator {padding-right: 30px;}
|
||||||
|
.FormButtonsBarCleanSeparatorSmall {padding-right: 15px;}
|
||||||
.GridFooter .Left {float: left;}
|
.GridFooter .Left {float: left;}
|
||||||
.GridFooter .Right {text-align: right;}
|
.GridFooter .Right {text-align: right;}
|
||||||
.FormRow {padding-top: 4px; padding-bottom: 4px;}
|
.FormRow {padding-top: 4px; padding-bottom: 4px;}
|
||||||
|
|
|
@ -328,21 +328,21 @@ namespace WebsitePanel.Portal
|
||||||
return idn.GetAscii(domainName);
|
return idn.GetAscii(domainName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
public static List<T> GetCheckboxValuesFromGrid<T>(GridView gridView, string checkboxName)
|
||||||
/// Adds the specified parameter to the Query String.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="url"></param>
|
|
||||||
/// <param name="paramName">Name of the parameter to add.</param>
|
|
||||||
/// <param name="paramValue">Value for the parameter to add.</param>
|
|
||||||
/// <returns>Url with added parameter.</returns>
|
|
||||||
public static Uri AddParameter(this Uri url, string paramName, string paramValue)
|
|
||||||
{
|
{
|
||||||
var uriBuilder = new UriBuilder(url);
|
// Get checked users
|
||||||
var query = HttpUtility.ParseQueryString(uriBuilder.Query);
|
var userIds = new List<T>();
|
||||||
query[paramName] = paramValue;
|
|
||||||
uriBuilder.Query = query.ToString();
|
|
||||||
|
|
||||||
return new Uri(uriBuilder.ToString());
|
foreach (GridViewRow gvr in gridView.Rows)
|
||||||
|
{
|
||||||
|
if (((CheckBox)gvr.FindControl(checkboxName)).Checked)
|
||||||
|
{
|
||||||
|
string userId = gridView.DataKeys[gvr.DataItemIndex].Value.ToString();
|
||||||
|
userIds.Add((T)Convert.ChangeType(userId, typeof(T)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return userIds;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,6 +66,24 @@ namespace WebsitePanel.Portal.Code.Helpers
|
||||||
|| PackagesHelper.CheckGroupQuotaEnabled(packageId, t.ResourceGroup, t.Quota)
|
|| PackagesHelper.CheckGroupQuotaEnabled(packageId, t.ResourceGroup, t.Quota)
|
||||||
select t;
|
select t;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adds the specified parameter to the Query String.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="url"></param>
|
||||||
|
/// <param name="paramName">Name of the parameter to add.</param>
|
||||||
|
/// <param name="paramValue">Value for the parameter to add.</param>
|
||||||
|
/// <returns>Url with added parameter.</returns>
|
||||||
|
public static Uri AddParameter(this Uri url, string paramName, string paramValue)
|
||||||
|
{
|
||||||
|
var uriBuilder = new UriBuilder(url);
|
||||||
|
var query = HttpUtility.ParseQueryString(uriBuilder.Query);
|
||||||
|
query[paramName] = paramValue;
|
||||||
|
uriBuilder.Query = query.ToString();
|
||||||
|
|
||||||
|
return new Uri(uriBuilder.ToString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Tab
|
public class Tab
|
||||||
|
|
|
@ -2,6 +2,15 @@
|
||||||
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
|
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
|
||||||
<%@ Register Src="../UserControls/QuotaViewer.ascx" TagName="QuotaViewer" TagPrefix="wsp" %>
|
<%@ Register Src="../UserControls/QuotaViewer.ascx" TagName="QuotaViewer" TagPrefix="wsp" %>
|
||||||
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
|
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
|
||||||
|
<%@ Register Src="../UserControls/UserActions.ascx" TagName="UserActions" TagPrefix="wsp" %>
|
||||||
|
|
||||||
|
<script src="JavaScript/jquery-1.4.4.min.js" type="text/javascript"></script>
|
||||||
|
|
||||||
|
<script language="javascript">
|
||||||
|
function SelectAllCheckboxes(box) {
|
||||||
|
$(".NormalGridView tbody :checkbox").attr("checked", $(box).attr("checked"));
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
|
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
|
||||||
|
|
||||||
|
@ -23,13 +32,20 @@
|
||||||
<asp:Button ID="btnCreateMailbox" runat="server" meta:resourcekey="btnCreateMailbox"
|
<asp:Button ID="btnCreateMailbox" runat="server" meta:resourcekey="btnCreateMailbox"
|
||||||
Text="Create New Mailbox" CssClass="Button1" OnClick="btnCreateMailbox_Click" />
|
Text="Create New Mailbox" CssClass="Button1" OnClick="btnCreateMailbox_Click" />
|
||||||
</div>
|
</div>
|
||||||
<div class="FormButtonsBarCleanRight">
|
<div class="FormButtonsBarCleanMiddle">
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<wsp:UserActions ID="userActions" runat="server" />
|
||||||
|
</td>
|
||||||
|
<td class="FormButtonsBarCleanSeparatorSmall"></td>
|
||||||
|
<td>
|
||||||
<asp:Panel ID="SearchPanel" runat="server" DefaultButton="cmdSearch">
|
<asp:Panel ID="SearchPanel" runat="server" DefaultButton="cmdSearch">
|
||||||
<asp:CheckBox ID="chkMailboxes" runat="server" meta:resourcekey="chkMailboxes" Text="Mailboxes" AutoPostBack="true" OnCheckedChanged="chkMailboxes_CheckedChanged" />
|
<asp:CheckBox ID="chkMailboxes" runat="server" meta:resourcekey="chkMailboxes" Text="Mailboxes" AutoPostBack="true" OnCheckedChanged="chkMailboxes_CheckedChanged" />
|
||||||
<asp:CheckBox ID="chkResourceMailboxes" runat="server" meta:resourcekey="chkResourceMailboxes" Text="Resource Mailboxes" AutoPostBack="true" OnCheckedChanged="chkMailboxes_CheckedChanged" />
|
<asp:CheckBox ID="chkResourceMailboxes" runat="server" meta:resourcekey="chkResourceMailboxes" Text="Resource Mailboxes" AutoPostBack="true" OnCheckedChanged="chkMailboxes_CheckedChanged" />
|
||||||
<asp:CheckBox ID="chkSharedMailboxes" runat="server" meta:resourcekey="chkSharedMailboxes" Text="Shared Mailboxes" AutoPostBack="true" OnCheckedChanged="chkMailboxes_CheckedChanged" />
|
<asp:CheckBox ID="chkSharedMailboxes" runat="server" meta:resourcekey="chkSharedMailboxes" Text="Shared Mailboxes" AutoPostBack="true" OnCheckedChanged="chkMailboxes_CheckedChanged" />
|
||||||
<asp:DropDownList ID="ddlPageSize" runat="server" AutoPostBack="True"
|
<asp:DropDownList ID="ddlPageSize" runat="server" AutoPostBack="True"
|
||||||
onselectedindexchanged="ddlPageSize_SelectedIndexChanged">
|
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
|
||||||
<asp:ListItem>10</asp:ListItem>
|
<asp:ListItem>10</asp:ListItem>
|
||||||
<asp:ListItem Selected="True">20</asp:ListItem>
|
<asp:ListItem Selected="True">20</asp:ListItem>
|
||||||
<asp:ListItem>50</asp:ListItem>
|
<asp:ListItem>50</asp:ListItem>
|
||||||
|
@ -44,14 +60,17 @@
|
||||||
<asp:ListItem Value="AccountName" meta:resourcekey="ddlSearchColumnAccountName">AccountName</asp:ListItem>
|
<asp:ListItem Value="AccountName" meta:resourcekey="ddlSearchColumnAccountName">AccountName</asp:ListItem>
|
||||||
<asp:ListItem Value="SubscriberNumber" meta:resourcekey="ddlSearchColumnSubscriberNumber">Account Number</asp:ListItem>
|
<asp:ListItem Value="SubscriberNumber" meta:resourcekey="ddlSearchColumnSubscriberNumber">Account Number</asp:ListItem>
|
||||||
<asp:ListItem Value="UserPrincipalName" meta:resourcekey="ddlSearchColumnUserPrincipalName">Login</asp:ListItem>
|
<asp:ListItem Value="UserPrincipalName" meta:resourcekey="ddlSearchColumnUserPrincipalName">Login</asp:ListItem>
|
||||||
</asp:DropDownList><asp:TextBox ID="txtSearchValue" runat="server" CssClass="NormalTextBox" Width="100"></asp:TextBox><asp:ImageButton ID="cmdSearch" Runat="server" meta:resourcekey="cmdSearch" SkinID="SearchButton"
|
</asp:DropDownList><asp:TextBox ID="txtSearchValue" runat="server" CssClass="NormalTextBox" Width="100"></asp:TextBox><asp:ImageButton ID="cmdSearch" runat="server" meta:resourcekey="cmdSearch" SkinID="SearchButton"
|
||||||
CausesValidation="false" />
|
CausesValidation="false" />
|
||||||
</asp:Panel>
|
</asp:Panel>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<asp:GridView ID="gvMailboxes" runat="server" AutoGenerateColumns="False" EnableViewState="true"
|
<asp:GridView ID="gvMailboxes" runat="server" AutoGenerateColumns="False" EnableViewState="true"
|
||||||
Width="100%" EmptyDataText="gvMailboxes" CssSelectorClass="NormalGridView"
|
Width="100%" EmptyDataText="gvMailboxes" CssSelectorClass="NormalGridView" DataKeyNames="AccountId"
|
||||||
OnRowCommand="gvMailboxes_RowCommand" AllowPaging="True" AllowSorting="True"
|
OnRowCommand="gvMailboxes_RowCommand" AllowPaging="True" AllowSorting="True"
|
||||||
DataSourceID="odsAccountsPaged" PageSize="20">
|
DataSourceID="odsAccountsPaged" PageSize="20">
|
||||||
<Columns>
|
<Columns>
|
||||||
|
@ -60,6 +79,14 @@
|
||||||
<asp:Image ID="img2" runat="server" Width="16px" Height="16px" ImageUrl='<%# GetStateImage((bool)Eval("Locked"),(bool)Eval("Disabled")) %>' ImageAlign="AbsMiddle" />
|
<asp:Image ID="img2" runat="server" Width="16px" Height="16px" ImageUrl='<%# GetStateImage((bool)Eval("Locked"),(bool)Eval("Disabled")) %>' ImageAlign="AbsMiddle" />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField>
|
||||||
|
<HeaderTemplate>
|
||||||
|
<asp:CheckBox ID="selectAll" Runat="server" onclick="javascript:SelectAllCheckboxes(this);" CssClass="HeaderCheckbox"></asp:CheckBox>
|
||||||
|
</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:CheckBox runat="server" ID="chkSelectedUsersIds"></asp:CheckBox>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="gvMailboxesDisplayName" SortExpression="DisplayName">
|
<asp:TemplateField HeaderText="gvMailboxesDisplayName" SortExpression="DisplayName">
|
||||||
<ItemStyle Width="20%"></ItemStyle>
|
<ItemStyle Width="20%"></ItemStyle>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
|
@ -80,7 +107,7 @@
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="gvServiceLevel">
|
<asp:TemplateField HeaderText="gvServiceLevel">
|
||||||
<ItemStyle Width="20%"></ItemStyle>
|
<ItemStyle Width="15%"></ItemStyle>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label id="lbServLevel" runat="server" ToolTip = '<%# GetServiceLevel((int)Eval("LevelId")).LevelDescription%>'>
|
<asp:Label id="lbServLevel" runat="server" ToolTip = '<%# GetServiceLevel((int)Eval("LevelId")).LevelDescription%>'>
|
||||||
<%# GetServiceLevel((int)Eval("LevelId")).LevelName%>
|
<%# GetServiceLevel((int)Eval("LevelId")).LevelName%>
|
||||||
|
|
|
@ -69,6 +69,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
||||||
|
|
||||||
BindServiceLevels();
|
BindServiceLevels();
|
||||||
|
|
||||||
|
DoUserActions();
|
||||||
|
|
||||||
if (cntx.Quotas.ContainsKey(Quotas.EXCHANGE2007_ISCONSUMER))
|
if (cntx.Quotas.ContainsKey(Quotas.EXCHANGE2007_ISCONSUMER))
|
||||||
{
|
{
|
||||||
|
@ -273,5 +274,42 @@ namespace WebsitePanel.Portal.ExchangeServer
|
||||||
odsAccountsPaged.SelectParameters["accountTypes"].DefaultValue = string.Join(",", accountTypes);
|
odsAccountsPaged.SelectParameters["accountTypes"].DefaultValue = string.Join(",", accountTypes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void DoUserActions()
|
||||||
|
{
|
||||||
|
// Get checked users
|
||||||
|
var userIds = Utils.GetCheckboxValuesFromGrid<int>(gvMailboxes, "chkSelectedUsersIds");
|
||||||
|
|
||||||
|
if (userActions.SelectedAction != UserActionTypes.None)
|
||||||
|
{
|
||||||
|
if (userIds.Count > 0)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var result = userActions.DoUserActions(userIds);
|
||||||
|
|
||||||
|
if (result < 0)
|
||||||
|
{
|
||||||
|
messageBox.ShowResultMessage(result);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
messageBox.ShowSuccessMessage("ORGANIZATION_USERS_ACTIONS");
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
messageBox.ShowErrorMessage("ORGANIZATION_USERS_ACTIONS", ex);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Refresh users grid
|
||||||
|
gvMailboxes.DataBind();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
messageBox.ShowWarningMessage("ORGANIZATION_USERS_ACTIONS");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
userActions.ResetSelection();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,6 +85,15 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::System.Web.UI.WebControls.Button btnCreateMailbox;
|
protected global::System.Web.UI.WebControls.Button btnCreateMailbox;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// userActions control.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Auto-generated field.
|
||||||
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
|
/// </remarks>
|
||||||
|
protected global::WebsitePanel.Portal.UserActions userActions;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// SearchPanel control.
|
/// SearchPanel control.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -3,6 +3,15 @@
|
||||||
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
|
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
|
||||||
<%@ Register Src="../UserControls/QuotaViewer.ascx" TagName="QuotaViewer" TagPrefix="wsp" %>
|
<%@ Register Src="../UserControls/QuotaViewer.ascx" TagName="QuotaViewer" TagPrefix="wsp" %>
|
||||||
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
|
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
|
||||||
|
<%@ Register Src="../UserControls/UserActions.ascx" TagName="UserActions" TagPrefix="wsp" %>
|
||||||
|
|
||||||
|
<script src="JavaScript/jquery-1.4.4.min.js" type="text/javascript"></script>
|
||||||
|
|
||||||
|
<script language="javascript">
|
||||||
|
function SelectAllCheckboxes(box) {
|
||||||
|
$(".NormalGridView tbody :checkbox").attr("checked", $(box).attr("checked"));
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
|
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
|
||||||
|
|
||||||
|
@ -25,10 +34,17 @@
|
||||||
<asp:Button ID="btnCreateUser" runat="server" meta:resourcekey="btnCreateUser"
|
<asp:Button ID="btnCreateUser" runat="server" meta:resourcekey="btnCreateUser"
|
||||||
Text="Create New User" CssClass="Button1" OnClick="btnCreateUser_Click" />
|
Text="Create New User" CssClass="Button1" OnClick="btnCreateUser_Click" />
|
||||||
</div>
|
</div>
|
||||||
<div class="FormButtonsBarCleanRight">
|
<div class="FormButtonsBarCleanMiddle">
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<wsp:UserActions ID="userActions" runat="server" />
|
||||||
|
</td>
|
||||||
|
<td class="FormButtonsBarCleanSeparator"></td>
|
||||||
|
<td>
|
||||||
<asp:Panel ID="SearchPanel" runat="server" DefaultButton="cmdSearch">
|
<asp:Panel ID="SearchPanel" runat="server" DefaultButton="cmdSearch">
|
||||||
<asp:DropDownList ID="ddlPageSize" runat="server" AutoPostBack="True"
|
<asp:DropDownList ID="ddlPageSize" runat="server" AutoPostBack="True"
|
||||||
onselectedindexchanged="ddlPageSize_SelectedIndexChanged">
|
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
|
||||||
<asp:ListItem>10</asp:ListItem>
|
<asp:ListItem>10</asp:ListItem>
|
||||||
<asp:ListItem Selected="True">20</asp:ListItem>
|
<asp:ListItem Selected="True">20</asp:ListItem>
|
||||||
<asp:ListItem>50</asp:ListItem>
|
<asp:ListItem>50</asp:ListItem>
|
||||||
|
@ -41,9 +57,12 @@
|
||||||
<asp:ListItem Value="AccountName" meta:resourcekey="ddlSearchColumnAccountName">AccountName</asp:ListItem>
|
<asp:ListItem Value="AccountName" meta:resourcekey="ddlSearchColumnAccountName">AccountName</asp:ListItem>
|
||||||
<asp:ListItem Value="SubscriberNumber" meta:resourcekey="ddlSearchColumnSubscriberNumber">Account Number</asp:ListItem>
|
<asp:ListItem Value="SubscriberNumber" meta:resourcekey="ddlSearchColumnSubscriberNumber">Account Number</asp:ListItem>
|
||||||
<asp:ListItem Value="UserPrincipalName" meta:resourcekey="ddlSearchColumnUserPrincipalName">Login</asp:ListItem>
|
<asp:ListItem Value="UserPrincipalName" meta:resourcekey="ddlSearchColumnUserPrincipalName">Login</asp:ListItem>
|
||||||
</asp:DropDownList><asp:TextBox ID="txtSearchValue" runat="server" CssClass="NormalTextBox" Width="100"></asp:TextBox><asp:ImageButton ID="cmdSearch" Runat="server" meta:resourcekey="cmdSearch" SkinID="SearchButton"
|
</asp:DropDownList><asp:TextBox ID="txtSearchValue" runat="server" CssClass="NormalTextBox" Width="100"></asp:TextBox><asp:ImageButton ID="cmdSearch" runat="server" meta:resourcekey="cmdSearch" SkinID="SearchButton"
|
||||||
CausesValidation="false" />
|
CausesValidation="false" />
|
||||||
</asp:Panel>
|
</asp:Panel>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<asp:Panel ID="UsersPanel" runat="server">
|
<asp:Panel ID="UsersPanel" runat="server">
|
||||||
|
@ -59,7 +78,14 @@
|
||||||
<asp:Image ID="img2" runat="server" Width="16px" Height="16px" ImageUrl='<%# GetStateImage((bool)Eval("Locked"),(bool)Eval("Disabled")) %>' ImageAlign="AbsMiddle" />
|
<asp:Image ID="img2" runat="server" Width="16px" Height="16px" ImageUrl='<%# GetStateImage((bool)Eval("Locked"),(bool)Eval("Disabled")) %>' ImageAlign="AbsMiddle" />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField>
|
||||||
|
<HeaderTemplate>
|
||||||
|
<asp:CheckBox ID="selectAll" Runat="server" onclick="javascript:SelectAllCheckboxes(this);" CssClass="HeaderCheckbox"></asp:CheckBox>
|
||||||
|
</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:CheckBox runat="server" ID="chkSelectedUsersIds"></asp:CheckBox>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="gvUsersDisplayName" SortExpression="DisplayName">
|
<asp:TemplateField HeaderText="gvUsersDisplayName" SortExpression="DisplayName">
|
||||||
<ItemStyle Width="25%"></ItemStyle>
|
<ItemStyle Width="25%"></ItemStyle>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
|
|
|
@ -52,6 +52,8 @@ namespace WebsitePanel.Portal.HostedSolution
|
||||||
|
|
||||||
BindServiceLevels();
|
BindServiceLevels();
|
||||||
|
|
||||||
|
DoUserActions();
|
||||||
|
|
||||||
if (cntx.Quotas.ContainsKey(Quotas.EXCHANGE2007_ISCONSUMER))
|
if (cntx.Quotas.ContainsKey(Quotas.EXCHANGE2007_ISCONSUMER))
|
||||||
{
|
{
|
||||||
if (cntx.Quotas[Quotas.EXCHANGE2007_ISCONSUMER].QuotaAllocatedValue != 1)
|
if (cntx.Quotas[Quotas.EXCHANGE2007_ISCONSUMER].QuotaAllocatedValue != 1)
|
||||||
|
@ -388,5 +390,44 @@ namespace WebsitePanel.Portal.HostedSolution
|
||||||
messageBox.ShowErrorMessage("ORGANIZATIONS_DELETE_USERS", ex);
|
messageBox.ShowErrorMessage("ORGANIZATIONS_DELETE_USERS", ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protected void DoUserActions()
|
||||||
|
{
|
||||||
|
// Get checked users
|
||||||
|
var userIds = Utils.GetCheckboxValuesFromGrid<int>(gvUsers, "chkSelectedUsersIds");
|
||||||
|
|
||||||
|
if (userActions.SelectedAction != UserActionTypes.None)
|
||||||
|
{
|
||||||
|
if (userIds.Count > 0)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var result = userActions.DoUserActions(userIds);
|
||||||
|
|
||||||
|
if (result < 0)
|
||||||
|
{
|
||||||
|
messageBox.ShowResultMessage(result);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
messageBox.ShowSuccessMessage("ORGANIZATION_USERS_ACTIONS");
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
messageBox.ShowErrorMessage("ORGANIZATION_USERS_ACTIONS", ex);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Refresh users grid
|
||||||
|
gvUsers.DataBind();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
messageBox.ShowWarningMessage("ORGANIZATION_USERS_ACTIONS");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
userActions.ResetSelection();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,6 +85,15 @@ namespace WebsitePanel.Portal.HostedSolution {
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::System.Web.UI.WebControls.Button btnCreateUser;
|
protected global::System.Web.UI.WebControls.Button btnCreateUser;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// userActions control.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Auto-generated field.
|
||||||
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
|
/// </remarks>
|
||||||
|
protected global::WebsitePanel.Portal.UserActions userActions;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// SearchPanel control.
|
/// SearchPanel control.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -31,6 +31,7 @@ using System.Web.UI.WebControls;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using WebsitePanel.Providers.Common;
|
using WebsitePanel.Providers.Common;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using WebsitePanel.Portal.Code.Helpers;
|
||||||
|
|
||||||
namespace WebsitePanel.Portal
|
namespace WebsitePanel.Portal
|
||||||
{
|
{
|
||||||
|
|
|
@ -36,6 +36,7 @@ using System.Web.UI;
|
||||||
using System.Web.UI.WebControls;
|
using System.Web.UI.WebControls;
|
||||||
using System.Web.UI.WebControls.WebParts;
|
using System.Web.UI.WebControls.WebParts;
|
||||||
using System.Web.UI.HtmlControls;
|
using System.Web.UI.HtmlControls;
|
||||||
|
using WebsitePanel.Portal.Code.Helpers;
|
||||||
|
|
||||||
namespace WebsitePanel.Portal
|
namespace WebsitePanel.Portal
|
||||||
{
|
{
|
||||||
|
|
|
@ -891,6 +891,13 @@
|
||||||
<Compile Include="UserControls\ItemButtonPanel.ascx.designer.cs">
|
<Compile Include="UserControls\ItemButtonPanel.ascx.designer.cs">
|
||||||
<DependentUpon>ItemButtonPanel.ascx</DependentUpon>
|
<DependentUpon>ItemButtonPanel.ascx</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="UserControls\UserActions.ascx.cs">
|
||||||
|
<DependentUpon>UserActions.ascx</DependentUpon>
|
||||||
|
<SubType>ASPXCodeBehind</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="UserControls\UserActions.ascx.designer.cs">
|
||||||
|
<DependentUpon>UserActions.ascx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="UserOrganization.ascx.cs">
|
<Compile Include="UserOrganization.ascx.cs">
|
||||||
<DependentUpon>UserOrganization.ascx</DependentUpon>
|
<DependentUpon>UserOrganization.ascx</DependentUpon>
|
||||||
<SubType>ASPXCodeBehind</SubType>
|
<SubType>ASPXCodeBehind</SubType>
|
||||||
|
@ -4473,6 +4480,7 @@
|
||||||
<Content Include="UserControls\PackagePhoneNumbers.ascx" />
|
<Content Include="UserControls\PackagePhoneNumbers.ascx" />
|
||||||
<Content Include="Lync\UserControls\AllocatePackagePhoneNumbers.ascx" />
|
<Content Include="Lync\UserControls\AllocatePackagePhoneNumbers.ascx" />
|
||||||
<Content Include="UserControls\ItemButtonPanel.ascx" />
|
<Content Include="UserControls\ItemButtonPanel.ascx" />
|
||||||
|
<Content Include="UserControls\UserActions.ascx" />
|
||||||
<Content Include="UserOrganization.ascx" />
|
<Content Include="UserOrganization.ascx" />
|
||||||
<Content Include="VPSForPC\MonitoringPage.aspx" />
|
<Content Include="VPSForPC\MonitoringPage.aspx" />
|
||||||
<Content Include="VPSForPC\VdcAccountVLanAdd.ascx" />
|
<Content Include="VPSForPC\VdcAccountVLanAdd.ascx" />
|
||||||
|
@ -4541,6 +4549,9 @@
|
||||||
<Content Include="PhoneNumbers.ascx" />
|
<Content Include="PhoneNumbers.ascx" />
|
||||||
<Content Include="PhoneNumbersAddPhoneNumber.ascx" />
|
<Content Include="PhoneNumbersAddPhoneNumber.ascx" />
|
||||||
<Content Include="PhoneNumbersEditPhoneNumber.ascx" />
|
<Content Include="PhoneNumbersEditPhoneNumber.ascx" />
|
||||||
|
<Content Include="UserControls\App_LocalResources\UserActions.ascx.resx">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Content>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="App_LocalResources\BandwidthReport.ascx.resx">
|
<Content Include="App_LocalResources\BandwidthReport.ascx.resx">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue