homeadminStuddetial.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 homeadminStuddetial : System.Web.UI.Page
{
SqlConnection conn;
SqlCommand cmd, cmd1,cmd2;
SqlDataReader dr, dr1;
protected void Page_Load(object sender, EventArgs e)
{
if(Session["homeAdminName"]==null)
{
Response.Redirect("login.aspx");
}
else
{
string studNo=Convert.ToString(Request.QueryString["studNo"]);
conn = sqldata.createCon();
conn.Open();
string sql = "select studName,Sex,birthday,enterDate,shenfen from student where studNo='"+studNo+"'";
cmd = new SqlCommand(sql, conn);
dr = cmd.ExecuteReader();
if(dr.Read())
{
this.studNo.Text=studNo.ToString();
this.studName.Text = dr["studName"].ToString();
this.ddlSex.SelectedValue = dr["Sex"].ToString();
this.birthday.Text = dr["birthday"].ToString();
this.enterDate.Text = dr["enterDate"].ToString();
this.ddlShenfen.SelectedValue = dr["shenfen"].ToString();
}
}
}
protected void OK_Click(object sender, EventArgs e)
{
string studNo = Convert.ToString(Request.QueryString["studNo"]);
string studName = this.studName.Text;
string Sex = this.ddlSex.SelectedValue;
string birthday = this.birthday.Text;
string enterDate = this.enterDate.Text;
string classID = this.ddlClass.SelectedValue;
string shenfen = this.ddlShenfen.SelectedValue;
conn = sqldata.createCon();
conn.Open();
int eareID = Convert.ToInt32(this.ddlEare.SelectedValue);
int floodID = Convert.ToInt32(this.ddlFlood.SelectedValue);
string homeNo = Convert.ToString(this.homeHao.Text);
string sql1 = "select homeID from (eare inner join flood on eare.eareID=flood.eareID)inner join home on flood.floodID=home.floodID and eare.eareID=@eareID and flood.floodID=@floodID and homeNo=@homeNo";
后面还有 32 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。