page result restored, got lost somewhere

Subscriber Number for Users added. Search on Subscriber Number is still on the
to do list.
This commit is contained in:
robvde 2012-08-06 21:57:04 +04:00
parent 0475288ebd
commit 8841bbd6c3
32 changed files with 536 additions and 102 deletions

View file

@ -221,6 +221,7 @@ AS
U.UserID,
U.RoleID,
U.StatusID,
U.SubscriberNumber,
U.LoginStatusId,
U.FailedLogins,
U.OwnerID,
@ -785,6 +786,7 @@ CREATE TABLE [dbo].[Users](
[AdditionalParams] [nvarchar](max) COLLATE Latin1_General_CI_AS NULL,
[LoginStatusId] [int] NULL,
[FailedLogins] [int] NULL,
[SubscriberNumber] [nvarchar] (32) COLLATE Latin1_General_CI_AS NULL,
CONSTRAINT [PK_Users] PRIMARY KEY CLUSTERED
(
[UserID] ASC
@ -9867,7 +9869,7 @@ GO
CREATE VIEW [dbo].[UsersDetailed]
AS
SELECT U.UserID, U.RoleID, U.StatusID, U.LoginStatusId, U.FailedLogins, U.OwnerID, U.Created, U.Changed, U.IsDemo, U.Comments, U.IsPeer, U.Username, U.FirstName, U.LastName, U.Email,
SELECT U.UserID, U.RoleID, U.StatusID, U.SubscriberNumber, U.LoginStatusId, U.FailedLogins, U.OwnerID, U.Created, U.Changed, U.IsDemo, U.Comments, U.IsPeer, U.Username, U.FirstName, U.LastName, U.Email,
U.CompanyName, U.FirstName + ' ' + U.LastName AS FullName, UP.Username AS OwnerUsername, UP.FirstName AS OwnerFirstName,
UP.LastName AS OwnerLastName, UP.RoleID AS OwnerRoleID, UP.FirstName + ' ' + UP.LastName AS OwnerFullName, UP.Email AS OwnerEmail, UP.RoleID AS Expr1,
(SELECT COUNT(PackageID) AS Expr1
@ -12101,6 +12103,7 @@ SELECT
U.UserID,
U.RoleID,
U.StatusID,
U.SubscriberNumber,
U.LoginStatusId,
U.FailedLogins,
U.OwnerID,
@ -12255,6 +12258,7 @@ SELECT
U.UserID,
U.RoleID,
U.StatusID,
U.SubscriberNumber,
U.LoginStatusId,
U.FailedLogins,
U.OwnerID,
@ -19612,6 +19616,7 @@ AS
U.UserID,
U.RoleID,
U.StatusID,
U.SubscriberNumber,
U.LoginStatusId,
U.FailedLogins,
U.OwnerID,
@ -19660,6 +19665,7 @@ AS
U.UserID,
U.RoleID,
U.StatusID,
U.SubscriberNumber,
U.LoginStatusId,
U.FailedLogins,
U.OwnerID,
@ -20023,6 +20029,7 @@ SELECT
U.UserID,
U.RoleID,
U.StatusID,
U.SubscriberNumber,
U.LoginStatusId,
U.FailedLogins,
U.OwnerID,
@ -20143,6 +20150,7 @@ SELECT
U.UserID,
U.RoleID,
U.StatusID,
U.SubscriberNumber,
U.LoginStatusId,
U.FailedLogins,
U.OwnerID,
@ -25328,6 +25336,7 @@ CREATE PROCEDURE [dbo].[AddUser]
@OwnerID int,
@RoleID int,
@StatusID int,
@SubscriberNumber nvarchar(32),
@LoginStatusID int,
@IsDemo bit,
@IsPeer bit,
@ -25372,6 +25381,7 @@ INSERT INTO Users
OwnerID,
RoleID,
StatusID,
SubscriberNumber,
LoginStatusID,
Created,
Changed,
@ -25402,6 +25412,7 @@ VALUES
@OwnerID,
@RoleID,
@StatusID,
@SubscriberNumber,
@LoginStatusID,
GetDate(),
GetDate(),
@ -25608,6 +25619,7 @@ CREATE PROCEDURE [dbo].[UpdateUser]
@UserID int,
@RoleID int,
@StatusID int,
@SubscriberNumber nvarchar(32),
@LoginStatusId int,
@IsDemo bit,
@IsPeer bit,
@ -25648,6 +25660,7 @@ AS
UPDATE Users SET
RoleID = @RoleID,
StatusID = @StatusID,
SubscriberNumber = @SubscriberNumber,
LoginStatusId = @LoginStatusId,
Changed = GetDate(),
IsDemo = @IsDemo,
@ -28895,6 +28908,7 @@ SELECT
U.UserID,
U.RoleID,
U.StatusID,
U.SubscriberNumber,
U.LoginStatusId,
U.FailedLogins,
U.OwnerID,
@ -29063,6 +29077,7 @@ AS
U.UserID,
U.RoleID,
U.StatusID,
U.SubscriberNumber,
U.LoginStatusId,
U.FailedLogins,
U.OwnerID,
@ -29116,6 +29131,7 @@ AS
U.UserID,
U.RoleID,
U.StatusID,
U.SubscriberNumber,
U.LoginStatusId,
U.FailedLogins,
U.OwnerID,

View file

@ -1063,7 +1063,7 @@ GO
ALTER VIEW [dbo].[UsersDetailed]
AS
SELECT U.UserID, U.RoleID, U.StatusID, U.LoginStatusId, U.FailedLogins, U.OwnerID, U.Created, U.Changed, U.IsDemo, U.Comments, U.IsPeer, U.Username, U.FirstName, U.LastName, U.Email,
SELECT U.UserID, U.RoleID, U.StatusID, U.LoginStatusId, U.SubscriberNumber, U.FailedLogins, U.OwnerID, U.Created, U.Changed, U.IsDemo, U.Comments, U.IsPeer, U.Username, U.FirstName, U.LastName, U.Email,
U.CompanyName, U.FirstName + ' ' + U.LastName AS FullName, UP.Username AS OwnerUsername, UP.FirstName AS OwnerFirstName,
UP.LastName AS OwnerLastName, UP.RoleID AS OwnerRoleID, UP.FirstName + ' ' + UP.LastName AS OwnerFullName, UP.Email AS OwnerEmail, UP.RoleID AS Expr1,
(SELECT COUNT(PackageID) AS Expr1
@ -1821,6 +1821,15 @@ ALTER TABLE [dbo].[ExchangeAccounts] ADD [SubscriberNumber] [nvarchar] (32) COLL
END
GO
/****** Object: Table [dbo].[ExchangeAccounts] Extend Exchange Accounts with SubscriberNumber ******/
IF NOT EXISTS(select 1 from sys.columns COLS INNER JOIN sys.objects OBJS ON OBJS.object_id=COLS.object_id and OBJS.type='U' AND OBJS.name='Users' AND COLS.name='SubscriberNumber')
BEGIN
ALTER TABLE [dbo].[Users] ADD [SubscriberNumber] [nvarchar] (32) COLLATE Latin1_General_CI_AS NULL
END
GO
/****** Object: Table [dbo].[ExchangeOrganizations] ******/
ALTER TABLE [dbo].[ExchangeOrganizations] ALTER COLUMN [OrganizationID] [nvarchar](128) COLLATE Latin1_General_CI_AS NOT NULL
GO
@ -2429,6 +2438,7 @@ AS
U.UserID,
U.RoleID,
U.StatusID,
U.SubscriberNumber,
U.LoginStatusId,
U.FailedLogins,
U.OwnerID,
@ -4281,6 +4291,7 @@ ALTER PROCEDURE [dbo].[AddUser]
@OwnerID int,
@RoleID int,
@StatusID int,
@SubscriberNumber nvarchar(32),
@LoginStatusID int,
@IsDemo bit,
@IsPeer bit,
@ -4325,6 +4336,7 @@ INSERT INTO Users
OwnerID,
RoleID,
StatusID,
SubscriberNumber,
LoginStatusID,
Created,
Changed,
@ -4355,6 +4367,7 @@ VALUES
@OwnerID,
@RoleID,
@StatusID,
@SubscriberNumber,
@LoginStatusID,
GetDate(),
GetDate(),
@ -4403,6 +4416,7 @@ AS
U.UserID,
U.RoleID,
U.StatusID,
U.SubscriberNumber,
U.LoginStatusId,
U.FailedLogins,
U.OwnerID,
@ -4459,6 +4473,7 @@ AS
U.UserID,
U.RoleID,
U.StatusID,
U.SubscriberNumber,
U.LoginStatusId,
U.FailedLogins,
U.OwnerID,
@ -4513,6 +4528,7 @@ AS
U.UserID,
U.RoleID,
U.StatusID,
U.SubscriberNumber,
U.LoginStatusId,
U.FailedLogins,
U.OwnerID,
@ -4564,6 +4580,7 @@ AS
U.UserID,
U.RoleID,
U.StatusID,
U.SubscriberNumber,
U.LoginStatusId,
U.FailedLogins,
U.OwnerID,
@ -4659,6 +4676,7 @@ SELECT
U.UserID,
U.RoleID,
U.StatusID,
U.SubscriberNumber,
U.LoginStatusId,
U.FailedLogins,
U.OwnerID,
@ -4710,6 +4728,7 @@ SELECT
U.UserID,
U.RoleID,
U.StatusID,
U.SubscriberNumber,
U.LoginStatusId,
U.FailedLogins,
U.OwnerID,
@ -4756,6 +4775,7 @@ SELECT
U.UserID,
U.RoleID,
U.StatusID,
U.SubscriberNumber,
U.LoginStatusId,
U.FailedLogins,
U.OwnerID,
@ -4807,6 +4827,7 @@ SELECT
U.UserID,
U.RoleID,
U.StatusID,
U.SubscriberNumber,
U.LoginStatusId,
U.FailedLogins,
U.OwnerID,
@ -4901,6 +4922,7 @@ SELECT
U.UserID,
U.RoleID,
U.StatusID,
U.SubscriberNumber,
U.LoginStatusId,
U.FailedLogins,
U.OwnerID,
@ -4947,6 +4969,7 @@ ALTER PROCEDURE [dbo].[UpdateUser]
@UserID int,
@RoleID int,
@StatusID int,
@SubscriberNumber nvarchar(32),
@LoginStatusId int,
@IsDemo bit,
@IsPeer bit,
@ -4987,6 +5010,7 @@ AS
UPDATE Users SET
RoleID = @RoleID,
StatusID = @StatusID,
SubscriberNumber = @SubscriberNumber,
LoginStatusId = @LoginStatusId,
Changed = GetDate(),
IsDemo = @IsDemo,

View file

@ -68,6 +68,7 @@ namespace WebsitePanel.EnterpriseServer
private bool htmlMail;
private string companyName;
private bool ecommerceEnabled;
private string subscriberNumber;
/// <summary>
@ -295,6 +296,14 @@ namespace WebsitePanel.EnterpriseServer
set { this.ecommerceEnabled = value; }
}
public string SubscriberNumber
{
get { return this.subscriberNumber; }
set { this.subscriberNumber = value; }
}
public string AdditionalParams { get; set; }
public List<UserVlan> Vlans

View file

@ -199,7 +199,7 @@ namespace WebsitePanel.EnterpriseServer
new SqlParameter("@Username", username));
}
public static int AddUser(int actorId, int ownerId, int roleId, int statusId, int loginStatusId, bool isDemo,
public static int AddUser(int actorId, int ownerId, int roleId, int statusId, string subscriberNumber, int loginStatusId, bool isDemo,
bool isPeer, string comments, string username, string password,
string firstName, string lastName, string email, string secondaryEmail,
string address, string city, string country, string state, string zip,
@ -217,6 +217,7 @@ namespace WebsitePanel.EnterpriseServer
new SqlParameter("@OwnerID", ownerId),
new SqlParameter("@RoleID", roleId),
new SqlParameter("@StatusId", statusId),
new SqlParameter("@SubscriberNumber", subscriberNumber),
new SqlParameter("@LoginStatusId", loginStatusId),
new SqlParameter("@IsDemo", isDemo),
new SqlParameter("@IsPeer", isPeer),
@ -243,7 +244,7 @@ namespace WebsitePanel.EnterpriseServer
return Convert.ToInt32(prmUserId.Value);
}
public static void UpdateUser(int actorId, int userId, int roleId, int statusId, int loginStatusId, bool isDemo,
public static void UpdateUser(int actorId, int userId, int roleId, int statusId, string subscriberNumber, int loginStatusId, bool isDemo,
bool isPeer, string comments, string firstName, string lastName, string email, string secondaryEmail,
string address, string city, string country, string state, string zip,
string primaryPhone, string secondaryPhone, string fax, string instantMessenger, bool htmlMail,
@ -255,6 +256,7 @@ namespace WebsitePanel.EnterpriseServer
new SqlParameter("@ActorId", actorId),
new SqlParameter("@RoleID", roleId),
new SqlParameter("@StatusId", statusId),
new SqlParameter("@SubscriberNumber", subscriberNumber),
new SqlParameter("@LoginStatusId", loginStatusId),
new SqlParameter("@UserID", userId),
new SqlParameter("@IsDemo", isDemo),

View file

@ -418,6 +418,7 @@ namespace WebsitePanel.EnterpriseServer
user.OwnerId,
user.RoleId,
user.StatusId,
user.SubscriberNumber,
user.LoginStatusId,
user.IsDemo,
user.IsPeer,
@ -562,6 +563,7 @@ namespace WebsitePanel.EnterpriseServer
user.UserId,
user.RoleId,
user.StatusId,
user.SubscriberNumber,
user.LoginStatusId,
user.IsDemo,
user.IsPeer,

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="lblReseller.Text" xml:space="preserve">
<value>Host:</value>
@ -150,4 +150,7 @@
<data name="StatusHeader.Text" xml:space="preserve">
<value>Status</value>
</data>
<data name="locSubscriberNumber.Text" xml:space="preserve">
<value>Subscriber Number:</value>
</data>
</root>

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="btnCancel.Text" xml:space="preserve">
<value>Cancel</value>
@ -159,6 +159,9 @@
<data name="lblSecondaryEmail.Text" xml:space="preserve">
<value>Secondary E-Mail:</value>
</data>
<data name="lblSubscriberNumber.Text" xml:space="preserve">
<value>Subscriber Number:</value>
</data>
<data name="lblUsername.Text" xml:space="preserve">
<value>User name:</value>
</data>

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="btnCancel.Text" xml:space="preserve">
<value>Cancel</value>
@ -201,4 +201,7 @@
<data name="usernameValidator.Text" xml:space="preserve">
<value>*</value>
</data>
<data name="lblSubscriberNumber" xml:space="preserve">
<value>Subscriber Number:</value>
</data>
</root>

View file

@ -32,6 +32,14 @@
<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 +52,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>

View file

@ -85,6 +85,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();
}
protected void gvContacts_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "DeleteItem")

View file

@ -93,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>

View file

@ -32,6 +32,14 @@
<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 +52,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>

View file

@ -112,5 +112,18 @@ 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();
}
}
}

