XDF/Teacher/MyCourse.aspx.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace XDF.Teacher
{
public partial class MyCourse : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "CourseInfo")
{
int rowIndex = Convert.ToInt32(e.CommandArgument);
rowIndex = rowIndex - GridView1.PageIndex * GridView1.PageSize;
string courseid = GridView1.Rows[rowIndex].Cells[0].Text;
Session["CourseID"] = courseid;
Response.Redirect("~/Teacher/CourseInfo.aspx");
GridView1.DataBind();
}
if (e.CommandName == "Student")
{
int rowIndex = Convert.ToInt32(e.CommandArgument);
rowIndex = rowIndex - GridView1.PageIndex * GridView1.PageSize;
string courseid = GridView1.Rows[rowIndex].Cells[0].Text;
Session["CourseID"] = courseid;
Response.Redirect("~/Teacher/Student.aspx");
GridView1.DataBind();
}
}
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
string auditState = DataBinder.Eval(e.Row.DataItem, "AuditState").ToString();
if (auditState == "未审核")
{
e.Row.BackColor = System.Drawing.Color.MistyRose;
}
e.Row.Attributes.Add("onmouseover", "currentcolor=this.style.backgroundColor;this.style.backgroundColor='Wheat';");
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=currentcolor;");
}
}
后面还有 16 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。