HyperLesson/Student/Lesson-S.aspx.cs
(开头部分) 8KB这里只显示每个文件的开头 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
{
public partial class Lesson_S : System.Web.UI.Page
{
private void Bind()
{
GridView1.DataSource = LessonManager.getCategoryList();
GridView1.DataBind();
}
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Bind();
if (Session["userinfo"] != null)
{
int StudentNum = (Session["userinfo"]as student).StudentNum;
LessonSelect ls = LessonSelectManager.getSelect(StudentNum);
this.nowMax.Text = ls.UserSelect.ToString();
}
}
}
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
int i;
for (i = 0; i <= GridView1.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.GridView1.PageIndex = e.NewPageIndex;
Bind();
}
//刷新
protected void Button4_Click(object sender, EventArgs e)
{
Response.Redirect("Lesson-S.aspx");
}
后面还有 146 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。