admin/kaosheng_chengji.aspx.cs
(开头部分) 7KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
using System.Data.OleDb;
using System.IO;
public partial class admin_kaosheng_chengji : System.Web.UI.Page
{
DataCode dataconn = new DataCode();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
dataconn.formkey(gvExamResu, "select * from tb_StuResult ORDER BY res_Id DESC", "res_id");
InitData();
}
((ScriptManager)FindControl("ScriptManager1")).RegisterPostBackControl(ImageButton1);
//((ScriptManager)Master.FindControl("ScriptManager1")).RegisterPostBackControl(ImageButton1);
// ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "updateScript", "alert('对不起,账号和密码错误');", true);
}
protected void InitData()
{
SqlConnection con = dataconn.getcon();
con.Open();
//SqlCommand cmd = new SqlCommand("SELECT * FROM tb_StuResult", con);
//SqlDataReader sdr = cmd.ExecuteReader();
SqlDataAdapter zw = new SqlDataAdapter("SELECT * FROM tb_StuResult", con);
//DataSet ds = score.dataconn.dataos("SELECT res_id,stu_id,which_lesson,taotiname,res_total,res_subdate FROM tb_StuResult");
DataSet ds = new DataSet();
zw.Fill(ds);
gvExamResu.DataSource = ds;
gvExamResu.DataBind();
//string comText = "SELECT res_id,stu_id,which_lesson,taotiname,res_total,res_subdate FROM tb_StuResult";
//SqlConnection con = this.dataconn.getcon();
//con.Open();
//SqlCommand strcom = new SqlCommand(comText, con);
//DataSet ds = strcom.ToString();
////// Score score = new Score();;
////DataSet ds = new DataSet();
////ds ="SELECT * FROM tb_StuResult");
//gvExamResu.DataSource = ds;
//gvExamResu.DataBind();
}
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
//获取GridView控件当前索引
gvExamResu.PageIndex = e.NewPageIndex;
//调用公共类中的ecadabind方法,绑定查询信息
后面还有 111 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。