View file

@ -93,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>

View file

@ -31,6 +31,16 @@
</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>
@ -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="40%"></ItemStyle>

View file

@ -127,5 +127,18 @@ 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();
}
}
}

View file

@ -84,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>

View file

@ -34,6 +34,14 @@
</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>
@ -48,7 +56,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>
<ItemTemplate>

View file

@ -197,5 +197,17 @@ namespace WebsitePanel.Portal.HostedSolution
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();
}
}
}

View file

@ -84,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>

View file

@ -31,6 +31,14 @@
</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>
@ -44,7 +52,7 @@
<asp:GridView ID="gvUsers" runat="server" AutoGenerateColumns="False" EnableViewState="true"
Width="100%" DataSourceID="odsAccountsPaged" EmptyDataText="gvUsers" CssSelectorClass="NormalGridView"
meta:resourcekey="gvUsers" AllowPaging="true" AllowSorting="true" OnRowCommand="gvUsers_RowCommand">
meta:resourcekey="gvUsers" AllowPaging="true" AllowSorting="true" OnRowCommand="gvUsers_RowCommand" PageSize="20">
<Columns>
<asp:TemplateField HeaderText="gvUsersDisplayName" meta:resourcekey="gvUsersDisplayName"
SortExpression="DisplayName">

View file

