Admin/XsList.aspx.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.IO;
public partial class Admin_XsList : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
//调用函数
initDg();
}
}
private void initDg()
{
//绑定学生列表
this.GridView1.DataSource = db.GetData("SELECT * FROM dbo.学生 INNER JOIN dbo.班级 ON dbo.学生.班级代码 = dbo.班级.班级代码");
this.GridView1.DataBind();
}
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
string idKey = this.GridView1.DataKeys[Convert.ToInt32(e.CommandArgument)]["学号"].ToString();
if (e.CommandName == "Mod")
{
//传递修改的标志 跳转页面
Response.Redirect("XsEdit.aspx?ID=" + idKey);
}
else if (e.CommandName == "Del")
{
if (db.GetData("select * from 床位分配 where 学号='" + idKey + "'").Rows.Count > 0)
{
Page.RegisterClientScriptBlock("onload", "<script>alert('学号存在信息');</script>");
return;
}
if (db.GetData("select * from 班级交费 where 学号='" + idKey + "'").Rows.Count > 0)
{
Page.RegisterClientScriptBlock("onload", "<script>alert('学号存在信息');</script>");
return;
}
//删除指定路径下边的图片文件
string DPath;
if (Server.MapPath("").Substring(Server.MapPath("").Length - 1, 1) == @"\")
{
DPath = Server.MapPath("");
}
else
后面还有 20 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。