Admin/jiaoshiManage.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;
using System.Data;
public partial class Admin_jiaoshiManage : System.Web.UI.Page
{
SqlHelper data = new SqlHelper();
Alert alert = new Alert();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
getinfo();
}
}
protected void dlinfo_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
string ID = dlinfo.DataKeys[e.RowIndex].Values[0].ToString();
try
{
data.RunSql("delete from jiaoshi where id='" + ID + "'");
alert.Alertjs("删除成功");
dlinfo.EditIndex = -1;
getinfo();
}
catch
{
alert.Alertjs("删除失败");
}
}
private void getinfo()
{
try
{
string strsql = "select a.*,b.zhuanyeName from jiaoshi a left join zhuanye b on a.zhuanyeID=b.ID where 1>0";
if (this.TextBox1.Text != "")
{
strsql += " and yonghuming='" + this.TextBox1.Text + "'";
}
if (this.TextBox2.Text != "")
{
strsql += " and xingming='" + this.TextBox2.Text + "'";
}
strsql += " order by yonghuming,xingming";
DataSet ds = data.GetDs(strsql, "ds");
dlinfo.DataSource = ds.Tables[0];
dlinfo.DataBind();
}
catch
{
}
}
protected void dlinfo_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
dlinfo.PageIndex = e.NewPageIndex;
getinfo();
后面还有 23 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
