Teachter/AddScore.aspx.cs
(开头部分) 3KB这里只显示每个文件的开头 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 Admin_AddCourseInfo : System.Web.UI.Page
{
public string DownPath;
SqlHelper data = new SqlHelper();
public string zuoyedananPath;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DropDownList2.DataSource = data.GetDataReader("select * from dbo.CourseInfo where Tid='" + Session["adminid"].ToString() + "' ");
DropDownList2.DataTextField = "Name";
DropDownList2.DataValueField = "id";
DropDownList2.DataBind();
DropDownList1.DataSource = data.GetDataReader("select * from ClassInfo ");
DropDownList1.DataTextField = "Name";
DropDownList1.DataValueField = "id";
DropDownList1.DataBind();
GridView3.DataSource = data.GetDataReader("select * from Student where ClassId='" + DropDownList1.SelectedValue + "'");
GridView3.DataBind();
}
}
protected void Button1_Click(object sender, EventArgs e)
{
foreach (GridViewRow dr1 in GridView3.Rows)
{
string name = ((Label)dr1.FindControl("Label11")).Text.Trim();
string id = ((Label)dr1.FindControl("Labelid")).Text.Trim();
string fenshu = ((TextBox)dr1.FindControl("TextBox2")).Text.Trim();
string ZuoYeScore = ((TextBox)dr1.FindControl("ZuoYeScore")).Text.Trim();
string ShiYanScore = ((TextBox)dr1.FindControl("ShiYanScore")).Text.Trim();
SqlDataReader dr = data.GetDataReader("select * from dbo.Score where CourseId='" + DropDownList2.SelectedValue + "' and StId='" + id + "' and XueQi='" + DropDownList3.SelectedValue + "' ");
if (dr.Read())
{
Alert.AlertAndRedirect("该学生本课程同一个学期已经添加过了不能重复添加成绩", "AddScore.aspx");
}
else
{
后面还有 24 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