@ -96,5 +96,17 @@ namespace WebsitePanel.Portal.Lync
}
}
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
gvUsers.PageSize = Convert.ToInt16(ddlPageSize.SelectedValue);
// rebind grid
gvUsers.DataBind();
// bind stats
BindStats();
}
}
}

View file

@ -1,33 +1,4 @@
// 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.
//
@ -113,6 +84,15 @@ namespace WebsitePanel.Portal.Lync {
/// </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>

View file

@ -13,6 +13,10 @@
<td class="SubHead" style="white-space:nowrap;"><asp:Localize ID="locFullName" runat="server" meta:resourcekey="locFullName" Text="Name:"/></td>
<td class="Normal"><asp:Literal ID="litFullName" runat="server"></asp:Literal></td>
</tr>
<tr>
<td class="SubHead"><asp:Localize ID="locSubscriberNumber" runat="server" meta:resourcekey="locSubscriberNumber" Text="Subscriber Number:"/></td>
<td class="Normal"><asp:Literal ID="litSubscriberNumber" runat="server"></asp:Literal></td>
</tr>
<tr>
<td class="SubHead"><asp:Localize ID="locEmail" runat="server" meta:resourcekey="locEmail" Text="E-mail:"/></td>
<td class="Normal"><asp:HyperLink ID="lnkEmail" runat="server"></asp:HyperLink></td>

View file

@ -61,6 +61,7 @@ namespace WebsitePanel.Portal
// bind account details
litUsername.Text = user.Username;
litFullName.Text = Utils.EllipsisString(user.FirstName + " " + user.LastName, 25);
litSubscriberNumber.Text = Server.HtmlDecode(user.SubscriberNumber);
litRole.Text = PanelFormatter.GetUserRoleName(user.RoleId);
litCreated.Text = user.Created.ToString();
litUpdated.Text = user.Changed.ToString();

View file

@ -1,40 +1,258 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.42
//
// 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 {
public partial class UserAccountDetails {
protected System.Web.UI.WebControls.Image imgUser;
protected System.Web.UI.WebControls.Image imgAdmin;
protected System.Web.UI.WebControls.Image imgReseller;
protected System.Web.UI.WebControls.Literal litUsername;
protected System.Web.UI.WebControls.Localize locFullName;
protected System.Web.UI.WebControls.Literal litFullName;
protected System.Web.UI.WebControls.Localize locEmail;
protected System.Web.UI.WebControls.HyperLink lnkEmail;
protected System.Web.UI.WebControls.Localize locRole;
protected System.Web.UI.WebControls.Literal litRole;
protected System.Web.UI.WebControls.Localize locCreated;
protected System.Web.UI.WebControls.Literal litCreated;
protected System.Web.UI.WebControls.Localize locUpdated;
protected System.Web.UI.WebControls.Literal litUpdated;
protected System.Web.UI.WebControls.HyperLink lnkSummaryLetter;
protected System.Web.UI.WebControls.HyperLink lnkEditAccountDetails;
protected System.Web.UI.WebControls.HyperLink lnkChangePassword;
protected System.Web.UI.WebControls.HyperLink lnkDelete;
protected WebsitePanel.Portal.CollapsiblePanel StatusHeader;
protected System.Web.UI.WebControls.Panel StatusPanel;
protected System.Web.UI.WebControls.Literal litStatus;
protected System.Web.UI.HtmlControls.HtmlGenericControl StatusBlock;
protected System.Web.UI.WebControls.ImageButton cmdActive;
protected System.Web.UI.WebControls.ImageButton cmdSuspend;
protected System.Web.UI.WebControls.ImageButton cmdCancel;
/// <summary>
/// imgUser 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.Image imgUser;
/// <summary>
/// imgAdmin 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.Image imgAdmin;
/// <summary>
/// imgReseller 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.Image imgReseller;
/// <summary>
/// litUsername 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.Literal litUsername;
/// <summary>
/// locFullName 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 locFullName;
/// <summary>
/// litFullName 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.Literal litFullName;
/// <summary>
/// locSubscriberNumber 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 locSubscriberNumber;
/// <summary>
/// litSubscriberNumber 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.Literal litSubscriberNumber;
/// <summary>
/// locEmail 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 locEmail;
/// <summary>
/// lnkEmail 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.HyperLink lnkEmail;
/// <summary>
/// locRole 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 locRole;
/// <summary>
/// litRole 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.Literal litRole;
/// <summary>
/// locCreated 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 locCreated;
/// <summary>
/// litCreated 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.Literal litCreated;
/// <summary>
/// locUpdated 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 locUpdated;
/// <summary>
/// litUpdated 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.Literal litUpdated;
/// <summary>
/// lnkSummaryLetter 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.HyperLink lnkSummaryLetter;
/// <summary>
/// lnkEditAccountDetails 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.HyperLink lnkEditAccountDetails;
/// <summary>
/// lnkChangePassword 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.HyperLink lnkChangePassword;
/// <summary>
/// lnkDelete 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.HyperLink lnkDelete;
/// <summary>
/// StatusHeader control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel StatusHeader;
/// <summary>
/// StatusPanel 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.Panel StatusPanel;
/// <summary>
/// litStatus 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.Literal litStatus;
/// <summary>
/// StatusBlock control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl StatusBlock;
/// <summary>
/// cmdActive 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.ImageButton cmdActive;
/// <summary>
/// cmdSuspend 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.ImageButton cmdSuspend;
/// <summary>
/// cmdCancel 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.ImageButton cmdCancel;
}
}

