Change default page size to 20 items. Add Page Size drop down to all User lists to allow user to select Page size for results.
This commit is contained in:
parent
e903cc6273
commit
9b61ed720e
22 changed files with 241 additions and 67 deletions
|
@ -32,6 +32,13 @@
|
|||
<div class="FormButtonsBarCleanRight">
|
||||
<asp:Panel ID="SearchPanel" runat="server" DefaultButton="cmdSearch">
|
||||
<asp:Localize ID="locSearch" runat="server" meta:resourcekey="locSearch" Visible="false"></asp:Localize>
|
||||
<asp:DropDownList ID="ddlPageSize" runat="server" AutoPostBack="True"
|
||||
onselectedindexchanged="ddlPageSize_SelectedIndexChanged">
|
||||
<asp:ListItem>10</asp:ListItem>
|
||||
<asp:ListItem Selected="True">20</asp:ListItem>
|
||||
<asp:ListItem>50</asp:ListItem>
|
||||
<asp:ListItem>100</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:DropDownList ID="ddlSearchColumn" runat="server" CssClass="NormalTextBox">
|
||||
<asp:ListItem Value="DisplayName" meta:resourcekey="ddlSearchColumnDisplayName">DisplayName</asp:ListItem>
|
||||
<asp:ListItem Value="PrimaryEmailAddress" meta:resourcekey="ddlSearchColumnEmail">Email</asp:ListItem>
|
||||
|
@ -44,7 +51,7 @@
|
|||
<asp:GridView ID="gvContacts" runat="server" AutoGenerateColumns="False" EnableViewState="true"
|
||||
Width="100%" EmptyDataText="gvContacts" CssSelectorClass="NormalGridView"
|
||||
OnRowCommand="gvContacts_RowCommand" AllowPaging="True" AllowSorting="True"
|
||||
DataSourceID="odsAccountsPaged">
|
||||
DataSourceID="odsAccountsPaged" PageSize="20">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="gvContactsDisplayName" SortExpression="DisplayName">
|
||||
<ItemStyle Width="50%"></ItemStyle>
|
||||
|
|
|
@ -109,5 +109,17 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
gvContacts.PageSize = Convert.ToInt16(ddlPageSize.SelectedValue);
|
||||
|
||||
// rebind grid
|
||||
gvContacts.DataBind();
|
||||
|
||||
// bind stats
|
||||
BindStats();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,22 +1,15 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.312
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebsitePanel.Portal.ExchangeServer {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ExchangeContacts class.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated class.
|
||||
/// </remarks>
|
||||
public partial class ExchangeContacts {
|
||||
|
||||
/// <summary>
|
||||
|
@ -100,6 +93,15 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize locSearch;
|
||||
|
||||
/// <summary>
|
||||
/// ddlPageSize 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.DropDownList ddlPageSize;
|
||||
|
||||
/// <summary>
|
||||
/// ddlSearchColumn control.
|
||||
/// </summary>
|
||||
|
|
|
@ -32,6 +32,13 @@
|
|||
<div class="FormButtonsBarCleanRight">
|
||||
<asp:Panel ID="SearchPanel" runat="server" DefaultButton="cmdSearch">
|
||||
<asp:Localize ID="locSearch" runat="server" meta:resourcekey="locSearch" Visible="false"></asp:Localize>
|
||||
<asp:DropDownList ID="ddlPageSize" runat="server" AutoPostBack="True"
|
||||
onselectedindexchanged="ddlPageSize_SelectedIndexChanged">
|
||||
<asp:ListItem>10</asp:ListItem>
|
||||
<asp:ListItem Selected="True">20</asp:ListItem>
|
||||
<asp:ListItem>50</asp:ListItem>
|
||||
<asp:ListItem>100</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:DropDownList ID="ddlSearchColumn" runat="server" CssClass="NormalTextBox">
|
||||
<asp:ListItem Value="DisplayName" meta:resourcekey="ddlSearchColumnDisplayName">DisplayName</asp:ListItem>
|
||||
<asp:ListItem Value="PrimaryEmailAddress" meta:resourcekey="ddlSearchColumnEmail">Email</asp:ListItem>
|
||||
|
@ -44,7 +51,7 @@
|
|||
<asp:GridView ID="gvLists" runat="server" AutoGenerateColumns="False" EnableViewState="true"
|
||||
Width="100%" EmptyDataText="gvLists" CssSelectorClass="NormalGridView"
|
||||
OnRowCommand="gvLists_RowCommand" AllowPaging="True" AllowSorting="True"
|
||||
DataSourceID="odsAccountsPaged">
|
||||
DataSourceID="odsAccountsPaged" PageSize="20">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="gvListsDisplayName" SortExpression="DisplayName">
|
||||
<ItemStyle Width="50%"></ItemStyle>
|
||||
|
|
|
@ -109,5 +109,17 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
gvLists.PageSize = Convert.ToInt16(ddlPageSize.SelectedValue);
|
||||
|
||||
// rebind grid
|
||||
gvLists.DataBind();
|
||||
|
||||
// bind stats
|
||||
BindStats();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,22 +1,15 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.312
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebsitePanel.Portal.ExchangeServer {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ExchangeDistributionLists class.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated class.
|
||||
/// </remarks>
|
||||
public partial class ExchangeDistributionLists {
|
||||
|
||||
/// <summary>
|
||||
|
@ -100,6 +93,15 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize locSearch;
|
||||
|
||||
/// <summary>
|
||||
/// ddlPageSize 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.DropDownList ddlPageSize;
|
||||
|
||||
/// <summary>
|
||||
/// ddlSearchColumn control.
|
||||
/// </summary>
|
||||
|
|
|
@ -31,12 +31,22 @@
|
|||
</div>
|
||||
<div class="FormButtonsBarCleanRight">
|
||||
<asp:Panel ID="SearchPanel" runat="server" DefaultButton="cmdSearch">
|
||||
<asp:DropDownList ID="ddlSearchColumn" runat="server" CssClass="NormalTextBox">
|
||||
<asp:ListItem Value="DisplayName" meta:resourcekey="ddlSearchColumnDisplayName">DisplayName</asp:ListItem>
|
||||
<asp:ListItem Value="PrimaryEmailAddress" meta:resourcekey="ddlSearchColumnEmail">Email</asp:ListItem>
|
||||
<asp:ListItem Value="AccountName" meta:resourcekey="ddlSearchColumnAccountName">AccountName</asp:ListItem>
|
||||
<asp:DropDownList ID="ddlPageSize" runat="server" AutoPostBack="True"
|
||||
onselectedindexchanged="ddlPageSize_SelectedIndexChanged">
|
||||
<asp:ListItem>10</asp:ListItem>
|
||||
<asp:ListItem Selected="True">20</asp:ListItem>
|
||||
<asp:ListItem>50</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:ListItem>100</asp:ListItem>
|
||||
|
||||
</asp:DropDownList>
|
||||
<asp:DropDownList ID="ddlSearchColumn" runat="server" CssClass="NormalTextBox">
|
||||
<asp:ListItem meta:resourcekey="ddlSearchColumnDisplayName" Value="DisplayName">DisplayName</asp:ListItem>
|
||||
<asp:ListItem meta:resourcekey="ddlSearchColumnEmail"
|
||||
Value="PrimaryEmailAddress">Email</asp:ListItem>
|
||||
<asp:ListItem meta:resourcekey="ddlSearchColumnAccountName" Value="AccountName">AccountName</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"
|
||||
CausesValidation="false"/>
|
||||
</asp:Panel>
|
||||
</div>
|
||||
|
@ -45,7 +55,7 @@
|
|||
<asp:GridView ID="gvMailboxes" runat="server" AutoGenerateColumns="False" EnableViewState="true"
|
||||
Width="100%" EmptyDataText="gvMailboxes" CssSelectorClass="NormalGridView"
|
||||
OnRowCommand="gvMailboxes_RowCommand" AllowPaging="True" AllowSorting="True"
|
||||
DataSourceID="odsAccountsPaged">
|
||||
DataSourceID="odsAccountsPaged" PageSize="20">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="gvMailboxesDisplayName" SortExpression="DisplayName">
|
||||
<ItemStyle Width="50%"></ItemStyle>
|
||||
|
|
|
@ -76,7 +76,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
public string GetAccountImage(int accountTypeId)
|
||||
{
|
||||
ExchangeAccountType accountType = (ExchangeAccountType)accountTypeId;
|
||||
string imgName = "mailbox_16.gif";
|
||||
string imgName = "accounting_mail_16.png";
|
||||
if (accountType == ExchangeAccountType.Contact)
|
||||
imgName = "contact_16.gif";
|
||||
else if (accountType == ExchangeAccountType.DistributionList)
|
||||
|
@ -85,7 +85,6 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
imgName = "room_16.gif";
|
||||
else if (accountType == ExchangeAccountType.Equipment)
|
||||
imgName = "equipment_16.gif";
|
||||
|
||||
return GetThemedImage("Exchange/" + imgName);
|
||||
}
|
||||
|
||||
|
@ -117,5 +116,17 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
gvMailboxes.PageSize = Convert.ToInt16(ddlPageSize.SelectedValue);
|
||||
|
||||
// rebind grid
|
||||
gvMailboxes.DataBind();
|
||||
|
||||
// bind stats
|
||||
BindStats();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,10 +1,9 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.3053
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
@ -85,6 +84,15 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Panel SearchPanel;
|
||||
|
||||
/// <summary>
|
||||
/// ddlPageSize 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.DropDownList ddlPageSize;
|
||||
|
||||
/// <summary>
|
||||
/// ddlSearchColumn control.
|
||||
/// </summary>
|
||||
|
|
|
@ -34,6 +34,13 @@
|
|||
</div>
|
||||
<div class="FormButtonsBarCleanRight">
|
||||
<asp:Panel ID="SearchPanel" runat="server" DefaultButton="cmdSearch">
|
||||
<asp:DropDownList ID="ddlPageSize" runat="server" AutoPostBack="True"
|
||||
onselectedindexchanged="ddlPageSize_SelectedIndexChanged">
|
||||
<asp:ListItem>10</asp:ListItem>
|
||||
<asp:ListItem Selected="True">20</asp:ListItem>
|
||||
<asp:ListItem>50</asp:ListItem>
|
||||
<asp:ListItem>100</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:DropDownList ID="ddlSearchColumn" runat="server" CssClass="NormalTextBox">
|
||||
<asp:ListItem Value="DisplayName" meta:resourcekey="ddlSearchColumnDisplayName">DisplayName</asp:ListItem>
|
||||
<asp:ListItem Value="PrimaryEmailAddress" meta:resourcekey="ddlSearchColumnEmail">Email</asp:ListItem>
|
||||
|
@ -47,7 +54,7 @@
|
|||
<asp:GridView ID="gvUsers" runat="server" AutoGenerateColumns="False" EnableViewState="true"
|
||||
Width="100%" EmptyDataText="gvUsers" CssSelectorClass="NormalGridView"
|
||||
OnRowCommand="gvUsers_RowCommand" AllowPaging="True" AllowSorting="True"
|
||||
DataSourceID="odsAccountsPaged">
|
||||
DataSourceID="odsAccountsPaged" PageSize="20">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="gvUsersDisplayName" SortExpression="DisplayName">
|
||||
<ItemStyle Width="50%"></ItemStyle>
|
||||
|
|
|
@ -49,6 +49,7 @@ namespace WebsitePanel.Portal.HostedSolution
|
|||
ES.Services.Organizations.GetOrganizationStatistics(PanelRequest.ItemID);
|
||||
usersQuota.QuotaUsedValue = stats.CreatedUsers;
|
||||
usersQuota.QuotaValue = stats.AllocatedUsers;
|
||||
|
||||
}
|
||||
|
||||
protected void btnCreateUser_Click(object sender, EventArgs e)
|
||||
|
@ -102,15 +103,26 @@ namespace WebsitePanel.Portal.HostedSolution
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public string GetAccountImage(int accountTypeId)
|
||||
{
|
||||
ExchangeAccountType accountType = (ExchangeAccountType)accountTypeId;
|
||||
string imgName = "accounting_mail_16.png";
|
||||
if (accountType == ExchangeAccountType.User)
|
||||
imgName = "admin_16.png";
|
||||
|
||||
return GetThemedImage("Exchange/" + imgName);
|
||||
}
|
||||
|
||||
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
gvUsers.PageSize = Convert.ToInt16(ddlPageSize.SelectedValue);
|
||||
|
||||
// rebind grid
|
||||
gvUsers.DataBind();
|
||||
|
||||
// bind stats
|
||||
BindStats();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,10 +1,9 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.3053
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
@ -85,6 +84,15 @@ namespace WebsitePanel.Portal.HostedSolution {
|
|||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Panel SearchPanel;
|
||||
|
||||
/// <summary>
|
||||
/// ddlPageSize 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.DropDownList ddlPageSize;
|
||||
|
||||
/// <summary>
|
||||
/// ddlSearchColumn control.
|
||||
/// </summary>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue