netQT/zxText.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.Data.SqlClient;
using DBUtility;
using CommonLib;
public partial class zxText : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
SqlHelper.BindGridview(GridView1, SqlHelper.ConnectionStringLocalTransaction, CommandType.Text, "select *from T_Exams where ChapterId='"+Request.QueryString["id"].ToString()+"'", null);
}
}
protected void Button1_Click(object sender, EventArgs e)
{
SqlConnection conn = new DBCon().getCon();
SqlCommand cmd = new SqlCommand();
cmd.Connection = conn;
cmd.CommandText = "select ExamAns from T_Exams";
SqlDataAdapter adp= new SqlDataAdapter();
adp.SelectCommand = cmd;
DataSet ds = new DataSet();
adp.Fill(ds, "T_Exams");
DataTable datatable = ds.Tables["T_Exams"];
int c = 0;
int m=0;
for (int a = 0; a < GridView1.Rows.Count; a++)
{
RadioButtonList rbl = (RadioButtonList)(GridView1.Rows[a].FindControl("RadioButtonList1"));
Label lb = (Label)(GridView1.Rows[a].FindControl("Label6"));
Label lb1 = (Label)(GridView1.Rows[a].FindControl("Label7"));
Label lb2 = (Label)(GridView1.Rows[a].FindControl("Label8"));
if ( rbl!= null && rbl.SelectedValue != "")
{
string answer = datatable.Rows[a]["ExamAns"].ToString().Trim();
if (rbl.SelectedValue.ToString().Trim() == answer)
{
c = c + 1;
lb.Text = "回答正确";
m = m + 2;
ViewState.Add("m",m);
lb1.Text = "每题二分";
rbl.SelectedIndex = -1;
}
else
后面还有 20 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。