HyperLesson/Teacher/MyStudent.aspx.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using BLL;
using Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace HyperLesson.Teacher
{
public partial class MyStudent : System.Web.UI.Page
{
//绑定数据方法
void Bind()
{
this.Gridview2.DataSource = LessonManager.SelStu((Session["userinfo"] as teacher).TeacherNum);
DataBind();
}
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Bind();
}
}
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
int i;
for (i = 0; i <= Gridview2.Rows.Count; i++)
{
//首先判断是否是数据行
if (e.Row.RowType == DataControlRowType.DataRow)
{
//当鼠标停留时更改背景色
e.Row.Attributes.Add("onmouseover", "c=this.style.backgroundColor;this.style.backgroundColor='skyblue'");
//当鼠标移开时还原背景色
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=c");
}
}
}
//分页
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
this.Gridview2.PageIndex = e.NewPageIndex;
Bind();
}
//刷新
protected void Button4_Click(object sender, EventArgs e)
{
Response.Write("<script>location.href='MyStudent.aspx';</script>");
}
//点击跳转页数的功能
protected void Turn_Click(object sender, EventArgs e)
{
if (((TextBox)Gridview2.BottomPagerRow.FindControl("txtGoPage")).Text == "")
{
后面还有 45 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。