Student_Main.aspx.cs
(开头部分) 1KB这里只显示每个文件的开头 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;
public partial class Student_Main : WebPage
{
protected void Page_Load(object sender, EventArgs e)
{
this.ValidateStudent();
if (!this.IsPostBack)
{
this.lblStudentID.Text = this.eStudentID;
this.initForm();
}
}
protected void btnOK_Click(object sender, EventArgs e)
{
StudentMgr mgr = new StudentMgr();
Student student = new Student();
student.StudentID = int.Parse(this.eStudentID);
student.StudentName = this.txtStudentName.Text;
student.Sex = this.lstSex.SelectedValue;
if (this.txtPassword1.Text != "")
{
student.Password = this.txtPassword1.Text;
}
mgr.UpdateStudent(student, 0);
this.SendMessage("资料更改成功");
}
#region 窗体内部函数
/// <summary>
/// 初始化页面信息
/// </summary>
private void initForm()
{
this.lblStudentID.Text = this.eStudentID;
StudentMgr mgr = new StudentMgr();
Student student = mgr.GetStudent(this.lblStudentID.Text);
if (mgr.GetStudent(student.StudentID).StudentID != 0)
{
this.txtStudentName.Text = student.StudentName;
this.lstSex.Items.FindByValue(student.Sex).Selected = true;
}
else
{
this.SendMessage("没有找到该信息");
this.btnOK.Enabled = false;
}
}
#endregion
后面还有 1 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。