📄 mod_student_allinfo.aspx.cs
字号:
using System;
using System.Data;
using System.Data.SqlClient;
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 XTeamBBL;
using XTeamDBL;
public partial class jiaowu_sys_student_allinfo_set_mod_student_allinfo : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
bind_student_allinfo();
}
}
protected void bind_student_allinfo()
{
int student_allID = Convert.ToInt32(Request.QueryString["student_allID"].ToString());
string sql = "select * from student_allinfo where student_allID=" + student_allID;
SqlDataReader dr = DB.RunGetReader(sql);
if (dr.Read())
{
TBxtype.Text = dr["student_alltype"].ToString();
TBxyear.Text = dr["student_year"].ToString();
TBxterm.Text = dr["student_term"].ToString();
TBxcontent.Text = dr["student_allcontent"].ToString();
}
}
protected void Btnmod_Click(object sender, EventArgs e)
{
if (Page.IsValid)
{
int student_allID = Convert.ToInt32(Request.QueryString["student_allID"].ToString());
string type = TBxtype.Text;
string year = TBxyear.Text;
string term = TBxterm.Text;
string content = TBxcontent.Text;
student_all sa = new student_all(student_allID, type, content, year, term);
Boolean flag = student_all.mod_student_allinfo(sa);
if (flag) Response.Write("<script>alert('修改成功');</script>");
else Response.Write("<script>alert('修改失败');</script>");
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -