XKsystem/edit.aspx.cs
(完整代码) 1KBusing Moodels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace XKsystem
{
public partial class edit : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
TextBox2.Text = Session["name"].ToString();
TextBox1.Text = Session["ID"].ToString();
Session.Remove("name");
Session.Remove("ID");
}
}
protected void Button1_Click(object sender, EventArgs e)
{
int id = int.Parse(TextBox1.Text);
user u = new user();
u.Ystudent1= DropDownList1.Text;
u.Ystudent2 = DropDownList2.Text;
u.Ystudent3 = DropDownList3.Text;
u.Ystudent4 = DropDownList4.Text;
u.Ystudent5 = DropDownList5.Text;
u.XID = id;
bool br = BLL.Class1.yyyyy(u);
if (br)
{
Response.Write("<SCRIPT>alert('更改成功')</SCRIPT>");
}
else
{
Response.Write("<SCRIPT>alert('更改失败!')</SCRIPT>");
}
}
protected void Button2_Click(object sender, EventArgs e)
{
Session["name"] = TextBox2.Text;
Session["ID"] = TextBox1.Text;
Response.Redirect("ycourse_selection.aspx");
}
}
}
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