View file

@ -35,6 +35,16 @@
ControlToValidate="txtLastName"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="SubHead">
<asp:Label ID="lblSubscriberNumber" runat="server" meta:resourcekey="lblSubscriberNumber" Text="Subscriber Number:"></asp:Label>
</td>
<td class="NormalBold">
<asp:TextBox id="txtSubscriberNumber" runat="server" CssClass="NormalTextBox"></asp:TextBox>
</td>
</tr>
<tr>
<td class="SubHead">
<asp:Label ID="lblEmail" runat="server" meta:resourcekey="lblEmail" Text="E-mail:"></asp:Label>

View file

@ -77,6 +77,7 @@ namespace WebsitePanel.Portal
// account info
txtFirstName.Text = Server.HtmlDecode(user.FirstName);
txtLastName.Text = Server.HtmlDecode(user.LastName);
txtSubscriberNumber.Text = Server.HtmlDecode(user.SubscriberNumber);
txtEmail.Text = user.Email;
txtSecondaryEmail.Text = user.SecondaryEmail;
ddlMailFormat.SelectedIndex = user.HtmlMail ? 1 : 0;
@ -128,6 +129,7 @@ namespace WebsitePanel.Portal
// account info
user.FirstName = Server.HtmlEncode(txtFirstName.Text);
user.LastName = Server.HtmlEncode(txtLastName.Text);
user.SubscriberNumber = Server.HtmlEncode(txtSubscriberNumber.Text);
user.Email = txtEmail.Text;
user.SecondaryEmail = txtSecondaryEmail.Text;
user.HtmlMail = ddlMailFormat.SelectedIndex == 1;

