admin/insert_taoti.aspx.cs
(开头部分) 2KB这里只显示每个文件的开头 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;
public partial class admin_insert_taoti : System.Web.UI.Page
{
DataCode dataconn = new DataCode();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
dataconn.DownList(DropDownList1, "select * from tb_Profession", "Name", "id");
GetDropDownList();
}
this.Label1.Visible = false;
}
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
GetDropDownList();
}
public void GetDropDownList()
{
//调用ecDropDownList方法,绑定考试专业信息
dataconn.DownList(DropDownList2, "select * from tb_Lesson where ofProfession='"
+ DropDownList1.SelectedValue.ToString() + "'", "Name", "id");
dataconn.DownList(DropDownList3, "select a.*,b.ofProfession from tb_TaoTi as a join tb_Lesson as b on a.LessonID=b.ID where a.LessonID='"
+ DropDownList2.SelectedValue.ToString() + "' and b.ofProfession='"
+ DropDownList1.SelectedValue.ToString() + "'", "Name", "id");
}
protected void DropDownList2_SelectedIndexChanged(object sender, EventArgs e)
{
dataconn.DownList(DropDownList3, "select * from tb_TaoTi where LessonID='" + DropDownList2.SelectedValue.ToString() + "'", "Name", "id");
}
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
Session["drop1"] = DropDownList1.Text;
Session["drop2"] = DropDownList2.Text;
Session["drop3"] = DropDownList3.Text;
if (this.DropDownList2.Text == "")
{
//this.Label3.Text = "请选择考试课程";
this.Label2.Visible = true;
return;
}
if (this.DropDownList3.Text == "")
{
//this.Label5.Text = "请先添加考试试题!";
this.Label1.Visible = true;
后面还有 11 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。