活动页面添加参赛作品瀑布流
[PumpkinHouse.git] / PumpkinHouseWeb / Admin / UserManagement.aspx.cs
blob227079c2631a3641310a18340fc7340e597a1ef0
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Web;
5 using System.Web.UI;
6 using System.Web.UI.WebControls;
7 using PumpkinHouseDatabase;
9 namespace PumpkinHouse.Admin
11 public partial class UserManagement : System.Web.UI.Page
13 protected void Page_Load(object sender, EventArgs e)
15 if (!IsPostBack)
17 using (DataUtils utils = new DataUtils(false))
19 lblUserCount.Text = utils.FindUsers().Count().ToString();
24 private void FilterUser()
26 string name = txtUsername.Text.Trim();
27 if (!string.IsNullOrEmpty(name))
29 SqlDataSource1.FilterExpression = "Nick_Name = '" + name + "'";
30 GridView1.DataBind();
34 protected void OnUpdating(object sender, GridViewUpdateEventArgs e)
36 FilterUser();
39 protected void OnDateChanged(object sender, EventArgs e)
41 FilterUser();
45 protected void PageIndexChanged(object sender, EventArgs e)
47 FilterUser();
51 protected void Sorted(object sender, EventArgs e)
53 FilterUser();
57 protected void OnEditing(object sender, GridViewEditEventArgs e)
59 FilterUser();
62 protected void btnSearchUser_Click(object sender, EventArgs e)
64 FilterUser();