View file

@ -1,31 +1,3 @@
// 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.
@ -130,6 +102,24 @@ namespace WebsitePanel.Portal {
/// </remarks>
protected global::System.Web.UI.WebControls.RequiredFieldValidator lastNameValidator;
/// <summary>
/// lblSubscriberNumber 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.Label lblSubscriberNumber;
/// <summary>
/// txtSubscriberNumber 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 txtSubscriberNumber;
/// <summary>
/// lblEmail control.
/// </summary>

View file

@ -52,6 +52,16 @@
Display="Dynamic" ControlToValidate="txtLastName"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="SubHead">
<asp:Label ID="lblSubscriberNumber" runat="server" meta:resourcekey="lblSubscriberNumber" Text="Subscriber Number:"></asp:Label>
</td>
<td class="NormalBold">
<asp:TextBox ID="txtSubscriberNumber" runat="server" CssClass="NormalTextBox"></asp:TextBox>
</td>
</tr>
<tr>
<td class="SubHead">
<asp:Label ID="lblEmail" runat="server" meta:resourcekey="lblEmail" Text="E-mail:"></asp:Label>

View file

@ -93,6 +93,7 @@ namespace WebsitePanel.Portal
// account info
user.FirstName = txtFirstName.Text;
user.LastName = txtLastName.Text;
user.SubscriberNumber = txtSubscriberNumber.Text;
user.Email = txtEmail.Text;
user.SecondaryEmail = txtSecondaryEmail.Text;
user.HtmlMail = ddlMailFormat.SelectedIndex == 1;

View file

@ -1,10 +1,9 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.1434
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
@ -130,6 +129,24 @@ namespace WebsitePanel.Portal {
/// </remarks>
protected global::System.Web.UI.WebControls.RequiredFieldValidator lastNameValidator;
/// <summary>
/// lblSubscriberNumber 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.Label lblSubscriberNumber;
/// <summary>
/// txtSubscriberNumber 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 txtSubscriberNumber;
/// <summary>
/// lblEmail control.
/// </summary>