Teacher/AddZhScore.aspx.cs
(开头部分) 4KB这里只显示每个文件的开头 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;
public partial class AddZhScore : System.Web.UI.Page
{
Alert alert = new Alert();
data data = new data();
data mydata = new data();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DropDownList3.DataSource = mydata.GetDataReader("select a.* from student a inner join SelectCourse b on b.Stuid=a.xuehao where courseid in(select id from course where teacherID='" + Session["id"].ToString() + "')");
DropDownList3.DataTextField = "xuehao";
DropDownList3.DataValueField = "username";
DropDownList3.DataBind();
string geshu = data.ReturnSql("select count(*) from StScore where StXueHao='" + DropDownList3.SelectedValue + "'");
SqlDataReader dr1 = data.GetDataReader("select sum(Score) as zScore from StScore where StXueHao='" + DropDownList3.SelectedValue + "' ");
if (!string.IsNullOrEmpty(Request.QueryString["xuehao"]))
{
SqlDataReader dr = data.GetDataReader("select * from StZHScore where StXueHao='" + Request.QueryString["xuehao"].ToString() + "' ");
if (dr.Read())
{
TextBox1.Text = dr["PDScore"].ToString();
TextBox2.Text = dr["XXScore"].ToString();
TextBox3.Text = dr["FJScore"].ToString();
TextBox4.Text = dr["IsChk"].ToString();
double a = float.Parse(TextBox1.Text) + float.Parse(TextBox3.Text) + float.Parse(TextBox2.Text) ;
TextBox5.Text = a.ToString("0");
LinkButton1.Text = "修改";
}
else
{
}
}
}
}
protected void LinkButton1_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(Request.QueryString["xuehao"]))
{
string bj = null;
SqlDataReader drs = data.GetDataReader("select * from Teacher where xuehao='" + DropDownList3.SelectedValue + "'");
if (drs.Read())
后面还有 48 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读 AI
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
