<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
GridView1.Load += new EventHandler(GridView1_Load);
GridView1.PreRender += new EventHandler(GridView1_PreRender);
GridView1.PageIndexChanging += new GridViewPageEventHandler(GridView1_PageIndexChanging);
GridView1.RowEditing += new GridViewEditEventHandler(GridView1_RowEditing);
GridView1.RowCancelingEdit += new GridViewCancelEditEventHandler(GridView1_RowCancelingEdit);
GridView1.RowUpdating += new GridViewUpdateEventHandler(GridView1_RowUpdating);
GridView1.RowDeleting += new GridViewDeleteEventHandler(GridView1_RowDeleting);
}
protected void GridView1_Load(object sender, EventArgs e)
{
Dao.GridViewUser(GridView1);
}
protected void GridView1_PreRender(object sender, EventArgs e)
{
Dao.BangDingUser(GridView1);
}
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
GridView1.PageIndex = e.NewPageIndex;
}
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
GridView1.EditIndex = e.NewEditIndex;
}
protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
Dao.UpdateUser(GridView1, e.RowIndex);
}
protected void GridView1_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
{
GridView1.EditIndex = -1;
}
protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
Dao.DeleteUser(GridView1, e.RowIndex);
}
</script>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<asp:GridView ID="GridView1" runat="server">
</asp:GridView>
</asp:Content>